Keil Logo

Limitations When Using Internal Flash

Using Internal Flash Memory of an ARM device for code execution and file storage is the same as using an external flash which stores the code and files. However, there are differences when comparing internal flash memory with external flash devices:

  • In most cases, it is possible to program internal flash memory only with IAP function calls. IAP functions are factory preprogrammed into the boot sector of Internal Flash Memory.
  • Another limitation is that flash memory may be programmed only a complete page at a time. A page starts at the page boundary address. A page size for NXP LPC2xxx devices is 512/1024/.. bytes. So to program only one byte requires reading a complete page from Internal Flash Memory into the RAM buffer, modifying the particular byte, and then writing back a complete page. This is handled by the ProgramPage function.
  • IAP function calls also require an assembly interface function for C-function calls. This is why an IAP.s assembly module must be included for NXP Internal Flash programming algorithms.

There are preconfigured Flash Algorithms for NXP devices in the \Keil\ARM\RL\FlashFS\Flash folder. You may use them as a reference for your own driver.

Note

  • If the device uses an Error Correction Code (ECC) to correct single bit flash errors, then RL-FlashFS will not work. Such devices are, for example, NXP LPC213x and LPC214x devices.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.