Ethernet HAL Driver CubeMX 6.5 and STM32F4 broken ICMP Ping, anyone knows how to fix?
Hello All,
I have updated to CubeMX 6.5 and STM32F4 1.27 and now thinks are failing in my project.
I could reproduce this using NucleoF429 board.
When I create example from example selector LwIP_HTTP_Server_Netconn_RTOS
- it activates ethernet
- I can ping the board
when I create example from the board selector nucleo429 and preset all peripherals to default it fails
- I add LwIP
- assign BSP driver LAN8742
- TCP protocols are working
- ICMP ping results in timeout on PC
My investigation shows:
- a ping response is sent
- the ping response has ICMP CRC set to 0(zero) and fails CRC check on pC
- even I manually set ICMP CRC before sending via HAL driver, the driver modifies this CRC to 0(zero) ??????
- also: I have to comment some stupid regression errors in the lwipopts.h
/*----- Default Value for H7 devices: 0x30044000 -----*/
// #define LWIP_RAM_HEAP_POINTER 0x30044000
/*----- Value supported for H7 devices: 1 -----*/
// #define LWIP_SUPPORT_CUSTOM_PBUF 1- you see this is very STM32F7 specific
I compared the working RTOS sample and the nonworking NO-RTOS sample.
I can not find differences in LWIP or HAL.
However the ethernetif.c/.h and lwip.c/.h are different.
The RTOS sample uses Transmit_IT() while the noRTOS uses Transmit() in side the ethernetif.c.
Has anyone encountered that defect?
Any hints?
Regards, Adib.