Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

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;


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS