Skip to main content
Associate
March 7, 2025
Solved

Trigger ADC by TRGO

  • March 7, 2025
  • 4 replies
  • 2051 views

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?

 

adc.pngtimer.png

This topic has been closed for replies.
Best answer by TDK

The options listed in CubeMX are the only options available. You're not missing anything.

TDK_0-1741390250713.png

 

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.

4 replies

TDK
TDKBest answer
March 7, 2025

The options listed in CubeMX are the only options available. You're not missing anything.

TDK_0-1741390250713.png

 

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.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate
March 8, 2025

 

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:

table.png

- TIM5 (as master), through TRGO, triggers the TIM1 (as slave), that, through channel, triggers the ADC. is this possible?

 

ADC:
adc.png

 

MASTER:

tim5.png

 

 

SLAVE:

tim1.png

 

 

Associate
March 8, 2025

Got it! Thank you very much for your help!!

tim1.png

TDK
March 8, 2025

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.

"If you feel a post has answered your question, please click ""Accept as Solution""."