DM9000A
APPLICATION NOTES
Preliminary 23
Version: DM9000A-AN-V121
November 27, 2007
5.3 How to Read/ Write EEPROM Data
The DM9000A supports the serial EEPROM interface and provides a very easy method to
access it. It is only to read/ write the EEPROM&PHY control/ address/ data register (REG.
0BH ~ REG. 0EH), which are used to control and read/ write the EEPROM address or data.
For example, IC 93C46 is a 64-word (1024-bit) EEPROM and the word addresses are
mapped to the EROA Bit [5:0] in the EEPROM&PHY address register, EPAR REG. 0CH.
Besides, EPAR PHY_ADR Bit [7:6] must be set "00"b to enable the word address for the
EEPROM. And, the setting PHY_ADR Bit [7:6] = 01 in EPAR is for the PHY address selected.
Please refer to the datasheet ch.6.12 ~ ch.6.14 about setting the EEPROM&PHY registers.
5.3.1 HOWTO Read EEPROM Data
The following steps are shown to read data from the serial EEPROM (SROM):
Step 1: write the word address into EPAR REG. 0CH.
Step 2: write command = 0x04 into the EEPROM&PHY Control Register (EPCR REG. 0BH)
to start the SROM + READ operation:
i. EPCR (REG. 0BH) EPOS Bit [3] = 0: select SROM mode (this is default: 0).
ii. EPCR (REG. 0BH) ERPRR Bit [2] = 1: issue READ command.
Step 3: read EPCR REG. 0BH and wait until ERRE Bit [0] = 0 ok, or just following Step 4.
Step 4: wait 40 us at least, then write "0" into EPCR REG. 0BH to clear READ command.
Step 5: read the SROM data high byte from EE_PHY_H REG. 0EH, and the low byte from
EE_PHY_L REG. 0DH in the EEPROM&PHY Data registers.
HOWTO read SROM Word 0x03, Auto Load Control, shown as follows:
1. write word address 0x03 into EPAR REG. 0CH
iow ( 0x0C, 0x03 );
2. write the SROM + READ command = 0x04 into EPCR REG. 0BH
iow ( 0x0B, 0x04 );
3. wait until EPCR REG. 0BH Bit [0] = 0 ok, or just following Step 4
do { udelay ( 10 ); i++; } while ( ( i < 500 ) && ( inb ( 4 ) & 1 ) );
4. delay 40 us at least, then write "0" into EPCR REG. 0BH