|
KSZ8893M Datasheet, PDF (51/116 Pages) Micrel Semiconductor – Integrated 3-Port 10/100 Managed Switch with PHYs | |||
|
◁ |
Micrel, Inc.
KSZ8893MQL/MBL
I2C Slave Serial Bus Configuration
In managed mode, the KSZ8893MQL/MBL can be configured as an I2C slave device. In this mode, an I2C master
device (external controller/CPU) has complete programming access to the KSZ8893MQL/MBLâs 142 registers.
Programming access includes the Global Registers, Port Registers, Advanced Control Registers and indirect
access to the âStatic MAC Tableâ, âVLAN Tableâ, âDynamic MAC Table,â and âMIB Counters.â The tables and
counters are indirectly accessed via registers 121 to 131.
In I2C slave mode, the KSZ8893MQL/MBL operates like other I2C slave devices. Addressing the
KSZ8893MQL/MBLâs 8-bit registers is similar to addressing Atmelâs AT24C02 EEPROMâs memory locations.
Details of I2C read/write operations and related timing information can be found in the AT24C02 Datasheet.
Two fixed 8-bit device addresses are used to address the KSZ8893MQL/MBL in I2C slave mode. One is for read;
the other is for write. The addresses are as follow:
1011_1111 <read>
1011_1110 <write>
The following is a sample procedure for programming the KSZ8893MQL/MBL using the I2C slave serial bus:
1. Enable I2C slave mode by setting the KSZ8893MQL/MBL strap-in pins PS[1:0] (pins 100 and 101,
respectively) to â01â.
2. Power up the board and assert reset to the KSZ8893MQL/MBL. After reset, the âStart Switchâ bit (register 1
bit [0]) is set to â0â.
3. Configure the desired register settings in the KSZ8893MQL/MBL, using the I2C write operation.
4. Read back and verify the register settings in the KSZ8893MQL/MBL, using the I2C read operation.
5. Write a â1â to the âStart Switchâ bit to start the KSZ8893MQL/MBL with the programmed settings.
Note: The âStart Switchâ bit cannot be set to â0â to stop the switch after an â1â is written to this bit. Thus, it is
recommended that all switch configuration settings are programmed before the âStart Switchâ bit is set to â1â.
Some of the configuration settings, such as âAging enableâ, âAuto Negotiation Enableâ, âForce Speedâ and âPower
downâ can be programmed after the switch has been started.
SPI Slave Serial Bus Configuration
In managed mode, the KSZ8893MQL/MBL can be configured as a SPI slave device. In this mode, a SPI master
device (external controller/CPU) has complete programming access to the KSZ8893MQL/MBLâs 142 registers.
Programming access includes the Global Registers, Port Registers, Advanced Control Registers and indirect
access to the âStatic MAC Tableâ, âVLAN Tableâ, âDynamic MAC Tableâ and âMIB Countersâ. The tables and
counters are indirectly accessed via registers 121 to 131.
The KSZ8893MQL/MBL supports two standard SPI commands: â0000_0011â for data read and â0000_0010â for
data write. SPI multiple read and multiple write are also supported by the KSZ8893MQL/MBL to expedite register
read back and register configuration, respectively.
SPI multiple read is initiated when the master device continues to drive the KSZ8893MQL/MBL SPIS_N input pin
(SPI Slave Select signal) low after a byte (a register) is read. The KSZ8893MQL/MBL internal address counter
increments automatically to the next byte (next register) after the read. The next byte at the next register address
is shifted out onto the KSZ8893MQL/MBL SPIQ output pin. SPI multiple read continues until the SPI master
device terminates it by de-asserting the SPIS_N signal to the KSZ8893MQL/MBL.
Similarly, SPI multiple write is initiated when the master device continues to drive the KSZ8893MQL/MBL SPIS_N
input pin low after a byte (a register) is written. The KSZ8893MQL/MBL internal address counter increments
automatically to the next byte (next register) after the write. The next byte that is sent from the master device to
the KSZ8893MQL/MBL SDA input pin is written to the next register address. SPI multiple write continues until the
SPI master device terminates it by de-asserting the SPIS_N signal to the KSZ8893MQL/MBL.
For both SPI multiple read and multiple write, the KSZ8893MQL/MBL internal address counter wraps back to
register address zero once the highest register address is reached. This feature allows all 142
KSZ8893MQL/MBL registers to be read, or written with a single SPI command from any initial register address.
The KSZ8893MQL/MBL is capable of supporting a 5MHz SPI bus.
February 2010
51
M9999-021110-1.6
|
▷ |