Configuring an Ethernet PHY (Davicom DM9161A)

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

Configuring an Ethernet PHY (Davicom DM9161A)

ソリューションへジャンプ
2,392件の閲覧回数
panpwr
Contributor IV

Hello,

I am trying to use the MQX-supplied driver for my Ethernet PHY (assembled on my custom board), but I can't get it to work (MQX 3.8.0).

I've modified the following:

1. init_enet.c:

const ENET_IF_STRUCT ENET_0 = {

    &MACNET_IF,

    &phy_dm9161_IF,     /*<=== instead of &phy_ksz8041_IF*/

    MACNET_DEVICE_0,

    MACNET_DEVICE_0,

    BSP_ENET0_PHY_ADDR,

    BSP_ENET0_PHY_MII_SPEED

};

2. init_enet.c:

#include "phy_dm9161.h"  /*<=== instead #include "phy_ksz8041.h"*/

3. Recompiled BSP & RTCS libraries.

Now, the problem:

When performing phy_dm9161_init(), the Status Register reading (&phy_status) always returns 0x0, as if it has not been read at all (The PHY's status register default values are definitely different from 0x0).... So I thought checking K60 physical lines, to see if the request is transmitted at all:

When I check the MDIO I/O pin, I don't see anything that is transmitted to line. The MDC line shows accurate clocks at ~2.5MHz (as required by spec).

What am I doing wrong? I don't believe that it is a PHY configuration problem since no instruction is transmitted from K60 towards the PHy.

HELP! :smileyhappy:

Thank you.

ラベル(1)
0 件の賞賛
1 解決策
1,054件の閲覧回数
panpwr
Contributor IV

We've tried to do so, but it didn't quite help... We've added an external pull up and it all seems stable now.

Thank you ! :smileyhappy:

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
1,054件の閲覧回数
panpwr
Contributor IV

OK, found some problems HW-related problems (following this post: Re: MCF52259 &amp; DP83640):

1. We've added a pull up resistor to the MDIO pin (though it was not mandatory according to the PHY's spec) - then we've started to see communication over the line. However, it was a bit noisy and inaccurate (when trying to make TCP communication).

2. We've added external trace, bypassing our custom's board traces - now it works well (probably due to a combination of problematic trace with a weak pull up) - Hurray! :smileyhappy:.

Now, for another related question:

How can I configure the internal pull up resistor for the MDIO line (PTB0) using MQX functionality? I am trying to save here the external pull-up.

Thanks!

Lior.

1,054件の閲覧回数
c0170
Senior Contributor III

Hello,

I have noticed just this one recently, to configure internall pull up, there's lwgpio_set_attribute function.

Regards,

MartinK

1,055件の閲覧回数
panpwr
Contributor IV

We've tried to do so, but it didn't quite help... We've added an external pull up and it all seems stable now.

Thank you ! :smileyhappy:

0 件の賞賛