cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F411 ADC full capacity with USB

epsi1on
Associate II

I've got an black pill with STM32F411CEU6 on it, I plan to simply use it for a single purpose: reading ADC at near full capacity and transfer values to PC via USB.

 

After investigating around F411 product page on st.com, I've found that:

ADC

in product definition it is stated:

1×12-bit, 2.4 MSPS A/D converter: up to 16 channels

So, without transfer protocol overhead, i needs minimum of 2.4*12=28.8 Mb/s equal to 3.6 MB/s bandwidth to transfer data into PC.

USB

in product definition also it is stated:

Advanced connectivity: USB 2.0 full-speed device/host/OTG controller with on-chip PHY

from the definition of USB2FS (full speed), i can understand the maximum speed is 12Mb/s (equal to 1.5 MB/s).

 

Main Question

So data rate from ADC is about 29Mb/s but maximum data rate from USBFS is 12Mb/s.

Is there any method which i can send full ADC data from my black pill to PC, and preferably without external components (like discovery boards)?

Thanks

foot note:

It STM32F411 product page, USB2FS (12Mb/s) is counted as a advanced connectivity feature, it was advanced in like 15 years ago, but for now ...

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

> Is there any method which i can send full ADC data from my black pill to PC, and preferably without external components (like discovery boards)?

12 Mb/s is not achievable on USB FS. Expect to max out at around 8 Mbps with excellent coding.

Also be aware USB is subject to random delays of tens of ms. You will need to buffer data.

There's no way to increase the throughput beyond this.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3
TDK
Guru

> Is there any method which i can send full ADC data from my black pill to PC, and preferably without external components (like discovery boards)?

12 Mb/s is not achievable on USB FS. Expect to max out at around 8 Mbps with excellent coding.

Also be aware USB is subject to random delays of tens of ms. You will need to buffer data.

There's no way to increase the throughput beyond this.

If you feel a post has answered your question, please click "Accept as Solution".
Lohi
Associate III

Just thinking that you might be able to use spi, maybe into a USB 3.0 adapter?  I know it's external, but... and, yes, usb 2.0 is getting kind of old age...but, there are newer devices, and the nucleo boards are usually <$20, so....i found this, maybe a starting point

https://diolan.com/usb-spi-adapters

using SPI instead of USB1 could be a solution too.

anyways i think USB 2 (High Speed HS with 480Mbps bandwidth) would be more than enough for this case. (3*2.4Msps*12bit = 90Mbps)