2017-09-27 11:00 PM
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-disco2017-09-27 11:33 PM
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.
2017-09-28 01:53 AM
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.
2017-09-28 02:05 AM
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
2017-09-28 02:29 AM
Dear Avatar,
Thanks for your help.
Regards,
Thiha
2017-09-28 02:51 AM
Thanks Avatar.
I may need to compare with example code.
Example code is working.
Regards,
Thiha Kyaw
2017-09-28 02:55 AM
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 ...
2017-09-28 04:00 AM
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.
2017-09-28 04:22 AM
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.
2017-09-28 04:22 AM
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