[Bug 1832] New: Wrong interrupt vector number reported on at91rm9200

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Wed Jul 13 19:43:13 UTC 2011


https://www.rtems.org/bugzilla/show_bug.cgi?id=1832

           Summary: Wrong interrupt vector number reported on at91rm9200
           Product: RTEMS
           Version: 4.10
          Platform: arm
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P3
         Component: libcpu
        AssignedTo: joel.sherrill at oarcorp.com
        ReportedBy: mannet at kth.se


Created attachment 1219
  --> https://www.rtems.org/bugzilla/attachment.cgi?id=1219
Patch for c/src/lib/libcpu/arm/at91rm9200/irq/irq.c

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

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list