cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube Ethernet Demos on Discovery

pablintino
Associate
Posted on December 23, 2015 at 01:12

Hello guys!

I'm trying to use the ''LwIP_HTTP_Server_Socket_RTOS'' demo for the STM324G evaluation board on a STM32F4Discovery with an external DP83848 PHY. Initially the demo works quite good with multiple TCP connections at the same time, but when sudenly all the connections stop and the demo ''freezes''.

Actually, the demo stop working for two reasons:

-> Option 1: Hardfault at ''memp_tab[type] = memp->next;'' in memp_malloc of LWIP. This function checks that memp could not be NULL, but for some reason when the processor tries to read from memp->next memp is NULL.

Note: I have enabled LWIP debug in order to investigate if memp_free is called, and yes, it's called.

-> Option 2: Nothing, FreeRTOS seems to continue working (i have a blinky task) but HTTP server doesn't respond. I don's know hot to debug on this sceneario (with FreeRTOS) and how to obtain the threads that are running.

I have tried to modify the stack size (increasing it to 4k), heap (to 4k, but i use heap_4 scheme so i think it's useless). I have modified the stack size of the individual threads (ether_if, lwip and http) with no success too.

Has anyone else had these kinds issues with demos?

Thanks in advance, Pablo.

P.S: I use Rowley Crossworks (GCC compiler).

1 REPLY 1
Oussema Hajjem_O
Associate III
Posted on December 28, 2015 at 14:34

Hello Pablo,

I didn't face such issue, but I suggest you to customise your LwIP parameters configuration in the lwipopts.h file, for example you can increase the following values:

MEM_SIZE : lwip total memory heap size

MEMP_NUM_TCP_PCB : the number of simulatenously active TCP connections.

MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.

other parametes can be tuned too.

Best regards,

LEO.