-
Notifications
You must be signed in to change notification settings - Fork 244
SWO Output
Patrik Bachan edited this page Oct 4, 2019
·
13 revisions
Simple SWO ascii console, CPU running at 72MHz, SWO at 2MHz, SWO data comes from probe itself (eg. ST-LINK)
"swoConfig":{
"enabled":true,
"source":"probe",
"swoFrequency": 2000000,
"cpuFrequency":72000000,
"decoders": [
{
"port": 0,
"type": "console",
"label": "SWO output",
"encoding":"ascii"
}
]
}
This example expects CMSIS usage
Init
/* Select the SWO interface */
DBGMCU->CR &= DBGMCU_CR_TRACE_MODE_Msk;
/* Enable the TRACE interface */
DBGMCU->CR |= DBGMCU_CR_TRACE_IOEN;
Send character
ITM_SendChar(character);
Note: Don't forget to properly configure SWO pin.