nobody wrote on Wednesday, February 14, 2007:
Hello everybody !
I’m new in the world of FreeRTOS and I tried it on an Freescale HC12 card with the Help of CodeWarrior.
I created 2 tasks : one is turning on the Leds and the other do alternate them (on/off) like this :
xTaskHandle xh1, xh2 ;
xTaskCreate( off, "of", 512, NULL, 10, &xh1 );
xTaskCreate( onoff, "onoff", 512, NULL, 6, &xh2 );
When I launch the scheduler with vTaskStartScheduler(); only the second task is launched and the first one never !
Here’s the code of this 2 functions :
void on(void) {
DDRB = 0xFF; //turn on the Leds
}
void onoff(void) {
int i ;
for (i=0;i<=40;i++)
{
if(i%8==0)
PORTB ^= 0xFF; //alternate the Leds
}
}
Have you any idea why the first task isn’t called ?
Thanks a lot for helping me