DBGU AIC Config irq_id?

hudson2009 wrote on Monday, July 16, 2007:

Hi,

Following are the example code to enable interrupt for UART0.
Q: Whats the "irq_id" for DBGU?

/* Enable the interrupts in the AIC. */
// AT91F_AIC_ConfigureIt( irq_id, priority, src_type, newHandler )
AT91F_AIC_ConfigureIt(AT91C_ID_US0, serINTERRUPT_LEVEL, AT91C_AIC_SRCTYPE_INT_HIGH_LEVEL, ( void (*)( void ) )  vUART_ISR );
AT91C_BASE_AIC->AIC_IECR =  0x1 << AT91C_ID_SSC;

my Board: AT91SAM7X-EK
Compiler: CrossWork 1.7 (GCC)
example: FreeRTOS IwIP

Thanks!

embeddedc wrote on Monday, July 16, 2007:

The DBGU uses the system interrupt.  From memory this is the same ID as the PIT.  The PIT interrupt is setup in port.c, so you can get the ID from there.  The DBGU and PIT share the interrupt, so in the ISR you need to determine the interrupt source and cannot vector to the interrupt directly without doing this first (tell me someone if this is wrong).  There have been some threads on this list some time back about this.