cancel
Showing results for 
Search instead for 
Did you mean: 

Set Internal trigger connections to TIM2 in STM32CubeMX

diverger
Senior
Posted on June 08, 2016 at 05:37

By the DM00032020 Reference Manual, when TIM2 is used as slave, it's trigger source can be IRT0 from TIM1, ITR1 from TIM8, ITR2 from TIM3, IRT3 from TIM4. But now, when choose trigger source ITR1 in the 'pinout' card. There is a configuration ''ITR1 remap capabitlities for TIM2'' appears in the TIM2 configuration wizard, and I can set it to TIM8 TRGOA. But when I choose trigger source ITR2 or  ITR3 in the pinout card, there is no relevant configurations shown in the timer's configurations card. Am I wrong or it's a bug of STM32CubeMX?

I'm using STM32CubeMX 4.15.0 and STM32F429Ix.
3 REPLIES 3
Nesrine M_O
Lead II
Posted on June 08, 2016 at 11:23

Hi diverger,

In fact is not a bug,If you check the TIM2 option register (TIM2_OR) in your related reference manual, you find that TIM2 ITR1 input can be connected to TIM8_TRGOUT, to the PTP trigger output or to the OTG FS/HS.so the ITR1 remap capabitlities for TIM2 table appears to give the possible connection for TIM2 ITR1 input.

I recommend you to have a look to the

http://www.st.com/content/ccc/resource/technical/document/application_note/59/ed/30/07/55/76/4e/82/DM00154959.pdf/files/DM00154959.pdf/jcr:content/translations/en.DM00154959.pdf

Application note about Peripherals interconnections on STM32F4 devices.

-Syrine-

diverger
Senior
Posted on June 12, 2016 at 03:01

Thanks Syrine.

But I'm a bit confused now. In RM0090, section 18.4.3, ''TIMx slave mode control resgister (TIMx_SMCR)'', ''Table 97. TIMx internal trigger connection'' at the end, with one row state:

 Slave TIM   ITR0  ITR1   ITR2   ITR3 

 TIM2  TIM1  TIM8  TIM3  TIM4

Doesn't it mean TIM2 can be used as a slave timer fo TIM3 or TIM4, and triggered by ITR2 or ITR3?

If it can be used as the table stated, but I can't figure out how to implement that configurations in CubeX, except ITR1.

diverger
Senior
Posted on June 12, 2016 at 08:30

It seems it works. Though there is no extra settings appears in the configuration wizard when I choose ITR2 or ITR3 as TIM2 slave trigger input. But the code generated works.