Quality RTOS & Embedded Software

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


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 ]    [ 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