2025-03-07 3:19 PM
Hello, everyone!
I've been searching for an answer to this question for a long time, but so far without success.
I have an STM32F410 and would like to use a timer to trigger ADC readings. However, TRGO does not appear as an option for the ADC trigger source.
What am I missing?
Solved! Go to Solution.
2025-03-07 3:32 PM - edited 2025-03-07 3:33 PM
The options listed in CubeMX are the only options available. You're not missing anything.
Dedicate one channel to triggering the ADC and set the CCRx value (or "pulse" value) to when you want it triggered. Setting it to 0 will trigger it just after the update event.
2025-03-07 3:32 PM - edited 2025-03-07 3:33 PM
The options listed in CubeMX are the only options available. You're not missing anything.
Dedicate one channel to triggering the ADC and set the CCRx value (or "pulse" value) to when you want it triggered. Setting it to 0 will trigger it just after the update event.
2025-03-07 5:41 PM
Thanks for the help!
By "channels" does this mean using external pins?
Is there a way to do this without involving external pins as input or output? I came across the concept of "TRC".
So it would be something like:
- TIM5 (as master), through TRGO, triggers the TIM1 (as slave), that, through channel, triggers the ADC. is this possible?
ADC:
MASTER:
SLAVE:
2025-03-07 5:53 PM
Got it! Thank you very much for your help!!
2025-03-07 6:04 PM - edited 2025-03-07 6:05 PM
You do not need pins or TRGO here. Neither of them will help.
Set up channel 1 as output compare (no output) and leave the pulse value at zero. When you start the timer and channel, it will trigger the ADC each time the counter reaches the CC1 value (or "pulse" value in CubeMX). Set the ARR value (or period in CubeMX) and prescaler to achieve the trigger rate you want.