LPC1549 (or LPC1500), How to use SDCard to program the LPC1549 when inserted.

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

LPC1549 (or LPC1500), How to use SDCard to program the LPC1549 when inserted.

736 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by riscy00 on Mon Jun 15 22:17:02 MST 2015
Hi

I'm looking for a way in using SDCard which contain binary file, when inserted automatically kick start the bootloader, take file from SDCard and program the LPC1549.

The question is how, is there demo code that done that.

What right material I should make a start? I have read on AN11555 so far.  My impression so far I have to write up custom bootloader that copy from FLASH into RAM and then load file from SDCard and write content into FLASH, possibly using IAP code. 

I seen article on LPC1700 and LPC2000, but could not find article for LPC15xx device.

Is there reason it cannot be done on LPC15xx lack something from LPC1700 or LP2000? (I can see ISP lack SPI interface).

R.
Labels (1)
0 Kudos
2 Replies

597 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Thu Jun 25 10:24:09 MST 2015
Hi,
Below example code may be helpful to interface SDCard using SPI/SSP
http://www.lpcware.com/content/nxpfile/an11070-accessing-sdcmmc-card-using-spissp-lpc1700

Yes, you can use IAP functions to flash image in the flash.
0 Kudos

597 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpc_bloke on Tue Jun 16 03:02:52 MST 2015
If you can control an SPI interface you can read and write to and SD card but it is not a simple task.  I did this a year or so back on another much simpler NXP micro controller.

I suggest you look here http://elm-chan.org/fsw/ff/00index_p.html this is not a simple receipt for an NXP process but more a generic way with a very simple file system interface.

There are a number of layers in the file system interface:
* FS top level open / read / write
* block mode interface to disk.
* SD card interface to send commands and read responses from SD card
* SPI interface to SD card
* GPIO control for insert detect / power control for SD / and SPI routing.

Good luck, there is a lot of debugging in your future.
0 Kudos