NXP S32K14x: No trace output on the SWO pin

02-Aug-2024

Trace is initialized in the user application, but the trace output does not appear on the SWO pin when the target is used in standalone mode (i.e. not connected to a BlueBox debugger).


Explanation

On Arm Cortex devices the SWO trace pin can only be used in combination with SWD (Serial Wire Debug), because the same pin is also used for the TDO signal used by the JTAG interface. On S32K1xx controllers the debug port always comes out of reset in JTAG mode and can only be switched to SWD mode by a specific sequence which is sent by an external device. For this reason, when the S32K1xx controller is reset in standalone operation the SWO pin is initialized to be used as JTAG TDO signal, hence the expected trace output does not appear on this pin.


Possible solution

Always use a BlueBox when observing the SWO trace signal by an oscilloscope. The BlueBox will automatically send the JTAG to the SWD switch sequence when winIDEA attaches to the S32K1xx controller. After the switch to SWD has occurred, the trace messages will appear on the SWO pin and can be observed by an oscilloscope.

The complete set-up required to observe the SWO trace signal: 

  • Target S32K1xx
  • BlueBox with a CoreSight Debug Adapter
  • winIDEA, configured to use the SWD interface
  • Oscilloscope attached to the SWO wire between the target and the BlueBox

More detailed information about this topic can be found in the S32K1xx Reference manual (section 58.3) and the Arm Cortex documentation. 


More resources

Was this answer helpful?