I would like some example code to configure and use ITM to print debug messages using the SWO pin on the S32K344. I tried used the example code from Segger here: https://www.segger.com/products/debug-probes/j-link/tools/j-link-swo-viewer/ and I configured pin 161 for JTAG_TRACE. When I connect using the J-Link SWO Viewer V7.96i, my microcontroller freezes.
I believe this is a question rather for Segger. You can take a look at their page of J-Link SWO Viewer. I am additionally adding some references where information related to the topic is discussed.
Tutorial: Using Single Wire Output SWO with ARM Cortex-M and Eclipse
Single Wire Output (SWO) support within S32 Design Studio, enabled by PEmicro's GDB Server
Problem with ITM-printf in S32DS
SWV (ITM --> SWO) on S32k324 not working
B.R.
VaneB