I'm finally able to get Trace using just 2 data pins working reliably on a Silicon Labs EFR32ZG23 ARM CM33 processor. The reason I want to use only 2 bits is Silabs uses a 10-pin (MiniSimplicity) header for programming/debug and there are sufficient pins on it for only 2 bits of trace.
The trick was to set the ITM_TCR.STALLENA PROGRAMMATICALLY. However, I would much rather set it in the .JLinkScript file but for whatever reason, when I set STALLENA=1 in the script it does not appear to "stick".
Attached is my JLinkScript - See lines 214-220 where I try to set STALLENA.
When I run trace, I print out the value after writing to the ITM_TCR register and it shows the bit as being set, but it seems it gets cleared somewhere or doesn't stick?
End: Initializing trace pins
ITM_TCR:0x0001000F - this is the ITM+TCR before writing
ITM_TCR:0x0001002F - This is the ITM_TCR after writing bit 5=1 which is apparently does - but the debugger also shows STALLEN=0 when the CPU is Paused.
OnTraceStart() end - Took 6.88ms
Note that in the Registers window in the attached screenshot STALLENA has just been SET to 1 when I single stepped across the set_STALLENA function. But why doesn't the script set it?
Should I set STALLENA in a different debug function?
Why doesn't Ozone set the STALLENA bit in general when doing trace debug (after setting the TRACE ENABLE for example)?
The trick was to set the ITM_TCR.STALLENA PROGRAMMATICALLY. However, I would much rather set it in the .JLinkScript file but for whatever reason, when I set STALLENA=1 in the script it does not appear to "stick".
Attached is my JLinkScript - See lines 214-220 where I try to set STALLENA.
When I run trace, I print out the value after writing to the ITM_TCR register and it shows the bit as being set, but it seems it gets cleared somewhere or doesn't stick?
End: Initializing trace pins
ITM_TCR:0x0001000F - this is the ITM+TCR before writing
ITM_TCR:0x0001002F - This is the ITM_TCR after writing bit 5=1 which is apparently does - but the debugger also shows STALLEN=0 when the CPU is Paused.
OnTraceStart() end - Took 6.88ms
Note that in the Registers window in the attached screenshot STALLENA has just been SET to 1 when I single stepped across the set_STALLENA function. But why doesn't the script set it?
Should I set STALLENA in a different debug function?
Why doesn't Ozone set the STALLENA bit in general when doing trace debug (after setting the TRACE ENABLE for example)?