
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
TwinCAN Module
User’s Manual
21-78
V2.2, 2004-01
TwinCAN_X1, V2.1
CANPTR
[4:0]
High
rwh
CAN Pointer for FIFO/Gateway Functions
Message object is configured in standard mode
(MMC = ‘000’):
No impact, CANPTR should be initialized with the
respective message object number.
Message object is configured as FIFO base object
(MMC = ‘010’):
CANPTR contains the number of the message object
addressed by the associated CAN controller for the next
transmit or receive operation.
For initialization, CANPTR should be written with the
message number of the respective FIFO base object.
Message object is configured as FIFO slave object
(MMC = ‘011’):
CANPTR has to be initialized with the respective
message object number of the FIFO base object.
Message object is configured for normal gateway
mode (MMC = ‘100’):
CANPTR contains the number of the message object
used as gateway destination object.
Message object is configured as gateway
destination object without FIFO functionality
(MMC = ‘000’):
If SRREN is set to ‘1’, CANPTR has to be initialized with
the number of the message object used as gateway
source. The backward pointer is required to transfer
remote frames from the destination to the source side.
If SRREN is cleared, CANPTR is not evaluated and must
be initialized with the respective message object
number.
Message object is configured for shared gateway
mode (MMC = ‘101’):
No impact, CANPTR has to be initialized with the
respective message object number.
For FIFO functionality (or gateway functionality with a
FIFO as destination), CANPTRn should not be written by
software while FIFO mode is activated and data transfer
is in progress. This bitfield can be used to reset the FIFO
by software.
Field
Bits
Type
Description