2023-10-19 09:44 AM - edited 2023-10-19 07:12 PM
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.
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.
May I know if there is anything I should set? Thanks.
Solved! Go to Solution.
2023-10-21
07:05 PM
- last edited on
2023-10-23
03:19 AM
by
Lina_DABASINSKA
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.
2023-10-19 01:42 PM - edited 2023-10-19 07:09 PM
[Deleted]
2023-10-19 10:07 PM
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.
2023-10-20 09:15 AM
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.
2023-10-21
07:05 PM
- last edited on
2023-10-23
03:19 AM
by
Lina_DABASINSKA
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.
2023-10-23 12:49 PM - edited 2023-10-23 12:52 PM
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.
2023-10-23 01:35 PM
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.