at91rm9200 ExecuteITHandler parameter bug
Haberhausen, Dierk
Dierk.Haberhausen at wincor-nixdorf.com
Fri Dec 17 14:18:40 UTC 2004
Hello,
I was wondering why my ISR don't get the interrupt vector parameter.
I found out that the ExecuteITHandler function,
don't consign this parameter to the ISR
(rtems-src\c\src\lib\libcpu\arm\at91rm9200\irq\bsp_irq_asm.s).
So I have changed the ExecuteITHandler to:
ExecuteITHandler :
/*
* Look at interrupt status register to determine source.
* From source, determine offset into expanded vector table
* and load handler address into r1.
*/
ldr r0, =0xFFFFF100 /* AIC_CTL_BASE + AIC_IVR */
ldr r1, [r0]
str r1, [r0] /* write back in case we are using protect
*/
ldr r0, =0xFFFFF108 /* AIC_CTL_BASE + AIC_ISR */
ldr r0, [r0] /* Read interrupt vector */
stmdb sp!,{lr}
ldr lr, =IRQ_return /* prepare the return from handler */
mov pc, r1 /* execute handler */
But I am not sure that I get the right vector in all cases (nested irqs)???
Has anybody a deep knowledge in the ATMEL AIC?
Thanks and nice weekend...
Dierk
More information about the users
mailing list