Ethernet low_level_init does not handle return code from LAN8742_init #261
Labels
bug
Something isn't working
eth
Ethernet-related issue or pull-request
internal bug tracker
Issue confirmed and reported into a ticket in the internal bug tracking system
mw
Middleware-related issue or pull-request.
Milestone
Caution
The Issues are strictly limited for the reporting of problem encountered with the software provided in this project.
For any other problem related to the STM32 product, the performance, the hardware characteristics and boards, the tools the environment in general, please post a topic in the ST Community/STM32 MCUs forum
Describe the set-up
Describe the bug
The return code from https://github.com/STMicroelectronics/STM32CubeH7/blob/c2b13142a354d26b0baa5f505bb5607cd4aadd88/Projects/NUCLEO-H743ZI/Applications/LwIP/LwIP_HTTP_Server_Netconn_RTOS/Src/ethernetif.c#L216C10-L216C10
is not used. I have the case that a timeout error occurs. The code continues without checking (same in CubeMX generated code) and the link status is set wrongly to 10 M / half duplex. A following dhcp sequence executes correctly, but never sends a valid discover on the wire. So the debugging is difficult, as everything seems to be fine.
How can the soft reset of LAN8742 fail? Haven't tested yet, but must not the link mode set before the soft reset? According to the datasheet, the soft reset doesn't evaluate the hardware strapping bits.
How To Reproduce
Indicate the global behavior of your application project
Build a ethernet app with CubeMX (needs additional steps, CubeMX code is not valid at the moment) or use the LwIP_HTTP_Server_Netconn example.
The modules that you suspect to be the cause of the problem (Driver, BSP, MW ...)
Middlewar LWIP, ethernetif.c
The use case that generates the problem
power on board with external supply
How we can reproduce the problem
I can reproduce the problem by using an external 5 V power supply, or unplug/plug the JP2 in STLink position
Additional context
return code of LAN8742 must be checked. In a debug build, it should run into ErrorHandler.
Print out the Error Codes as in lwip, there is a lot of nice tracing output.
Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: