Hi,
I was playing around with the WebServer example (for FreeRTOS), with the SDK 2.0. I noted the uC execution is aborted when I initialise the interface (netif) and the ethernet connector is not plugged in.
This seems to be a bit unfortunate, since I have another task which handles some basic IO Input.
Investigating this issue with the debugger, shows me that the problem is within the PHY initialization (fsl_phy.c). In particular in PHY_Init().
PHY_Init() - line 84/85:
result = PHY_Write(base, phyAddr, PHY_BASICCONTROL_REG,
(PHY_BCTL_AUTONEG_MASK | PHY_BCTL_RESTART_AUTONEG_MASK));
How can I initialise Ethernet / lwip without depending on a physically connected cable?
I presume the auto negotiation has to be replaced with fixed values, right?
Thanks,
Tobias
解決済! 解決策の投稿を見る。
Hi Tobias,
Please disable the assert in ethernetif.c, low_level_init():
#if 0 /* Disable assert. If initial auto-negation is timeout,
the ENET set to default 100Mbs and full-duplex.*/
if (count == ENET_TIMEOUT)
{
LWIP_ASSERT("\r\nPHY Link down, please check the cable connection.\r\n", 0);
}
#endif
It must help.
Best regards,
Andrey Butok
Hi Tobias,
Please disable the assert in ethernetif.c, low_level_init():
#if 0 /* Disable assert. If initial auto-negation is timeout,
the ENET set to default 100Mbs and full-duplex.*/
if (count == ENET_TIMEOUT)
{
LWIP_ASSERT("\r\nPHY Link down, please check the cable connection.\r\n", 0);
}
#endif
It must help.
Best regards,
Andrey Butok
Thanks Andrey,
this did the trick.
Tobias
Hi Tobias,
I have reported this to the KSDK team, and they are going to fix it in the next release. Thanks for your patience!
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Tobias,
Which platform did you run the webserver from ksdk 2.0? Would you please help to clarify? Thanks for your patience!
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hey Kan,
The Platform is an K64F freedom board.
Thanks,
Tobias
Am 10.03.2016 um 07:32 schrieb Kan_Li <admin@community.freescale.com>:
NXP Community
K64F: System stops when ethernet cable isn't plugged in
reply from Kan_Li in Kinetis Software Development Kit - View the full discussion
Hi Tobias,
Which platform did you run the webserver from ksdk 2.0? Would you please help to clarify? Thanks for your patience!
Have a great day,
Kan
>