How to use stm32l4 from IAP jump to bootloader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-22 6:53 AM
I have bootloader initial position 0x08000000 and IAP 0x08004000 now.
​
First, I form bootloader jump to IAP code and it works fine.
But my jump back to bootloader will stop.
​
Maybe I have a lot of IAP function enable.
So I want to ask, besides __disable_irq() close NVIC, and any other way to deinit other functions?
​
Because I use __disable_irq(),but it seem isn't effect.
when i back to bootloader code of GPIO inti funaction , it already haven't stop.
Solved! Go to Solution.
- Labels:
-
Bootloader
-
STM32L4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-22 2:13 PM
Please take a look at the following information:
ARM: How to write a bootloader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-22 7:38 AM
Understand that __disable_irq() has a different effect than actually disabling the interrupts in the peripherals which you have enabled.
You're going to need an __enable_irq() somewhere if you ever want to see them again.
The loader/app need to set SCB->VTOR appropriately.
You can't transfer control from within an IRQ Handler, or related Callback function. Similarly an RTOS using System/User execution contexts.
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-05-22 2:13 PM
Please take a look at the following information:
ARM: How to write a bootloader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-22 6:26 PM
Thank you, the problem has been solved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-23 6:31 AM
Good!
Please let us know how you fixed the issue, as this helps the community if someone runs into the same issue in the future.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-23 6:29 PM
I refer to the URL provided by Alex: How to write a bootloader
​
Before the jump,first you must Disable all enabled interrupts in NVIC.
code : NVIC->ICER[ 0~7 ] = 0xFFFFFFFF ;
​
After Disable SysTick and clear its exception pending bit, if it is used in the bootloader.
code : SysTick->CTRL = 0 ;
SCB->ICSR |= SCB_ICSR_PENDSTCLR_Msk ;
​
finally the user application into SCB->VTOR register.
This site has more detailed content.
If you are interested, you can refer to it.
THX.
​
​
