Data Sheet
AD5940
The transaction protocol is shown in Figure 44. Six dummy reads
are required before valid data is returned on the advanced
peripheral bus (APB). The diagram also illustrates why the last
two FIFO results are read back with a nonzero offset. In Figure 44,
the APB reads Data C when the SPI bus is transferring Data B.
Assuming APB Read B is the last data in the FIFO, the read
offset (ROFFSETC) is set to a nonzero value. Then, the APB
reads a different register than the DATAFIFORD register. If the
APB continues to read the DATAFIFORD register, the data
FIFO underflows, which causes an underflow error.
READING DATA FROM THE DATA FIFO
There are two methods to read back data from the data FIFO:
read the DATAFIFORD register as described in the Writing to
and Reading from Registers section, or implement a fast FIFO
read protocol.
If there are less than three results in the data FIFO, the data can
be read back from the DATAFIFORD register. However, if there
are more than three results in the FIFO, a more efficient SPI
transaction protocol is implemented. The following section
describes this protocol and is illustrated in Figure 44.
Read Data from Data FIFO
To read data from the data FIFO, take the following steps:
CS
1. Drive
low.
2. Send an 8-bit command byte: SPICMD_READFIFO.
3. Transmit six dummy bytes on the SPI bus before valid data
can be read back.
4. Continuously read the DATAFIFORD register until only
two results are left.
5. Read back the last two data points using a nonzero offset.
CS
6. Pull
high.
APB READ A
APB READ B
APB READ C
CMD
ROFFSETA ROFFSETA ROFFSETA ROFFSETA ROFFSETB ROFFSETB ROFFSETB ROFFSETB ROFFSETC ROFFSETC ROFFSETC ROFFSETC ROFFSETC
MOSI
MISO
RDATA3
RDATA2
RDATA1
RDATA1
RDATA3
RDATA2
RDATA1
B
SSTATUS1 SSTATUS2 SSTATUS3 SSTATUS4 SSTATUS5
6 DUMMY READS BEFORE VALID DATA
SSTATUS6
SSTATUS0
A
A
A
A0
B
B
Figure 44. Data FIFO Read Protocol
Rev. 0 | Page 97 of 130