Quality RTOS & Embedded Software

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


Loading

changing in xTaskGetTickCount() , is this safe ?

Posted by chaabanemalki on December 9, 2014

Hello,

I'm using PIC 32MX, I changed xTaskGetTickCount() to :

TickType_t xTaskGetTickCount( void ) { return xTickCount; }

and xTaskGetTickCountFromISR( ) to

TickTypet xTaskGetTickCountFromISR( void ) { TickTypet xReturn; xReturn = xTickCount; return xReturn; } My code doesn't use interrupt nesting and i figure out that I can optimize this function little bit ? Is this safe for freeRTOS. for now, everything working just fine, with no errors.

Thank you chaabane


changing in xTaskGetTickCount() , is this safe ?

Posted by rtel on December 9, 2014

On a PIC32 that is fine - in fact the next release will change the critical section that surrounds reading the tick count to one that only has an effect when the tick count is read as two 16-bit or four 8-bit values.

Regards.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

Version 10.1.0 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