KL03 PWM set channel output low

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

KL03 PWM set channel output low

Jump to solution
816 Views
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

Tags (3)
0 Kudos
1 Solution
552 Views
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!

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

View solution in original post

0 Kudos
3 Replies
553 Views
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 Kudos
552 Views
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 Kudos
552 Views
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 Kudos