Quality RTOS & Embedded Software

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


Loading

xSemaphoreGiveFromISR from context of a task

Posted by ARMinator on March 20, 2009
Hi,

Sorry if this post appears twice, my first attempt seems to have failed.

I need to write that piece of code that is generic enough that it allows giving a semaphore from the context of either an ISR or a task. Since an ISR must use xSemaphoreGiveFromISR to give semaphores, is it possible to use xSemaphoreGiveFromISR in the context of a task?

If so, any cons with doing this?

Jean

RE: xSemaphoreGiveFromISR from context of a t

Posted by Richard on March 20, 2009
You can use xQueueGenericSendFromISR() from a task but need to take care of critical sections. The ISR version uses portSET_INTERRUPT_MASK_FROM_ISR() which is only defined for ports that use interrupt nesting. You would need to implement an equivalent for your port if it were not already defined.

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.

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