cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with the startup of the Ethernet LAN 8742 transceiver in a control board with stm32H723.

APrea.1
Associate II

The lwip stack was initialized by cube mx (no FREERTOS). I follow the chip guide lines for the hardware (like nucleo board but with transformer built into the connector). It seems that with a fast transient on the power supply of the board everything works, while with a slower startup the lan component does not initialize correctly. I also tried to reset the transceiver via software after the power transient but with no results.

7 REPLIES 7
LCE
Principal

How's the LAN8742 reset pin connected?

On the Nucleo-144 it's sourced by the STlink MCU, so the main STM and the LAN come up at the same time.

APrea.1
Associate II

I've attached the schematic. Even with the H7 nucleo board we have encountered problems if the debugger is not connected.

In our custom board Transceiver Reset is connected to STM32 GPIO, and pull-up to 3V3. We try to delay the reset assertion with no result. It seems that with slow slope of supply transceiver cannot detect the right configuration.

What is the correct startup procedure?

Is it possible to do a complete reset of the transceiver via software via ethernetif.c functions?

Thank You for the answer

Antonio

> lan component does not initialize correctly

What does this mean, exactly? Find out the reason by debugging your code (that you've clicked it in CubeMX is no excuse, it is your code now).

Review in PHY's DS the pullups/pulldowns used as straps.

Read back the PHY registers content and check.

JW

APrea.1
Associate II

in case of failed startup the function LAN8742_GetLinkState() returns LAN8742_STATUS_10MBITS_HALFDUPLEX instead of 100M duplex. It appears that the transceiver does not recognize the mode0 / mode1 state under certain power supply conditions. We tried to lower the pull-up resistors without results. Is there a way to configure a full software reset regardless of the transceiver configuration at startup?

 Antonio

Hi JW,

> lan component does not initialize correctly

 >What does this mean, exactly?

in case of failed startup the function LAN8742_GetLinkState() returns LAN8742_STATUS_10MBITS_HALFDUPLEX instead of 100M duplex. It appears that the transceiver does not recognize the mode0 / mode1 state under certain power supply conditions. We tried to lower the pull-up resistors without results. Is there a way to configure a full software reset regardless of the transceiver configuration at startup?

Thank you

Antonio

IIRC the PHY has a reset bit. Try to repeat reset and restart netgotiation.

If this won't detect the link again, try to force desired state. 100 Mbit/HALF duplex

(our ethernet expert says that forced link parameters should be only HALF duplex, not FULL. I don't understand why).

You can ignore straps and write directly to registers 0 and 4 the mode you want.

Strapping all MODEx to 1 means full autonegotiation, so you are not supposed to read out the speed/duplex value until autonegotiation is done, i.e. "Auto-Negotiate Complete" bit in register 1 or the "autodone" bit in register 31 is set.

[EDIT] I don't use Cube nor 'H7, but I remember the old ST lwip example ('F4, using SPL) used to rely on ETH cable being connected at reset time, i.e. not checking the PHY connection state at all. If this is still the case, I can imagine confusing and unreliable results in case of various delays during reset. AFAIK the CubeH7 ETH driver was reworked recently, I have no idea what's the status of this issue, I don't care about Cube.

JW