Kinetis K60 rectangular wave generation

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

Kinetis K60 rectangular wave generation

跳至解决方案
1,827 次查看
mruetti
Contributor III

Hi

 

I have a K60Dx256VLL10 and I would like to generate a rectangular wave (with variable frequency) on port PTB19.

To do this I tried the PE and used the PPG component. But when I try to use the "Runtime settings type: interval" I only get the following error message : "Timing setting failed in Clock configuration 0 - minimal resolution failed. Minimal applicable resolution for the selected limit is: 0.021us".

 

14245_14245.pngBild 3.png

What's my problem?

 

Thank you

Mario

标签 (1)
0 项奖励
回复
1 解答
1,443 次查看
marek_neuzil
NXP Employee
NXP Employee

Hi Mario,

I have checked the problem and it seems that there is a precision computing problem. The precision is computed from the Low limit value. Please, set the allowed error in ms (select ms in Units) and set 0.0001ms allowed error, see the following screenshot.

I have also noticed that there can be problem with the Initial Value. In case that you have trouble to set the Init. Value in us, select ms and set the same value in ms.

I use the MK60DX256VLQ10 CPU and 20.9MHz bus clock. Therefore there are different minimal value. When you click on the Advance button in the Timing dialog you can also see the clock path and you can select clock source and prescaler values directly.

Best Regards,

Marek Neuzil

K60 - PPG timing setting minimal values.GIF.gif

在原帖中查看解决方案

0 项奖励
回复
7 回复数
1,443 次查看
mruetti
Contributor III

I'm still looking for a solution...

0 项奖励
回复
1,443 次查看
trytohelp
NXP Employee
NXP Employee

Hi Mario,

I will check with PE team to have their comments about it.

In another way can you please just confirm what is the development tool you're using.

  is it CW for MCU V10.6 ?

Have a great day,
Pascal Irrle

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

1,443 次查看
mruetti
Contributor III

Hi Pascal

The CW IDE tells me:

CodeWarrior Development Studio

(c) Freescale Semiconductor, Inc. 2014. All rights reserved.

Learn more about CodeWarrior at

http://www.freescale.com/codewarrior

Installed Products:

- CodeWarrior for MCU

    Version: 10.6

    Build Id:140329

If you need some more information please do not hesitate to ask me...

Thank you

Mario

0 项奖励
回复
1,444 次查看
marek_neuzil
NXP Employee
NXP Employee

Hi Mario,

I have checked the problem and it seems that there is a precision computing problem. The precision is computed from the Low limit value. Please, set the allowed error in ms (select ms in Units) and set 0.0001ms allowed error, see the following screenshot.

I have also noticed that there can be problem with the Initial Value. In case that you have trouble to set the Init. Value in us, select ms and set the same value in ms.

I use the MK60DX256VLQ10 CPU and 20.9MHz bus clock. Therefore there are different minimal value. When you click on the Advance button in the Timing dialog you can also see the clock path and you can select clock source and prescaler values directly.

Best Regards,

Marek Neuzil

K60 - PPG timing setting minimal values.GIF.gif

0 项奖励
回复
1,443 次查看
mruetti
Contributor III

Hi Marek,

thank you for the help! The allowed error was indeed the problem. Now it works as expected!

With best regards

Mario

0 项奖励
回复
1,443 次查看
ankur_kala
NXP Employee
NXP Employee

Hi Mario,

what is the frequency of the rectangular wave you are looking for?

0 项奖励
回复
1,443 次查看
mruetti
Contributor III

Hi Ankur

The range must contain my resonant frequency of 2.7 kHz.

Just to mention, I can generate a constant frequency but not one I can change at runtime.

0 项奖励
回复