English
Language : 

LAN9303 Datasheet, PDF (60/366 Pages) SMSC Corporation – Small Form Factor Three Port 10/100 Managed Ethernet Switch with Single MII/RMII/Turbo MII
6.2.1
Small Form Factor Three Port 10/100 Managed Ethernet Switch with Single MII/RMII/Turbo MII
Datasheet
Switch Fabric CSR Writes
To perform a write to an individual Switch Fabric register, the desired data must first be written into the
Switch Fabric CSR Interface Data Register (SWITCH_CSR_DATA). The write cycle is initiated by
performing a single write to the Switch Fabric CSR Interface Command Register
(SWITCH_CSR_CMD) with the CSR Busy (CSR_BUSY) bit set, the CSR Address (CSR_ADDR[15:0])
field set to the desired register address, the Read/Write (R_nW) bit cleared, the Auto Increment
(AUTO_INC) and Auto Decrement (AUTO_DEC) fields cleared, and the desired CSR Byte Enable
(CSR_BE[3:0]) bits selected. The completion of the write cycle is indicated by the clearing of the CSR
Busy (CSR_BUSY) bit.
A second write method may be used which utilizes the auto increment/decrement function of the
Switch Fabric CSR Interface Command Register (SWITCH_CSR_CMD) for writing sequential register
addresses. When using this method, the Switch Fabric CSR Interface Command Register
(SWITCH_CSR_CMD) must first be written with the Auto Increment (AUTO_INC) or Auto Decrement
(AUTO_DEC) bit set, the CSR Address (CSR_ADDR[15:0]) field written with the desired register
address, the Read/Write (R_nW) bit cleared, and the desired CSR byte enable bits selected (typically
all set). The write cycles are then initiated by writing the desired data into the Switch Fabric CSR
Interface Data Register (SWITCH_CSR_DATA). The completion of the write cycle is indicated by the
clearing of the CSR Busy (CSR_BUSY) bit, at which time the address in the Switch Fabric CSR
Interface Command Register (SWITCH_CSR_CMD) is incremented or decremented accordingly. The
user may then initiate a subsequent write cycle by writing the desired data into the Switch Fabric CSR
Interface Data Register (SWITCH_CSR_DATA).
The third write method is to use the direct data range write function. Writes within the Switch Fabric
CSR Interface Direct Data Registers (SWITCH_CSR_DIRECT_DATA) address range automatically set
the appropriate register address, set all four CSR Byte Enable (CSR_BE[3:0]) bits, clears the
Read/Write (R_nW) bit, and set the CSR Busy (CSR_BUSY) bit of the Switch Fabric CSR Interface
Command Register (SWITCH_CSR_CMD). The completion of the write cycle is indicated by the
clearing of the CSR Busy (CSR_BUSY) bit. Since the address range of the Switch Fabric CSRs
exceeds that of the Switch Fabric CSR Interface Direct Data Registers
(SWITCH_CSR_DIRECT_DATA) address range, a sub-set of the Switch Fabric CSRs are mapped to
the Switch Fabric CSR Interface Direct Data Registers (SWITCH_CSR_DIRECT_DATA) address range
as detailed in Table 13.4, “Switch Fabric CSR to SWITCH_CSR_DIRECT_DATA Address Range Map,”
on page 164.
Figure 6.1 illustrates the process required to perform a Switch Fabric CSR write.
Revision 1.3 (08-27-09)
60
DATASHEET
SMSC LAN9303/LAN9303i