2021-01-27 08:23 PM
I am using a bootloader as STM32F405.
Before Jump_to_application(), I want to keep the GPIO status in API, but what should I do?
After the GPIO PIN is output "high" from the current boot firmware, it runs the jump_to_application().
The parameters are initialized at API run, and the GPIO PIN is output to Low.
Is there any way to keep the GPIO PIN "High"?
The code is as follows.
JumpAddress = *(__IO uint32_t*) (APPLICATION_ADDRESS + 4);
Jump_To_Application = (pFunction) JumpAddress;
HAL_RCC_DeInit();
HAL_DeInit();
__set_MSP(*(__IO uint32_t*) (APPLICATION_ADDRESS));
Jump_To_Application();
2021-01-27 11:06 PM
Find a different entry point
2021-01-28 03:50 AM
Only external Pulls will guarantee.
2024-07-17 02:13 AM - edited 2024-07-17 02:14 AM
Can you elaborate how to resolve this issue am using STM32L010R8T6 device how to retain gpio state when jumping from main application to bootloader section. i want to retain one gpio pin state from main application to bootloader.
Here is the code for jumping application to bootloader.
void BootLoader_jumpToApp(void)
{
volatile uint32_t *appVT;
// main app's vector table
if (g_eeprom->active_image == FW_IMG_B)
{
// Bank B
appVT = (volatile uint32_t *)UPGRADE_APP_BASE;
LOG_INFO(MAIN_LOG, "Main APP : Jump to App B %x", appVT);
HAL_Delay(TICKS_2MS);
g_BootLoaderJumpFlag = JUMP_TO_MAIN_APPLICATION;
HAL_NVIC_SystemReset();
while(1);
}
else
{
// Bank A
appVT = (volatile uint32_t *)FLASH_BASE;
LOG_INFO(MAIN_LOG, "Main APP : Jump to App A %x", appVT);
HAL_Delay(TICKS_2MS);
g_BootLoaderJumpFlag = JUMP_TO_BOOTLOADER;
HAL_NVIC_SystemReset();
while(1);
}
Thanks,
Meimurugan
2024-07-17 03:16 AM