JTAG Lock procedure on NXP S32K1xx
In this topic:
•Allowing access to the Security Byte (additional steps)
This topic describes how to allow programming in winIDEA to a specific flash region on S32K1xx devices that stores default protection settings.
If programmed incorrectly, it may result in permanently locking the device. |
The program flash memory contains a specific region that stores default protection settings (loaded on reset) and security information that allows the MCU to restrict access to the FTFC module.The memory addresses of this region are: 0x0000’0400 to 0x0000’040F.
When download in winIDEA is performed, programming this flash region is skipped by default preventing unintentionally permanently locking the device.
JTAG Lock procedure requires access to the Flash security byte (0x40C). Depending on how this byte is configured it will determine the functionality in securing the target and finally lock the MCU.
To enable Security bit configuration, the winIDEA restriction needs to be disabled. This can be simply achieved by following the winIDEA configuration procedure below.
Extensive knowledge of the S32K1 device and Flash Memory Module handling is required. Refer to the NXP S32K1 microcontroller reference manual and carefully study the Flash Configuration Field Table for restriction access to the FTFC Module and the Flash Security Register field function descriptions before accessing the restricted region. |
•winIDEA 9.17.0 or newer
•BlueBox
•ARM HSSTP II Active Probe or CoreSight Debug Adapter
To access specific Regions and secure them the follow next steps:
Open Hardware | Freescale S32K | Configure. |
Select the SKIP 400 40F field and press the Edit button in the Regions section. |
Check the box Allow Programming and confirm the changes. |
When the next download occurs, the region will be accessed by winIDEA and the download file which has been selected in the workspace. |
Navigate to Hardware | Freescale S32K | Configure | Device section | FLAGS Configuration. |
Uncheck the Release Secure Flags On Program Erase option and confirm the changes |
Perform download to allow winIDEA to write the determined values to the selected memory address. |
Unchecking the option Release Secure Flags On Program Erase allows winIDEA to write to that address to the values determined in the next download. If checked, it will still have the MCU as unsecure which is the default settings of the microcontroller.