Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Round robin and Free Rtos

Status
Not open for further replies.

sameerr11

Junior Member level 1
Joined
Jan 18, 2007
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,525
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 taskdelay 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.
 

Since you didn't provide RTOS name nor names of O/S function calls, this is like saying my car is broke so what is wrong with it (and not specifying the make or model or much more about the car).

Just guessing that you should change priorities of tasks, and ensure all calls from interrupts are safe and can be called within an interrupt. I could guess more but nothing more than a guess with the lack of information.
 

Hi it s free RTOS... Task t1 waits for interrup by serial FIFO...and then executes...As i mentioned all tasks have same priority.

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 and sends data to q1. Sending data to q1 unblocks t2. t2 sends data to q2. Sending data to q2 unblocks t3.

Now all t1 t2 and t3 executes...i want to go back to t1 and wait for new data interrupt.........
 

For Full FREE RTOS details refer Richard Barry tutorial... It will be very much useful for you... In that tutorial he will tell clearly how 2 use free RTOS as a preemptive scheduling method or Co-operative Scheduling method....

Task based - Pre-emptive Scheduling method...
Co-routine - Co-operative Scheduling method...

I think you might have used Pre-emptive Scheduling method instead of Co-operative [Round Robin] Scheduling method...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top