akhe wrote on Thursday, April 20, 2006:
I have just started to evaluate FreeRTOS 4.0.0 so please excuse me if this is a dumb question.
I have an AVR ssystem where I have created one task that toggle som bits and one task that send some characters on a serial port.
This works fine if the tasks are created with
xTaskCreate( task1, "led", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL );
xTaskCreate( task2, "uart", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 2, NULL );
or with
xTaskCreate( task1, "led", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL );
xTaskCreate( task2, "uart", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL );
but not with
xTaskCreate( task1, "led", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 2, NULL );
xTaskCreate( task2, "uart", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL );
where task1 never get called at all.
I can´t understand why this is.
In the first case the serial task have higher priority. The serial task should get more process time.
In the second case both have the same priority and should get equal processing time.
In the third - non working - case the LED task get more priority then the serial task but now it is never even called.
I’m sure I have missed something basic. Can someone set me on the right track.
Best Regards
/Ake