Available Timers for additional periodic 200us interrupt routine on Kinetis K60

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

Available Timers for additional periodic 200us interrupt routine on Kinetis K60

844 Views
Maciek
Contributor V

Hi,

I'm using 120MHz kinetis K60 on custom board and I need one computational routine to be run each 200us (microseconds). The rest of the application can be run with standard 5ms timer resolution from MQX.

I can't find info which peripherals and interrupts (resources) are used by MQX itself. And I don't want to interfere in the MQX internal processes by changing/modifying interrupts used internally by MQX.

If I would like to add a timer ISR to my application (run each 200us) - which timers (or other peripherals) are available to me ?

Thanks for help

Maciek

Tags (4)
3 Replies

343 Views
soledad
NXP Employee
NXP Employee

Hi,

Unfortunately you can have a routine running each 200us (microseconds). You need to use interrupts.

If you want that MQX handled all the ISR process you can use _int_install_isr. Using this function MQX catches all hardware interrupts in the range that the BSP defined and saves the context of the active task. For most interrupts, MQX calls the ISR that is stored in the interrupt vector table at the location identified by its interrupt vector number. The disadvantage with this is the interrupt latency is longer and depends completely on MQX. In this case you cannot have the interrupt each 200us.

The other option is using _int_install_kernel_isr. Some real-time applications need special event handling to occur outside the scope of MQX. The need might arise that the latency in servicing an interrupt be less than the MQX interrupt latency. If this is the case, an application can use _int_install_kernel_isr() to bypass MQX and let the interrupt be serviced immediately.

Because the function returns the previous kernel ISR, applications can temporarily install an ISR or chain ISRs so that each new one calls the one installed before it.

Regards,

Sol

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

343 Views
Maciek
Contributor V

Hi,

thanks for the answer but I wasn't asking how to use interrupts (kernel or MQX interrupts).

My question is about available resources:

"I can't find info which peripherals and interrupts (resources) are used by MQX itself. And I don't want to interfere in the MQX internal processes by changing/modifying interrupts used internally by MQX.

If I would like to add a timer ISR to my application (run each 200us) - which timers (or other peripherals) are available to me ?"

I don't know which timers are free to use by my application. Free means: not used by MQX itself.

Thanks

Maciek

0 Kudos

343 Views
soledad
NXP Employee
NXP Employee

Hi Maciek,

MQX implements software timers, so you can use the hardware timers, for example LPTMR.

Regards

Sol

0 Kudos