Hi, I am doing an application for LPC55S69 where I would like to erase/program/read flash memory. The problem is that I am not able to erase sector before programming it. After the calling erase function, that part of flash becomes inaccessible and cant be read. I tried with Segger tool and the same is happening in that case. Erase causes flash inaccessibility and even the reset or power cycle cant restore that flash to become accessible back. Th only way to make it accessible again is with weird combination of writing in this sector, reading it and resetting the device. But I couldn't find the pattern that would work in all cases.
On the picture in attachment you can see part of inaccessible flash above 0x0000'0600 below that I manage to manipulated flash with Segger tool (combination of reading writing and resetting) so now can be read.
I would really appreciate any helpful information. There is nothing in the errata regarding this subject.
FYI: am using iSystem winIDEA for debugging.
Thank you and best regards!
Hi, @ZhangJennie,
then the only possible way to check if the device is blank after erasing is with CMD_BLANK_CHECK command. After the write operation, the ECC updates and read via bus is possible.
Thanks that helped a lot.
Best regards,
JakaJ
Hi JakaJ
You are welcome.
Have a nice day,
Jun Zhang
HI @JakaJ
the erased FLASH state with code in runtime. NXP enhanced LPC55xx FLASH with ECC added. This means that there is now a functional block between the read entity (for example the CPU) and the FLASH itself. When erasing, both the erased FLASH and its ECC are set as 0. The reading can’t be successful if the erased memory and its ECC don’t match.
See this article:
Thanks,
Jun Zhang