darrylring commented on PR #20144: URL: https://github.com/apache/nuttx/pull/20144#issuecomment-5671432436
The STM32H5 will allow you to re-write the same word in OTP but the second write will corrupt the data and ECC. Data corruption is bad, of course, but the ECC corruption (by default) triggers NMIs. The ways to prevent this are: 1. Don't do it. 2. Don't do it (and use the MPU to ensure that the OTP is read-only) 3. Lock the entire 64 byte block and prevent future writes completely. I do like the idea of checking for 0xFFFF. But then you also hit ECC NMIs by default. The block read/write is definitely the safest approach, but pretty much incompatible with being able to write individual words. It's incompatible with eFuse write, too. Though eFuse read could still be implemented? We were originally intending to write individual words, and so can't really make use of this driver as is. I'm rethinking that, though. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
