623
/
838
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
can win bus communication through the standard arbitration during address transmission. If confirming the slave
address, device’s SMBALERT is no longer pulled low. If message transmitted completely,device’s SMBALERT still
is low,it mean host will read ARA again. The host can periodically access the ARA when the SMBALERT signal is
not used.
SMBus communication process
The communication process on SMBus is similar to that on I2C.To use the SMBus mode, you need to configure
SMBus specific registers in the program, respond and process SMBus specific flag, to implement the upper-layer
protocols described in the SMBus manual.
1.
At first, set I2C_CTRL1.SMBMODE bit, and configure I2C_CTRL1.SMBTYPE bit and I2C_CTRL1.ARPEN
bit according to the application requirements. If I2C_CTRL1.ARPEN=1 and I2C_CTRL1.SMBTYPE=0, use
the default address of the SMB device. If I2C_CTRL1.ARPEN=1 and I2C_CTRL1.SMBTYPE=1, use the
SMB master header field.
2.
In order to support ARP (I2C_CTRL1.ARPEN=1), in SMBus host mode (I2C_CTRL1.SMBTYPE=1), software
needs to respond to the I2C_STS2.SMBHADDR bit (in SMBus slave mode, respond to
I2C_STS2.SMBDADDR bit) and implement the functions according to the ARP protocol.
3.
To support the SMBus warning mode, software should respond to the I2C_STS1.SMBALERT bit and
implement the corresponding functions.
Debug mode
When the microcontroller enters the debug mode (Cortex-M4 core is in the stop state), configure the
DBG_CTRL.I2CxSMBUS_TIMEOUT bit in the DBG module, Select SMBUS timeout to continue normal work or
stop. See section 29.3.2 for details.
Interrupt request
All I2C interrupt requests are listed in the following table.
Table 22-2 I
2
C interrupt request
Interrupt function
Interrupt event
Event flag
Set control bit
I2C event interrupt
Start bit sent (master)
STARTBF
EVTINTEN
Address sent (master) or
address matched (slave)
ADDRF
10-bit header sent (master)
ADDR10F
Received stop (slave)
STOPF
Data byte transfer completed.
BSF
Receive buffer is not empty.
RXDATNE
EVTINTEN and BUFINTEN
Send buffer is empty.
TXDATE
I2C error interrupt
Bus error
BUSERR
ERRINTEN
Lost arbitration (master)
ARLOST
Acknowledge fail
ACKFAIL
Overrun/underrun
OVERRUN