FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [August 2006 Threads] lwIP & timer questionPosted by Nobody/Anonymous on August 17, 2006 The lwIP demo that ships with FreeRTOS initialises the network interface in the task that runs the webserver, having tried to move the code out, I now know why it's in there. (it causes a data abort if called from outside a task!)
Inside the ethernetif_init routine is a call to sys_timeout, now this will only work if it is called from a task because its timeout list is per task, otherwise it returns NULL.
I don't want the network initialisation code inside a task because to me it's not conceptually the right place for it to be, my solution has been to replace the sys_timeout call with a task which blocks the same amount of time and then calls the arp_tmr function. (it's doing exactly the same as sys_timeout call).
Are there any disadvantages to doing this? Is there any reason that richard didn't do this? Ok, I'm eating up a bunch of RAM having this task doing it this way, but it means that my other tasks have access to the tcp stack as soon as they start up, they're not dependant on another task initialising the ethernet interface.
Thanks.
RE: lwIP & timer questionPosted by Nobody/Anonymous on August 17, 2006 The initialization will have to be in the task if either it blocks (what happens if the network cable is not connected?), calls a blocking function, or uses a queue or semaphore that is not created until the task is running. Any of these things could cause it to crash. Otherwise I don't see why to do in in the task. My hardware is initialized before the scheduler is started.
RE: lwIP & timer questionPosted by Nobody/Anonymous on August 17, 2006 This is an "after the event" question, it works absolutely fine. I was just wondering why richard chose to do it the way he did it rather than starting a task to handle the arp timer.
RE: lwIP & timer questionPosted by Nobody/Anonymous on August 17, 2006 Probably because that is how it is done in the uIP demo - and that come first ;-)
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|