This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ST STM32 STM32F2 boot loader bootloader custom STM32F207ZGT6

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.

0