Quality RTOS & Embedded Software

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




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) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists