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.

[FAQ] Extended Register Space Access for Ethernet PHYs

Our Ethernet PHYs have a standard set of registers, 0x0-0x1F, that can be accessed in a straight forward fashion. Registers beyond 0x1F require a different approach to access. 

This FAQ is intended to provide a few examples on how to read/write these registers. More details about the different Register spaces can be found in the Ethernet PHY's Data Sheet. 

Two registers are used in accessing the Extended Register Set: 0xD (REGCR) & 0xE (ADDAR). A brief summary of how to use these registers is provided below.

REGCR[15:14]

Function

00

Accesses to register ADDAR modify the extended register ‘set address’ register. This address register must always be initialized to access any of the registers within the extended register set.

 

01

Accesses to register ADDAR access the register within the extended register set selected by the value in the address register.

10

Access to register ADDAR access the register within the extended register set selected by the value in the address register. After that access is complete, for both reads and writes, the value in the address register is incremented.

11

Access to register ADDAR access the register within the extended register set selected by the value in the address register. After that access is complete, for write accesses only, the value in the address register is incremented. For read accesses, the value of the address register remains unchanged.

Read (No Post Increment) Operation

To read a register in the extended register set:

 

Instruction

Example: Read 0x0170

1. Write the value 0x001F (address function field = 00, DEVAD = 31) to register REGCR.

 

Write register 0x0D to value 0x001F

 

2. Write the desired register address to register ADDAR.

 

Write register 0x0E to value 0x0170

3. Write the value 0x401F (data, no post increment function field = 01, DEVAD = 31) to register REGCR.

 

Write register 0x0D to value 0x401F

4. Read the content of the desired extended register set register to register ADDAR.

 

Read register 0x0E

 

Subsequent reads from register ADDAR (step 4) continue reading the register selected by the value in the address register.

Note: Steps (1) and (2) can be skipped if the address register was previously configured.

 

Write (No Post Increment) Operation

To write a register in the extended register set:

 

Instruction

Example: Set reg 0x0170 = 0C50

1. Write the value 0x001F (address function field = 00, DEVAD = 31) to register REGCR (0x0D).

 

Write register 0x0D to value 0x001F

2. Write the desired register address to register ADDAR (0x0E).

 

Write register 0x0E to value 0x0170

3. Write the value 0x401F (data, no post increment function field = 01, DEVAD = 31) to register REGCR.

 

Write register 0x0D to value 0x401F

4. Write the content of the desired extended register set register to register ADDAR.

Write register 0x0E to value 0x0C50

 

 

Subsequent writes to register ADDAR (step 4) continue to rewrite the register selected by the value in the address register.

Note: Steps (1) and (2) can be skipped if the address register was previously configured.

 

Read (Post Increment) Operation

 

To read a register in the extended register set and automatically increment the address register to the next higher value following the read operation:

 

Instruction

Example: Read register 0x0170 & 0x0171

1. Write the value 0x001F (address function field = 00, DEVAD = 31) to register REGCR.

 

Write register 0x0D to value 0x001F

 

2. Write the desired register address to register ADDAR.

 

Write register 0x0E to value 0x0170

3. Write the value 0x801F (data, post increment on reads and writes function field = 10, DEVAD = 31) to register REGCR.

Write register 0x0D to value 0x801F

4. Read the content of the desired extended register set register to register ADDAR.

Read register 0x0E

5. Subsequent reads to register ADDAR (step 4) reads the next higher addressed data register selected by the value of the address register; the address register is incremented after each access.

Read register 0x0E

 

Step 4 Reads register 0x0170 and because post increment is enabled, Step 5 reads register 0x0171.

Write (Post Increment) Operation

 

To write a register in the extended register set and automatically increment the address register to the next higher value following the write operation:

 

Instruction

Example: Set reg 0x0170 = 0C50 & reg 0x0171 = 0x0011

1. Write the value 0x001F (address function field = 00, DEVAD = 31) to register REGCR.

 

Write register 0x0D to value 0x001F

2. Write the register address from register ADDAR.

 

Write register 0x0E to value 0x0170

3. Write the value 0x801F (data, post increment on reads and writes function field = 10, DEVAD = 31) or the value 0xC01F (data, post increment on writes function field = 11. DEVAD = 31) to register REGCR.

Write register 0x0D to value 0x401F

4. Write the content of the desired extended register set register to register ADDAR.

Write register 0x0E to value 0x0C50

 

5. Subsequent writes to register ADDAR (step 4) writes the next higher addressed data register selected by the value of the address register; the address register is incremented after each access.

Write register 0x0E to value 0x0011

 

Step 4 Writes register 0x0170 to 0x0C50 and because post increment is enabled, Step 5 writes register 0x0171 to 0x0011.