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] [December 2012 Threads] portTICK_RATE_MS ResolutionPosted by rog57 on December 28, 2012 Hi, In the "FreeRTOSConfig.h" file, this is declared: #define configTICK_RATE_HZ( ( portTickType ) 1000 )
In my program, I have this declared: #define mainLED_TOGGLE_RATE( ( portTickType ) 5000 / portTICK_RATE_MS )
When I use this: vTaskDelayUntil( &xLastFlashTime, mainLED_TOGGLE_RATE );
I would expect it to flash every 5 seconds; however, it's flashing at about 7 or 8 seconds. After reading the application manual, I think I understand this topic, but clearly I do not. Can anyone point out the error of my ways?
Regards, Gary
RE: portTICK_RATE_MS ResolutionPosted by Richard on December 28, 2012 I suspect there will be a mismatch between the configCPU_CLOCK_HZ setting and the actual clock frequency being used.
Regards.
RE: portTICK_RATE_MS ResolutionPosted by rog57 on December 28, 2012 That was exactly the problem; I displayed all the clock and peripheral registers and updated the value of configCPU_CLOCK_HZ to reflect that value. It's now working fine.
Thanks for the "timely" help!
Gary
RE: portTICK_RATE_MS ResolutionPosted by rog57 on December 28, 2012 I also want to say the support I've received on this forum is far better than anything I've paid for from any vendor. Great tool, and the assistance is very appreciated!
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|