cancel
Showing results for 
Search instead for 
Did you mean: 

DHCP error in LwIP Ethernet middleware on STM32H755 CM4

MasatoKawatsuma
Associate

The problem ethernet link with NUCLEO-H755ZI-Q.
The conditions are as follows:

  • Board: NUCLEO-H755ZI-Q
  • Ethenet select core: CM4
  • STM32Cube_FW_H7: V1.12.1
  • LWIP: V2.1.2
  • DHCP client

In this case, the Ack from the DHCP server could not be confirmed as being received.
dhcp->pcb_allocated is set to 0 (in function of dhcp_recv()).
A similar error has not occurred with CM7.

Do you happen to know the reason for this?

1 ACCEPTED SOLUTION

Accepted Solutions

@MasatoKawatsuma wrote:

The above thread mentions MPU, but I don't use MPU in my environment.
・RTOS disabled
・MPU not used

 

 No the problem in that thread is not only about the MPU configuration but also linked to the memory partition.

So check also your SRAM memory partitioning.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

5 REPLIES 5
mƎALLEm
ST Employee

Hello @MasatoKawatsuma and welcome to the community,

Related question raised on this thread.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Billy OWEN
ST Employee

Hi @MasatoKawatsuma 

 

This post has been escalated to the ST Online Support Team for additional assistance.  We'll contact you directly.

 

Regards,

Billy

The above thread mentions MPU, but I don't use MPU in my environment.
・RTOS disabled
・MPU not used

 

Also, the following warning occurred while debugging dhcp, so I think it might be a problem with pbuf memory management.

Assertion "pbuf_free: p->ref > 0" failed at line 753 in {path}/Middlewares/Third_Party/LwIP/src/core/pbuf.c

If you know anything, please let me know.


@MasatoKawatsuma wrote:

The above thread mentions MPU, but I don't use MPU in my environment.
・RTOS disabled
・MPU not used

 

 No the problem in that thread is not only about the MPU configuration but also linked to the memory partition.

So check also your SRAM memory partitioning.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Thank you.
I had not assigned LWIP to SRAM3 in the linker file, so setting it as follows solved the problem.

MEMORY
{
FLASH (rx)     : ORIGIN = 0x08100000, LENGTH = 1024K
RAM (xrw)      : ORIGIN = 0x10000000, LENGTH = 256K
RAM_LWIP (xrw) : ORIGIN = 0x10000000 + 256K, LENGTH = 32K
}

...

  .lwip_sec (NOLOAD) :
  {
    . = ABSOLUTE(0x10040000);
    *(.RxDecripSection)

    . = ABSOLUTE(0x10040060);
    *(.TxDecripSection)

    . = ABSOLUTE(0x10040200);
    *(.Rx_PoolSection)
  } >RAM_LWIP