LPC1769 webserver

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1769 webserver

999 Views
djtilava
Contributor II

I am working on  MCB1700 Board  with webserver example . But After sometime of ping webserver is crash and  program got stuck in Hardfault Handler . If i analysed call stack window then it shows that hard fault handler is due to malloc. So what will be the cause of this?

lpc1769‌ 

#webserver

Labels (5)
Tags (2)
1 Reply

645 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Divyesh,
 

We found a workaround to resolve this issue in the webserver project  on LPC1769 , the suggested workaround is this:

In the tcp_impl.h file change the definition of TCP_MSL to the following:

#define TCP_MSL 100 //1000 //60000UL /* The maximum segment lifetime in milliseconds */

It means the memory is freed more quickly when closing connection.

I tried the value 100 and 1000 on lpcopen webserver example on lpc1788 and it can work.

We analyze the cause should be that when TCP connection is closed, the PCB is not released in time due to the long (120s) time waiting. This cause the PCB created more and more so that memory leaks due to the limited memory of MCU (SRAM).

Hope it helps!
 
Best Regards,
Carlos Mendoza
Technical Support Engineer