The best method to transmit continuous data from the STM32 to a PC at high speed
I am currently using the STM32 to sample a waveform with an ADC, perform the FFT and transmit the data to a computer. 2 ADC's are used, and the buffer fills up every 1.26 ms. The result of 12 FFT bins is transmitted to the PC, which is around 1400 bits. The data needs to be transmitted before the next buffer fills up; this is why UART is set to high rates of 7M/bits. The board being used is the NucleoH7A3ZI-Q
I have tried several communication methods, but all seem to not work for different reasons. These are:
- UART at 7M/bits per second via the STLink. Though this works, I can see the data printed via virtual com port and PUtty. However, the serials link is set to 115200 K/bits, so after a while, a group of transmitted data is lost as the STlink is overflowed.
- UART at 7M/bits per second via a high-speed serial cable. Same as over the STLINK, this high-speed cable can take in 7M but only outputs the data at 1Mb/s when you look at the virtual com port in the device manager. So again, there is data loss.
- USB via Communication device class (Virtual port com). This worked well as the data was transmitted at full speed (12M/bs), but when I looked at the device manager, the port was set to 128200 and could not be increased.
My questions are:
Has anyone had an experience with a problem like this and can give some guidance? Or is there any good documentation or examples on the problem?
Is there something I've been doing wrong when attempting via my current methods of UART and USB?
Thanks for any advice.
