cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F769I-Disco Ethernet

THIHA KYAW
Associate III
Posted on September 28, 2017 at 08:00

Hi,

Now I am creating a STM32CubeMX file for LWIP+FreeRTOS.

I didn't change anything and I just compile it.

But I didn't get IP address after dhcp_start(&gnetif);

I attached STM32CubeMX file.

Is there anything wrong in my settings?

Please advise me.

Regards,

Thiha Kyaw

#stm32f769i-disco
12 REPLIES 12
AvaTar
Lead
Posted on September 28, 2017 at 08:33

But I didn't get IP address after dhcp_start(&gnetif);

Check with your server.

DHCP servers give IP addresses only to machines that fulfill certain requirements, like the MAC address being in a specific range.

THIHA KYAW
Associate III
Posted on September 28, 2017 at 10:53

Dear Avatar,

I think cube generated code has some problems. When I compare ethernet initialization, some pins are missing such RMII_MII_RXER pins.

I believe my STM32Cube file is not correct. 

0690X00000608QLQAY.png
THIHA KYAW
Associate III
Posted on September 28, 2017 at 11:05

Dear Avatar,

Yes, I tried debugging.

When MX_LWIP_Init() funiction is called, netif_is_link_up(&gnetif) is always false.

That's means ethernet link doesn't up.

That's why I suspect it in hardware initialization.

Regards,

Thiha Kyaw

THIHA KYAW
Associate III
Posted on September 28, 2017 at 11:29

Dear Avatar,

Thanks for your help.

Regards,

Thiha

Posted on September 28, 2017 at 09:51

Thanks Avatar.

I may need to compare with example code. 

Example code is working.

Regards,

Thiha Kyaw

Posted on September 28, 2017 at 09:55

I may need to compare with example code. 

Example code is working.

I hope you realize that two identical MAC addresses do not work.

Don't know your Cube code example, but I guess the MAC address comes as ♯ define from a header ...

Posted on September 28, 2017 at 11:00

I don't use Cube, so I can't comment on on specific code.

But to recap:

But I didn't get IP address after dhcp_start(&gnetif);

Have you tried debugging, or an ethernet sniffer like Wireshark ?

If your see IP packets from/to your module, I would not start looking in the init code.

I still suspect you have a network/setup problem.

Posted on September 28, 2017 at 11:22

When MX_LWIP_Init() funiction is called, netif_is_link_up(&gnetif) is always false.

That's means ethernet link doesn't up.

That's why I suspect it in hardware initialization.

That sounds correct.

Unfortunately I don't have a F769I Disco board, nor I am using Cube, so I can't help you with that.

But Cube is known not to be 100% bug-free, to state it cautiously.

If you have a working example, I would try to copy the init code from there.

Imen.D
ST Employee
Posted on September 28, 2017 at 13:22

Hello

thihakyaw.job

,

Could you please precise the version of CubeMx and firmware you are using ?

Have a look to the datasheet and check the pin assignment as the PG2 is used by FMC.

Also, refer to the errata sheet related to your device to check if you have the same conditions as described in the errata sheet.

Please, keep us informed about your progress.

Kind Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen