2018-07-31 09:46 PM
Hi, I am using STM32F405.
I use the Flash Sector as follows.
- Sector 0: IAP
- Secotr 2: Data Save
- Sector 5: Main Application
Main Save the data in APP. And Main_APP erases Sector2 before writing the data.
While erasing Sector2 from Main_APP, I noticed that Tiemr_Interrupt does not occur.
Checking the datasheet shows that you can not read during Flash Erase / Write.
So I want to copy the Main_APP code to SRAM. What should I do?
Best Regards
2018-08-01 01:14 AM
Will the entire application fit?
Typically one would place a subset into RAM, including the Vector Table (at the front and by setting SCB->VTOR), IRQ Handlers, and any subroutines/libraries those functions call.
I will note that the F405 can't run code out of the CCM RAM at 0x10000000
Your loader (IAP) code could copy the app to RAM and transfer control. You want the linker to build the app with the expectation it would operate in the 0x20000000 space.
You should make sure you understand how the processor functions, and how the linker works, and come up with a method to deliver the code to the IAP.