Lantronix DSTni-EX Benutzerhandbuch

Seite von 95
 
22 
Resetting the I
2
C Controller 
There are two ways to reset the I
2
C controller.  
 
Using the RSTIN# pin 
 
Writing to the Software Reset register 
 
Using the RSTIN# pin reset method: 
 
Clears the Address, Extended Slave Address, Data, and Control registers to 00h. 
 
Sets the Status register to F8h. 
 
Sets the Clock Control register to 00h. 
 
Writing any value to the Software Reset register: 
 
Sets the I
2
C controller back to idle. 
 
Sets the STP, STA, and IFLG bits of the Control register to 0. 
Programmer’s Reference 
The DSTni I
2
C controller base address is D000h. The controller shares interrupt 2 with the SPI 
controller. The I
2
C bus interface requires two bidirectional buffers, with open collector (or open 
drain) outputs and Schmitt inputs. 
I
2
C Controller Register Summary 
The A[2:0] address lines of the microprocessor interface provide access to the 8-bit registers in 
Table 3-7. 
On a hardware reset: 
 
Address, Extended Slave Address, Data, and Control register clear to 00h. 
 
The Status register is set to F8h. 
 
The Clock Control register is set to 00h. 
On a software reset, the STP, STA and IFLG bits of the Control register are set to zero. 
Table 3-7. I
2
C Controller Register Summary 
A[2:0] Bits 
Page
A2 
A1 
A0 
Hex 
Offset 
Mnemonic 
Register Description 
 
D000 
ADDR 
Slave Address register 
D002 
DATA 
Data register 
0 1  0 D004 
CNTR 
Control 
register 
D006 
STAT 
Status register 
D007 
CCR 
Clock Control register 
D008 
XADDR 
Extended Slave Address register 
D00E 
SRST 
Software Reset register