What is ADC sampling time -- specs are not clear

the specs state ETADCSAMPLETIME() min is:
ADC_SampleTime_1Cycles5: Sample time equal to 1.5 cycles

is this 1.5 cycles od the system clock? please give me the actual minimum sampling time.

@hib actual sampling times from the STM32f205 data sheet.

Hope this satisfies your request.
full data sheet available http://www.st.com/web/en/resource/technical/document/datasheet/CD00237391.pdf

Thanks. I need 1 usec or less.

In that case your going to need a MUCH faster processor lol

@hib. Unfortunately, there’s no way you’ll get 1.5 cycles A/D sample time with the Particle firmware. See this thread: Interesting results from various ADC sample times
The findings discussed in that thread may be important to you. Due to the 10-sample average, etc. coded in the firmware, you won’t be getting the world’s fastest read speeds with analogread().

For 1 MSPS+ (small digital 'scope, huh?), you will likely need an external ADC. Keep in mind that with such short sample rates, you will have a very low input impedance, regardless of which way you go.

It is possible to get approximately 1MSPS out of the STM32, but you’ll have to install a local build environment, and dig down “to the bare metal” to utilize the STM32’s “dual/triple fast-interleaved” ADC mode coupled with the DMA module to get the values. Couldn’t be any easier :dizzy_face:.

Is this for the Core (STM32F103) or the Photon (STM32F205)? If you’re digging down to the bare metal, according to the datasheets, we find:

  • the Core CPU has 2 ADC modules, “1 µs A/D converters (up to 16 channels)”, so no more than 2 MSPS can be attained. 1 MSPS should be achievable. Remember: that’s going to be 2MB (2048KB) of data every second (no 12-bit variables)…where are you going to put it?
  • the Photon CPU has 3 ADC modules, “0.5 µs ADCs with up to 24 channels and up to 6 MSPS in triple interleaved mode.” Bingo: 12MB of data every second. Unless you’re just grabbing the top byte, in which case you only have to deal with a paltry 6MB of data every second. That’s what a 120MHz CPU is for, right?

@Bdub…good catch. That was a doozy of an error for someone wanting fast sample times :blush:. Maybe I do need some more sleep…

You and me both :zzz: :sleeping: