STM32F207
Hi ,
I am coding for STM32F207 for first time so I do not understand Why is STM32F207 processor loading 16 bit thumb instruction where as the Function pointer is 32-bit . is this ((void (*)(void))g_ulTransferAddress)() wrong ?
As per our Project requirement we have 4 different sections of 1MB Flash. All the 4 Different sections of 1MB flash has 4 independent projects.
1. CRC Verifier Project 0x0800_0000 to 0x0800_3FFF
2. Decision Maker Project 0x0800_4000 to 0x0800_7FFF
3. Bootloader Project 0x0800_8000 to 0x0801_FFFF
4. Runtime or Scheduler Project 0x0802_0000 to 0x0810_0000
Decision Marker should be loaded from the CRC verifier for this I am using following code
g_ulTransferAddress=0x0800_4004 ; // RUN Decision maker
((void (*)(void))g_ulTransferAddress)(); // Execute Code with Function Pointer
This is causing an exception as the STM32F207 is switching to 16 bit Thumb instruction mode when the Function Pointer is Invoked .
Where as it should be 32 bit Function pointer to the Decision Maker .
Attached Image shows the same address location of 32 bit function pointer being interpreted as 16 bit thumb instruction .
0x08004000
0x08004004
0x08004008


