cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F030 ADC Config

markjohnson9
Associate II
Posted on September 28, 2015 at 17:51

I could use some expertise on the ADC... Device STM32F030R8, I have a 10uSec rising pulse coming into PA2(PIN 16). I need to trigger the internal ADC to start converting data every 1 or 2 uSec (to be determined). Can someone shed some light on the preferred method to configure the PA2 I/O port to accept the rising edge and use timer 15 or another timer, ext interupt to start the ADC conversion? I understand that PA2 needs to be configured as an input, but there are many configurations for the use of  PA2.

#stm32f
1 REPLY 1
raptorhal2
Lead
Posted on September 28, 2015 at 23:13

You can configure PA2 as Alternate Function 0 and configure Timer 15 Capture Compare 1 (CC1) interrupt to be used to start ADC conversion.

1 usec sampling requires the multiplexer (sequencer) sample time be the minimum, which may not give good accuracy unless the signal source is something like an amplifier with low output impedance.

At a 1 or 2 usec sample rate, not much else can be done concurrently. DMA should be used to stuff the converted values into a memory buffer. Then when the required number of samples have been achieved, process the results.

Cheers, Hal