flash programming library (IAP) problem

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

flash programming library (IAP) problem

428 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kim-y on Tue Mar 31 22:10:53 MST 2015
Hello.

I have trouble with using the flash programming library (IAP).
I run it at the M0 core of LPC4357.
It seems there is no problem with using the library when I assigned the program data region to on-chip RAM.
However, when I assigned program data region to external SDRAM, the flash writing api fails with error number of 14.

the return value of "Chip_IAP_CopyRamToFlash()" is 14.
Other functions "Chip_IAP_PreSectorForReadWrite()" and "Chip_IAP_EraseSector()" returns no error.

I just add external SDRAM region (0x28000000)  in the "Memory configuration editor" of the "MCU Settings" and assigned it to the top of all other rams in the list.
(If I move one of on-chip RAMs to the top of the list, the library works with no problem.)

What is the problem?

Thank you.
Labels (1)
0 Kudos
3 Replies

350 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Thu Apr 02 01:59:06 MST 2015
AFAIK, the data to be programmed MUST be placed in on-chip SRAM. You cannot put it in external RAM.
0 Kudos

350 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kim-y on Wed Apr 01 23:26:07 MST 2015
Thank you for your reply.

It seems when I set the program data region to on-chip ram , coping the data from SDRAM to the flash.works. But if I changed program data region to SDRAM, it fails.
Do you think the difference is only the stack region?
If so, Just changing only the stack region may solve this problem??
(I do not know how to do it though..)
0 Kudos

350 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Tue Mar 31 22:19:44 MST 2015
In the 1700 series, to my certain knowledge, IAP 'copy ram to flash' only works from the  on-chip internal static ram.
I presume that this is also the case with the 4300 family.

It is probably documented somewhere. If not it should d*mn well be.

Mike
0 Kudos