LPC5500 Flash over-programming

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

LPC5500 Flash over-programming

630件の閲覧回数
craigmcqueenir
Contributor IV

I understand the LPC5500 processors have Flash with ECC, with a 512 byte page size for erase and programming.

In the LPC55S6x/LPC55S2x User Manual, section 5.7.13 ECC, I found it says

Due to the presence of ECC, over-programming an already programmed word will likely result in inconsistent parity bits; for this reason, it is not allowed to program a memory word without erasing it first.

I'm interested to know if over-programming is practical, if an application ensures that it programs the Flash being careful to consider Flash ECC "memory word" boundaries.

  • What is the size of a Flash "memory word"?
  • Will the Flash storage operate correctly if a Flash page is programmed multiple times, with the following algorithm:
    • Read a Flash page (512 bytes) into RAM
    • Modify 0xFF bytes to some other data, ensuring that any such modified bytes are in a "memory word" that was previously all 0xFF.
    • Write the data back to the Flash page.
ラベル(1)
0 件の賞賛
5 返答(返信)

577件の閲覧回数
craigmcqueenir
Contributor IV

As for the Flash "word size", I found the following in the User Manual, section 5.6.2

When a register (STARTA, STOPA, DATAWx…) is said to contain an address, this is a physical word address inside the flash memory (that is, address 1 represents the second 128-bit word inside the flash memory, not the second byte in the first word). When a page address is required/returned, the 5 least significant bits of the address are don’t-care (a flash page contains 32 user-accessible words).

So a Flash word is 16 bytes. I found other text in this chapter that confirms that.

Section 5.7 describes how to erase and write the Flash using direct access to Flash controller registers (instead of via the Flash API in the boot ROM). It sounds as though this enables writing of individual Flash words.

Now, I'm curious to know if individual Flash words could be written using the boot ROM Flash API, or if it's necessary to do writes using the Flash controller registers.

0 件の賞賛

536件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @craigmcqueenir 

LPC556x/2x on-chip  flash program memory with flash accelerator and 512 byte
page erase and write.

 

BR

Alice

0 件の賞賛

611件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @craigmcqueenir 

Before program , erasing must be first. So if you want to over-programming, please erase first.

Other options you can test on your side. 

 

BR

Alice

0 件の賞賛

596件の閲覧回数
craigmcqueenir
Contributor IV

This answer is more technically ambiguous than I hoped.

0 件の賞賛

563件の閲覧回数
frank_m
Senior Contributor III

ECC protection is usually applied to the smallest programmable item size, which would be 32-bit in case of program Flash.
Though this is a guess - I am not affiliated with NXP, and thus have only access to publicly available information.

0 件の賞賛