2017-02-17 03:11 AM
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-adc2017-02-18 07:50 AM
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.