When erasing sector of the flash memory, that part of the flash becomes inaccessible

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

When erasing sector of the flash memory, that part of the flash becomes inaccessible

2,204件の閲覧回数
JakaJ
Contributor I

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!

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

2,177件の閲覧回数
JakaJ
Contributor I

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

0 件の賞賛
返信

2,146件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi JakaJ

You are welcome.

Have a nice day,

Jun Zhang

0 件の賞賛
返信

2,187件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

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:

https://community.nxp.com/t5/LPC-Microcontrollers-Knowledge/LPC55xx-Erased-Memory-State-0-or-1/ta-p/...

Thanks,

Jun Zhang

0 件の賞賛
返信