lpcware

LPC1225/321 flash programming problem

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
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?

Outcomes