LPC5504 Smaller FLASH usable memory size

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

LPC5504 Smaller FLASH usable memory size

ソリューションへジャンプ
709件の閲覧回数
pejo
Contributor III

Hi there,

I'm using an LPC5504. According to its own configuration and data from API functions the size is 128KB. While trying to store some data at the end of the memory map it turns out that I cannot write successfully in the last 2KB (in the range 1F800-1FFFF). Well, I can write on the memory without error but when I restart  the board the data are just not there.

Is there a reason for this? Is it because of the space needed for spare memory in case some pages are not working anymore?

ラベル(1)
0 件の賞賛
返信
1 解決策
681件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @pejo 

 

Please create a simple flash project by referring to the SDK demo "flashiap" for the LPC55S06. Then, check whether it can work with the address range from 0x1F800 to 0x1FFFF.

 

BR

Alice

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
694件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @pejo 

Could you please show your project code, as well as your testing steps and results? I will help you check. Thank you.

 

BR

Alice

0 件の賞賛
返信
687件の閲覧回数
pejo
Contributor III

Hi Alice,

unfortunately I can't share the whole code without taking the time to remove proprietary code but I can share the procedure that you can use for test it:

  • General initialization:
    • Disable All Interrupts
      Init Boot clocks
      Init timers
  • Flash initialization
    • LPC55S0XFLASH_Init
      VERSION1_FLASH_API_TREE->flash_init
  • Check values on one page (512 (0x200) Bytes) at address 0x1F800
    • LPC55S0XFLASH_Read
  • Flash fixed char (0x1A) on one page (512 (0x200) Bytes) at address 0x1F800
    • LPC55S0XFLASH_Erase
      LPC55S0XFLASH_Program
      LPC55S0XFLASH_VerifyProgram
  • Check values on one page (512 (0x200) Bytes) at address 0x1F800 contain 0x1A:
    • LPC55S0XFLASH_Read
  • Restart and check values --> Those values are not there anymore (it is a mix of zeros and 0xFF)

If I do the same at address 0x1F600 it works properly

0 件の賞賛
返信
682件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @pejo 

 

Please create a simple flash project by referring to the SDK demo "flashiap" for the LPC55S06. Then, check whether it can work with the address range from 0x1F800 to 0x1FFFF.

 

BR

Alice

0 件の賞賛
返信
667件の閲覧回数
pejo
Contributor III

Hi Alice,

I've found where the problem was, thanks to the example you mentioned. Just so that you know in the debug build I had a different linker script which reserved the section from 0x1F800 (sigh..). So, as you see it was all my mistake.

Thank you again and best regards

0 件の賞賛
返信