2019-01-04 11:49 AM
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?
Solved! Go to Solution.
2019-01-04 12:23 PM
> 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
2019-01-04 12:23 PM
> 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
2019-01-04 12:41 PM
Awww that helped a lot. I thought the ITRx inputs were open to any TRGO. That makes much more sense.
Thanks!