cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429 and Controlling a timer to control another timer that is a one shot to update the internal DAC.

Andrew C
Associate II

I am trying to set up a timer go to a one shot timer that goes to the DAC update command (to output data that was written via DMA). 

I am little confused on how to set everything up. 

I want to set up timer 1 to go to timer 2 and timer 2 will be a one shot.

Seems simple enough, but I am a little confused on how to set this up in Cubemx. 

How do I make sure that Timer 1's TRGO goes to the correct ITRx in Timer 2? Also is it assumed that since I disabled Timer 1 in slave mode that Timer 1 will automatically be the master? What if I had timer 3 be a master timer for something else? There seems to be no way to direct which timer will go to which ITRx. Is this just something you have to do in code manually?

1 ACCEPTED SOLUTION

Accepted Solutions

> How do I make sure that Timer 1's TRGO goes to the correct ITRx in Timer 2?

The interconnections between timers are fixed, you then select one of four external inputs (and of four internal signals) as slave-mode controller input (TRGI) by setting TIMx_SMCR.TS. In RM0090 rev.17, look at Table 98 - for TIM2, the TIM1's TRGO is selected by setting TIM2_SMCR.TS=0b000.

I don't Cube/CubeMX.

JW

View solution in original post

2 REPLIES 2

> How do I make sure that Timer 1's TRGO goes to the correct ITRx in Timer 2?

The interconnections between timers are fixed, you then select one of four external inputs (and of four internal signals) as slave-mode controller input (TRGI) by setting TIMx_SMCR.TS. In RM0090 rev.17, look at Table 98 - for TIM2, the TIM1's TRGO is selected by setting TIM2_SMCR.TS=0b000.

I don't Cube/CubeMX.

JW

Andrew C
Associate II

Awww that helped a lot. I thought the ITRx inputs were open to any TRGO. That makes much more sense.

Thanks!