Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training



Posted by Raphael Derosso Pereira on July 31, 2008

I'm trying to use this function inside my UART IRQ handler in my ARM7 GNUARM project, but it is producing Data Abort Exception. I raised the IRQ stack to 2048 bytes and verified the pointers using a debugger. All seems to be fine. I really can't find the problem, as it doesn't occur when stepping through the debugger.
The code used is below:

extern volatile struct uart_info **uarts_available;

void uart_0_interrupt_handler(void)
unsigned char c;
unsigned int status;
portBASE_TYPE task_woken = 0;

status = U0IIR;

/* Check interrupt source */
switch (status & UART_INT_ID)
/* Status received */
/* Not enabled */

/* Data available */

status = U0LSR;
while (status & UART_LSR_RDR)
c = U0RBR;
if (!(status & UART_LSR_RXFE))
xQueueSendToBackFromISR(uarts_available[0]->rx_queue, &c, &task_woken);

status = U0LSR;

/* Not enabled */

/* Not enabled */

VICVectAddr = 0;
if (task_woken)

RE: xQueueSendToBackFromISR

Posted by Dave on July 31, 2008
Check the UART demo that comes with the port to see how to call yield from within an interrupt. I don't think it is likely that you can simply call taskYIELD(). Which ARM7 port are you using?

Have you followed the example given on the documentation page for your port with regard to how to write an interrupt?

RE: xQueueSendToBackFromISR

Posted by Ricky on July 31, 2008
Perhaps you have an interrupt interrupting your interrupt. When you're in the debugger, interrupts are inhibited so you won't see the data abort happen.

Also, taskYIELD isn't the proper macro to be using in an interrupt. You should do something like this:

portEND_SWITCHING_ISR (task_woken);

RE: xQueueSendToBackFromISR

Posted by Raphael Derosso Pereira on August 1, 2008
Thank you all. I was really doing the thing in the wrong way! Now everything is working fine!


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

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists