Hi all! I was began to porting the software on MQX LITE system, and in this process i have encountered a problem. Interrupt upon completion of the conversion of the ADC0 have not occur. I was tried to use the command _int_install_isr(), which has the form below:
_int_install_isr(0x49, ADC0_MeasurementCompleteInterrupt, adc0);
where ADC0_MeasurementCompleteInterrupt - pointer of interrupt handler, which was generated by Processor Expert, adc0 - descriptor of ADC0, which contains the pointer of ADC0 data, and 0x49 - ADC0's interrupt vector. Can you tell me where is the error? This function is called from task1. Tell me, is there a complete description of the mechanism of interrupts in MQX LITE system? In the document MQX LITEUG almost nothing written about the interrupt mechanism. Help me please!
Solved! Go to Solution.
Ops, I missed “MQX Lite”. My last reply is valid for MQX.
Priorities and interrupt enabling in MQX Lite are handled by ProcessorExpert code.
One specific point for ARM M4 core (like Kinetis K family):
We cannot use odd numbers for interrupt priorities because these priorities are used by MQX core.
If you want that interrupt is handled by MQX, you have to use these two commands:
_int_install_isr(vector, isr_ptr, isr_data);
_bsp_int_init(vector, priority, subpriority, enable);
Firts command will install isr, second command will enable it.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Ops, I missed “MQX Lite”. My last reply is valid for MQX.
Priorities and interrupt enabling in MQX Lite are handled by ProcessorExpert code.
One specific point for ARM M4 core (like Kinetis K family):
We cannot use odd numbers for interrupt priorities because these priorities are used by MQX core.
Thank you for answer, Radeks! It very helped me.
But problem was very simple:
I used the PE's ADCx_StartSingleMeasurement command , which starts the ADC conversion. Before this, need to use command ADCx_CreateSampleGroup, which does the required settings by installing the corresponding bits. I did not do it. Therefore, ADC interrupt enable bit (ADC_SC1_AIEN) was reset when the ADCx_StartSingleMeasurement command was invoked. The system MQX I will use a little later.
Thank you very much.