cancel
Showing results for 
Search instead for 
Did you mean: 

FLASH ECC Codes Cause Bus Fault on STM32H743

jaakjensen
Associate III

Hello,

For a few months now I have been having issues with writing data to flash memory on the STM32H743ZIT6. Most of the time, everything works great and I am able to read the data from flash successfully, but every now and again, the flash memory gets corrupted somehow and ECC codes are thrown (both single and double), which causes my device to have a bus fault.

I am running the flash peripheral / AXI bus at 240Mhz and I have the flash wait states set to 4 WS (5 Flash clock cycles). I have followed all the guidelines related to the HW design and have the correct core capacitance on the VCAP pins. I write 256 bits of data to the flash memory approximately every 10 seconds to save the state of my device (of course I increment the write address after each write so that I'm not writing to the same position every time). When the sector is filled, it is then erased and then I start writing to the start of the sector. I also set the BOR bits to the highest voltage setting to try and prevent brown-out issues. I think these are most of the important settings you need to know.

Today while looking at my register settings in debug mode I noticed that the WRHIGHFREQ setting was set to 3 (aka 11) by default... I can't find anywhere in the HAL / code where this is done so it must be set automatically. The manual only lists valid settings for 0, 1, and 2 (see below). Can anyone tell me what the behavior is of the STM32H743ZIT6's flash module is when a setting of 3 is used for WRHIGHFREQ? Is it just invalid / undefined? Maybe this is my issue?

Does anyone have any ideas?

0693W00000StskjQAB.png

33 REPLIES 33

Hi @F.Belaid​,

this fix seems to be working for us too, thank you. Do you think same problem could happen on the STM32G4 family (namely STM32G473RBT)? We do not have any issues now, just asking preventively.

Hi @heveskar​,

Thank you for your feedback.

Honestly, I am not sure, if it is possible to predict this kind of issues. It would be better to test it. If facing any issues, please don't hesitate to share it.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!

@F.Belaid​ OK, thanks for quick response. If we'll discover anything I'll let you know!

Hello,

I am seeing something similar on a G4. We are seeing the ECCD being triggered which causes an NMI.
I couldnt find the RDSERR in the G4 TRM[RM440]. Is RDPERR same as WRPERR?

Is RDSERR not applicable in the case of G474?

 

JHari1_0-1687789339270.png