IAP flash write

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

IAP flash write

1,037 Views
ianbenton
Senior Contributor I

Just wondering about the sequence to write to the flash. . . 

I am going to write the area between 0xA000 and 0xFFFF, 512 bytes at a time (as in one block off a SD card).

First I prepared the whole area of flash for erase (CMD 50), erased it (CMD 51),

prepared it again (CMD 50) and then wrote to it (CMD 52).

After the first 512 bytes, it returns with error 9 (not prepared).

Does that mean that I should run the prepare command EACH time I run the write command?

Is the prepare command required for the erase operation?

Labels (2)
0 Kudos
Reply
1 Reply

877 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello Ian,

I've checked the IAP Commands for both of the LPCs that were tagged on this post.To be extra sure of the information can you please provide the part number of the LPC you are using. 

However I believe the IAP commands are the same through out. You mention that you are erasing using CMD 51 and writing CMD 52. Can you please verify  these commands as they should be erase CMD 52 and write CMD 51. 

In addition, you should always prepare the sector prior an erase or write command. 

You can find more information in this application note.

Best Regards,

Sabina

0 Kudos
Reply