PWM Period creating errors when compiling

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

PWM Period creating errors when compiling

739件の閲覧回数
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 返信

645件の閲覧回数
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 件の賞賛
返信