AnsweredAssumed Answered

Crash with IRQ7 and MQX 4.0

Question asked by CEDRIC PALABOST on Mar 18, 2014
Latest reply on Mar 20, 2014 by CEDRIC PALABOST


Hello,

 

I'm using MQX 4.0 with a 52259EVB board and I have a crash with my application...

 

I create a new project based on the example GPIO. Then, I modify the source code to activate IRQ on the IRQ7 pin like this :

lwgpio_init(&btn1, GPIO_PORT_NQ | GPIO_PIN7, LWGPIO_DIR_INPUT, LWGPIO_VALUE_NOCHANGE)

 

Code of the interrupt routine :

void int_service_routine(void *pin)

{

    lwgpio_int_clear_flag((LWGPIO_STRUCT_PTR) pin);

    ul_CompteurIT++;

}

 

In the main loop, the counter ul_CompteurIT is displayed each second (I have 50 interrupts per second).

 

This program crashes after some seconds and goes to a "dummyfn1".

 

 

I try another solution :

I declare a new interrupt routine like this :

__declspec(interrupt) void SecteurSync_Interrupt(void)

{

MCF_EPORT_EPFR = 0x80;

ul_CompteurIT++;

}

 

and use : _int_install_kernel_isr(lwgpio_int_get_vector(&btn1), SecteurSync_Interrupt);

 

It's work well !

 

An ISR doesn't work, an KERNEL ISR works !

 

any ideas?

 

Thanks in advanced for your help.

 

Outcomes