GD32F20x User Manual
533
Address resolution protocol
The SMBus uses I2C hardware and I2C hardware addressing, but adds second-level
software for building special systems. Additionally, its specifications include an Address
Resolution Protocol that can make dynamic address allocations. Dynamic reconfiguration of
the ha
rdware and software allow bus devices to be ‘hot-plugged’ and used immediately,
without restarting the system. The devices are recognized automatically and assigned unique
addresses. This advantage results in a plug-and-play user interface. In both those protocols
there is a very useful distinction made between a System Host and all the other devices in
the system that can have the names and functions of masters or slaves.
Time-out feature
SMBus has a time-out feature which resets devices if a communication takes too long. This
explains the minimum clock frequency of 10 kHz to prevent locking up the bus. I2C can be a
‘DC’ bus, meaning that a slave device stretches the master clock when performing some
routine while the master is accessing it. This will notify to the master that the slave is busy but
does not want to lose the communication. The slave device will allow continuation after its
task is completed. There is no limit in the I2C bus protocol as to how long this delay can be,
whereas for a SMBus system, it would be limited to 35ms. SMBus protocol just assumes that
if something takes too long, then it means that there is a problem on the bus and that all
devices must reset in order to clear this mode. Slave devices are not allowed to hold the clock
low too long.
Packet error checking
SMBus 2.0 and 1.1 allow Packet Error Checking (PEC). In that mode, a PEC (packet error
code) byte is appended at the end of each transaction. The byte is calculated as CRC-8
checksum, calculated over the entire message including the address and read/write bit. The
polynomial used is x8+x2+x+1 (the CRC-8-ATM HEC algorithm, initialized to zero).
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 but passing more data
and building on the I2C multi-master mode.
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, response 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 value.
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...