STM32F4 Retriggerable one pulse mode
Hello Community,
I am struggling to get a retriggerable one pulse mode working on a STM32F405 and I reached the point where I am not sure whether this is actually possible with the processor. I saw that newer processors have the "Combined Reset Trigger Mode" option which I think is not available for the STM32F405.
As this not available in hardware I think I have to reset/reconfigure the timer by software such that it can be retriggered after the One Pulse mode was executed.
I want to have 3 cascading timers, namely 2, 1 and 3 where timer 2 gets triggered from the outside via ETRF and timer 1 gets triggered via ITR1 and timer 3 gets triggered via ITR0.
This should look like the following:

As in the picture, I am able to configure the timers as described and trigger the cascade once.
Then I read in the manual, that I need to "Write TIF = 0" and this is where I am stuck.

My understanding of "Write TIF = 0" is that I need to reset the status register:
TIMx->SR = ~TIM_FLAG_Trigger;
But that does not seem to be enough to "arm" the timers again.
I have tried resetting all interrupt bits in the SR registers and generating an update event with
TIMx->EGR = TIM_EGR_UG;
and many more variants but I was not able to retrigger the timers.
Any help on what I am missing to make the timer cascade retriggerable or what is meant "Write TIF = 0" is welcome.
Also whether it is at all possible what I am trying to realize with the STM32F405.
Some background to my project:
The 3 pulses shall be retriggered constantly to form a sort of PWM signal. But the duration between the pulses varies slightly s.t. I can not use the PWM mode, especially because sometimes the duration is shorter than the period of one PWM cycle.
All of this happens at 100kHz that is why I was not able to just adapt the ARR and CCR registers with software via an ISR. I get a flickering as some other ISRs seem to sometimes delay the ISR.
My hope is that resetting the timer is not causing unwanted flickering as the reset itself is not so time critical.
Thank you everybody
Luke
