I'm using keil with STLINK, connected to a GD32F130C8.
I can see, in debug, by means of Watch, variables changing in real time.
Everything works fine.
Now I would like to enable trace, in order to see the evolution of a variable in time domain, thru logic analyzer.
I enabled trace flag on trace tab (setting menu), I set, on trace tab, the processor speed (72MHZ).
The problem is that logic analyzer doesn't show requested float variable, and on the bottom of the screen I read the sentence "Trace: No Synchronization".
The output of SystemCoreClock() function gives 72Mhz.
Probably trace is not covered by your ST-Link.
The recommended Debug Adapter is the "ULINKpro Debug and Trace Unit":
Do also refer to:
here is clearly described the compatibility with stlink:
So have you run through that example to verify that you have everything set up & working correctly?
You haven't said what model & version of ST-Link you are using. Is is a genuine ST one?
ema vac said:GD32F130C8
That's not an STM32 - is it?
Are you sure that chip has Trace ... ?
The trace on this chip is supported:
This is my stlink, it is not the original one, but it says that all functions are supported...
You should never buy such copies. This just ends up in lost time as you see here. Order the original tools when programming a microcontroller - then i.e. you can expect a professional support
Can you send me some link where it is written that my problem is related to the stlink emulator?
Please understand that I am not commenting on a setup that includes a usage of such copies
Ok, thank you, don’t comment
ema vac said:Can you send me some link where it is written that my problem is related to the stlink emulator
Again, have you tried the example you mentioned - using a genuine ST-Link?
If you have followed that, and that doesn't work, then there's something to work with.
come to think of it, ISTR seeing something on the interwebs about hardware hacks to get these cheap ST-Link knock-offs to do Trace...
yes - that looks like the kind of thing.
Please let me better understand trace:
now I use clock and data to flash firmware and to watch variables.
do I need to use one more pin to receive trace data?
according to the previous shared link I can add SWO pin to my cheap st link clone.
Then where should I connect SWO ? On which pin of my GD32 chip?
Again, why don't you go back to the example you cited earlier - get that working, and then you'll have the understanding to know what to do ...
View all questions in Keil forum