Interrupts, timers and frequency with PE

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

Interrupts, timers and frequency with PE

347 Views
alexismaslyczyk
Contributor II

Hi everyone,

as usual I'm confused and not able to find solution on web or datasheet.

I'm using the TWR-KV58F220M with KDS 3.0 and Processor Expert.

I just want to create one interrupt at 1000Hz.

 

When I look tutorial like this:

http://mcuoneclipse.com/2012/08/13/tutorial-timer-led-with-processor-expert-for-kinetis/

 

They use the component Timer, but on my project I didn't have any Timer component. What should I use?

I got the component InterruptManager but it's empty in the Inspector:

133604_133604.pngpastedImage_1.png

Second question what should I use if I want to use timers in my code? (like start a timer, do something, stop timer and see how long my code was)

 

Third question, how can I know that my TWR-KV58F220M is running at 220Mhz? where we can change the frequency

Last question, when I do calculation with float, the floating point unit is directly used in the processor?

 

Thank you for all these answers.

 

 

 

TWR-KV58F220M

Labels (1)
1 Reply

240 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello alex,

- You can use the component of "fsl_pit" or "fsl_ftm"

pastedImage_0.pngpastedImage_1.png

- After you configure the fls_pit or fsl_ftm component, you will find the Methods  that

using the timer:

pastedImage_2.png

- About the chip clock , please refer to the Reference Manual -> Figure 6-1. Clocking diagram , you can refer to the section to

configure the related register to change the frequency of your chip.

pastedImage_3.png

And if you want check the real frequency of the chip , you can check from the PTC3 pin :

pastedImage_4.png

from the register of  SIM_SOPT2-> CLKOUTSEL to select the  clock to output on thePTC3pin , about the detail

you can check the introduce of this register.

pastedImage_5.png

Hope it helps


Have a great day,
Alice Yang

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