AP_Bootloader: fixed use of OTG in peripheral bootloader

This commit is contained in:
Andrew Tridgell 2023-09-02 12:01:47 +10:00
parent efb4a98414
commit 2e0eef20d1
1 changed files with 5 additions and 1 deletions

View File

@ -240,6 +240,10 @@ do_jump(uint32_t stacktop, uint32_t entrypoint)
#define APP_START_ADDRESS (FLASH_LOAD_ADDRESS + (FLASH_BOOTLOADER_LOAD_KB + APP_START_OFFSET_KB)*1024U)
#endif
#if !defined(STM32_OTG2_IS_OTG1)
#define STM32_OTG2_IS_OTG1 0
#endif
void
jump_to_app()
{
@ -324,7 +328,7 @@ jump_to_app()
#endif
rccDisableAPB2(~0);
#if HAL_USE_SERIAL_USB == TRUE
#if !defined(STM32_OTG2_IS_OTG1)
#if !STM32_OTG2_IS_OTG1
rccResetOTG_FS();
#endif
#if defined(rccResetOTG_HS)