cancel
Showing results for 
Search instead for 
Did you mean: 

High speed data transfer from STM32 to the PC

Yusuf2
Associate II

What is the best way to transfer high-speed data (12.288 Mbit/s) from the STM32H723 microcontroller to a PC? I'm controlling a four-channel audio codec (AK4619vn) and need to sample the FFT of the signal received from the ADC on the PC. The STM32 MCU has an Ethernet port.

Do I need external memory to ensure continuous transmission without data loss, or is it possible to buffer the data within the MCU? Considering the received data speed is 12.288 Mbit/s.

PS: I'm using the SAI1 block to receive the data on two different blocks  so two different pins of the SAI1 (SAI1_A, SAI1_B), each handling 6.144 Mbit/s.

Thanks in advance!

4 REPLIES 4
STea
ST Employee

Hello @Yusuf2 ,

You can use either the Ethernet or USB peripheral to transfer data with this Rates of speed, but you need to make sure you have good buffer management with respect to all buffer management optimization techniques with DMA and double buffers etc ... 
theoretically the Ethernet Peripheral can transfer in 100Mb/s with real time values in the low 90s which is more than good for your application.

Regards 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

You should be able to use the USB-HS modes to move the data off the STM32.

The size of the buffer would be determined by the amount of variability you have in processing the data. With ~500KB of RAM I'd expect that to be sufficient.

You could perhaps present as a USB Audio Class device. 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thank you for your respons. I see, it require a deep data management to transfer from the SAI block to the ethernet port I suppose. 

I think I already tried the USB-HS but when I activate the USB-HS, all of SAI block becomes disable so it occupy the port I need for the rest of the system. Thank you for your response.