fjburgoa wrote on Saturday, May 23, 2009:
Dear members.
I’d like to post a problem concerning the vTaskDelay primitive. So you can give me any idea about how to proceed.
I’m using FreeRTOS in a Silicon Labs C8051F120 development board and the SDCC compiler (as indicated in the demo).
I’ve slightly modified the demo code, to simplify the tasks. The code consists on
- hardware start-up: prvSetupHardware() and prvSetupSystemClock()
- just one single task that toggles a bit and suspends its execution for some ticks
- the main function: It performs hwd start-up and scheduler init.
I compile the code without any problem. I download it into the hardware, but when I start running the code, it always keeps blocked in the vTaskDelay function. I tried to change task stack size and xDelay time, but it is always blocked in that point until I reset the hardware.
Does anybody have any idea to solve this problem?
Below I show the code of the application.
Task looks like this:
----------------------------------------------
static void LoopTask(void *pvParameters){
const portTickType xDelay = 125 / portTICK_RATE_MS;
( void ) pvParameters;
for(;
{
vTaskDelay(xDelay);
prvToggleOnBoardLED();
}
}
---------------------------------------------
This task is initialized in main function in this way:
void main(void){
prvSetupHardware();
xTaskCreate( LoopTask, "TAREA", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, ( xTaskHandle * ) NULL );
vTaskStartScheduler();
}
Many Thanks for your help!!