Assigning vector interrupts outside of MQX

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Assigning vector interrupts outside of MQX

626件の閲覧回数
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.

タグ(2)
1 返信

269件の閲覧回数
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.