2021-10-21 04:45 AM
You can't reprogram flash double words on the stm32g4 even if the were programmed to 0xFFFF'FFFF'FFFF'FFFF.
Does anyone know if it is possible to check if the 0xFFFF'FFFF'FFFF'FFFF value I read from a specific flash position has previously been programmed or is the result of an erase (without trying to program it)?
2021-10-21 04:56 AM
Look at the reference manual: ```Note: For a virgin data: 0xFF FFFF FFFF FFFF FFFF, one error is detected and corrected but two
errors detection is not supported.``` So if you programm, the ECC gets set correctly resulting in some ECC bit set to 0. On the next programm, this ECC bit will interfere.