2023-12-18 11:13 PM
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
SR.
2023-12-19 02:13 AM
Hello @Sm.2
Given that this looks like a complex task, perhaps you could supply a 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.
2023-12-19 03:48 AM
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.
Or.you need to rethink your approach.
A diagram might help.
With many ms you could perhaps manage sequence with state machine driven by 1ms SysTick