0
\$\begingroup\$

I am writing an application for the STM32f407-Discovery board that will use the ADCs present on it. I want to have access to all 17 of the input channels, and I will be using the HAL library to write to a DMA buffer, so that my higher level libraries can use buffered input.

STM32 ADC modes (see application notes) say that the ADCs can all be sequenced to convert "continuous capture" - think a buffer of reading, and the inputs can be hardware sequenced for capturing, with EOF by single channel (which I will use), or end of group capture. ADC1 and ADC2 can be run in a "dual regular simultaneous mode".

The signals in question are analog approximations of square waves and some analog level sensors (this is an automotive application). The higher level logic of my application runs on “timing” input - a square wave of varying frequency that determines engine timing. This input will always be read.

Precision is nice, but takes a back seat to capture speed.

EDIT: The hardware I am targeting uses ADC inputs for these waves and leaves processing to software. Hardware solutions to convert analog pulses to digital signals may be a good idea but it is outside the scope of this question.

TLDR: What configuration of the 3 ADCs on an STM32f407-Discovery board should be used for an STM32 application that uses buffered input/output?

STM32F4 HAL library docs

STM32F4/2 ADC application notes

\$\endgroup\$
  • \$\begingroup\$ Have you skimmed through the reference manual for the chip itself about the difference between the modes? \$\endgroup\$ – DKNguyen Nov 10 at 18:21
  • \$\begingroup\$ I have looked through the docs - I understand how the modes work, but I am not sure which modes to use for this application \$\endgroup\$ – avghighschoolstudent Nov 10 at 18:36
  • \$\begingroup\$ You said square wave approximations. How approximate? Because using comparators and GPIO interrupts would be faster than ADCs if you don't need "read" the actual voltage level. \$\endgroup\$ – DKNguyen Nov 10 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.