cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger ADC by TRGO

import_tiago
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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".

View solution in original post

4 REPLIES 4
TDK
Guru

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".
import_tiago
Associate II

 

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

 

 

import_tiago
Associate II

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

tim1.png

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".