Quality RTOS & Embedded Software

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


Loading

Yielding from ISR on dsPIC

Posted by https://www.google.com/accounts on November 14, 2011
I'm using FreeRTOS on a dsPIC and want to give a semaphore from an ISR. The xSemaphoreGiveFromISR macro is being called but in all of the documentation it talks about yielding from within the ISR. The actual implementation depends on the port. some ports use taskYIELD. There is a version for the PIC32 that is named portEND_SWITCHING_ISR but I can't find an implementation for the dsPIC. Has anyone implemented this and if so, do you want to share the solution? I'm in crunch mode and don't have time to re-invent the wheel. If nobody has the solution I will implement it and post the code for all to use.

RE: Yielding from ISR on dsPIC

Posted by Richard on November 14, 2011
See the "Interrupt Service Routines" section of http://www.freertos.org/portpic24_dspic.html, and the example in _U2RXInterrupt() defined within FreeRTOS\Demo\PIC24_MPLAB\serial\serial.c.

Regards.

RE: Yielding from ISR on dsPIC

Posted by Richard Damon on November 14, 2011
If you want to make the code look the same for PIC32 and dsPIC, you can define


#define portEND_SWITCHING_ISR( xSwitchRequired ) \
{\
if( xSwitchRequired ) \
{\
portYIELD(); \
}\
}


RE: Yielding from ISR on dsPIC

Posted by https://www.google.com/accounts on November 16, 2011
Thank you for the replies. I used the taskYIELD() function and it seems to be working fine. I'm having stack overflow problems but I'm convinced it's elsewhere in the code. I had tried the taskYEILD before but thought it was causing the stack overflows. Now I'm pretty sure it's not the cause.


[ 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