cancel
Showing results for 
Search instead for 
Did you mean: 

Custom bootloader based on AN3990 firmware updgrade via USB key

kweisi50
Associate II

Hi,

I followed the AN3990 and managed to update the code supplied to use HAL and get it working correctly on our custom board. But in my readings on custom bootloaders in the forums, it mentions things like disabling interrupts before jumping to the program location in flash. The example code with the application code did not do the latter, so for the sake of good practices and reliability, what are correct actions before and after the jump to the code in flash.

Thanks in advance.

MikeZ

2 REPLIES 2

The RAM utilization in the app will be different in the loader, so peripheral instance structures and IRQ and callback functions will likely malfunction unless efforts are made to pass this data.

You should turn off interrupting sources prior to transfer, and reestablish them within the new operational context.​

You can establish a contract both side, for example pass data or determine which side should establish clocks and external memory interfaces, then not repeat that initialization.​

The expectations are not STM32 specific.​ Think through the logic and consequences.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
kweisi50
Associate II

Hi Clive1,

Thanks.

MikeZ