cancel
Showing results for 
Search instead for 
Did you mean: 

EEPROM emulation hard fault

heveskar
Senior

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

1 ACCEPTED SOLUTION

Accepted Solutions
4 REPLIES 4
Imen.D
ST Employee

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".
Thanks
Imen

and this one

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

@Imen DAHMEN​ Thanks, I found that one, but I think I am programming data of correct length (I am using ST's EEPROM emulation so this shouldn't be a problem).