2026-01-28 8:44 AM - last edited on 2026-01-29 3:20 AM by mƎALLEm
ST moderator: Edited the tile to add "ADC"
I want to extract data at high sampling frequency ~10KHz at STM32N6570-DK, Is it possible with USART for three channels or we have any other mode for this purpose. I want to continuously stream data at 10KHz sampling frequency.
2026-01-28 8:47 AM
Hello,
What kind of data ?
How to write your question to maximize your chances to find a solution
2026-01-28 9:06 AM
As @mƎALLEm said, you need to give more details.
Remember that we know nothing about you or your project other than what you provide in your post!
What is going to receive this "data"?
@chanchal94 wrote:we have any other mode for this purpose.
We don't know what the purpose is!
But the STM32N6570-DK also has USB HS and Gigabit Ethernet - among other interfaces...
The board documentation is here:
https://www.st.com/en/evaluation-tools/stm32n6570-dk.html#documentation
2026-01-28 9:10 AM
It's possible, but you would be stretching the limits of UART. Do the math to see how many bytes per second you need to transfer and that will let you know the baud rate you need. Typically UART is run at 115200 baud but can be up to several Mbaud. If you convert values to string before sending, this increases bandwidth even more.
3 channels, 10 ksps, 2 bytes/sample would require around 600000 baud which is doable.
You also need to ensure the receiving software is up to the task.
2026-01-28 9:30 AM
@TDK wrote:Typically UART is run at 115200 baud but can be up to several Mbaud.
@chanchal94 it also depends on how you are connecting the STM32's UART to whatever will be receiving this data.
@gbm suggests here that the ST-Link VCP is good for at least 921600 baud.
I have certainly used FTDI UART-to-USB converters at 921600 baud.
@TDK wrote:You also need to ensure the receiving software is up to the task.
Indeed. Some apps/APIs don't allow to select particularly high baud rates ...
2026-01-28 10:30 AM
My project requirement is to extract the data from three voltage sensors with the help of STM32N6570-DK, so that I can capture the data in my PC at 10KHz sampling rate for 10 seconds.
I have to use this same data for my ML model.
Is it feasible with this board? This is my query. As whatever boards I had tried previously was having data loss in real time streaming.
2026-01-28 10:45 AM
You haven't said how many bit per sample.
@TDK showed how to do the maths
@chanchal94 wrote:sampling rate for 10 seconds.
So you could send later ?
2026-01-29 2:34 AM
ADC resolution is 12-bit
Three channels sampled at 10 kHz individually.
Data is streamed in real time to a PC via ST-Link VCP (UART)
I want to capture this data for 10seconds on PC, i.e. 100000 samples
I am trying this ADC+DMA+Timer code for 921600 baud rate using USART1 , I am able to run the code and see the values in live expressions, but I am enable to capture this data in PC (Tried using matlab code, visual studio code)
Can you suggest anything regarding this?
2026-01-29 2:41 AM
@chanchal94 wrote:I want to capture this data for 10seconds on PC, i.e. 100000 samples
So you could do it in two steps:
That would save all the complications of trying to do both capture and transmission at the same time.
@chanchal94 wrote:I am enable (sic?) to capture this data in PC (Tried using matlab code, visual studio code)
I guess you mean, "unable" ?
As already noted, 921600 baud should be possible from the STM32.
Do your Matlab and VSCode support 921600 baud?
Have you done a simple test just sending fixed data - to prove that all your connections and receiving software are correct & working ?
I would suggest testing at 115200 first ...