Skip to main content
heveskar
Senior
November 3, 2022
Solved

EEPROM emulation hard fault

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.
Pavel A.
Pavel A.Best answer
November 19, 2022

4 replies

ST Technical Moderator
November 18, 2022

Hello @heveskar​,

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

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Pavel A.
Pavel A.Best answer
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 :(