2018-06-11 11:31 PM
Hi, I am trying to enable the SWV on the STM32F746ZG, but without success. I generated the code with CUBEMX (enabled the Trace asynchronous SW) and in debugger configuration configured interface SWD, and trace SWV (with core clock at 200MHz). I have also configured the trace configuraton in debugger, but when i click start trace, no data is shown. In the console window I get verify failed message. I am using J-Link.
#swv2018-06-12 07:10 AM
Your board, or something else. Make sure PB3 (SWO) is connected properly, check solder-bridges on NUCLEO/DISCO boards.
Check the actual speed, use a USART to output internal stats until you get SWV working.
printf('HCLK=%d\n', HAL_RCC_GetHCLKFreq());
printf('APB1=%d\n', HAL_RCC_GetPCLK1Freq());
printf('APB2=%d\n', HAL_RCC_GetPCLK2Freq());2018-06-12 10:22 AM
Hello Clive,
Thank you very much for your reply. I already checked the sb - it is soldered (the board is NUCLEO). The speeds also: HCLK:200Mhz, PCLK1:50Mhz, PCLK2:100MHz.
I managed to get some data with core clock set to 100Mhz (actual clock is 200) in the debugger conf, but the data is incorrect, which makes me believe that swo clock is not configured properly? (I am sending data with ITM_SendChar(0) but receiving non constant data)
I could not find where to set manualy via register the swo clock. Shouldn't there be an options for that?
2018-06-13 02:00 AM
Ok. Found the error. I had the input frequency for HSE set to 25 MHz (from previous project with different board but same proc), but upon looking at the schematic it shows that this board has 8 MHz oscillator. Everything works as it should now.
2018-06-13 02:04 AM
Update: I set the system clock -> HSI (16 MHz) and now everything works fine. Will have to find out why doesn't work with 200 MHz.