This is the documentation for the latest (main) development branch of mcuxpresso sdk. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

pflash_swap

Overview

The flash_swap example shows how to use flash swap feature:

Running the demo

When the example runs successfully, you can see the similar information from the terminal as below.

PFLASH Swap example Start PFlash Information: Total Program Flash Size: xx KB, Hex: (xx) Total Program Flash Block Count: xx Program Flash Sector Size: xx KB, hex: (xx) Flash is xx Original swap indicator address: xx Current swap system status: xx Validating the backup example image… Backup example image is invalid Start to program backup example image Finish programming backup example image Checking the system status… It is first swap for the system Start to erase test data on lower pflash before swapping system Finish erasing test data Start to program backup test data on upper pflash Finish programming backup test data Start to swap the system

Perform a system reset

FLASH Swap example Start PFlash Information: Total Program Flash Size: xx KB, Hex: (xx) Total Program Flash Block Count: xx Program Flash Sector Size: xx KB, hex: (xx) Flash is xx Original swap indicator address: xx Current swap system status: xx Validating the backup example image… Backup example image is valid Checking the system status… The system has been swapped successfully Start to erase test data on lower pflash before exiting this example Finish erasing test data

End of PFLASH Swap example

Supported Boards