TMP0 and center aligned PWM

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

TMP0 and center aligned PWM

1,566件の閲覧回数
miroslavmartise
Contributor I

Hello everybody,

I am playing with FRDM-KL25Z at the moment, namely with Init_TMP component and blue LED. If I want to set up the mode of channels as a Center-aligned PWM, output signal is not produced farther away. But if I change it to Edge-aligned PWM, it works fine and LED lights.

In attachment you can see screenshot of my current setting.

Is there any bug, or so? This puzzles me.....

Thank you.

ラベル(2)
0 件の賞賛
返信
5 返答(返信)

1,344件の閲覧回数
miroslavmartise
Contributor I

Hi Alice,

I would like to thank you for your advice and help.I highly appreciate it. Center-aligned PWM is working properly at the moment :-)

Have a nice day.

Miroslav

0 件の賞賛
返信

1,345件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Miroslav

Welcome !

BR

Alice

0 件の賞賛
返信

1,345件の閲覧回数
miroslavmartise
Contributor I

Hello Alice,

in attached .rar file you can find my project. It should be noted that I am not the author of entire project, main structure was downloaded from this community forum. I have only changed setting of TPM0 to center-aligned PWM.....

Have a nice day,

Miroslav

0 件の賞賛
返信

1,345件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Miroslav,

I test your project on my side , find there is a bug in the generated code of Init_TPM.

Please add these code in the file of "TPM0.C"

 TPM0_C0SC = (TPM_CnSC_MSB_MASK | TPM_CnSC_ELSB_MASK);‍‍

and disable the original code of TPM0_C0SC :

pastedImage_1.png

After change the code,  please  choose " Don't Write Generated Component Modules":

pastedImage_2.png

Then build , run ...

I also attached the project which I changed .

Hope it helps


Have a great day,
Alice Yang

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

0 件の賞賛
返信

1,345件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Miroslav,

Could you please share your project to me , I will check it on my side .

BR

Alice

0 件の賞賛
返信