PWM Period creating errors when compiling

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

PWM Period creating errors when compiling

743 Views
briancavanagh
Contributor III

Hi All, 

I'm using the MK22FN256VLH12 uC.  I inherited some code that creates a PWM.  What I do is change the value to the variable "DutyCycle" to 100.  I compile and load the uC and it works great.  I also tried set the DutyCycle variable to 80 it still, it works great.

On the properties page (Kinetis Design Studio 3.2.0) the current period is set to 20kHz (see attached Figure 1.).  I would like to reduce the period to 1kHz, however, I get an error when I compile (see attached Figures 2 and 3).

When I change it back to a 20kHz period and recompile, the error and warnings remain (see attached Figure 4).  

I also attached the code, perhaps this will help.  

Thanks,

Brian

Labels (1)
Tags (3)
0 Kudos
Reply
1 Reply

649 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Brian,

The PWM_LDD component doesn't support ticks as it's Unit.
Please try to use us\ms\sec.

PWM unit.png

Best Regards,

Robin

 

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

0 Kudos
Reply