FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [January 2013 Threads] timers API from ISR version 7.3.0Posted 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.0Posted 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.0Posted 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.0Posted 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.0Posted 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.0Posted 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|