Skip to main content
Taxara
Associate III
Dec 6, 2019 10:56 AM UTC
Solved

What is the fastest adc sampling speed when using 4 adc's

Hi

I thinking of buying and STM32WB (P-NUCLEO-WB55 evaluation board) because of the fast ADC.

I need to sample four analog signals with a rate of a few hunderd Ksps and store their values.

  • what would roughly be the sample rate when using 4 adc inputs (8bit)?
  • Is there any direction you can guide me to, to accomplish this? (example/ adc application note)

Thanks in advance,

This topic has been closed for replies.
Philippe Cherbonnel
ST Employee
Dec 20, 2019 2:09 PM UTC

Hello,

As said above by Remi, the ADC is fast enough for your " few hunderd Ksps" application, you can even use it with resolution 12 bits.

You can refer to STM32WB reference manual for conversion time calculation.

conversion time = (sampling time + conversion time resolution) x (1/ ADC clock freq)

for example, with ADC resolution 12 bits, sampling time 47.5 ADC clock cycles, ADC clock freq 64MHz:

conversion time = 0.9375us <=> 1Msmp/sec

About examples to help you start your application:

There are several examples in STM32WB FW package (available to download on www.st.com).

Here are some examples using multiple ADC channels:

  • using ADC LL driver:

...\Firmware\Projects\P-NUCLEO-WB55.Nucleo\Examples_LL\ADC\ADC_GroupsRegularInjected_Init

Convert one channel with trigger from timer and data transfer by DMA, another channel on asynchronous trigger

  • using ADC HAL driver:

...\Firmware\Projects\P-NUCLEO-WB55.Nucleo\Examples\ADC\ADC_MultiChannelSingleConversion

Convert 3 channels (1 from GPIO and 2 internals (VrefInt, internal temperature sensor)) with data transfer by DMA.

Best regards

Philippe

7 replies

Ozone
Principal
Dec 6, 2019 11:14 AM UTC

The datasheet for the STM32WB55CC says 4,26 Msps.

Up to 7,11 Msps with reduced resolution.

Taxara
TaxaraAuthor
Associate III
Dec 6, 2019 11:18 AM UTC

Yes this seems to be the case when using one adc. But i think, (i cant really find this) that it would be divided by x when sampling x at the same time.

TDK
Dec 6, 2019 2:31 PM UTC

Yes, it will be x/4 if you use a single adc. Or x/2 if you use two adcs for 2 channels each. If that chip has two adcs. Still gets you well over a couple hundred ksps in either case.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Remi QUINTIN
ST Technical Moderator
Dec 9, 2019 10:10 AM UTC

​For 8 bit resolution , the fast ADC of the STM32WB can achieve up to 5.81 Msps. This let over 1.4 Msps for each of the 4 signals.

It is by far enough for the signals you want to sample.

Philippe Cherbonnel
ST Employee
Dec 20, 2019 2:09 PM UTC

Hello,

As said above by Remi, the ADC is fast enough for your " few hunderd Ksps" application, you can even use it with resolution 12 bits.

You can refer to STM32WB reference manual for conversion time calculation.

conversion time = (sampling time + conversion time resolution) x (1/ ADC clock freq)

for example, with ADC resolution 12 bits, sampling time 47.5 ADC clock cycles, ADC clock freq 64MHz:

conversion time = 0.9375us <=> 1Msmp/sec

About examples to help you start your application:

There are several examples in STM32WB FW package (available to download on www.st.com).

Here are some examples using multiple ADC channels:

  • using ADC LL driver:

...\Firmware\Projects\P-NUCLEO-WB55.Nucleo\Examples_LL\ADC\ADC_GroupsRegularInjected_Init

Convert one channel with trigger from timer and data transfer by DMA, another channel on asynchronous trigger

  • using ADC HAL driver:

...\Firmware\Projects\P-NUCLEO-WB55.Nucleo\Examples\ADC\ADC_MultiChannelSingleConversion

Convert 3 channels (1 from GPIO and 2 internals (VrefInt, internal temperature sensor)) with data transfer by DMA.

Best regards

Philippe

Taxara
TaxaraAuthor
Associate III
Dec 20, 2019 2:21 PM UTC

Hi Philippe

Thanks for the examples and extensive information!

Cheers,

Taxara