cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get maximum ADC samples mentioned in datasheet using STM32H743ZI2 USB FS

Pandian
Associate

Guys currently I am working on STM 32 H7 board and trying to achieve 3.6MSPS as per mentioned in an datasheet, after many tries currently I can able to take 175k samples/second as 12 bit resolution ADC values using an USB FS but if they claimed to be 3.6MSPS is achievable means then we can achieve it right?? here I have attached my code that can get max of 175 samples only but I have to achieve more, help me to get out this problem

16 REPLIES 16

Did you see @AScha.3's post? Your required bit rate is unachievable at USB FS.

 

PS:

https://en.wikipedia.org/wiki/USB_communications#Signaling_rate_(transmission_rate)

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Yeah you are totally correct, in my scenario I need to print each and every values of ADC and transfer through an USB FS and I can see it on Tera-Term. And I am using an logic of using an DMA Circular buffer that continuously fills the buffer and once buffer filled it gets transferred through an USB and prints that's what I am trying to do.

And how much samples you can take using that USB FS???

Yeah I can see its unachievable using this USB FS. But what's an way to achieve that 3.6 MSPS? and we know by using an USB FS we can transfer Upto 1.2 MB/S right atleast we have to get Upto there right? can you give me some suggestions to achieve those big values?

You need to look at an efficient protocol - certainly not wasting bandwidth by sending text!

You will never achieve the full bandwidth, because there always has to be a certain amount of protocol overhead.

Your ADC samples are only 12 bits - so even sending 2 bytes/sample is a significant overhead.

Do you really need the full 12 bits?

Achieving a true, meaningful 12-bit resolution requires some pretty careful, precision analogue design - seems unlikely that you have that ... ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Okay Just give me an best way to achieve those 3.6MSPS samples from an ADC?

Maybe you should try with USB HS (480Mb), theoretically 60 MB/s could be possible.

But at first need external hi-speed PHY chip here, H743 has only full-speed PHY onchip.

Then you could try, to send about 8 MB/s raw data.

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

Yeah yeah I tried that USB HS but as you said there is no inbuild External PHY so even that also works like USB FS while using without that chip. So my question is we can able to send 1.2 MB/S right using USB FS then even that's too till can't achieve can you please Go-through my code I have attached on top? and give me some suggestion.