cancel
Showing results for 
Search instead for 
Did you mean: 

LWIP: Random Initialization Failure

Rick MC
Associate III
Posted on July 10, 2018 at 15:03

I have a STM32F769-Disco board. I used CubeMX to implement ethernet communication in RMII mode. I'm not using any OS. No DHCP. I left the configuration pretty much like default.

I have the ping to the board working normally. The only problem is that, when the microcontroller is

booted or is reset,

the ping does not always work. 

I found out this problem is caused by an

if statement

in function HAL_ETH_GetReceivedFrame() in stm32f7xx_hal_eth, where the following condition happens to be false:

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

I do not understand why this happens in such a random way.. Does anyone have already faced this problem?

Thanks!
6 REPLIES 6
Imen.D
ST Employee
Posted on July 10, 2018 at 15:15

Hello

marco.pirotta

 ,

Check the PHY address value in ETH configuration and make sure you set the PHY address to 0

With Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on July 10, 2018 at 15:26

Hello

DAHMEN.IMEN

. I already knew about the PHY address and I had already set it to zero!

Posted on July 11, 2018 at 15:53

Hello

DAHMEN.IMEN

‌,

do you have any other suggestion about my issue?? I'm pretty stuck and out of ideas..

Thanks

Posted on July 12, 2018 at 12:57

Hello 

marco.pirotta

,

Have a look to the 

https://www.st.com/content/ccc/resource/technical/document/errata_sheet/group0/23/a6/11/0b/30/24/46/a5/DM00257543/files/DM00257543.pdf/jcr:content/translations/en.DM00257543.pdf

 to check if you have the same conditions as described in the Ethernet peripheral limitations section.

With Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on July 12, 2018 at 15:07

Hello 

DAHMEN.IMEN

I checked the Errata sheet but I can&39t find anything close to my problem.. 

Here is what I also tried to do: 

- increase the C-STACK to 0x1550 and the HEAP to 0x2AA0 (almost the maximum they can reach)

- Add MPU_Config() and CPU_CACHE_Enable() before HAL_Inith() as in \STM32Cube\Repository\STM32Cube_FW_F7_V1.11.0\Projects\STM32F769I_EVAL\Applications\LwIP\LwIP_HTTP_Server_Raw

Anyway I don&39t think anything has changed..I still have the same problem: the ping to the board works just some times..

Rick MC
Associate III
Posted on July 16, 2018 at 11:03

DAHMEN.IMEN

is it possible that this is some kind of problem not included in the Errata sheet?

Please let me know!