Motorola MPC860 PowerQUICC User Manual page 840

Table of Contents

Advertisement

Part V. The Communications Processor Module
31.7.1 SPI Buffer Descriptors (BDs)
Receive and transmit BDs report information about each buffer transferred and whether a
maskable interrupt should be generated. Each 64-bit BD, shown in Figure 31-11 and
Figure 31-12, has the following structure:
¥ The half word at offset + 0 contains status and control bits. The CPM updates the
status bits after the buffer is sent or received.
¥ The half word at offset + 2 contains the data length (in bytes) that is sent or received.
Ñ For an RxBD, this is the number of octets the CPM writes into this RxBDÕs
buffer once the BD closes. The CPM updates this Þeld after the received data is
placed into the buffer. Memory allocated for this buffer should be no smaller than
MRBLR.
Ñ For a TxBD, this is the number of octets the CPM should transmit from its buffer.
Normally, this value should be greater than zero. If the character length is more
than 8 bits, the data length should be even. For example, to send three characters
of 8-bit data the data length Þeld should be initialized to 3. However, to send
three characters of 9-bit data, the data length Þeld should be initialized to 6 since
the three 9-bit data Þelds occupy three half-words in memory. The CPM never
modiÞes this Þeld.
¥ The word at offset + 4 points to the beginning of the buffer.
Ñ For an RxBD, the pointer must be even and can point to internal or external
memory.
Ñ For a TxBD, the pointer can be even or odd, unless the character exceeds 8 bits,
for which it must be even. The buffer can be in internal or external memory.
31.7.1.1 SPI Receive BD (RxBD)
The CPM uses RxBDs to report on each received buffer. It closes the current buffer,
generates a maskable interrupt, and starts receiving data in the next buffer once the current
buffer is full. The CPM also closes the buffer when the SPI is conÞgured as a slave and
SPISEL is negated, indicating that reception stopped. The core should write RxBD bits
before the SPI is enabled. The format of an RxBD is shown in Figure 31-11.
0
1
Offset + 0
E
Ñ
Offset + 2
Offset + 4
Offset + 6
31-14
2
3
4
5
W
I
L
Ñ
CM
Figure 31-11. SPI Receive BD (RxBD)
MPC860 PowerQUICC UserÕs Manual
6
7
8
9
10
Ñ
Data Length
Rx Buffer Pointer
11
12
13
14
15
OV
ME
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents