cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0x series ECCD error after flash memory read

danielbathtub
Associate III

Hi, 

I want to read flash memory to determine whether or not valid data is in the flash. 

And if this data can be used in my application. 

in my code, if I deference a Flash memory address I immediately get a ECCD error. 

Why is this happening? 

 

Thanks, 

1 ACCEPTED SOLUTION

Accepted Solutions
Saket_Om
ST Employee

Hello @danielbathtub 

 

If an ECCD error occurs and is not properly managed, it can lead to the program entering an NMI interrupt when trying to read the memory at a specific address. The ECCD error indicates that the Flash memory at the read address contains corrupted data that could not be corrected by the ECC mechanism, which is designed to correct single-bit errors but not multiple-bit errors.

The recommended approach to handle an ECCD error includes checking the ECCD bit in the FLASH_ECCR register and taking appropriate actions such as erasing and reprogramming the affected Flash sector.

If your question is answered, please close this topic by clicking "Accept as Solution".

Thanks
Omar

View solution in original post

1 REPLY 1
Saket_Om
ST Employee

Hello @danielbathtub 

 

If an ECCD error occurs and is not properly managed, it can lead to the program entering an NMI interrupt when trying to read the memory at a specific address. The ECCD error indicates that the Flash memory at the read address contains corrupted data that could not be corrected by the ECC mechanism, which is designed to correct single-bit errors but not multiple-bit errors.

The recommended approach to handle an ECCD error includes checking the ECCD bit in the FLASH_ECCR register and taking appropriate actions such as erasing and reprogramming the affected Flash sector.

If your question is answered, please close this topic by clicking "Accept as Solution".

Thanks
Omar