I want to execute 4 channels which has independent period and pulsewidth.
Period will be set only during initialization and pulsewidth will be varied in runtime.
eg:
FTM0 chan1 : period = 10ms and pulsewith varying
FTM0 chan2 : period = 20ms and pulsewith varying
FTM0 chan3 : period = 30ms and pulsewith varying
FTM0 chan4 : period = 1000ms and pulsewith varying
How can I attain this functionality in FTM ?
Hi kardhik sambath kumar,
The EPWM period is determined by (MOD − CNTIN + 0x0001) and the pulse width (duty cycle) is determined by (CnV − CNTIN).
But the channels of one FTM module share the same MOD and counter. So the period of these channels are the same.
You need to use channels from different FTM modules. S32K146 contains multiple FTM modules.
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Yes, I can do that.
But I have 40 PWM output channels which needs to be operated in independent period and duty cycle. In this case how can I do it in S32k148. I cannot have same period for channels in same FTM.
Thank you,
Kardhik Sambathkumar
Platform Software
Innov & Tech Devel Div
Caterpillar: Confidential Green
If you mean that you need 40 PWM with different period and varied pulse width. I am afraid the FTM module can not achieve it.
Yes, I can do that.
But I have 40 PWM output channels which needs to be operated in independent period and duty cycle. In this case how can I do it in S32k148. I cannot have same period for channels in same FTM.
Yes, I can do that.
But I have 40 PWM output channels which needs to be operated in independent period and duty cycle. In this case how can I do it in S32k148. I cannot have same period for channels in same FTM.