As described in the title, I created a project on the 144 chip, added an FTM_IC, and successfully configured several Input Capture channels. How to configure the remaining channels as Output Compare?
Solved! Go to Solution.
Hello @fengjuntian,
You can add the FTM_OC driver, but you would need to use it with another FTM module as the SDK does not allow using two or more FTM driver on the same FTM module.
The non-SDK FTM example (S32K144_project_FTM) that is available in the S32DS IDE configures OC, IC and PWM channels on FTM0.
Regards,
Daniel
Hello @fengjuntian,
You can add the FTM_OC driver, but you would need to use it with another FTM module as the SDK does not allow using two or more FTM driver on the same FTM module.
The non-SDK FTM example (S32K144_project_FTM) that is available in the S32DS IDE configures OC, IC and PWM channels on FTM0.
Regards,
Daniel
So it seems that FTM_IC or FTM_OC software module design prevents multi-purpose usage of a FTM device, even though the hardware module allows that?
Do you see any possibility of refactoring the FTM driver software to remove that limitation? Especially can we refactor the ftmMode member as a bitmask type so that multi-purposes can be supported? do you see any hidden difficulties?
Hello @yfliu,
Currently, FTM drivers in RTM 4.0.x in S32DS 3.4 accepts PWM and IC but not OC, this is due to concurrent access to the same timer which is hard to manage in this use case.
Regards,
Daniel
@danielmartynek ,Thanks!
Input Capture and Output Compare cannot be implemented in the same FTM driver??
I can only do this by configuring registers, is that what you mean?