LPC2648 IAP

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

LPC2648 IAP

604 Views
utsavkumar
Contributor II

Working on dumping a bin file read from a USB drive into the LPC2648 flash. IAP erase and write functions are working and data is properly getting written in the Flash with following configurations.

// Clock
CCLKCFG = 0x05;

// Disable PLL
PLLCON = 0x00;
PLLFEED = 0xAA; // Feed Sequence Part #1
PLLFEED = 0x55; // Feed Sequence Part #2

// User flash mode
MEMMAP = 0x01; // User Flash Mode

But after the flash update is done, I have to soft reset the  controller since the PLL has been disabled for flash writing and no other peripherals are working post this. Moreover, with this approach, I need to copy whole file data from the USB drive to a global buffer, which will work until the file data is not too much and we don't out of RAM.

I want to have a design like we can read data from USB drive in multiple reads and write into the flash in multiple writes which will give advantage of not going out of RAM. But with the current configuration, this cycle of reading a chunk of data from USB and writing into the flash is not working.

How to achieve this? 

Labels (5)
0 Kudos
1 Reply

412 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Kumar,

You could take a look at the following links, that provide information regarding IAP implementation:

https://os.mbed.com/users/okano/notebook/iap-in-application-programming-internal-flash-eras/

http://www.keil.com/forum/17860/iap-flash-programming-put-program-to-ram/

https://community.nxp.com/thread/430530

 

Hope this will be useful for you.

Best regards!

/Carlos

0 Kudos