Skip to main content
Associate III
June 14, 2024
Solved

STM32G0x series ECCD error after flash memory read

  • June 14, 2024
  • 1 reply
  • 1022 views

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, 

This topic has been closed for replies.
Best answer by Saket_Om

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.

1 reply

Saket_OmBest answer
ST Technical Moderator
June 19, 2024

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.

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. Saket_Om