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 Eduardo Goncalves on March 19, 2009
Hi :)

On a interrupt routine I've placed the following code:

uint8 msg;
xQueueSendToBackFromISR ( CANopenQueue_handle, &msg, &xHigherPriorityTaskWoken );
portEND_SWITCHING_ISR ( xHigherPriorityTaskWoken );

the task that is performing a:

xQueueReceive ( CANopenQueue_handle, &msg, ...

no longer seems to run.

If I don't use portEND_SWITCHING_ISR then all is well.

Any ideas?



Posted by MEdwards on March 19, 2009
You don't say which compiler you are using. Have you checked the WEB documentation page for a similar port (sam7 with the same compiler) to see how an ISR should be written? Different compilers have different requirements as to when and how the task context should be saved and restored.


Posted by Eduardo Goncalves on March 19, 2009
I've been using IAR 5.20 on an AT91SAM7A3.

I've taken the AT91SAM7S64 example and created (with small changes, just the include and linker files) a port for the AT91SAM7A3.

I've looked to the example of serial.c for the AT91SAM7S64 but somehow it does not seem to be up to date since it does not use __irq in the declaration of the interrupt routine. So most likely this is from IAR 4 and uses the IRQ_Handler_Entry provided in Cstartup.s79 file.

the same happens with usbsample.c

more ideas, please. :)


Posted by Richard on March 19, 2009
See "an example of an ISR with context switching capabilities" on the following page and all will be clear: http://www.freertos.org/portsam7iar.html



Posted by Eduardo Goncalves on March 19, 2009
... and everything works! :) :)

many thanks

[ 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