interrupt on arm9

Rochat Joël jrochat at
Wed Oct 24 14:55:44 UTC 2007


I'm relative young in rtems developpment. I'm using a board with an ARM9
(at91rm9200) cpu on it with csb337 as bsp. 

The tools I've test such as event, timers, semaphores are working well. I
also managed to write some code to 'listen' to 
an interrupt. I write this code manually :

void handlerIRQ (void) __attribute__ ((interrupt ("IRQ"))) ;
void handlerIRQ (void)
	doIsr = TRUE ;

	//clear irq
	AT91C_BASE_AIC->AIC_ICCR = (1 << AT91C_ID_IRQ5) ;

void initIRQ ()
	//Level sensitivity and priority of interrupt

	//give fonction to call when interrupt comes
	AT91C_BASE_AIC->AIC_SVR[AT91C_ID_IRQ5] = (unsigned long)handlerIRQ ;

	//enable irq
	AT91C_BASE_AIC->AIC_IECR = (1 << AT91C_ID_IRQ5) ;

This code works fine. But I try now to use rtems interrupt tools. But I'm a
littel bit lost with it here is the code i used

//the isr routine
rtems_isr user_isr(rtems_vector_number vector)
	gTick = TRUE ;

//the catch methode
status =  rtems_interrupt_catch(user_isr, ARM_EXCEPTION_IRQ, &old_isr_handler) ;

//then unabled the irq for level 3
rtems_interrupt_enable(3) ;

When I launch this code on the board it stops one time in the isr routine.
Do I have to reste the interupt or somthing like that ?

Did someone use the at91rm9200 with interrupt ?

How can I say to RTEMS that I want to listen to IRQ5 for exemple ?

Think you have a nice day.

Joel R.

More information about the users mailing list