Freescale Semiconductor PowerQUICC MPC885 Reference Manual page 843

Powerquicc family
Table of Contents

Advertisement

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 field 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 field should
be initialized to 3. However, to send three characters of 9-bit data, the data length field should
be initialized to 6 since the three 9-bit data fields occupy three half-words in memory. The CPM
never modifies this field.
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.
30.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 configured 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
30-11.
0
1
Offset + 0
E
Offset + 2
Offset + 4
Offset + 6
Table 30-8
describes the RxBD status and control fields.
Table 30-8. SPI RxBD Status and Control Field Descriptions
Bits
Name
0
E
Empty
0 The buffer is full or stopped receiving because of an error. The core can examine or write to any
fields of this RxBD, but the CPM does not use this BD while E = 0.
1 The buffer is empty or reception is in progress. The CPM owns this RxBD and its buffer. Once E
is set, the core should not write any fields of this RxBD.
1
Reserved, should be cleared.
Freescale Semiconductor
2
3
4
5
6
W
I
L
CM
Rx Buffer Pointer
Figure 30-11. SPI Receive BD (RxBD)
MPC885 PowerQUICC Family Reference Manual, Rev. 2
7
Data Length
Description
Serial Peripheral Interface (SPI)
13
14
15
OV
ME
30-13

Advertisement

Table of Contents
loading

This manual is also suitable for:

Powerquicc mpc870Powerquicc mpc880Powerquicc mpc875

Table of Contents