cancel
Showing results for 
Search instead for 
Did you mean: 

What should I do to maintain GPIO PIN status during bootloader execution?

sbaek.11
Associate II

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();

4 REPLIES 4

Find a different entry point​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Uwe Bonnes
Principal III

Only external Pulls will guarantee.

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