Skip to main content
Explorer
June 5, 2024
Question

High speed data transfer from STM32 to the PC

  • June 5, 2024
  • 2 replies
  • 2189 views

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!

    This topic has been closed for replies.

    2 replies

    ST Employee
    June 10, 2024

    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 

    Yusuf2Author
    Explorer
    June 13, 2024

    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. 

    Graduate II
    June 10, 2024

    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. 

    Yusuf2Author
    Explorer
    June 13, 2024

    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.