diff --git a/Tools/AP_Bootloader/mcu_f4.h b/Tools/AP_Bootloader/mcu_f4.h new file mode 100644 index 0000000000..c3ebe061e1 --- /dev/null +++ b/Tools/AP_Bootloader/mcu_f4.h @@ -0,0 +1,41 @@ +/* + support tables for STM32F4 + */ + +#if defined(STM32F4) +/* magic numbers from reference manual */ +enum { + MCU_REV_STM32F4_REV_A = 0x1000, + MCU_REV_STM32F4_REV_Z = 0x1001, + MCU_REV_STM32F4_REV_Y = 0x1003, + MCU_REV_STM32F4_REV_1 = 0x1007, + MCU_REV_STM32F4_REV_3 = 0x2001 +}; + + +#define STM32_UNKNOWN 0 +#define STM32F40x_41x 0x413 +#define STM32F42x_43x 0x419 +#define STM32F42x_446xx 0x421 + +// The default CPU ID of STM32_UNKNOWN is 0 and is in offset 0 +// Before a rev is known it is set to ? +// There for new silicon will result in STM32F4..,? +const mcu_des_t mcu_descriptions[] = { + { STM32_UNKNOWN, "STM32F???", '?'}, + { STM32F40x_41x, "STM32F40x", '?'}, + { STM32F42x_43x, "STM32F42x", '?'}, + { STM32F42x_446xx, "STM32F446XX", '?'}, +}; + +const mcu_rev_t silicon_revs[] = { + {MCU_REV_STM32F4_REV_3, '3'}, /* Revision 3 */ + + {MCU_REV_STM32F4_REV_A, 'A'}, /* Revision A */ // FIRST_BAD_SILICON_OFFSET (place good ones above this line and update the FIRST_BAD_SILICON_OFFSET accordingly) + {MCU_REV_STM32F4_REV_Z, 'Z'}, /* Revision Z */ + {MCU_REV_STM32F4_REV_Y, 'Y'}, /* Revision Y */ + {MCU_REV_STM32F4_REV_1, '1'}, /* Revision 1 */ +}; + +#endif // STM32F4 + diff --git a/Tools/AP_Bootloader/mcu_f7.h b/Tools/AP_Bootloader/mcu_f7.h new file mode 100644 index 0000000000..e60f757ad8 --- /dev/null +++ b/Tools/AP_Bootloader/mcu_f7.h @@ -0,0 +1,30 @@ +/* + MCU tables for STM32F7 + */ + +#if defined(STM32F7) + +#define STM32_UNKNOWN 0 +#define STM32F74x_75x 0x449 +#define STM32F76x_77x 0x451 + +typedef enum mcu_rev_e { + MCU_REV_STM32F7_REV_A = 0x1000, + MCU_REV_STM32F7_REV_Z = 0x1001, +} mcu_rev_e; + +// The default CPU ID of STM32_UNKNOWN is 0 and is in offset 0 +// Before a rev is known it is set to ? +// There for new silicon will result in STM32F4..,? +mcu_des_t mcu_descriptions[] = { + { STM32_UNKNOWN, "STM32F??????", '?'}, + { STM32F74x_75x, "STM32F7[4|5]x", '?'}, + { STM32F76x_77x, "STM32F7[6|7]x", '?'}, +}; + +const mcu_rev_t silicon_revs[] = { + {MCU_REV_STM32F7_REV_A, 'A'}, /* Revision A */ + {MCU_REV_STM32F7_REV_Z, 'Z'}, /* Revision Z */ +}; + +#endif // STM32F7