Assigning vector interrupts outside of MQX

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

Assigning vector interrupts outside of MQX

627 Views
MatthewScott_DE
Contributor II

I am running a project that uses a kinetis k60_100 along with MQX because of the need for Ethernet communication and webpage hosting. The main function of the device is to use a setup of ADCs with automatic comparison and hardware triggering of the ADCs and DMA to measure transient and RMS voltages. I am much more comfortable writing this code without the use of the MQX IO subsystem and need to figure out how to assign the vector interrupts for the ADCs to code that I have written.

Tags (2)
1 Reply

270 Views
Martin_
NXP Employee
NXP Employee

Hello,

for MQX managed isr:

(hardware vector table for all MQX managed isrs points to MQX kernel function _int_kernel_isr()). This function invokes user isr by jumping into instruction pointed by "isr_ptr" installed by _int_install_isr():

  _int_install_isr(vector, isr_ptr, isr_data);

  _bsp_int_init(vector, priority, subpriority, enable);

for a user kernel isr (bypasses MQX kernel system):

_int_install_kernel_isr(Vector, isr_ptr);

if vector table is located in RAM; or in case of vector table in flash, you can hook your isr function directly into the vectors.c in BSP source code directory. then:

  _bsp_int_init(vector, priority, subpriority, enable);

see section 3.9 in MQX User's Guide. VERY IMPORTANT:

- priority of MQX managed isr must not be greater than MQX_HARDWARE_INTERRUPT_LEVEL_MAX

- from a user kernel isr the application must not call MQX API.