Communication Processor Module
16-354
MPC823 USER’S MANUAL
MOTOROLA
USB
COMMUNICATION
16
PROCESSOR
MODULE
RBPTR—The receiver buffer descriptor pointer points to the next buffer descriptor that
the receiver will transfer data to when it is in an idle state or to the current buffer
descriptor while processing a frame. RBPTR should be initialized by the software after
reset. When the end of the buffer descriptor table is reached, the communication
processor module initializes this pointer to the value programmed in the RBASE entry.
Although you never need to write RBPTR in most applications (except initialization),
you can modify it when the receiver is disabled or when you are sure that no receive
buffer is currently in use.
TBPTR—The transmitter buffer descriptor pointer for each USB endpoint points to the
next buffer descriptor that the transmitter will transfer data from when it is in an idle state
or to the current buffer descriptor during frame transmission. TBPTR should be
initialized by the software after reset. When the end of buffer descriptor table is reached,
the communication processor module initializes this pointer to the value programmed
in the TBASE entry. Although you never need to write TBPTR in most applications
(except initialization), you can modify it when the transmitter is disabled or when you
are sure that no transmit buffer is currently in use.
TSTATE—The transmit internal state entry should be initilaized to zero before enabling
the USB controller.
Other General Parameters—These are the additional parameters listed in
Table 16-34and
Table 16-35. You do not need to access these parameters in normal operation and
they are only listed because they provide helpful information to experienced users for
debugging purposes. The RX and TX internal data pointers (RPTR and TPTR) are
updated by the SDMA channels to show the next address in the buffer to be accessed.
TX internal byte count (TBCNT) is a down-count value that is initialized with the TX
buffer descriptor’s DATA LENGTH field and decremented with every byte read by the
SDMA channels. RX internal byte count (RBCNT)is a down-count value that is
initialized with the MRBLR value and decremented with every byte written by the SDMA
channels. RSTATE, TSTATE, RTEMP, TTEMP, and the reserved areas are only used
by the RISC microcontroller.
Note: MRBLR is not intended to be changed dynamically while the USB channel is
operating. However, if it is modified in a single bus cycle with one 16-bit move
(not two 8-bit bus cycles back-to-back), then a dynamic change in the receive
buffer length can be successfully achieved. This occurs when the
communication processor module moves control to the next RX buffer descriptor
in the table. Thus, a change to MRBLR will not have an immediate effect. To
guarantee the exact RX buffer descriptor on which the change will occur, you
should change MRBLR only while the USB receiver is disabled.