From: Mike on


I am using an MSP430f5438 with version 5.4 of FreeRTOS.

I am having a funny problem that I can't figure out.

Basically, when I set configTICK_RATE_HZ to different values, the LED
blinks faster or slower; it should stay the same rate. It blinks
slower the higher i set configTICK_RATE_HZ, and faster when I set
TICK_RATE lower.

vTaskDelayUntil( &xLastFlashTime, xFlashRate ); is such that the LED
should only blink once a second no matter what the configTICK_RATE_HZ
is. I stepped through and checked the xFlashRate to make sure. Its
always = to the configTICK_RATE_HZ. Code:

///Code snippet/////
xFlashRate = ledFLASH_RATE_BASE;//my flash base rate is 1000ms
xFlashRate /= portTICK_RATE_MS; //so xFlashrate = whatever
configTICK_RATE_HZ equals

/* We need to initialise xLastFlashTime prior to the first call to
xLastFlashTime = xTaskGetTickCount();
for(;;) {
vTaskDelayUntil( &xLastFlashTime, xFlashRate );
vParTestToggleLED( uxLED );
flashled();//this should happen every 1 second.
///Code snippet/////

The led blinks with a period greater than 1 second when i set the
configtick_rate_hz to 1000, and the led blinks with a period far less
than 1s when i set the tick rate to anything less than ~200

configTICK_RATE_HZ should not affect the LED blinktime!!!!!!!

I realize more info is needed and will readily supply whatever code
snippets are needed to help!!!!!!