#776 closed defect (fixed)

at91rm9200 ExecuteITHandler parameter bug

Reported by: lars Owned by: Joel Sherrill
Priority: normal Milestone: 2
Component: bsps Version: unknown
Severity: major Keywords:
Cc: bugs@…, jtm@… Blocked By:
Blocking:

Description

Dierk Haberhausen posted the following a while ago on the rtems-users mailing list and I recently ran into the same problem as well:


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?

Release:
CVS Head

Environment:
csb337 bsp

Change History (1)

comment:1 Changed on Sep 15, 2005 at 6:40:36 PM by Jay Monkman

Status: assignedclosed

State-Changed-From-To: open->closed
State-Changed-Why: Commited change to CVS HEAD.

Note: See TracTickets for help on using tickets.