cancel
Showing results for 
Search instead for 
Did you mean: 

Execution of code in SRAM of STM32F405

JPark.18
Associate

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

1 REPLY 1

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.

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