Quality RTOS & Embedded Software

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


Loading

Cortex A9 port: The access to portICCPMR_PRIORITY_MASK_REGISTER causes data abort

Posted by stephenwwu on March 24, 2014

I am porting FreeRTOS 8.0.0 to other ARMv7 platforms based on the .../portable/GCC/ARMCA9. I found the system generates data abort when accessing portICCPMRPRIORITYMASKREGISTER.

portICCPMRPRIORITYMASKREGISTER is defined as ( *( ( volatile uint8t * ) ( portINTERRUPTCONTROLLERCPUINTERFACEADDRESS + portICCPMRPRIORITYMASK_OFFSET ) ) ) in portmacro.h. According to ARM IHI0048B GIC Architecture Specification, section 4.1.4, all registers support 32-bit access. Some registers support 8-bit access. All other accesses are implementation dependent.

I changed portICCPMRPRIORITYMASK_REGISTER to 32-bit wide register, the data abort goes away.

Does the register width change make sense? Is there any side effect of the width change?


Cortex A9 port: The access to portICCPMR_PRIORITY_MASK_REGISTER causes data abort

Posted by rtel on March 24, 2014

To be honest, I'm not sure.

The ICCPMR register is a 32-bit register, but only the least significant byte is implemented. The other three bytes are "Reserved", and should be read as zero with writes ignored. Therefore I would not have thought it made any difference, but evidently it does. I think you would have to look at the assembly code generated to work out what the problem is.

Please report back what you find.

Out of interest, which chip are you porting to?

Regards.


Cortex A9 port: The access to portICCPMR_PRIORITY_MASK_REGISTER causes data abort

Posted by stephenwwu on March 25, 2014

The assembly code was 8-bit load 'ldrb' when it is declared as (uint8t *). The ldrb instruction causes data abort. After changing the definition to (uint32t *), the assembly code becomes 'ldr'. No more data abort.


Cortex A9 port: The access to portICCPMR_PRIORITY_MASK_REGISTER causes data abort

Posted by rtel on March 25, 2014

I have updated all 3 Cortex-A port layers to ensure only 32-bit accesses are made to both the ICCPMR and ICCRPR registers.

Regards.


Cortex A9 port: The access to portICCPMR_PRIORITY_MASK_REGISTER causes data abort

Posted by stephenwwu on March 25, 2014

Thanks for the confirmation.


[ 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