LPC5528 IAP (flash api) RAM usage

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

LPC5528 IAP (flash api) RAM usage

Jump to solution
1,224 Views
cgerlach
Contributor II

Hi,

we want to use the flash API (using fsl_iap.c) for a 2nd stage bootloader as well as to save some application data. It is not clear to me whether the functions in ROM (called by fsl_iap.c) use some ram (besides the stack).

Referring to UM11126 (Rev. 2.4) chapter 8.3.4.2:

"Below regions are reserved for bootloader use when the bootloader is running. The heap
and the BSS, RW section need to be reserved for the ROM API use before calling the
ROM APIs in user application (IAP scenario)."

The picture below this text indicates a RAM usage from 0x30000000 to 0x30005000 which would be the first 20k of RAM in secure access mode.

Does this only apply when the whole ROM bootloader is run (then the text above is misleading) or also when I do call the flash API (erase/program/verify) - which is normally called "IAP"? The latter case would imply that I must reserve the 20k of RAM and can not use them while doing some flash programming.

Regards

Clemens

1 Solution
1,071 Views
bressan
Contributor III

Here: https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-RAM-reservation-for-ROM-API-operations/m-...
was written:
"The Flash API in LPC55S6x won't need extra RAM for Stack. Only Secure ROM API need such RAM for stack purpose."

View solution in original post

4 Replies
1,072 Views
bressan
Contributor III

Here: https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-RAM-reservation-for-ROM-API-operations/m-...
was written:
"The Flash API in LPC55S6x won't need extra RAM for Stack. Only Secure ROM API need such RAM for stack purpose."

1,207 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @cgerlach,

It seems you're correct, the RAM regions are reserved for when the bootloader is running and when you call the flash API.

You could re-position code in that region after the functions are called, as an alternative.

Best regards,

Julián

0 Kudos
1,201 Views
cgerlach
Contributor II

Hi Julian,

thank you for the answer.

Sadly these are really bad news, as reserving 20k is really much when you just want so save some
bytes of configuration data (EEROM replacement) and are already short of RAM.

To me it seems the RAM range in the datasheet is mostly relevant for the whole bootloader and there
is just no precise RAM usage information for just the IAP calls.

Is it possible to get some more detailed information here?

Or some more information on how to do flash programming by using the flash controller (the UM hast not enough information on that IMHO),

Regards,

Clemens

1,180 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @cgerlach,

I'm sorry for the inconvenience, but that specific information is not available, as the memory space reserved is for the whole process.

For your second question, there is a file attached to the user manual called ROM_API which may be relevant to your problem, as it describes the usage and definitions of IAP APIs.

Capture ROM_APIs.PNG

Best regards, Julian

 

0 Kudos