2018-08-29 06:00 PM
Working with LWIP using TCP echo example code on STM32H743I_Eval and CMX V1.3.0.
After receiving a packet and extracting the payload netbuf_delete(buf) gets called which works most of the time. When it does not work it throws an assert failure in pbuf.c during the pbuf_free() function when wlaking back through the chain p->ref goes to 0. The packet that is sent is a test packet with know byte count and contents. The number of p->ref is always the same and should be 3 prior to netbuf_delete(). I find that when p->buf should be 2, freeing the second allocated buffer it somehow comes up 0 which causes the assert to be thrown.
Anyone seen this?
2018-08-30 04:39 AM
lwip-related questions may have higher chance to be answered in the lwip-users forum https://lists.nongnu.org/mailman/listinfo/lwip-users
JW
2018-09-13 10:22 AM
That is true however I think that this is also an ST HAL problem.
2018-09-27 12:28 PM
I fixed the problem inadvertently.
When I reduce the number of LCD_UsrLog() calls printing debug messages to the LCD screen and reduced the text for each call, the Asserts stopped occurring. I did the reduction because I no longer needed the verbosity and noticed that I was slowing down other processes. It would appear that frequent calls to the Utility function has an adverse affect on the Ethernet processing.