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] [June 2008 Threads] xTaskGetTickCount not countingPosted by Christopher Coley on June 7, 2008 I noticed an issue where when vTaskSuspendAll has been called to suspend the scheduler the xTickCount is no longer incremented and instead a count of ticks missed is kept in uxMissedTicks.
In the code between the suspend and the resume I was using the TickCount returned by xTaskGetTickCount to time off some signals.
Is there any reason why xTaskGetTickCount should not be modified to return the sum of the xTickCount and uxMissedTicks such that it returns a real tick time while suspended?
Thanks Chris.
RE: xTaskGetTickCount not countingPosted by Richard on June 7, 2008 While the scheudler is suspended all the tick counts are held pending and unwound when the scheduler is unsuspended. This is part of the suspension, the scheduler is not supposed to be running.
You could implement a tick hook or one of the trace macros to provide an alternative time source that keeps running all the time.
Regards.
RE: xTaskGetTickCount not countingPosted by Christopher Coley on June 7, 2008 Yes I agree with the operation from the scheduler perspective, however the definition for xTaskGetTickCount says the number of ticks since vTaskStartScheduler was called not the number of ticks that have been operated upon.
It appears that the Kernel itself does not use xTaskGetTickCount so having it return the sum of the current ticks executed plus the number of ticks pending would then match the description of the function? Alternatively the description should probably change so somebody else doesn't make the same mistake.
Chris.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|