Skip to main content
daniel239955_stm1_stmicro
Visitor II
February 17, 2017
Question

STM32F407 Capture Compare Trigger for injected ADC conversion

  • February 17, 2017
  • 1 reply
  • 10106 views
Posted on February 17, 2017 at 12:11

Hello,

I'm using STM32F407 and i want to trigger an injected ADC1 measurement by Timer 1, Capture Compare Channel 4.

So:

Timer 1, Channel 4 is configured as Output Channel with a timebase of 50us. So each 50us, I got a CC4 interrupt, which calls the defined callback.

What I don't understand is the following:

The injected ADC measurement isn't triggered, if the OutputCompare (OCMode) of Channel 4 is set to Frozen (OC4M Bits in Reg. TIM_CCMR2 set to 000). However, If I do set OC4M bits to 011 (Toggle), the injected ADC measurement is triggered correctly. But the CC4IF is set in both cases, which in my opinion should be the trigger event for injected ADC conversion. So do you have any idea what's wrong?

#external-trigger #stm-32f407 #adc-tim #injected-adc
This topic has been closed for replies.

1 reply

S.Ma
Principal
February 18, 2017
Posted on February 18, 2017 at 16:50

Generate your 50us periodic outpt compare repetitive pulse from timer to an output pin. Connect it to the injected channel trigger input pin. Then you can monitor the trigger signal physically for debug.