AnsweredAssumed Answered

S32K144 - FTM Output Compare for Single Pulse

Question asked by brucebowling on Dec 31, 2018
Latest reply on Jan 8, 2019 by brucebowling

I have a question regarding the generation of a single pulse (one shot) using the Flex Timer Output Compare method. I wish to generate an immediate pulse (positive edge) which last a given duration and returns back low - a simple single shot or one shot operation. I want the pulse to begin immediately by forcing the output to a high state and letting an OC match reset the pulse.


Using the output compare function I realize that I can set up a OC match to set the pulse high and then another OC match to reset the pulse to low. But what I wish to do is manually set the output high and then let a single OC match set the pulse back low.


Is there a proper S/W means to force the output high manually while the FTM is configured in OC mode? I see that there are registers like OUTINIT but this appears to be an initialization register and not a runtime. And I see the register SWOCTRL which appears to be the correct method, however from the manual this appears to be used for PWM synchronization and not OC mode? And there are different SYNCONF update mechanisms for SWOCTRL, again not appearing to be relevant to the OC mode.


This should be the simplest operation to generate a one-shop pulse but the actual implementation is not clear.... without having to resort to multiple OC operations or even bit-banging GPIO during OC matches.


Thanks - Bruce