cancel
Showing results for 
Search instead for 
Did you mean: 

Ethernet cube config

T J
Lead
Posted on July 17, 2017 at 00:57

in CubeMx 4.21.0 setting the 'Ethernet configuration registers' addresses...

What is the correct configuration for the STM32F76x  for the LAN8710a  ?

1 ACCEPTED SOLUTION

Accepted Solutions
john doe
Lead
Posted on July 17, 2017 at 04:05

as of version 4.22 it is still generating with the wrong PHY address for a 769 discovery. Change PHY from 1 to 0, maybe that will help you

View solution in original post

6 REPLIES 6
john doe
Lead
Posted on July 17, 2017 at 04:05

as of version 4.22 it is still generating with the wrong PHY address for a 769 discovery. Change PHY from 1 to 0, maybe that will help you

Posted on July 17, 2017 at 12:17

no, it didnt help,

I am stuck at tcpWaitForEvents()

I am not sure if the LAN8710a chip is up, hence the question.

Posted on July 17, 2017 at 20:54

Hi

Make sure you have a pin defined as MCO .Im using the F407 and apparently if that pin is not defined ethernet would not work.The cube doesn't define it automatically.(I haven't verified but I have seen multiple sources mentionning this).

On the F407 the configs work ''out of the box'' for LAN8720.(dont know the difference between this and your 10A).

Check if your LEDS in your ethernet connector are blinking that would be a good sign that your PHY is working.Most ethernet project I've seen the mcu clock is set to the max speed (168MHz for me).If you are sure it is a hardware problem try to make sur that your ethernet wires are as short as possible.

-Andy

Posted on July 18, 2017 at 01:27

Thanks Andy, I have it running now,

The Yellow LED is fully ON, but the Green LED never comes on.

I set the board to 100MHz no negotiation.

I had to set PHY =0 (thanks John)

and I found there is no reset function in the code

So I had to pull the Reset pin high. (It seems to be a wasted pin.)

Thanks Guys

Amel NASRI
ST Employee
Posted on July 18, 2017 at 11:15

Hello

Marsh.Nick

‌,

Thanks for updates you provided. Even if you already fixed it in your code, I'll report the wrong PHY address issue (highlighted by

doe.john.016

‌) to our CubeMX team.

-Amel

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.

stm32cube-t
Senior III
Posted on November 08, 2017 at 11:08

For MII Ethernet modes, STM32Cube uses '' DP83848_PHY_ADDRESS'' and ''User Phy''. For RMII Ethernet modes  ''LAN8742A_PHY_ADDRESS'' and ''User Phy'' can be used.

The MCO pin (master clock output) must be configured when that you want to use for the ETH Phy source. Otherwise you can keep the default crystal configuration.

On some boards (evaluation board) there is no choice but to use the MCO and it is already configured in CubeMX when you select to load the board with all peripherals initialized:

0690X00000608s1QAA.png