Skip to main content
Andrew C
Associate III
January 4, 2019
Solved

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

  • January 4, 2019
  • 2 replies
  • 1936 views

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?

This topic has been closed for replies.
Best answer by waclawek.jan

> 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

2 replies

waclawek.jan
waclawek.janBest answer
Super User
January 4, 2019

> 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
Andrew CAuthor
Associate III
January 4, 2019

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

Thanks!