Kinetis K60 rectangular wave generation

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Kinetis K60 rectangular wave generation

Jump to solution
1,258 Views
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

Labels (1)
0 Kudos
1 Solution
874 Views
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

View solution in original post

0 Kudos
7 Replies
874 Views
mruetti
Contributor III

I'm still looking for a solution...

0 Kudos
874 Views
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!
-----------------------------------------------------------------------------------------------------------------------

874 Views
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 Kudos
875 Views
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 Kudos
874 Views
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 Kudos
874 Views
ankur_kala
NXP Employee
NXP Employee

Hi Mario,

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

0 Kudos
874 Views
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 Kudos