Question
Retaining GPIO Pin state when jumping from main application to bootloader
Hi all,
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. How to achieve it. Is there anyway to achieve it. Please help me to resolve this issue.
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
