This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with SWO when debugger not connected

Hi,

I have configured my M4 based CC3200 from TI to output printf via ITM (all uarts used). Works great as long as the debugger is connected. But when I boot up with no debugger it streams out unrecognisable packets. The normal packets are one header and one byte  0x09 XX where XX is my ascii trace. Now, with no debugger, I get a verbose stream of one byte packets the content of which I don't recognise. 0x09 YY 0x09 YY etc where YY is not ascii. Often it could be 0x09 0x89 0x09 0x89 0x09 0x89 0x09 0x89 0x09 0x89. Any clue as to what is going on with Coresight/ Debug and Trace / ITM? 

Thanks,

Ciarán

Code here:

// Enable Trace (Debug Exception and Monitor Control Registe
CoreDebug->DEMCR = CoreDebug_DEMCR_TRCENA_Msk;

// Enable write to ITM registers
ITM->LAR = 0xC5ACCE55;

// TPIU - Select UART(NRZ) mode (Sometimes called SWO Mode)
TPI->SPPR = 0x00000002;

// TPIU - Set the baud rate (I found this did NOT work reliably at 256000. 95% ok, but occassionally saw *** in the trace and scoping it showed the timing was well out of range. 115200 looks better.
TPI->ACPR = 80000000 / 115200 - 1;

// Configure FIFO
TPI->FFCR = 0x100;

ITM->TPR = ITM_TPR_PRIVMASK_Msk;

// Enable ITM (Trace Control Register) 
ITM->TCR = (ITM_TCR_TraceBusID_Msk | ITM_TCR_ITMENA_Msk | ITM_TCR_SWOENA_Msk | ITM_TCR_SYNCENA_Msk ); // Enable

DWT channel anyway even if we don't config a watchpoint below, it doesn't matter
// Enable stimulus port (Trace Enable Register)
ITM->TER = 2; // Was 3

0