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] [April 2009 Threads] How convert the jitters to a TICKPosted by Bill Yang on April 14, 2009 Hi,
I have a question how to add the jitters to a timer expires. For instance, //declare a time, struct timer periodic_timer; // start a timer in period of two seconds timer_set( &periodic_timer, configTICK_RATE_HZ * 2 ); // since there are jitters, when timer expired and reset, I need to add these jiffters. below is code. if( timer_expired( &periodic_timer ) ){ periodic_timer.interval += (( ulMaxJitter * mainNS_PER_CLOCK ) / mainNS_PER_TICK); timer_reset( &periodic_timer );
..... do something..... } // Note: ulMaxJitter is measured by the high freq task. mainNS_PER_CLOCK is 20ns. Because configTICK_RATE_HZ is 200, so mainNS_PER_TICK is 5000000ns. I wonder if above code is correct? Thanks, Bill Yang
RE: How convert the jitters to a TICKPosted by Richard on April 15, 2009 Please do not create multiple threads on the same topic.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|