µTasker Forum
µTasker Forum => NXPTM M522XX, KINETIS and i.MX RT => Topic started by: sam512bb on January 07, 2013, 10:23:48 PM
-
Good day Mark,
I was curious if you can provide a Kinetis Periodic Timer Example? Sadly, I cannot use uTaskerMonoTimer, as I require the task to run every 100 milliseconds. I have tried doing this via TIMER_INTERRUPT_SETUP as well as PIT_SETUP, but with no success...
Thank you in advance!
Cheers,
Sam
-
Hi Sam
In ADC_Timers.h you can enable a PIT demo with TEST_PIT plus TEST_PIT_PERIODIC for a periodic interrupt.
Make sure that SUPPORT_PITS is enabled in app_hw_kinetis.h (so that the PIT driver is available).
This configures PIT0 using fnConfigurePIT() for a 500us interrupt period.
The interrupt handler (test_nmi()) will toggle an LED as defined by TOGGLE_TEST_OUTPUT so that a 500Hz square wave is generated. The output is, for example, the yellow LED on the K60 Tower board.
Regards
Mark
-
Good day Mark,
Excellent, thanks for the prompt response and info ... as usual :)
Cheers,
Sam