User Manual
BCM1250/BCM1125/BCM1125H
10/21/02
B r o a d c o m C o r p o r a t i o n
Document
1250_1125-UM100CB-R
Section 14: Serial Configuration Interface
Page
411
U
SING
E
XTENDED
P
ROTOCOLS
A transfer is configured by setting data values in the SMBus registers and writing the transfer type with the
extend bit set to the
smb_start
register. This starts the operation. If the remote device fails to acknowledge
when expected, then the transfer is abandoned with an error. If the part loses arbitration or detects over-long
slave stretching then the transfer is aborted. The interface will retry an aborted transfer 15 times before
abandoning it with an arbitration error.
Reading from a slave on the serial bus involves these steps:
1
Wait until the busy bit in the
smb_status
register is clear. The interface will ignore accesses while the bit is set.
2
If the read is preceded by an address/command (other than just a Slave Address) write the
smb_cmd
register
with the 8 or 16 bit data to be sent.
3
Specify the device address and the transfer type by writing to the
smb_start
register. This will cause the
transfer to begin. The busy bit in the
smb_status
register will be set to a one as long as the transfer is in
progress.
4
When the transaction finishes the busy bit will be cleared. This can either be detected by polling the
smb_status
or by enabling the smb_finish interrupt. The error bit indicates that an acknowledgement was not
received from the slave device when the master attempted to start the transaction.
5
Read the data from the
smb_cmd
,
smb_data
and
smb_xtra
registers.
6
If PEC is enabled the
smb_pec
register should be read.
Writing to a slave on the serial bus involves these steps:
1
Wait until the busy bit in the
smb_status
register is clear. The interface will ignore accesses while the bit is set.
2
If an address/command is needed write 8 or 16 bits to the
smb_cmd
register.
3
Write the data to the
smb_data
and
smb_xtra
registers.
4
If PEC is enabled an extra data byte should be written to the
smb_pec
register.
5
Specify the device address and the transfer type by writing to the
smb_start
register. This will cause the
transfer to begin. The busy bit in the
smb_status
register will be set to a one as long as the transfer is in
progress.
The SMBus interface is accessed through a number of registers in the I/O portion of the memory map. The two
interfaces are identical, register names in this discussion should have
_0
or
_1
appended to indicate the
interface. There are two interrupts generated from each interface. Both interrupts are maskable through the
control register. The smb_finish interrupt is generated when the interface completes an operation and the
smb_busy status bit changes from one to zero, the interrupt is cleared by a read from the status register. The
smb_error interrupt is generated when an error condition occurs, both the interrupt and status bit are cleared
by writing a 1 to the error bit in the status register.
Prior to using the configuration interface the clock speed should be set. This is derived from the 100 MHz
reference clock as configured in the
smb_freq
register. The two standard frequencies are 100 kHz and
400 kHz, but a much wider range can be programmed. Since the setup and hold time parameters vary
betweeen different slave devices it may be necessary to run the interface slightly slow to ensure reliable
operation.