Quality RTOS & Embedded Software

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




Loading

Round robin and task priority problem

Posted by *anonymous on April 7, 2011

Hi,
I have designed three task with two Queues to communicate.
First task waiting for external Interrupt . First task put data on queue1 at the end.
second task block for queue1,where data available it unblock.
second  task put some data to queue2  and third task block on that.when data available it unblock.
I do  not use taskdaly to block the task at the end of task, because all have same priority.
I set same priority to all task.
My problem: When i execute first time three task execute task1 then task2 then task3…. It should go back to task1 and waiting for interrupt again …it s not doing that way and stuck at task3 end. When i reset , it again execute one by one and stuck. I


Round robin and task priority problem

Posted by davedoors on April 7, 2011

So, if I follow you correctly.

You have three tasks, t1, t2 and t3.
You have two queues, q1 and q2.

When the application starts, t1 waits for an interrupt, t2 waits for data on q1, and t3 waits for data on q2.

When an interrupt comes, t1 unblocks (how?) and sends data to q1. Sending data to q1 unblocks t2. t2 sends data to q2. Sending data to q2 unblocks t3.

What does t3 do then? Does it block on q2 again. Why would it go back to t1.

It is impossible to answer your question without seeing the code.


Round robin and task priority problem

Posted by *anonymous on April 7, 2011

When i do only two task t1 and t2 they works fine……

t1 is waiting for interrupt register to set (in while loop) … then t1 executes…
t1 read data by serial port, t2  perform some function on data and t3 send data back ….. after that i again want that t1 wait s for new data to read…. again same t1>t2>t3>t1>t2….continue…
I dont get that with same priority,they shoul execute one by one…
I also tried to block t1 when it give signal to t2 …But same problem only one time execution….


[ 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