Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

ARM Cortex-A9 Intall Interrupt Handler bug?

Posted by John Wilkes on January 28, 2013
The vPortInstallInterruptHandler() function in the ARM_Cortex-A9 port.c file has the following:

unsigned long ulBank16 = 4 * ( ulVector / 16 );

/* Is it Edge Triggered?. */
if ( 0 != ucEdgeTriggered )
{
portGIC_SET( (portGIC_ICDICR_BASE(puxGICDistributorAddress + ulBank16) ),
( portGIC_READ(puxGICDistributorAddress + ulBank16) | ( 0x02 << ( ulOffset16 * 2 ) ) ) );
}

I think it wants to set the edge-triggered bit in the appropriate Interrupt Interrupt Configuration Register, but it looks like it is OR'ing the edge-triggered bit with the contents of the Interrupt Controller Type Register at GCDistributorAddress+4 (e.g. for "vector" 29).

This makes no sense to me. Am I missing something? Why does it read (puxGICDistributorAddress + ulBank16) and OR the edge-triggered bit into that value?

Seems like it should be something like this:

portGIC_SET( (portGIC_ICDICR_BASE(puxGICDistributorAddress + ulBank16) ), ( ( 0x02 << ( ulOffset16 * 2 ) ) ) );

-jw-

RE: ARM Cortex-A9 Intall Interrupt Handler bug?

Posted by Richard on January 28, 2013
There is not (yet) an official Real Time Engineers ltd maintained Cortex-A9 port. Did you get your code from the FreeRTOS Interactive site? If so, please let me know which post the code came from and I may be able to ping the authour for a reply.

Regards.

RE: ARM Cortex-A9 Intall Interrupt Handler bug?

Posted by John Wilkes on January 28, 2013
I found the Cortex-A9 posting and download on the FreeRTOS Interactive site:

http://interactive.freertos.org/entries/21035433

Thanks!

RE: ARM Cortex-A9 Intall Interrupt Handler bug?

Posted by Richard on January 28, 2013
Did you check it against this version?
http://interactive.freertos.org/entries/21558347-arm-cortex-a9-versatileexpress-quad-core-port

Regards.

RE: ARM Cortex-A9 Intall Interrupt Handler bug?

Posted by John Wilkes on January 28, 2013
I hadn't seen that version, but it has the same edge-triggered code in vPortInstallInterruptHandler().

RE: ARM Cortex-A9 Intall Interrupt Handler bug?

Posted by John Wilkes on January 29, 2013
I have convinced myself that this is a bug in the code, but I don't think it matters for the Cortex-A9 MPCore, as ICDICR0 and ICDICR1 are read-only registers. Different implementations, e.g. single Cortex-A9 with a GIC, might have a problem.

-jw-

RE: ARM Cortex-A9 Intall Interrupt Handler bug?

Posted by Richard on January 30, 2013
Thanks for taking the time to mention this. I will let the authors know.

Regards.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner