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] [September 2009 Threads] taskYield() hangs - help needed!Posted by DownyTif on September 29, 2009 Hi,
I'm trying to make my application work and I encounter issues like this one. First, I'm using FreeRTOS on a AVR32 UC3 chip. I use the Atmel framwork 1.4.
I currenty have 3 task running. The main one, a startup one, the main LWIP one.
I goes like this:
main.cpp
{ ... // Start the Startup Task. Done this way to start the scheduler as soon as possible! // The reason is simple... The scheduler enables the interrupts (used by the serial communication). xTaskCreate(StartupTask, (const signed portCHAR*) "STARTUP_TASK", TASK_STARTUP_STACK_SIZE, (void*)pRadarUnit, TASK_STARTUP_PRIORITY, NULL);
// Start the OS scheduler. It should never return from there. vTaskStartScheduler();
return 0; }
So, my main task is starting a STARTUP task that will create and initialize all modules. At this point, my LWIP task is already started. Then, my startup task will try to create another task. The problem I have is that inside
signed portBASE_TYPE xTaskCreate( pdTASK_CODE pvTaskCode, const signed portCHAR * const pcName, unsigned portSHORT usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask )
the application hangs on taskYIELD(); My RTOS is configured in preemtive mode.
Not sure what to do next... If anyone can help me... Thanks
RE: taskYield() hangs - help needed!Posted by Richard on September 29, 2009 Could you attempt to post the code again? I need to work out how it is supposed to work, sometimes it seems to format correctly automatically, and other times not. I suppose I should RTFM.
Regards.
RE: taskYield() hangs - help needed!Posted by DownyTif on September 30, 2009 There you go:
// Start the Startup Task. Done this way to start the scheduler as soon as possible! // The reason is simple... The scheduler enables the interrupts (used by the serial communication). xTaskCreate(StartupTask, (const signed portCHAR*) "STARTUP_TASK", TASK_STARTUP_STACK_SIZE, (void*)pUnit, TASK_STARTUP_PRIORITY, NULL);
// Start the OS scheduler. It should never return from there. vTaskStartScheduler();
return 0;
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|