[Top][All Lists]

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

[lwip-users] Increasing LwIP performance

From: Michał Karczewski
Subject: [lwip-users] Increasing LwIP performance
Date: Fri, 27 Feb 2015 14:02:03 +0100

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 = "">

          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

reply via email to

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