C8051F330/1/2/3/4/5
138
Rev. 1.7
15.3.2. Clock Low Extension
SMBus provides a clock synchronization mechanism, similar to I2C, which allows devices with different
speed capabilities to coexist on the bus. A clock-low extension is used during a transfer in order to allow
slower slave devices to communicate with faster masters. The slave may temporarily hold the SCL line
LOW to extend the clock low period, effectively decreasing the serial clock frequency.
15.3.3. SCL Low Timeout
If the SCL line is held low by a slave device on the bus, no further communication is possible. Furthermore,
the master cannot force the SCL line high to correct the error condition. To solve this problem, the SMBus
protocol specifies that devices participating in a transfer must detect any clock cycle held low longer than
25 ms as a “timeout” condition. Devices that have detected the timeout condition must reset the communi-
cation no later than 10 ms after detecting the timeout condition.
When the SMBTOE bit in SMB0CF is set, Timer 3 is used to detect SCL low timeouts. Timer 3 is forced to
reload when SCL is high, and allowed to count when SCL is low. With Timer 3 enabled and configured to
overflow after 25 ms (and SMBTOE set), the Timer 3 interrupt service routine can be used to reset (disable
and re-enable) the SMBus in the event of an SCL low timeout.
15.3.4. SCL High (SMBus Free) Timeout
The SMBus specification stipulates that if the SCL and SDA lines remain high for more that 50 µs, the bus
is designated as free. When the SMBFTE bit in SMB0CF is set, the bus will be considered free if SCL and
SDA remain high for more than 10 SMBus clock source periods. If the SMBus is waiting to generate a
Master START, the START will be generated following this timeout. Note that a clock source is required for
free timeout detection, even in a slave-only implementation.
15.4. Using the SMBus
The SMBus can operate in both Master and Slave modes. The interface provides timing and shifting con-
trol for serial transfers; higher level protocol is determined by user software. The SMBus interface provides
the following application-independent features:
•
Byte-wise serial data transfers
•
Clock signal generation on SCL (Master Mode only) and SDA data synchronization
•
Timeout/bus error recognition, as defined by the SMB0CF configuration register
•
START/STOP timing, detection, and generation
•
Bus arbitration
•
Interrupt generation
•
Status information
SMBus interrupts are generated for each data byte or slave address that is transferred. When transmitting,
this interrupt is generated after the ACK cycle so that software may read the received ACK value; when
receiving data, this interrupt is generated before the ACK cycle so that software may define the outgoing
ACK value. See
Section “15.5. SMBus Transfer Modes” on page 146
for more details on transmission
sequences.
Interrupts are also generated to indicate the beginning of a transfer when a master (START generated), or
the end of a transfer when a slave (STOP detected). Software should read the SMB0CN (SMBus Control
register) to find the cause of the SMBus interrupt. The SMB0CN register is described in
“15.4.2. SMB0CN Control Register” on page 143
; Table 15.4 provides a quick SMB0CN decoding refer-
ence.
Summary of Contents for TOOLSTICK C8051F330
Page 2: ...C8051F330 1 2 3 4 5 2 Rev 1 7 ...
Page 10: ...C8051F330 1 2 3 4 5 10 Rev 1 7 ...
Page 16: ...C8051F330 1 2 3 4 5 16 Rev 1 7 ...
Page 40: ...C8051F330 1 2 3 4 5 40 Rev 1 7 ...
Page 56: ...C8051F330 1 2 3 4 5 56 Rev 1 7 ...
Page 64: ...C8051F330 1 2 3 4 5 64 Rev 1 7 ...
Page 96: ...C8051F330 1 2 3 4 5 96 Rev 1 7 ...
Page 110: ...C8051F330 1 2 3 4 5 110 Rev 1 7 ...
Page 112: ...C8051F330 1 2 3 4 5 112 Rev 1 7 ...
Page 176: ...C8051F330 1 2 3 4 5 176 Rev 1 7 ...