cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f407 eeprom emulation

Pedram
Associate III
Posted on February 04, 2018 at 16:10

Hello friends

I use STM32F4-Discovery stm32f407 eeprom emulation example

But the program will only run once after each Download

For the second time, jump to hard fault

How to solve this problem?

Thanks
3 REPLIES 3
Posted on February 04, 2018 at 16:51

Instrument the hard fault so you can more clearly determine the cause and faulting instructions.

Make sure the FLASH region used by the EEPROM emulation does not coincide with the regions your code is placed into. ie check Linker Script or Scatter File settings, and make sure you're not erasing a portion of your active code.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 04, 2018 at 17:18

Thank you 

How can I Reserve Sector 2 and Sector 3?

Posted on February 04, 2018 at 17:29

Your linker script, or scatter file, would need to describe multiple load regions with a hole between them

ie

0x08000000..0x08007FFF (32KB) and 0x08010000..0x080FFFFF (1MB-64KB)

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