Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists