Skip to main content
heveskar
Senior
November 3, 2022
Solved

EEPROM emulation hard fault

  • November 3, 2022
  • 1 reply
  • 2694 views

We have another problem with EEPROM emulation. We use STM32H723Z and store user configuration to flash as emulated EEPROM. I used driver from the H7 examples' directory as a basis.

When we write the configuration heavily, after few days, there occurrs an ECC error and Hard Fault is hit. As the original driver didn't anticipate this, I added a code that after reset tries to read all the addresses and when HardFault due to ECC is detected, erase the whole offending sector, therefore the configuration is lost.

Does anyone have any idea why the hard fault could happen? We will probably solve it by modifying our boards and using external EEPROM, but this is last resort to solve it this way. I think that there might be some bug in the driver but I cannot find it. I speculate that some of the writes can be interrupted for some reason?

Karel

This topic has been closed for replies.
Best answer by Pavel A.

and this one

1 reply

Technical Moderator
November 18, 2022

Hello @heveskar​,

Please review this post, it may help you on this issue.

Imen

"When your question is answered, please close this topic by clicking ""Accept as Solution"".ThanksImen"
Pavel A.
Pavel A.Best answer
Super User
November 19, 2022
heveskar
heveskarAuthor
Senior
November 21, 2022

Thank you @Pavel A.​, I think this will solve the issue. Shame that I could't find that discussion myself :(