Skip to main content
Associate
May 29, 2024
Question

Flash write fails

  • May 29, 2024
  • 2 replies
  • 958 views

I am trying to test flash integrity function.

In order to cause an error I am changing the flash using STM32CubeProgrammer.

After changing the data in the flash the firmware can no longer write to the same page until a  page erase. I only try to change bits that are set change from 1 to 0)

Why is this happening? 

2 replies

Tesla DeLorean
Guru
May 29, 2024

What part?

ST Allows for a write-once per flash line, per erase cycle. It doesn't allow for repeated knock-down of ONE bits until ZERO, and this relates to the use of ECC/HAMMING used to protect the integrity of the memory.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
YaepAuthor
Associate
May 29, 2024

I divided each page (4k bytes)  into 16 sub-pages, where if an error is detected in a sub-page the next sub-page is used, so the address I am trying to access is 256 bytes from the address I change with the programmer