![GigaDevice Semiconductor GD32E23 Series User Manual Download Page 482](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32e23-series/gd32e23-series_user-manual_2225794482.webp)
GD32E23x User Manual
482
SMBus alert
The SMBus has an extra optional shared interrupt signal called SMBALERT# which can be
used by slaves to tell the host to ask its slaves about events of interest. SMBus also defines
a less common "Host Notify Protocol", providing similar notifications which is based on the
I2C multi-master mode but it can pass more data.
SMBus programming flow
The programming flow for SMBus is similar to normal I2C. In order to use SMBus mode, the
application should configure several SMBus specific registers, respond to some SMBus
specific flags and implement the upper protocols described in SMBus specification.
1.
Before communication, SMBEN bit in I2C_CTL0 should be set and SMBSEL and
ARPEN bits should be configured to desired values.
2.
In order to support address resolution protocol (ARP) (ARPEN=1), the software should
respond to HSTSMB flag in SMBus Host Mode (SMBSEL =1) or DEFSMB flag in
SMBus Device Mode, and implement the function of ARP protocol.
3.
In order to support SMBus Alert Mode, the software should respond to SMBALT flag and
implement the related function.
17.3.12.
SAM_V support
To support the SAM_V standard, two additional pins are added to the I2C module: txframe
and rxframe. Txframe is an output pin, in master mode, it indicates the I2C is busy when it is
asserted. Rxframe is an input pin that is supposed to be multiplexed together with the
SMBALERT signal.
The SAM_V mode is enabled by setting the SAMEN bit of the I2C_SAMCS register. The
status of the txframe and rxframe pin can be reflected by the RFR, RFF, TFR, TFF, RXF, and
TXF flags of the I2C_SAMCS register. I2C interrupts will be generated if the corresponding
interrupt enable bits are set.
17.3.13.
Status, errors and interrupts
There are several status and error flags in I2C, and interrupts may be asserted from these
flags by setting some register bits (refer to
Table 17-2. Event status flags
Event Flag Name
Description
SBSEND
START signal sent (master)
ADDSEND
Address sent or received
ADD10SEND
Header of 10-bit address sent
STPDET
STOP signal detected