hello,I want to disable PWM output on a specific channel of EMIOS. Can I achieve this through a function? Could you please tell me how to do it?
Solved! Go to Solution.
Hi @fengba_360
Is it possible to achieve it by writing to registers? Yes
If so, could you please tell me the specific plan? Mainly to disable an EMIOS channel you have to clear control register 2 and stop clock for Channel, clear control register for Channel and clear An and Bn registers (refer to section 63.8.6 of the S32K3xx Reference Manual, Rev. 8). There could be additional steps but deppends on some channel configurations (steps are explained in detail in Emios_Pwm_Ip_DeInitChannel() function).
Hi @fengba_360
The Emios_Pwm_Ip driver (low-level driver) has a function called Emios_Pwm_Ip_DeInitChannel() that resets the eMIOS channel to GPIO mode (default reset). Otherwise, the PWM driver (high-level driver/MCAL) does not have a similar function.
BR, VaneB
Hi @fengba_360
Is it possible to achieve it by writing to registers? Yes
If so, could you please tell me the specific plan? Mainly to disable an EMIOS channel you have to clear control register 2 and stop clock for Channel, clear control register for Channel and clear An and Bn registers (refer to section 63.8.6 of the S32K3xx Reference Manual, Rev. 8). There could be additional steps but deppends on some channel configurations (steps are explained in detail in Emios_Pwm_Ip_DeInitChannel() function).