STM32 - USB - CDC_Transmit - How to read the data on PC? - Matlab?

553 views Asked by At

I am in the process of programming some sort of USB oscilloscope.

I followed the tutorial, using a STM32F429. https://www.youtube.com/watch?v=MmwR1VU_rVc&list=PLnMKNibPkDnHxpOv2HETihQy5HHQGv2nS&index=26

The tutorial was very helpful with this and I am able to use the software from the tutorial (stmscope) to see the incoming data.

However, I would like to process the data in Matlab, where my problems start. As far as I understand the baudrate does not matter, because there is no real UART connection?

For reading the UART in another project I used for example "Putty" or "SerialMonitor". By specifying the baudrate and the com port the readout was quite easy, even in Matlab.

The used USB port is simulated as a virtual com port and the data is sent with CDC_transmit. However, with the previous methods "Putty" or "SerialMonitor" I cannot read the sent data, because I have to specify a baudrate for this, which is unknown to me. Which program is suitable to monitor the incoming data?

In Matlab I also have the same problem that I have to specify a baudrate for the com port.

My goal is to evaluate the data in Matlab. Preferably I would like to read the data directly with Matlab from the virtual com port and save it in Matlab. If this is not possible I would first save the data to a txt.file and then read it into Matlab.

Are there any ready-made solutions or open source programs for this?

Thanks for reading and your help!

0

There are 0 answers