FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [February 2007 Threads] Task not executed ?!Posted by Nobody/Anonymous on 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 :)
RE: Task not executed ?!Posted by Nobody/Anonymous on February 14, 2007 The on() task is not structured as a task. It must be in an infinite loop or call vTaskDelete() prior to its end.
Your tasks will also need to block at some point, otherwise only one will run unless they are both at the same priority.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|