Bootloader not jumping to the application address
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-15 5:45 AM
I am trying to read bin file from SD card and writing into flash memory . and trying to jump the application location.
My observation :
It is successfully writing into Flash memory.
May be it is stuck with SDIO irq.
Please can you suggest me, what could be the issue. I attached my code.
- Labels:
-
Bootloader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-15 5:54 AM
Turn OFF the SDIO, UART, SysTick interrupts at their source rather than disable all interrupts.
Make sure the application code relocates the Vector Table address properly, that code in SystemInit() points to the right location.
Use a debugger, review code execution, and processor/peripheral register settings.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-15 11:33 PM
Thank you for good suggestion. I was doing the mistake on Application code , system init is setting back vector table to 0x08000000UL, Now i changed to 0x0800C000UL (my application address).
I added these two line in my main code.
HAL_UART_Abort(&huart6);
hsd.Instance->POWER = 0x00000000U;
Bootloader_JumpToApplication();
But still have some issue. it is not jumping to the location.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-15 11:48 PM
In Debug, When tried it is stack in SDMMC_GetCmdResp2(SDIO_TypeDef *SDIOx) function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-17 5:18 AM
uint32_t JumpAddress = *(__IO uint32_t*)(APP_ADDRESS + 4);
pFunction Jump = (pFunction)JumpAddress;
HAL_RCC_DeInit();
HAL_DeInit();
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
#if (SET_VECTOR_TABLE)
SCB->VTOR = APP_ADDRESS;
#endif
__set_MSP(*(__IO uint32_t*)APP_ADDRESS);
Jump();
It is jumping to some other location.
