LPC1225/321 flash programming problem

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

LPC1225/321 flash programming problem

796 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jgorsk on Fri Mar 22 05:57:47 MST 2013
I'm trying to do to do some flash programming/erasing on the LPC1225/321.

I follow the example from:
http://lpcware.com/content/forum/lpc1225-iap-erase-sector-and-page-erase-returns-busy
published by Daniel Widyanto.


I'm trying to erase and write to sector 16 (starting at address 0x0001 0000)

'iap_prepare_sector' function seems to be working but whenever I want to erase
sector 16 or program flash 'iap_erase_sector' and 'iap_copy_ram_to_flash' functions
stop responding.

'iap_copy_ram_to_flash' function is writing something to the selected location
in flash but not exactly what I wanted. 'iap_erase_sector' erases the written 4 bytes
but never returns control either.

Last 32 bytes of RAM are excluded from use by linker.

System clock is 24MHz and is properly detected by 'iap_init' function.

What can cause this?

Labels (1)
0 Kudos
Reply
1 Reply

739 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jgorsk on Sun Mar 24 09:51:32 MST 2013
Problem solved. Flash programming and erasing started working when I disabled interrupts.

BTW, information in table 287 in UM10441 suggests that not all the sectors contain the same number of pages. According to the table sectors 16-19 contain 5.5 pages each. Someone at NXP may want to check this.
0 Kudos
Reply