Quality RTOS & Embedded Software

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


Loading

timers API from ISR version 7.3.0

Posted by GregK on January 23, 2013
HI

I found inconsistent in API in timers and queue.

Lets consider: xTimerStartFromISR()

1. In documentation nothing about parameter portBASE_TYPE *pxHigherPriorityTaskWoken may be NULL
2. the same situation in documentation xQueueSendFromISR() about portBASE_TYPE *pxHigherPriorityTaskWoken

I do not remember why I use NULL in xQueueSendFromISR(queue,item, NULL) (was in documentation in past or simply I have brose source code what I should not?) if I do not want feature of "task woken".

In similar method from timers when I browse source code, NULL is not supported! and it is ok, since it is not in documentation.

Hewer why in xQueueSendFromISR() NULL is supported since is also not in documentation.

PS.
I wopuld prefer support NULL in both, since I do not use this feature and I would like to keep it simply.

RE: timers API from ISR version 7.3.0

Posted by Dave on January 23, 2013
Allowing the last parameter to be NULL was added in V7.2.0 (http://www.freertos.org/History.txt).

RE: timers API from ISR version 7.3.0

Posted by GregK on January 23, 2013

davedoors: Good.
1. But is not explictly include in documentation: http://www.freertos.org/a00119.html
and i so

2. THERE IS A BUG in version 7.3.0

API:
xTimerStartFromISR(Timer,NULL);

xTimerGenericCommand( ( Timer ), 0, ( xTaskGetTickCountFromISR() ), ( ((void *) 0) ), 0U )

what is ok but implementation will call than API what is not allowed to use from ISR!!:

xTimerGenericCommand()
{
(...)
if( pxHigherPriorityTaskWoken == NULL )
{
if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
{
xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xBlockTime );
}
}


and this is inconsistent what I mentioned while open topic

RE: timers API from ISR version 7.3.0

Posted by Richard on January 23, 2013
Sorry - you say there is a bug, but I can't understand from your post what the bug is.

Currently the timer API that can be used from an ISR cannot have its last parameter set to NULL, and I don't think anything in the documentation says it can. The queue/semaphore implementation can set the parameter to NULL, but this is also not documented so I don't think people using the API documentation will be trying to do that yet.

Are you reporting a bug in the timer implementation, or are you saying you can't use the interrupt safe timer API with pxHigherPriorityTaskWoken parameter set to NULL and you wish to do so (in which case it would be a feature request rather than bug report).

Regards.

RE: timers API from ISR version 7.3.0

Posted by GregK on January 23, 2013
Richard:

if what point davedoors is true:
“Allowing the last parameter to be NULL was added in V7.2.0 (http://www.freertos.org/History.txt).


and quoting http://www.freertos.org/History.txt:


+ The last parameter in ISR safe FreeRTOS functions
(xHigherPriorityTaskWoken) is now optional and can be set to NULL if it
is not required.


period.

than is a bug because:

1. this point do not refer to any specific module like, queue, timers or semaphores

however is a history.txt a official documentation? I do not know... I guess not. Please do not feel offend.
just my few thoughts of possibly inconsistent/bug depend on how to treat.

Regards
/Greg


RE: timers API from ISR version 7.3.0

Posted by Richard on January 23, 2013
Ok - now I understand. I have updated the History.txt file, which now reads

“The last parameter in ISR safe FreeRTOS queue and semaphore functions
(xHigherPriorityTaskWoken) is now optional and can be set to NULL if it
is not required.”


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