cancel
Showing results for 
Search instead for 
Did you mean: 

How do you setup ITR0

MNapi
Senior III

I see that those ITR0 .. 4 are connected somehow to timers you can use it as timer trigger.

How do you set it up working. Can somebody provide sample code ?

I want faster timer to control (start, stop) with slower time. I have spent a few weeks experimenting and I cannot get it working. No working examples to be found.

2 REPLIES 2

Which STM32? There are dozens of different ones.

The Reference Manual will describe the plumbing, what TIM attach to what others via the ITR selection.

Configure the Master/Slave modes for each.

Configure the Master to associate the TRGO (Trigger Output) with the source within the TIM, ie Update, CCx

Configure the Slave to associate the ITR (Input Trigger) with the selected master. Mode, enable, reset, etc.

Want to modulate one vs the other, configure the Master in a PWM mode, describe the Period, and then duty vs Pulse setting of the chosen channel. This will modulate the on/off of the CCx source.

There are unlikely to be examples addressing every possible use case, find ones which are close and adapt. Look for examples for different boards, and chips, the libraries are pretty common, the key differences with be exact plumbing options, and these would be diagrammed/tabulated in the RM.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
MNapi
Senior III

I have STM32F446RE

I know that I can associate ITR0 with timer, I do not see the code. I am using CubeMX and Keil.

I does not say in Cube MX that I can asosiciate ITR0 with any timer.

The only place I can see it to use ITR0 as trigger. But I do not see a place I can activate ITR0 and connect to another timer.