STM32L433 IAP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-18 2:05 AM
Hi,
I have 2 partitions on the STM32L433cct6 :
- IAP (to upgrade via USB) : 0x08000000 - 0x0800C000
- Application : 0x0800C000 - 0x08040000
I have a function to jump to the application :
/* Jump to user application */
JumpAddress = *(__IO uint32_t*) (USBD_DFU_APP_DEFAULT_ADD + 4);
Jump_To_Application = (pFunction) JumpAddress;
/* Initialize user application's Stack Pointer */
__set_MSP(*(__IO uint32_t*) USBD_DFU_APP_DEFAULT_ADD);
Jump_To_Application();
But it doesn't work.
Do you have any ideas ?
Best regards
- Labels:
-
Bootloader
-
STM32L4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-18 4:18 AM
Use a debugger, follow​ the transfer of control.
Make sure SCB->VTOR​ gets set to the new address on the otherside.
Be aware of what interrupts are active, and what memory structures are used and there state.
Perhaps avoid reinitializing PLLs and clocks already in functional state.​
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
‎2022-03-18 5:34 AM
Hi,
Thank you for your reply.
I forgot to relocate the vector table... So I uncommented the following line :
#define USER_VECT_TAB_ADDRESS
I have another problem : when I place "Start_Application" function before "HAL_Init", it works fine. But, when I put the "Start_Application" function after "HAL_Init", it doesn't work.
Do you know why ?
Best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-21 1:26 AM
Hi,
Any ideas ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-23 4:32 AM
Hello @MMerc.1​,
Make sure to define the right offset of the vector table.
M Aymen
