Problem Statement:
Hi Expert,
How to read/write register values in DP83867 with addresses above 0x001F?
Regards
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Problem Statement:
Hi Expert,
How to read/write register values in DP83867 with addresses above 0x001F?
Regards
Solution:
Addresses above 0x001F falls under extended register set and they are accessed using indirect addressing via registers REGCR(0x000D) and ADDAR(0x000E).
REGCR: Register Control Register [0x000D]
BIT |
BIT NAME |
DEFAULT |
DESCRIPTION |
15:14 |
Function |
0, RW |
00 = Address 01 = Data, no post increment 10 = Data, post increment on read and write 11 = Data, post increment on write only |
13:5 |
RESERVED |
0, RO |
RESERVED: Writes ignored, read as 0 |
4:0 |
DEVAD |
0, RW |
Device Address: bits [4:0], directs any accesses of ADDAR register (0x000E) to appropriate MMD. DP83867 uses vendor specific DEVAD [4:0] = 1111 for accesses. All accesses through registers REGCR and ADDAR should use this DEVAD. Transactions with other DEVAD are ignored. |
ADDAR: Address or Data Register [0x000E]
BIT |
BIT NAME |
DEFAULT |
DESCRIPTION |
15:0 |
Address/Data |
0, RW |
If REGCR register 15:14 = 00, holds MMD DEVAD’s address register, otherwise holds MMD DEVAD’s data register. |
Bit setting of REGCR defines the working of ADDAR register as containing address value or data value.
Steps to follow for editing these register values:
{E.g. : Assigning value 0x0480 to address location 0x0025}
S.No. |
Step |
Respective Command |
1. |
Set REGCR = 0x001F |
phytool ethX/0x0/0x000D 0x001F
|
2. |
Set ADDAR to point to address of targeted register = 0x0025 |
phytool ethX/0x0/0x000E 0x0025
|
3. |
Set REGCR = 0x401F |
phytool ethX/0x0/0x000D 0x401F
|
4. |
Set ADDAR to value to be assigned to the location previously pointed by ADDAR
|
phytol ethX/0x0/0x000E 0x0480
|
To read the value of a register in extended register set:
S.No. |
Step |
Respective Command |
1. |
Set REGCR = 0x001F [ADDAR address mode]
|
phytool ethX/0x0/0x000D 0x001F |
2. |
ADDAR = 0x0025 (pointing to address of the register to be read) |
phytool ethX/0x0/0x000E 0x0025
|
3. |
Set REGCR = 0x401F [ADDAR data mode]
|
phytool ethX/0x0/0x000D 0x401F
|
4. |
Read ADDAR |
phytool read ethX/0x0/0x000E.
|
Thanks & Regards
Rimika