Interfacing with the PHY

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Interfacing with the PHY

Jump to solution
676 Views
sjackson
Contributor I

I'd like to talk to my Ethernet PHY through MQX to set up some configuration options and have greater control over Ethernet communications in my application. For example, I'd like to do things like automatically grab the OUI from the PHY and query link status. From what I've seen, however, there is basically ZERO documentation on using the Ethernet driver to perform such tasks. I'm using the same Micrel PHY that is used on the K60 tower and notice that there is some source code in the MQX tree to support this PHY. Moreover, that source code provides access to some of the functionality I want but I have no idea how to access it.

Can anyone explain how I can read/write PHY registers through MQX?

Thanks!

Labels (1)
Tags (3)
0 Kudos
1 Solution
347 Views
MarkP_
Contributor V

Hi,

Have you studied the example projects:

C:\Freescale\Freescale MQX 3.8\demo\security_telnet\cw10\sectelnet_twrk60n512
C:\Freescale\Freescale MQX 3.8\demo\security_webserver\cw10\secwebserver_twrk60n512

C:\Freescale\Freescale MQX 3.8\rtcs\build\cw10\rtcs_twrk60n512

Import and build those. The code functionality can be quite easily studied in CW.

The link status is used in ipcfg.c: boolean ipcfg_get_link_active()

      return ENET_link_status (((IP_IF_PTR)(ipcfg_data[device].ihandle))->HANDLE);

~Mark

View solution in original post

0 Kudos
1 Reply
348 Views
MarkP_
Contributor V

Hi,

Have you studied the example projects:

C:\Freescale\Freescale MQX 3.8\demo\security_telnet\cw10\sectelnet_twrk60n512
C:\Freescale\Freescale MQX 3.8\demo\security_webserver\cw10\secwebserver_twrk60n512

C:\Freescale\Freescale MQX 3.8\rtcs\build\cw10\rtcs_twrk60n512

Import and build those. The code functionality can be quite easily studied in CW.

The link status is used in ipcfg.c: boolean ipcfg_get_link_active()

      return ENET_link_status (((IP_IF_PTR)(ipcfg_data[device].ihandle))->HANDLE);

~Mark

0 Kudos