klonyyy / STMViewer

Real-time STM32 variable & trace viewer
GNU General Public License v3.0
530 stars 58 forks source link

High speed plotting #20

Open Vasili-Sk opened 7 months ago

Vasili-Sk commented 7 months ago

Can we use STM logger (STtrace) library for buffered high data rate plotting? i'm also in motor control and sine is barely visible there :)

klonyyy commented 7 months ago

Hello, could you elaborate on the topic, or show the problem you're facing? I'm not sure I understand the question.

Vasili-Sk commented 7 months ago

STM Studio had special libraries for logging data from inside chip, this way you can synchronise it to end of FOC routine, for example and have clearer data at PWM speed image These are STM libraries. image when you click this little square in stm studio it changes logger mode to buffered, also in settings you can setup how much calls to DumpTrace to be skipped. DumpTrace is a function you need to call from your code that saves data.

klonyyy commented 7 months ago

I must admit I wasn't aware of this feature. STMStudio still keeps surprising me. I'd have to research this topic, but right now If you'd like a synchronous way of logging data you should try the Trace Viewer and SWO output. I'll keep in mind to try it out and see how it works/how it is implemented in STMStudio. Thanks!

Vasili-Sk commented 7 months ago

yeah i wish but my boards dont have SWO anymore since i found this thing and always used it :P

klonyyy commented 7 months ago

Got it. In this case I don't think it's possible to synchronize the readings currently. It seems like a very interesting feature, but most probably it will take some time for me research and implement it. Feel free to contribute on this feature if you have some free time, though! :)