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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

463 次查看
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 项奖励
回复
1 回复

451 次查看
_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 项奖励
回复