I have heard about this problem where critical section helped. I don't remember the exact problem and solution.
Thanks & Regards, Yugal Kishore Gupta CYBER G. INDIA PVT. LTD, (A Unit of CYBER GROUP, INC) Logix Technopark Tower B, 5th Floor Sector 127, NOIDA, U.P., INDIA 201301 OT 91-120-4643106/ Cell: 91-9818566224 [email protected] / www.cygrp.com -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of vincent cui Sent: Tuesday, August 30, 2011 8:37 AM To: Mailing list for lwIP users Subject: Re: [lwip-users] FreeRTOS / lwip multiple connections Hi : I programmed a web server with socket api to do multi-connnection from more client. It seems there is a problem After it works some days, the system will halt. Does anyone meet this ? 锘?Vincent Cui Sr.Firmware Engineer Mobile: +8613482482211 Tel: +86 21 34612525x6104 Fax: +86 21 34619770 E-Mail: [email protected] Shanghai EnLogic Electric Technology Co., Ltd. Address: 1104-1106, Building A, No.391, Guiping Road, Xuhui District, Shanghai, 200233 http://www.enlogic.com -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of FreeRTOS Info Sent: 2011年8月29日 2:43 To: Mailing list for lwIP users Subject: Re: [lwip-users] FreeRTOS / lwip multiple connections Is this the project you are referring to? http://interactive.freertos.org/entries/20290712-freertos-win32-project-with -lwip-web-server If so, look at the command interpreter rather than the web server. It uses sockets, and although it is structure to only process one connection at a time, I think converting it to allow multiple connections should be simple (?). > * checks for incoming data (nonblocking) > * checks a Queue for outgoing data (nonblocking) > * wait 1 ms (to prevent 100% cpu usage) > * repeat :-) This does not sound like a good solution, unless you are running at the lowest (idle) task priority. At any other priority, you are still going to be using most of the CPU time even when there is no processing to perform. A better solution would be to block the TCP/IP processing until a TCP/IP related event occurs - a semaphore or queue can be used to signal the event, so the task blocks on the queue. An event can be external, like a packet arriving, or internal, like a buffer becoming free, or an ARP timer event, or data to be sent, etc. Regards, Richard. + http://www.FreeRTOS.org Designed for Microcontrollers. More than 7000 downloads per month. On 28/08/2011 17:48, Christoph Kronen wrote: > Hi all, > > I am using FreeRTOS 7.0.1 on a Sam7X512 and upgraded the contributed > port lwIP 1.3.0 to 1.3.2. > > The "lwIP Embedded Webserver Demo" is what I took as a starting point. I > removed the webserver functionality, now I have a task that > > * checks for incoming data (nonblocking) > * checks a Queue for outgoing data (nonblocking) > * wait 1 ms (to prevent 100% cpu usage) > * repeat :-) > > > This works pretty well, I get around 1400 kbyte/s RX and TX. > Now to my question: Is it possible/difficult/easy to transform this > functionality to accept multiple connections on the same port ? At the > moment I am using the netconn API, so I guess I have to switch to the > Socket API ? > > I read through Richards thread on his "FreeRTOS/lwip Win32 simulator" > project and it sounds as if it is quite difficult to have multiple > connections in a multithreaded environment. Unfortunately I could not > find other helpful topics or contributed examples. > > I am rather new to FreeRTOS and lwIP, so please excuse me if I am > missing something obvious :-) > > Please give me some comments / suggestions / tips / pushes into the > right direction. > > Thank you very much ! > > Christoph > > > _______________________________________________ > lwip-users mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
