Hi. First I apologise for my poor english. Now I’m having a feel problems with the functions vTaskDelay and vTaskDelayUntil on pic18f452. They simply doesn’t work. I set #define INCLUDE_vTaskDelayUntil 1 #define INCLUDE_vTaskDelay 1
and when I use the functions on the example on website:
// Initialise the xLastWakeTime variable with the current time.
xLastWakeTime = xTaskGetTickCount();
for( ;; )
{
// Wait for the next cycle.
vTaskDelayUntil( &xLastWakeTime, xFrequency );
// Perform action here.
}
}
the process block indefinitely. When I comment the function delay and put a for to make a delay and toggle a led the function work’s fine. It’s analogue when I use the example with vTaskDelay.
Sounds like the tick interrupt is not executing as expected. Put a break point in the tick interrupt handler and see if it ever gets hit. Alternatively remove the call to vTaskDelay() and instead just loop round calling xTaskGetTickCount() to see if the value returned ever increases.
well…more news….
putting some break points I found this……the ticks are ok….but I think there is a problem with the memory allocation for the process….for example:
the code works fine….but when I comment the for in main and uncomment the xTaskCreate, putting a break point on the toggleLed(i) on the process, when I step into toggleLed the value of parameter “i” becomes 0……