
69rlq62d-f714peg4 * Memec (Headquar
ter
s) - Unique
Tec
h,
Insight,
Impact
MAR
VELL CONFIDENTIAL,
UNDER ND
A# 12101050
69rlq62d-f714peg4 * Memec (Headquar
ter
s) - Unique
Tec
h,
Insight,
Impact
MAR
VELL CONFIDENTIAL,
UNDER ND
A# 12101050
69r
lq62d-f714peg4 * Memec (Headquar
ters) - Unique
T
ech, Insight, Impact * UNDER ND
A# 12101050
MAR
VELL CONFIDENTIAL - UNA
UTHORIZED DISTRIB
UTION OR USE STRICTL
Y PR
OHIBITED
PXA300 Processor and PXA310 Processor
Vol. I: System and Timer Configuration Developers Manual
Doc. No. MV-TBD-00 Rev. A
CONFIDENTIAL
Copyright © 12/13/06 Marvell
Page 284
Document Classification: Proprietary Information
December 13, 2006
Not approved by Document Control. For review only.
10.2
Signal Descriptions
describes the functionality of the 1-Wire signal.
10.3
Operation
This section describes the procedure for reading and writing using the 1-Wire interface. The 1-Wire bus master
interface controller is located on Peripheral bus #2. The 1-Wire protocol requires a reset before any bus
communication. Generating a 1-Wire reset on the bus is covered in
.
The 1-Wire bus master interface controller generates read, write or reset commands on the 1-Wire bus. The
1-Wire reset is a special command that must precede command given on the bus.
10.3.1
Writing a Byte
To send a byte on the 1-Wire bus, write the byte to be transferred to the transmit buffer. The data is then moved to
the Tx Shift register (see note in
) where it is shifted serially onto the bus, LSB first. A new byte of
data can then be written to the transmit buffer. As soon as the Tx Shift register is empty, the new data is
transferred from the transmit buffer and the process repeats. Each of these registers has a flag that can be used as
an interrupt source. The transmit buffer empty flag, W1INTR[TBE], is set when the transmit buffer is empty and
ready to accept a new byte. W1INTR[TBE] is cleared as soon as a byte is written into the transmit buffer. The Tx
Shift register empty flag, W1INTR[TEMT], is set when the Tx Shift register has no data in it and is ready to
accept a new byte. As soon as a byte of data is transferred from the transmit buffer, W1INTR[TEMT] is cleared
and W1INTR[TBE] is set.
10.3.2
Reading a Byte
To read data from a slave device, the device must first be prepared to transmit data. The slave device is prepared
through commands previously received from the CPU. Data is retrieved from the bus in a similar fashion to a
write operation. The host initiates a read by writing to the transmit buffer. The data that is then shifted into the Rx
Shift register (see note in
) is the wired-AND of the written data and the data from the slave device.
Therefore, to read a byte from a slave device, the host must write 0xFF. When the Rx Shift register is full, the
data is transferred to the receive buffer where the host can access it.
Additional bytes can now be read by sending 0xFF again. If the slave device is not ready to transmit, the data
received is identical to that which was transmitted. The 1-Wire Transmit/Receive Buffer (W1TRR) register can
also generate interrupts. The receive buffer flag, W1INTR[RBF], is set when data is transferred from the Rx
Shift register and cleared when the host reads the Rx Shift register. If RBF is set, additional transmissions on the
Table 10-1. 1-Wire Signal Descriptions
Name
Direction
Description
ONE_WIRE
In/Out
1-Wire Data Line
This open-drain line is the 1-Wire bidirectional data bus signal. 1-Wire
slave devices are connected to this pin. This pin must be pulled high by
an external resistor, nominally 5 K
Ω.