This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Use of IRQ on ARM
- From: Francesco Regazzoni <regazzoni at alari dot ch>
- To: ecos-discuss at sourceware dot org
- Date: Fri, 24 Feb 2006 15:18:43 -0500
- Subject: [ECOS] Use of IRQ on ARM
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