We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
STM32F20x custom bootloader
Hi Everyone!
I am writing a custom bootloader for STM32F207ZGT6. I divided the 1 Mb flash into 2 sections. The first one is 128 kbytes, my bootloader is loaded to this section. The second one is 896 kbytes, my main application is loaded here. I use the following code to the jump:
typedef void (*pFunction)(void); pFunction Jump_To_Application; uint32_t JumpAddress; . . . JumpAddress = 0x08020000 + 4; Jump_To_Application = (pFunction) JumpAddress; __set_MSP(0x20000000); Jump_To_Application();
I pasted the "+ 4" to the code because of endianness, but I may be wrong. My main application starts from 0x08020000. I set this in uVision. I ran to the following problem: When the Jump_To_Application() function is called, a HardFault is generated and its handler is called.
Anyone has a tip?
I am all ears.