K64F: System stops when ethernet cable isn't plugged in

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

K64F: System stops when ethernet cable isn't plugged in

ソリューションへジャンプ
2,109件の閲覧回数
tobiaswellnitz
Contributor II


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

ラベル(1)
タグ(4)
1 解決策
1,646件の閲覧回数
butok
NXP Employee
NXP Employee

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

元の投稿で解決策を見る

5 返答(返信)
1,647件の閲覧回数
butok
NXP Employee
NXP Employee

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

1,646件の閲覧回数
tobiaswellnitz
Contributor II

Thanks Andrey,

this did the trick.

Tobias

0 件の賞賛
返信
1,646件の閲覧回数
Kan_Li
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

1,646件の閲覧回数
Kan_Li
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
1,646件の閲覧回数
tobiaswellnitz
Contributor II

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

>

0 件の賞賛
返信