[ECOS] Use of IRQ on ARM

Francesco Regazzoni regazzoni@alari.ch
Sun Feb 26 14:51:00 GMT 2006


Hi,

I have one questions about attaching an handler for the IRQ generated by
an ARM simulator.

I generate my eCos using:
ecosconfig new integrator_arm9
ecosconfig add posix



Then in my main.c I added this:

static cyg_interrupt int1;
static cyg_handle_t int1_handle;
int initInterruptHandler(void) {
        cyg_vector_t int1_vector = CYGNUM_HAL_VECTOR_IRQ;
        cyg_priority_t int1_priority = 0;

        cyg_interrupt_create (
                int1_vector,
                int1_priority,
                0,
                &MyHandler,
                NULL,
                &int1_handle,
                &int1);

        cyg_interrupt_attach (int1_handle);
        cyg_interrupt_unmask (int1_vector);
        cyg_interrupt_enable();
}


and I call it here:

int main(int argc, char **argv)
{
	initInterruptHandler();
	while (1) {}
}


I was expecting to see my MyHandler being called when IRQ is raised, but
when the pin of the CPU is up, I don't see my function being executed.


Am I missing something?

Thanks a lot
Regards,


-- 
Francesco Regazzoni,
PhD student at ALaRI - USI, Lugano [http://www.alari.ch]

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list