cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger out and ADC using timer TRGO

ABD74
Associate

Hello ST Community,

I have a question about the way to trigger out an ADC using internal timer TRGO, i would like to use an STM32L4 or STM32U5 for this function, so i'm using an External Time Reference (ETR) signal and i would like to know if there is any way to trigger and ADC using timer TRGO for each ETR impulse which means produce the same ETR signal form for timer TRGO ?

Thank you in advance,

3 REPLIES 3

I don't quite understand what do you want to achieve. Try to make perhaps a drawing with TIM and ADC, indicating which signals go from where to where, using arrows.

JW

ABD74
Associate

I hope that the drawing below is clear for you, what I want to do is to be able to start an ADC conversion internally using timer TRGO. The ETR signal refers to the analog impulse to convert, I'm using an input capture to count the number of ETR impulse each 5ms and need to start an ADC conversion using timer TRGO for each ETR rising edge, so is it's possible to do that using STM32L4 or STM32U5 ?

Thank you in advance,

0693W00000aHJxuQAG.png

If you have active Input Capture on TIMx_CH1, you can generate a TRGO output pulsing at the moment of Capture by setting TIMx_CR2.MMS=0b011 - it's very incorrectly named Compare Pulse, but read the description in RM. Note, that this is available only for CH1.

What confuses me is, why do you insist on using TIMx_ETR pin to be source of the Capture. It is possible, through the Slave-mode controller, but isn't it simpler to use TIMx_CH1 pin?

JW