![](http://datasheet.mmic.net.cn/30000/MPC823ZC25_datasheet_2375818/MPC823ZC25_975.png)
Communication Processor Module
16-456
MPC823 USER’S MANUAL
MOTOROLA
I 2
C
COMMUNICATION
16
PROCESSOR
MODULE
RBPTR—The receive buffer pointer entry for each I2C channel points to the next buffer
descriptor that the receiver transfers data to when it is in an idle state or to the current
buffer descriptor during frame processing. After a reset or 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 in most applications you should
not write the RBPTR, it can be modified when the receiver is disabled or when you are
sure no receive buffer is currently in use.
TBPTR—The transmit buffer pointer entry for each I2C channel points to the next buffer
descriptor that the transmitter transfers data from when it is in an idle state or to the
current buffer descriptor during frame transmission. After a reset or 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 in most applications you
should not write TBPTR, it can be modified when the transmitter is disabled or when
you are sure no transmit buffer is currently in use.
Other General Parameters—For normal operation, you do not need to access these
parameters. They are only listed here because they provide helpful information for
experienced users and they can be used for debugging purposes. Additional
parameters are listed in
Table 16-40. RPTR and TPTR are updated by the SDMA
channels to show the next address to be accessed. TCNT is a down-count value that
is initialized with the TX buffer descriptor data length and decremented with every byte
read by the SDMA channels. RCNT is a down-count value that is initialized with the
MRBLR value and decremented with every byte the SDMA channels write. The
RSTATE, TSTATE, RTMP, TTMP, and reserved areas can only be used by the RISC
microcontroller.
16.13.5 I2C Commands
You can program the CPM command register (CPCR) with the following commands to
transmit or receive data.
INIT TX PARAMETERS—This command initializes all transmit parameters in this serial
channel’s parameter RAM to their reset state and should only be issued when the
transmitter is disabled. The INIT TX AND RX PARAMS command can also be used to
reset the transmit and receive parameters.
CLOSE RX BD—This command is used to force the I2C controller to close the current
RX buffer descriptor if it is being used and to use the next buffer descriptor for any
subsequently received data. If the I2C controller is not in the process of receiving data,
no action is taken by this command.
INIT RX PARAMETERS—This command initializes all the receive parameters in this
serial channel’s parameter RAM to their reset state and should only be issued when the
receiver is disabled. The INIT TX AND RX PARAMS command can also be used to
reset the receive and transmit parameters.