Skip to main content
Pedram
Associate III
February 4, 2018
Question

stm32f407 eeprom emulation

  • February 4, 2018
  • 3 replies
  • 1208 views
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
    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    February 4, 2018
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Pedram
    PedramAuthor
    Associate III
    February 4, 2018
    Posted on February 04, 2018 at 17:18

    Thank you 

    How can I Reserve Sector 2 and Sector 3?

    Tesla DeLorean
    Guru
    February 4, 2018
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..