cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F0 ADC external trigger with PWM and DMA - How to verify the trigger instance or ADC sampling begin instance?

GenuineDeveloper
Associate III

Hi,

I am using ADC with external trigger mode and DMA. The external trigger is TIM1 CH1 PWM out FALLING EDGE.

I wanted to verify if the trigger instance is correctly set for which I am probing the PWM output and a GPIO that toggles inside the ADC_ConvCpltCallback() function.

I can observe the GPIO signal toggling at an instance after the PWM falling edge occurs, which is creating a doubt that the ADC is not being triggered at the right instance. However, I understand that the ADC_ConvCpltCallback() function is called when all the ADC conversions are complete.

So, I would like to know if there is way(may be an interrupt) where I can toggle a GPIO at an instance where the ADC is triggered/begins conversion?

Regards,

Tinkerer

2 REPLIES 2
GenuineDeveloper
Associate III

Any inputs will be great help? Am I missing any additional data here?

GenuineDeveloper
Associate III

Is there any possibility?