6 days, 3 hours ago.

NXP LPC812 IAP Flash Page Writing

I am trying the Library and the program for IAP writing on LPC812 which works fine. I used Page Erase command which also worked well as shown in the example, however I didn't find Page Write command. LPC812 supports the Page Erase & Write both. Can you please guide to write pages of 64 bytes instead of writing the complete sector? By using Sector write I can write only the first page of 64 bytes by limiting the MEM_SIZE to 64. But I can't write the subsequent pages in the sector.

Comment on this question

2 Answers

19 hours, 19 minutes ago.

Is “the library” here?

If yes, I am going to contact Okano-san (library author).

Yes, the library and the sample code is released by Tedd OKANO. The Library is here and the sample code is here

posted by John Miller 14 Aug 2018
6 hours, 46 minutes ago.

Hi John,

Sorry for my response so slow / Thank you for using the IAP library.

I confirmed writing size can be the sector size (=1024 bytes).
Please find a program link below and give it a try.

Import programIAP_internal_flash_write_LPC812_sector_size_write

LPC812 sector size flash write sample code

This sample code is doing ...

  1. Blank check for sectors from 12 to 15
  2. If those are not blank, erase
  3. 1K byte writing for each sector 12, 13, 14 and 15.
  4. Memory dump of sector 12, 13, 14 and 15 on serial terminal.

Give me a shout if you have any problem or any question :)

Hi Watarai-san,
Thank you for letting me know the library got a question.

To post an answer, please log in.