Showing results for 
Search instead for 
Did you mean: 

STM32h timers

Associate II

Hello group,

The STM32h745 controller is what I'm using in my application,

I'm attempting to use several interrupts in a single timer from multiple channels,

In my application, we require several interrupts from separate channels on a single timer with distinct ARR values,

I'm using one channel in this instance to generate PWM (with a 2-second pulse). Every positive cycle on this channel requires an interrupt,

When the first channel is in the positive cycle, which is between 0 and 1000 msec, I want to interrupt the second channel. Depending on the intended ARR value, I want to interrupt CH2. For instance, if I want to interrupt a CH2 pulse that lasts between 50 and 600 msec, I also want to stop the subsequent positive pulse, which might last between 150 and 400 msec,

Similarly, CH3 ought to cause an interruption in CH1's negative cycle (between 1000 and 2000 msec).(For example, if I want an interrupt to occur between 1150 and 1600 msec, and then I want the interrupt to occur between 1550 and 17300 msec on the next negative pulse, the values may vary.) How can I configure this such that I receive many interrupts from various channels in single timer,

Best Regards


ST Employee

Hello @Sm.2 

Given that this looks like complex task, perhaps you could supply clear diagram that summarizes your request.

Thank you!

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

You probably can't. There's only one CNT and ARR per timer. You can only sequence things on a single time line by placing CCRx at the points you want interrupts. need to rethink your approach. 

A diagram might help.

With many ms you could perhaps manage sequence with state machine driven by 1ms SysTick 

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