Skip to main content
Explorer
December 15, 2025
Question

STM32L073 NOTZEROERR when writing to Flash

  • December 15, 2025
  • 1 reply
  • 85 views

Hello! I need help. STM32L073RZT6 MCU.

How can I write, for example, 2 times 8 Bytes into any second half-page of flash memory?
Every first page is recorded successfully and read successfully. For example, I write 8 Bytes of data to the beginning of the _writeBuf buffer (half page size) (fill the rest with zeros), erase the entire page of interest (*(__IO uint32_t *)_write_address = 0;), write _writeBuf to the first half page, the recording is successful. Write a next 8 bytes of data to _writeBuf after current 8 Bytes of data and I write it down in the first half page in the same way, it also goes well. With a similar operation, the first 8 Bytes are written to any second half page successfully, but when the next 8 Bytes are written to any second half page, the NOTZEROERR error occurs.

    This topic has been closed for replies.

    1 reply

    Super User
    December 15, 2025

    Writing to an address with a nonzero value will produce NOTZEROERR. Ensure you are not writing to the same address twice. Show a minimal working example that erases a page and then writes to it and produces the error you see.

    TDK_1-1765825237867.png

     

    KremenAuthor
    Explorer
    December 16, 2025

    Thank you very much! I understood.