AT32WB415
Series Reference Manual
2022.04.13
Page 126
Ver 2.00
SMBus Alert
SMBALERT is an optional signal that connects the ALERT pin between the host and the salve. With this
signal, the slave notifies the host to access the slave. SMBALERT is a wired-AND signal. For more
information about SMBus Alert, refer to SMBus2.0 protocol.
The detailed sequences are as follows:
SMBus host:
1.
Enable SMBus Alert mode by setting SMBALERT=1
2.
Enable ALERT interrupt if necessary
3.
When an alert event occurs on the ALERT pin (ALERT pin changes from high to low)
4.
The host will generate ALERT interrupt if enabled
5.
The host then processes the interrupt and accesses to all devices through ARA (Alert Response
Address 0001100x) so as to get the slave addresses. Only the devices with pulled-down
SMBALERT can acknowledge ARA.
6.
The host then continues to operate based on the slave addresses available.
SMBus slave:
1.
When an alert event occurs and the ALERT pin changes from high to low (SMBALERT=1), the
slave responses to ARA (Alert Response Address) address (0001100x)
2.
Enable ALERT interrupt if necessary (an interrupt is generated when receiving ARA address)
3.
Wait until the host gets the slave addresses through ARA
4.
Report its own address, but it continues to wait if the arbitration is lost.
5.
Address is reported properly, and the ALERT pin is released (SMBALERT=0).
Packet error checking (PEC)
Packet erro checking (PEC) is used to guarantee the correctness and integrity of data transfer. This is
done by using CRC-8 polynominal:
C(x) = x
8
+ x
2
+ x + 1
PEC calculation is enabled when PECEN=1 to check address and data. It becomes invalid when the
arbitration is lost.
PEC transmission:
Common mode: Set PECTRA=1 after the last TDBE event so that PEC is transferred after the last
transmitted byte.
DMA mode: The PEC is transferred automatically after the last transmitted byte. For example, if
the number of data to be transferred is 8, then DMA_TCNTx=8.
PEC reception:
Common mode: Set the PECTRA bit after the last RDBF event. The PECTRA must be set before
the ACK pulse of the current byte is received.
DMA mode: When receiving, it will automatically consider the last byte as PECVAL and check it.
For example, if the number of data to be transferred is 8, then DMA_TCNTx=9.
In reception mode, the NACK will be generated when PEC fails.