Search the web
Sign In
New User? Sign Up
lpc2000 · LPC ARM Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
More of a FreeRTOS question   Message List  
Reply | Forward Message #43077 of 45917 |
I have interrupt driven SPI putting bytes into Q1

Task1 blocks on Q1 and gobbles the bytes, eventually putting bytes in Q2. There
will be far fewer bytes sent to Q2 than Q1 but there is some atoi() kinds of
things in the process.

Task 2 blocks on Q2 and takes the ASCII strings and packs them into Q3 which has
multiple packet sized blocks of around 512 bytes. I suppose this could be done
in Task1 but having a separate task seems cleaner even if it wastes a little RAM
for Q2.

Task 3 blocks on Q3, grabs the packets and sends them on their way via uIP.
Other than ARP traffic, uIP will not be receiving packets for the application.

uIP looks at some kind of startup flag and decides that if there is a passive
connection (via uip_listen()) that this is the destination for the packets. If
there is no passive connection, it makes an active connection to a known host (a
LaserJet in this case) and sends the packets there.

There is also an unrelated 'flash the heartbeat LED' task.

The questions are about priorities.

1) What would be a reasonable assignment of task priorities? Right now I have
Task1 as lowest, Task2 next, Task3 and then the LED task highest. Does that
seem about right?

2) What should be the priority of uip AppCall()?

I have the project working up to the point of starting work on the uIP part. I
have experience with uIP and I will use the LPC2106 demo code as a start.

Thanks
Richard





Sat Jul 4, 2009 6:35 pm

rtstofer
Offline Offline
Send Email Send Email

Forward
Message #43077 of 45917 |
Expand Messages Author Sort by Date

I have interrupt driven SPI putting bytes into Q1 Task1 blocks on Q1 and gobbles the bytes, eventually putting bytes in Q2. There will be far fewer bytes sent...
rtstofer
Offline Send Email
Jul 4, 2009
6:36 pm

... Never ever try to control your system by priorities. Use the queues. Priorities are there to differ urgent and less urgent processes. Since all your "IO"...
42Bastian
bastian42
Offline Send Email
Jul 4, 2009
6:57 pm

... Hm... Interesting approach. Kind of round-robin depending on the data in the queues. It certainly makes sense to avoid overusing priorities. I'll give...
rtstofer
Offline Send Email
Jul 4, 2009
7:06 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help