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:
MY_ISR_STRUCT_PTR isr_ptr;
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);
Remote_init();
And the interrupt vector progam is as following:
void REMOTE_ISR(pointer user_isr_ptr)
{
MY_ISR_STRUCT_PTR 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
remote_count=0;
if (Remote_Data_Receive1()==0)
{
int x;
x=0;
}
/* Chain to the previous notifier */
(*isr_ptr->OLD_ISR)(isr_ptr->OLD_ISR_DATA);
}
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.
~Eric