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

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) 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