Beginner's question: Can't get ITM/SWO to work
I am doing my first steps on the NUCLEO-WL55JC1 and one of the first things I like to get working is of course some debug printfs. Though I could of course use the VCP via the integrated STLink I'd like to use ITM_SendChar() to output some informtion. Though I think I did everything the same as when I also configured the STM32H735-Discovery, where I got ITM working, nothing is output with the WL55 board. As far as I understood from the documentation SWO output via PB3 should be possible on this board as well? Using WL55 Firmware pack v1.0.0 with CubeIDE 1.6.0
Below are the steps I did to configure my app:
- Create an empty STM32 project for the NUCLEO-WL55JC1
- Initialize all peripherals with their default configuration: No
- In CubeMX: Set Debug/Trace: JTAG and Trace: Trace asynchronous sw
- In CubeMX: Clock config: Set MSI RC to 48000 setzen, to get output clock of 48 MHz
- Save CubeMX config and auto-generate source
Add to <Projectname>_CM4/Core/Src/main.c in the central while(1)-Loop in main():
uint32_t cnt = 0;
while (1)
{
cnt++;
if (cnt>=65535)
{
ITM_SendChar(0x41);
cnt=0;
}
cnt++;
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */- Start debugging
- Edit debug configuration
- Interface: SWD
- SWV: Enable
- Set SWV Core Clock to 48 MHz
- Start debugging
- In the initial hold after debug start
- Open View "SWV/SWV ITM Data Console" or "SWV Trace Log"
- Tick: PC Sampling: Enable, Timestamps: Enable, ITM Stimulus Ports: 0, Trace Events: CPI
- Click "Start Trace" Button im View
- Resume program
To my understanding every 65k iterations an "A" should be printed via ITM and logged to the view. Also the Trace Log View should show some infos about clocks, timestamps, etc (It did with the STMH7)
Nothing is output to the SWV windows.
What am I missing?
