AnsweredAssumed Answered

PWM Period creating errors when compiling

Question asked by brian cavanagh on Mar 19, 2017
Latest reply on Mar 21, 2017 by Robin_Shen

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

Attachments

Outcomes