KL03 PWM set channel output low

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

KL03 PWM set channel output low

跳至解决方案
862 次查看
stevengarfinkel
Contributor III

I am using the KL03s PWM outputs and I cannot determine if the channel outputs can be set low without disabling the PWM function.  For example, I would like the PWM to continue running and when an interrupt occurs I would like to turn the channel output off until the next cycle starts.

Thanks

标记 (3)
0 项奖励
1 解答
598 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Steven,

Do you mean the function like fault clearing? (for example: Automatic fault clearing)

Automatic fault clearing.jpg

The TPM module in KL03 doesn't support this function.

I am afraid you need select one MCU with fault inputs function. Product Selector can help you find the Kinetis with fault inputs function (PWM Types select Motor Control PWM).

If you still want to use KL03, I think you can wire-AND the output of PWM and GPIO.

and logic gate.jpg

For example: Clear the GPIO after rising edge detected, set the GPIO in Timer Overflow Interrupt if needed.

Best Regards,

Robin

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
3 回复数
599 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Steven,

Do you mean the function like fault clearing? (for example: Automatic fault clearing)

Automatic fault clearing.jpg

The TPM module in KL03 doesn't support this function.

I am afraid you need select one MCU with fault inputs function. Product Selector can help you find the Kinetis with fault inputs function (PWM Types select Motor Control PWM).

If you still want to use KL03, I think you can wire-AND the output of PWM and GPIO.

and logic gate.jpg

For example: Clear the GPIO after rising edge detected, set the GPIO in Timer Overflow Interrupt if needed.

Best Regards,

Robin

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 项奖励
598 次查看
stevengarfinkel
Contributor III

Thanks.  The feature you suggest is similar to what I had in mind.  I guess there is no register that actually represents the channel output in the KL03 family that could be reset in software.

0 项奖励
598 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Steven,

You can also refer the methods in Clear PWM channel output after StopOnOverflow (KL17Z) .

Best Regards,

Robin

0 项奖励