Page 1 of 1

Working with MDIO via sub_app.exe

Posted: Thu Apr 29, 2010 6:41 am
by xol
Command line utility sub_app.exe (or sub_app for Linux) provides access to SUB-20 MDIO functionality.

SYNOPSIS
sub_app.exe --mdio=<R|W|a|w|r|p>,<PRT_PHY>,<DEV_REG>,<DATA> [--mdio...]
where:
R - Clause22 Read
W - Clause22 Write
r - Clause45 read
w- Clause45 write
a - Clause45 address write
p - Clause45 post-read-increment
PRT_PHY - Phy/Port address (hex)
DEV_REG - Register/Device address (hex)
DATA - Data/Address (hex)

There can be a number of --mdio options in one command. They will be processed in series in order of appearance.

EXAMPLE
sub_app.exe --mdio=R,12,10,0 - Clause22 Read Phy=0x12 Register=0x10
Output:
MDIO[0] data=0xFFFF

sub_app.exe --mdio=a,23,5A,1000 --mdio=r,23,5A,0 --mdio=w,23,5A,300 - Clause45 Port=0x23, Device=0x5A, address write 0x1000, read, write 0x300
Output:
MDIO[0] data=0x1000
MDIO[1] data=0x1F23 - data read from port
MDIO[2] data=0x0300