2024-01-29 05:10 PM
I do not have any output via SWV or via COM port debugging using a STM32H723ZGTX.
I am using a nucleo ST-link breakoff board to program with no issue.
I have tried solutions provided in both following threads:
https://community.st.com/t5/other-tools-mcus/no-traceswo-output-on-stm32h7xx/m-p/395490
Any suggestions would be much appreciated.
Solved! Go to Solution.
2024-01-31 02:07 PM - edited 2024-01-31 02:10 PM
Dont know, what you did wrong....just: at first, its like a game . (tell it to STM...)
But when it starts working, it works on every debug start.
Just do nothing else, than i wrote.
Try again. Suddenly it will work. (If you only (!) did what i wrote.)
+ if try more: have any usb/cdc avail ?
st-link V2 has no CDC, only V2.1 or V3 has ...- right ?
If you only have V2 , try the game , click around , many times on red button, start debug, stop it, retry...
you can get more than printf : statistics...
or just - for usb testing- the messages :
It CAN work - just no simple and clear rules.
2024-01-31 02:27 PM
I am using the ST-link from a NUCLEUS-F401RE board which is ST-LINK/V2-1.
I have with a fresh project using only code and async trace setting you instructed tried again following the steps of the
game, still with no luck.
"+ if try more: have any usb/cdc avail ? "
I do not understand what you mean here, I have tried a different USB cable.
How would I go about viewing the information in the first screenshot?
2024-01-31 02:50 PM - edited 2024-01-31 02:55 PM
> have any usb/cdc avail ?
its about : to have a serial , cpu: uart -> serial-> USB cdc , on st-link V3 or any serial->usb converter (extra : CP2102, FT232, CH2340 etc. serial->usb adapter)
= extra adapter board, to get uart to usb as a "serial" connection .
https://de.aliexpress.com/item/1005005850315101.html
like this.
Then you send on both interfaces :
int __io_putchar(int ch)
{
ITM_SendChar(ch);
HAL_UART_Transmit(&huart3, (uint8_t *)&ch, 1, 0xFF);
return (ch);
}
-- here on uart3 connected to serial-usb adapter .
But... should work with st-link and swv. (Try again...suddenly it will work.)
2024-01-31 03:03 PM
I will continue to try your game method, but does anybody else have any suggestions on what I could try?
2024-01-31 11:47 PM - edited 2024-01-31 11:48 PM
> How would I go about viewing the information in the first screenshot?
in debug , (paused) or waiting at breakpoint :
1. open : menu: window -> Show View -> SWV -> SWV statistical profiling
2. open the "toolbox" (configure) :
+ here set PC sampling : ena.resolution -> not too fast (try: 10240 , as i choose here)
(+ enable prescaler /64 ; )
(+ check: on left shows your real actual core clock speed ? If wrong, nothing will work on SWV !!! )
-> ok.
Then "play" , resume debug, let program run some seconds, then "pause" debug again --- and you get statistics for this some seconds of program runnning :
<- this is just the main i showed (only printf() + hal_delay in while loop)
+ afaik this will fill up the sample buffer in the IDE (the faster/more you sample, the shorter time until overflow! );
so for longer debug session (= normal use) you have to un-check the PC_sampling , to avoid overflow .
2024-02-06 03:12 AM
This issue has now been resolved, it was a poor solder connection between the SWO pin and the PCB.
This was a simple mistake that I should have caught early on.
Thanks AScha.3 for helping out.