How to cold start with NXP S32E2/Z2 Cortex-M33 or R52 core
In this topic:
This topic describes how to start debugging the Cortex-M33 (SMU) or Cortex-R52 cores on NXP S32E2 and S32Z2 MCU via winIDEA initialization files if no valid boot image is found.
On the NXP S32E/S32Z microcontroller family only the Hardware Security Engine (HSE) starts to run after reset.
It reads boot image either from QSPI flash or SD card and starts either the Cortex-M33 (SMU) or the Cortex-R52 core. If no valid image is found, no core is started. All cores remain in reset and the device enters Serial Boot mode allowing the code to be loaded to RAM via CAN or UART interface.
By overriding the Serial Boot mode, a BlueBox debugger can start the core and gain access to RAM through a Cold Start procedure. Using winIDEA initialization files, a small program with an endless loop is written to RAM and then the M33 / R52 core is released from reset. Initialization files use AXI access type since standard Virtual Memory area access is not functioning due to the M33 / R52 core being in reset.
•winIDEA 9.17.158 or newer
•BlueBox
•Arm HSSTP II Active Probe or 10-pin CoreSight Debug Adapter or 20-pin CoreSight Debug Adapter
If the boot image is available HSE initializes only the part of RAM where the code image is loaded. If you want to load code to another part of RAM, the RAM Initialization script must be specified, so that the debugger can load the code anywhere in RAM.
Create a new workspace via File | Workspace | New Workspace and select your device. |
Open Hardware | CPU Options | Reset and configure: |
a.Select Stop and preset as RESET method.
b.Define Post RESET delay - HSE must have enough time to read the boot image and start the application core.
c.Make sure Initialization before Programming | Connect is Default.
d.Specify the RAM initialization script under Initialization before Programming | Initialize.
Perform: |
•Reset - HSE boots the application from SD Card / QSPI Flash, and no other part of RAM will be initialized. After reset, the HSE core is the only core which is running. It reads the boot image, copies the code image to RAM and starts the core responsible for running the application.
•Download - Resets the target, initializes the RAM (because of the specified script) and HSE boots the application from SD Card / QSPI flash, the entire RAM will be initialized (so if we specified any program files they can and will be downloaded at this point).
If the boot image is not available, or is invalid, HSE will not start any of the application cores. All the application cores remain in reset. To be able to debug such a target, winIDEA can start one of the application cores. That is done by the Cold Start script, which writes an endless loop to RAM and starts the specified core. The RAM location where this loop is written can be specified as a script parameter. The RAM initialization script in this case is not necessary, because RAM is first initialized by the Cold Start script.
Create a new workspace via File | Workspace | New Workspace and select your device. |
Open Hardware | CPU Options | Reset and make sure: |
•Boot core is the core you want to cold start from
•Latch target RESET in the RESET pin section is unchecked
•Stop and Preset in the RESET method drop-down menu is selected
Make sure the Cold Start script is added to Initialization before programming | Connect (as a Custom script via the arrow button). |
Specify the core that you want to start, and the start address where the code is loaded as the script parameters via the arrow button | Parameters for the script. |
•How to add a custom initialization script