cancel
Showing results for 
Search instead for 
Did you mean: 

Ethernet configuration on STM32F746G-Disco

hbZhao
Associate III

Hello, I have one STM32F746G-Disco, which works well with TouchGFX (v4.22.1) and STM32CUBEIDE (v1.13.2).

However, when I enabled the ethernet and LwIP, then set the PHY to LAN8742 in the LwIP, the display does not work as below. If I did not set the PHY, the display was shown well.

hbZhao_0-1697767679086.jpeg

 

After debugging, the application is stuck in the function of low_level_init in the file ethernetif.c.It keeps checking the link statue after pressing F8 to resume the application in the debug mode by STM32CubeIDE. Although the state is LAN8742_STATUS_100MBITS_FULLDUPLEX (2) which is bigger than LAN8742_STATUS_LINK_DOWN (1).

And at the same time, if disconnecting the ethernet cable, the PHYLinkState does not changed.

hbZhao_0-1697767720064.png

 

May I know if there is anything I should set? Thanks.

 
 
1 ACCEPTED SOLUTION

Accepted Solutions

Well, the feeling is completely wrong. For Ethernet the RMII 50 MHz clock is external, the AHB doesn't need a specific frequency and the only clock the software configures, is the divider for MDIO interface, which is not related to the LCD.

https://community.st.com/t5/stm32-mcus-embedded-software/how-to-make-ethernet-and-lwip-working-on-stm32/m-p/261456

 

View solution in original post

6 REPLIES 6
hbZhao
Associate III

[Deleted]

jiangfan
ST Employee

You may do stepping to see what the source is causing bad display. My feeling is that some ethernet operations may change STM32 LTDC clock - hence LCD display is bad.

When debugging the source codes, the application keeps in the loop to check the status in the line "PHYLinkState = LAN8742_GetLinkState(&LAN8742);". Although the PHYLinkState is 2, the application cannot run to the MAC configuration.

 

And I wonder whether ST can generate working codes properly. More ridiculously, there is not working example generated by CubeMX or CubeIDE rather than SW4STM32 in the repo package.

Well, the feeling is completely wrong. For Ethernet the RMII 50 MHz clock is external, the AHB doesn't need a specific frequency and the only clock the software configures, is the divider for MDIO interface, which is not related to the LCD.

https://community.st.com/t5/stm32-mcus-embedded-software/how-to-make-ethernet-and-lwip-working-on-stm32/m-p/261456

 

hbZhao
Associate III

Hello @Piranha ,

Thanks for your feedback. I have read the posts in your link. But no posts can help in this case.

I have spent so much time on this case. So many issues are still open without any solutions.

IT IS SO DISAPPOINT THE STM32CUBEIDE/STM32CUBEMX DO NOT WORK ON STM32F746G-DISCO, EVEN ALL OF THEM ARE FROM ST.

IT SHOULD BE BETTER TO QUIT FROM ST MCU IN CASE OF FURTHER ISSUES.

 

I have read the posts in your link. But no posts can help in this case.

Is this some reality denying religion? Fix the code and it will work - as simple as that.

 

IT SHOULD BE BETTER TO QUIT FROM ST MCU IN CASE OF FURTHER ISSUES.


The hardware is fine. Instead of using a broken bloatware, write and use a decent code and you will get great results.