Is there a simple explanation of the interrupt model for MQX.
I have a problem - the symptoms of which look like MQX only services interrupts when it is running the task in which they were installed.
Is that the case?
If so - how to make interrupts do what they are supposed to (i.e. interrupt the current process )
What CPU you are using?
In my project with K10 the MQX interrupts work OK: Eight tasks are running in ms timing schedule and Uart, PWM, ADC and Timer interrupts runs nicely.
The problem is probably not in MQX (Version 3.7).
How have you decided that interrupt is not running?
What interrupt is an problem?
One way to detect interrupt is toggling an output pin in interrupt routine.
Have you used _int_disable() and _int_enable() -calls? Is the _int_:enable() missing somewhere?
One problem source may be too small task stack, causes mysterious behauviour.
Does the debugger halt and report any "Kernel data area corrupted" messages?
Hi Mark P.
I am using MQX 3.7 and MCU is MCF51JF128. I want to have a interrupt in Port E bit 2. I had already written the program for install ISR, it shows as following:
isr_ptr = _mem_alloc_zero((_mem_size)sizeof(MY_ISR_STRUCT));
isr_ptr->OLD_ISR_DATA = _int_get_isr_data(BSP_REMOTE_INTERRUPT_VECTOR);
isr_ptr->OLD_ISR = _int_get_isr(BSP_REMOTE_INTERRUPT_VECTOR);
_int_install_isr(BSP_REMOTE_INTERRUPT_VECTOR, REMOTE_ISR, isr_ptr);
And the interrupt vector progam is as following:
void REMOTE_ISR(pointer user_isr_ptr)
// RNG_CMD |= RNG_CMD_SR_MASK; //generate SW reset
// PMC_LVDSC1 |= PMC_LVDSC1_LVDACK_MASK; //clear LVDF Low Voltage Detect Flag
isr_ptr = (MY_ISR_STRUCT_PTR)user_isr_ptr;
PCTLE_IC=PCTLE_IC&0b11111011; //clear PTIE flag
PCTLE_IF=0xff; // IF register = FF
/* Chain to the previous notifier */
This program can have interrupt to routine void REMOTE_ISR(pointer user_isr_ptr) when I strat the falling edge in this port. But this routine is running and then go to halt and then I run in single step the program is enter to _int_kernel_isr() routine.
Is any missing for this program?Please help me to solve this problem.
What happens if you leave the chaining away by commenting the line:
Not sure but I believe that _int_kernel_isr() should not be chain-called,
it is a default int handler for erroneous ints.
if (isr_ptr->OLD_ISR != _int_kernel_isr) // Chain int only when not default hadnler