AnsweredAssumed Answered

STM32F071 IAP: How to jump back from main app to bootloader?

Question asked by Shemmans.Jeffrey on Apr 3, 2017
Latest reply on Apr 4, 2017 by Shemmans.Jeffrey

Hi,

 

I am using the STM32F071C8 on one of my projects and it is of at-most importance that I get the IAP working. Jumping from my bootloader code to my main app code is not a problem. I copy the vector table to memory and remap to use the SRAM with the __HAL_SYSCFG_REMAPMEMORY_SRAM function. Obviously tweaking my linker files.

 

I do not want to call HAL_NVIC_SystemReset from my main app because I want to preserve the state of my IO pins, while programming the new bin file, so I was thinking of jumping back to my bootloader. While it seems that I can jump back it does not seem to be stable. Sometimes I get systick issues or sometimes it is just running "weird". I tried to to the copy to memory and remap the vector table again and even tried to call __HAL_SYSCFG_REMAPMEMORY_FLASH without the copy but to no avail.

 

Any ideas what I can try to get this "jumping" up and down up and running?

Jeff

Outcomes