PWM Period creating errors when compiling

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

PWM Period creating errors when compiling

738 次查看
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

标签 (1)
标记 (3)
0 项奖励
回复
1 回复

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