Mc68302 Buffer Processing And Interrupt Handling; Buffer Descriptors Definition - Motorola MC68302 User Manual

Integrated multiprotocol processor
Hide thumbs Also See for MC68302:
Table of Contents

Advertisement

D.3 MC68302 BUFFER PROCESSING AND INTERRUPT HANDLING
The following paragraphs describe how to build an algorithm to process the buffers for the
MC68302 serial communication controller (SCC) channels.
D.3.1 Buffer Descriptors Definition
Data buffers used by the MC68302 are controlled by buffer descriptors (BDs). The general
structure of a BD is shown in Figure D-3. The processing of buffers by software is done by
examining BDs. Thus, BDs are the focus of this discussion.
OFFSET + 0
READY
OFFSET + 2
OFFSET + 4
OFFSET + 0
EMPTY
OFFSET + 2
OFFSET + 4
Figure D-3. Transmit and Receive BD Structure
Each transmit BD has a very important bit called the "ready" bit. This bit is set by the M68000
user program to signify to the SCC that the BD has data ready for sending. Similarly, the
"empty" bit tells whether a receive BD is empty and can be used by the SCC for locating an
empty buffer to store incoming data.
In the MC68302, up to 8 receive BDs and 8 transmit BDs can be defined per SCC. These
BDs are stored in predefined places in the MC68302 dual-port RAM. The "wrap" bit is set in
the last BD, causing the SCC to wrap back around to the first BD when processing of the
last BD is complete. Thus, each set of BDs form a circular queue. An example is shown in
Figure D-4.
MOTOROLA
Transmit BD
OTHER STATUS AND CONTROL
DATA LENGTH (NUMBER OF BYTES TO SEND)
32-BIT BUFFER POINTER (24 BITS USED)
Receive BD
OTHER STATUS AND CONTROL
DATA LENGTH (0000 INITIALLY)
32-BIT BUFFER POINTER (24 BITS USED)
MC68302 USER'S MANUAL
MC68302 Applications
D-7

Advertisement

Table of Contents
loading

Table of Contents