Skip to main content
Rick MC
Associate III
May 21, 2018
Solved

LWIP with STM32F769

  • May 21, 2018
  • 3 replies
  • 2709 views
Posted on May 21, 2018 at 17:07

I want to use the ETH port to communicate with other devices. I started by creating a project in CubeMX for the STM2F769I-Disc board. 

I simply added the LWIP and the ETH port (as RMII) and set a specific IP address (which was not already taken by any other device, my pc included). 

I'm using IAR to comile the project and everything is fine: I also added in the while(1) the function MX_LWIP_Process();

My problem is that I don't reach the board at its specific address when I ping it.

Where am I going wrong?

Thank you!

#stm32f7 #lwip #eth
This topic has been closed for replies.
Best answer by john doe
Posted on May 23, 2018 at 01:59

Make sure you set the PHY address to 0.  STM32CubeMX application STILL wants to set it to 1.  Come on, ST,  how many years do we have to wait?

3 replies

Rick MC
Rick MCAuthor
Associate III
May 22, 2018
Posted on May 22, 2018 at 08:58

In particular the code returns an error in function HAL_ETH_GetReceivedFrame since the following if statement is not verified:

/* Check if segment is not owned by DMA */

if(((heth->RxDesc->Status & ETH_DMARXDESC_OWN) == (uint32_t)RESET))

What is this statement doing? When is its condition true?

john doe
john doeBest answer
Senior III
May 22, 2018
Posted on May 23, 2018 at 01:59

Make sure you set the PHY address to 0.  STM32CubeMX application STILL wants to set it to 1.  Come on, ST,  how many years do we have to wait?

ST Technical Moderator
May 23, 2018
Posted on May 23, 2018 at 12:45

Hello,

The

PHY 

address name issue is already fixed in the

STM32CubeMx 

4.19 release: You can change the PHY address value in ETH configuration, then go to the 'Parameter Settings' tab.

With Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
john doe
Senior III
May 23, 2018
Posted on May 23, 2018 at 13:37

It is NOT fixed in 4.25.1. PHY defaults to 1 - see attached images

0690X0000060KtXQAU.png0690X0000060KthQAE.png
Rick MC
Rick MCAuthor
Associate III
May 23, 2018
Posted on May 23, 2018 at 13:39

Thanks for your advice about the PHY parameter! It must have been that. Now it works well!

iw2lsi
Associate III
March 11, 2020

As far I can see, initially CubeMX starts with the correct PHY address of 0... but then if you (for example) disable and re-enable the ETH device, it changes the PHY address from 0 to 1

We are spending so much time on this stupid CubeMX behaviours...