diff --git a/Tools/AP_Bootloader/bl_protocol.cpp b/Tools/AP_Bootloader/bl_protocol.cpp index 3b8add3169..56c619b802 100644 --- a/Tools/AP_Bootloader/bl_protocol.cpp +++ b/Tools/AP_Bootloader/bl_protocol.cpp @@ -291,13 +291,18 @@ jump_to_app() #elif defined(STM32G4) rccDisableAPB1R1(~0); rccDisableAPB1R2(~0); +#elif defined(STM32L4) + rccDisableAPB1R1(~0); + rccDisableAPB1R2(~0); #else rccDisableAPB1(~0); #endif rccDisableAPB2(~0); #if HAL_USE_SERIAL_USB == TRUE rccResetOTG_FS(); +#if defined(rccResetOTG_HS) rccResetOTG_HS(); +#endif #endif // disable all interrupt sources diff --git a/Tools/AP_Bootloader/board_types.txt b/Tools/AP_Bootloader/board_types.txt index 5c4a26c58a..d792def1fc 100644 --- a/Tools/AP_Bootloader/board_types.txt +++ b/Tools/AP_Bootloader/board_types.txt @@ -133,6 +133,7 @@ AP_HW_HEREID 1043 AP_HW_BirdCANdy 1044 AP_HW_SKYSTARSF405DJI 1045 AP_HW_HITEC_AIRSPEED 1046 +AP_HW_NucleoL496 1047 AP_HW_CUBEORANGE_PERIPH 1400 AP_HW_CUBEBLACK_PERIPH 1401 diff --git a/Tools/AP_Bootloader/mcu_l4.h b/Tools/AP_Bootloader/mcu_l4.h new file mode 100644 index 0000000000..eed3509743 --- /dev/null +++ b/Tools/AP_Bootloader/mcu_l4.h @@ -0,0 +1,16 @@ +/* + MCU tables for STM32L4 + */ + +#if defined(STM32L4) + +#define STM32_UNKNOWN 0 + +mcu_des_t mcu_descriptions[] = { + { STM32_UNKNOWN, "STM32L4??", '?'}, +}; + +const mcu_rev_t silicon_revs[] = { +}; + +#endif // STM32L4 diff --git a/Tools/AP_Bootloader/support.cpp b/Tools/AP_Bootloader/support.cpp index 936a3c5c70..877c988c91 100644 --- a/Tools/AP_Bootloader/support.cpp +++ b/Tools/AP_Bootloader/support.cpp @@ -17,6 +17,7 @@ #include "mcu_f7.h" #include "mcu_h7.h" #include "mcu_g4.h" +#include "mcu_l4.h" // optional uprintf() code for debug // #define BOOTLOADER_DEBUG SD1