DM9000A
APPLICATION NOTES
Preliminary 22
Version: DM9000A-AN-V121
November 27, 2007
5.2 Driver Initializing Steps
1. To power on the internal PHY:
iow ( 0x1F, 0x00 );
to set GPR (REG. 1FH) Bit [0]: PHYPD = 0
The PHY is powered down at default. The power-up procedure will be needed to enable it by
writing iow "0" to PHYPD (GP0 = 0). Please refer to the ch.3.4 about setting the GPIO pins.
2. To do a software reset for the DM9000A initial (see chapter 4.2):
i. iow ( 0x00, 0x01 ); to set NCR (REG. 00) RST Bit [0] = 1 for a period time 10 us.
ii. iow ( 0x00, 0x00 ); to clear NCR (REG. 00) RST Bit [0] = 0, or let it auto clear.
3. Program the NCR register. Choose normal mode by setting NCR (REG. 00) LBK Bit [2:1] =
00b. The system designer can choose the network operations such as the internal MAC/ PHY
loop-back mode, forced the external PHY Full/ half duplex mode or to force collisions, and the
wake-up events enable. Please refer to the datasheet chapter 6.1 about the NCR setting.
4. To set the IMR register (REG. FFH) Bit [7] = 1 to enable the Pointer Auto Return function,
which is the memory read/ write address pointer of the RX/ TX FIFO SRAM.
5. Read the EEPROM data 3 words, for the individual Ethernet node address (if necessary).
6. Write 6-byte Ethernet node address into the Physical Address Registers (REG. 10H~15H).
7. Write Hash Table 8 bytes into the Multicast Address Registers (REG. 16H ~ REG. 1DH).
8. To clear TX & INTR status by R/W1 the NSR REG. 01 and ISR REG. FEH registers. The Bit
[2] TX1END, Bit [3] TX2END, and Bit [5] WAKEST will be cleared automatically by reading it
or writing "1" back. Please refer to the datasheet chapter 6.2 & 6.33 about setting NSR & ISR.
9. To handle the NIC interrupts or polling service routines.
10. Program the IMR register (REG. FFH) Bit [0]/ Bit [1] to enable the RX/ TX interrupt.
11. Program the RCR register to enable RX. The RX function is enabled by setting the RXEN
Bit [0] = 1 in the RX control register, RCR REG. 05. Please refer to the datasheet ch.6.6 RCR.
12. NIC is being activated and ready RX/ TX now.