lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Increasing LwIP performance


From: Micael
Subject: Re: [lwip-users] Increasing LwIP performance
Date: Sat, 28 Feb 2015 22:38:53 +0100
User-agent: KMail/4.14.3 (Linux/3.18.1-gentoo; KDE/4.14.3; x86_64; ; )

I just re-read your mail, and found that you are using FreeRTOS, which I 
missed. But anyways my suggestions are still the same. As others has also 
suggested, disconnecting the webserver from the actual polling makes sense.

  Good luck,
  Micael

On Saturday 28 February 2015 08.43.22 Micael wrote:
> I wouldn't worry too much about LwIP, but concentrate on getting your modbus
> comm's to work under load.
> You don't mention if you are using a RTOS or not, or if modbus is using
> interrupts, or dma, or the speed of modbus.
> My suggestion is that you need to get the modbus comm's in higher priority,
> so that it always works regardless of how much traffic is hitting your
> webserver.
> 
> Then, once everything works, you can concentrate on performance issues, if
> you still think that it is necessary.
> 
>  - Micael
> 
> On Friday 27 February 2015 14.02.03 Michał Karczewski wrote:
> > Hi,
> > I'm working on project that needs some web functionality. Using STM32F429
> > +
> > PHY LAN8720 with FreeRTOS and LwIP 1.4.1 raw API. I'm running webserver
> > from SDCard, which is showing numbers generate by microcontroller
> > firmware, and Modbus communication protocol over TCP. As far as I'm
> > testing only one of these functionality, everything works fine - problems
> > starts when I'm trying to run both at once. To be precise:
> > - webserver site works by sending five requests (one for another value)
> > every one second - javascript deals with it by sending
> > 
> > pwmfreq.open("GET", "/pwmfreqget?id=1", true);
> > 
> > and in firmware in fs.c file function fs_open is including
> > 
> > if (strncmp(name, "/pwmfreqget?id=1", 16) == 0)
> > 
> >      {
> >      
> >           static char pcBuf[16];
> >           
> >           
> >           
> >           sprintf(pcBuf, "%f", variable[10].value);
> >           
> >           
> >           
> >           file->data = pcBuf;
> >           
> >           file->len = strlen(pcBuf);
> >           
> >           file->index = file->len;
> >           
> >           file->pextension = NULL;
> >           
> >           return (file);
> >      
> >      }
> > 
> > - Modbus TCP is just a simple packet service. In receive callback payload
> > is parsed for modbus frame length, id, function etc. and in return is
> > sending random value (the same value is used in website). I'm requesting
> > for 20 registers information (= 40 bytes) from four different sources
> > every 10 seconds.
> > 
> > As I said before, everything works fine until I run both function at once.
> > Then modbus starts losing connection every few (random) seconds, and
> > website overwrite values with much bigger interval than one second.
> > Everything is very unstable.
> > 
> > My question is - is there possibility to increase LwIP performance, and if
> > is, what I should trying to modify to get better results. I'm using also
> > external SRAM memory, but I'm entirely sure how I should apply it to
> > cooperate with LwIP.
> > 
> > Regards, Michal
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users




reply via email to

[Prev in Thread] Current Thread [Next in Thread]