Re-programming lpc1227

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

Re-programming lpc1227

833 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yeefoowang on Thu Jun 25 11:31:50 MST 2015
The lpc1227 is on a board with external 256K-byte eeprom via SPI and it communicates to the main CPU board via SPI as slave most of the time. The main CPU will put the new upgrade code in the external eeprom and lpc1227 will take over the SPI control and move the code to its flash. Here are some issues I need to resolve:

(1) Do I need to convert the .axf file into binary before putting it into eeprom?

(2) My idea is to put the code (E2F) that moves the content in eeprom to on-chip flash in RAM. The E2F code will call the IAP functions in ROM to erase the flash and update it with new code. Is it the correct way?

(3) First of all, I need to copy a 4K-byte section from SPI eeprom to RAM. Then, program the flash 128-byte at a time (with prepare and row-write).

(4) From user manual, it mentions the IAP functions use the first 32 bytes of RAM. So, how do I place the E2F code after these 32-byte in RAM?

(5) Are there things I overlook?

I do need the help and light from all of you.

Thanks.
Labels (1)
0 Kudos
Reply
2 Replies

771 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yeefoowang on Fri Jun 26 15:05:06 MST 2015
For item (4), it is my misunderstanding.
The top of RAM means the highest address of RAM.
So, the E2F code will be placed at the lowest portion of the RAM.
The upgrade image (4K at a time) will be copied from SPI serial EEPROM  and placed between the E2F code and the top of the RAM,
I think I have all my questions figured out,
0 Kudos
Reply

771 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yeefoowang on Thu Jun 25 13:19:12 MST 2015
I figured out the answer of item (1).
I do need to convert the axf file to bin file.
Using the "Binary utilities->Create binary" option in LPCXpresso to create a binary file.
Then, in "Utilities->Open command prompt here", open a command prompt window.
Type in "checksum -p LPC1227 -d myProjectName.bin. The checksum word is added into the .bin file.
Without the checksum word, the bootloader will not start the application in LPC1227.
0 Kudos
Reply