Using PWM, after DeInitPwm() is called I hope the pin state is "High" state.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using PWM, after DeInitPwm() is called I hope the pin state is "High" state.

467 Views
toipaz
Contributor III

I'm using the S32K148 EVM.

I configured the pin PTB8 for FTM3_0 function.

After the DeInitPWM was executed, the pin states went to Low state.

My application needs to call InitPwm() and DeInitPwm() repeatedly. At this time, After DeInitPwm, the pin state need to keep the high state.

Is it possible to set the Default pin state to High state after DeInitPWM() in the PWM configuration settings?

0 Kudos
Reply
1 Reply

455 Views
_Leo_
NXP TechSupport
NXP TechSupport

Hi,

Thank you so much for your interest in our products and for using our community.

Yes! You can test it using the Ftm_Pwm_Ip_Example_S32K148 of RTD S32K1 2.0.0 with the following modifications:

  • Remove the while() loop in main file.
  • Change Initial Output State value from LOW to HIGH in Ftm_Pwm driver (PwmFtmCh tab).

When debugging and after Ftm_Pwm_Ip_DeInit() function you will see the output HIGH.

On the other hand, you can set duty cycle as 100% without call Ftm_Pwm_Ip_DeInit().

Hope it helps you.

Have a nice day!

0 Kudos
Reply