#1832 closed defect (fixed)

Wrong interrupt vector number reported on at91rm9200

Reported by: Manne Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: arch/arm Version: 4.10
Severity: major Keywords:
Cc: Blocked By:
Blocking:

Description

The bsp_interrupt_dispatch routine does not determine the correct interrupt source number.

According to the datasheet, the reading of the interrupt vector register (AIC_IVR) notifies the hardware that the OS is taken care of the interrupt. Only after AIC_IVR have been read can the correct source number be read from the interrupt status register (AIC_ISR).

TESTING:
Source was configured with
./configure --enable-posix --target=arm-rtems4.10 --enable-rtemsbsp=kb9202 --prefix=/opt/rtems-4.10 --enable-cxx
but should be possible to test on csb337 as well.

Test application:


rtems_task Init (rtems_task_argument ignored)
{

printf("sleeping...\n");
rtems_task_wake_after(1);
printf("woke up\n");

}
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INIT
#include <rtems/confdefs.h>


The outcome is:
sleeping...
spurious interrupt: 0
spurious interrupt: 0
spurious interrupt: 0
spurious interrupt: 0
...

PATCH
With the attached patch applied, the output is:
sleeping...
woke up

Attachments (1)

patch (624 bytes) - added by Manne on Jul 13, 2011 at 6:43:13 PM.
Patch for c/src/lib/libcpu/arm/at91rm9200/irq/irq.c

Download all attachments as: .zip

Change History (3)

Changed on Jul 13, 2011 at 6:43:13 PM by Manne

Attachment: patch added

Patch for c/src/lib/libcpu/arm/at91rm9200/irq/irq.c

comment:1 Changed on Jul 13, 2011 at 7:26:36 PM by Joel Sherrill

op_sys: LinuxAll
Resolution: fixed
Status: newclosed

Commited to 4.10 branch and head. Thanks.

comment:2 Changed on Oct 10, 2017 at 6:32:23 AM by Sebastian Huber

Component: libcpuarch/arm
Note: See TracTickets for help on using tickets.