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




Loading

xQueueReceive does not yield from ISR

Posted by petergreen0815 on March 29, 2015

Hi,

I use FreeRTOS V7.1.0 on a LPC2368 togther with Crossworks 3.0.

I have two tasks and an ISR. H-task has a high prio. L-task has a low prio.

H-task executes xQueueReceive and gets blocked as expected. L-task executes endless background processing and has no blocking statements. When the ISR is called, I use the following code and would expect H-task to resume.

portBASETYPE taskWoken=pdFALSE; taskWoken = xQueueSendToBackFromISR(xWavPlayerRequestQueue,&pWavFile,&taskWoken); if( taskWoken != pdFALSE ) portYIELDFROM_ISR();

But L-task keeps executing and H-task never resumes from xQueueReceive.

With the debugger I see that H-task is marked as "executing" but the breakpoint after xQueueReceive never hits.

Any ideas?

Shouldn't H-task be activated after the next vNonPreemptiveTick?

Thanks in advance.


xQueueReceive does not yield from ISR

Posted by rtel on March 29, 2015

Its been a long time since I did anything on an ARM7, but I don't recognise portYIELDFROMISR() as a macro that was ever provided for ARM7 ports (might be wrong). I think in ARM7 ports it is called portENDSWITCHINGISR().

Also in ARM7 ports you need to provide an assembly wrapper around interrupt service routines, are you doing that? Please post the code you are using the enter the interrupt.

Regards.


xQueueReceive does not yield from ISR

Posted by petergreen0815 on March 29, 2015

You are my hero! ;-)

Of course I had no wrapper. I wasn't aware that I need one.

After reading the word "wrapper" I examined the ARM7LPC2368Rowley demo and found in EMAC_isr.c the pattern for it.

Knowing the answer I also found the proper documentation here: http://www.freertos.org/portlpciar.html http://www.freertos.org/portlpc2106.html http://www.freertos.org/portat91fr40008.html

Thank you very much!

Regards.


[ 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