LPC5504 Smaller FLASH usable memory size

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC5504 Smaller FLASH usable memory size

Jump to solution
695 Views
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?

Labels (1)
0 Kudos
Reply
1 Solution
667 Views
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

View solution in original post

0 Kudos
Reply
4 Replies
680 Views
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 Kudos
Reply
673 Views
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 Kudos
Reply
668 Views
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 Kudos
Reply
653 Views
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 Kudos
Reply