Arm Cortex NXP Kinetis K2x/EA: Flash configuration

31-Jul-2024
Kinetis K2x

The NXP Kinetis K2x series microcontrollers contain a 16-byte flash configuration field within the program flash memory. This field is essential as it stores default protection settings (loaded on reset) and security information, enabling the MCU to restrict access to the flash memory module. On Kinetis devices, this configuration field is specifically located at flash memory addresses 0x400 to 0x40F.

For K2x devices, the range from 0x400 to 0x40F is defined as a special region in winIDEA that will not be downloaded. This precaution is to prevent accidentally locking the device. Care should be taken when linking an application to ensure it avoids these memory locations.

For more information please check the reference manual for your device.


Kinetis EA

The NXP Kinetis EA family also includes a special Flash Configuration Field, similar to other Kinetis devices. However, the handling of this field in the EA family is different.

1. Open Hardware | <device name> | Configure | FLAGS Configuration.

2. Configure according to your use case:

  • Release Secure Flags On Erase - Appropriately fixes Flash Configuration Field when Mass Erase is used. This will write 0xFE to location 0x40E.
  • Remove Flash Protection On Program - Appropriately fixes Flash Configuration Field when downloading the application. This will write 0xFFFF to locations 0x40C and 0x40D.


More resources in winIDEA Help

Was this answer helpful?