English
Language : 

XC161 Datasheet, PDF (265/419 Pages) Infineon Technologies AG – 16-Bit Single-Chip Microcontroller with C166SV2 Core Volume 2 (of 2): Peripheral Units
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
TwinCAN Module
Table 21-2 Message Objects Providing FIFO Base Functionality
Msg. Object n > 0 2 4 6 8 10 12 14 16 18 …
30
FIFO Size
2 stage FIFO
XXXXXXXXXX
X
4 stage FIFO
X– X– X– X– X–
–
8 stage FIFO
X– – – X– – – X–
–
16 stage FIFO
X– – – – – – – X–
–
32 stage FIFO
X– – – – – – – – –
–
The identifiers and corresponding acceptance masks have to be identical in all FIFO
elements belonging to the same buffer in case of a receive FIFO (DIR = ‘0’). In case of
a transmit FIFO (DIR = ‘1’) the identifier of the currently addressed message object is
taken into account for transmission.
Each member of a buffer configuration keeps its individual MSGVAL, NEWDAT,
CPUUPD or MSGLST, TXRQ and RMTPND flag and its separate interrupt control
configuration. Inside a FIFO buffer, all elements must be
• assigned to the same CAN node (control bit NODE in register MSGCFGn),
• programmed for the same transfer direction (control bit DIR),
• set up to the same identifier length (control bit XTD),
• programmed to the same FIFO length (bitfield FSIZEn) and
• set up with the same value for the FIFO direction (bit FD in register MSGFGCRn).
• The slave’s CANPTR has to point to the FIFO base object.
The base object’s CANPTR has to be initialized with the message number of the base
object, the CANPTR pointers of the slave objects have to be set up with the message
number of the base object. The CANPTR of the base object addresses the next FIFO
element to be accessed for information transfer and its value can be calculated
according the following rule:
CANPTRn(new) := CANPTRn(old) & ∼FSIZEn | (CANPTRn(old) + 1) & FSIZEn
Control bit FD defines which transfer action (reception or transmission) leads to an
update of the CANPTR bitfield. Bit FD works independently from the direction bit DIR of
the FIFO elements. The reception of a data frame (DIR = ‘0’) or the reception of a remote
frame (DIR = ‘1’) are receive actions leading to an update of CANPTR if FD = ‘0’. The
transmission of a data frame (DIR = ‘1’) or the transmission of a remote frame (DIR = ‘0’)
are transmit actions initiating an increment of CANPTR if FD = ‘1’.
Note: The overall message object storage size is not affected by the configuration of
buffer structures. The available storage size may be used for 32 message objects
without buffering or for one message object with a buffer depth of 32 elements.
Additionally, any combination of buffered and unbuffered message objects
User’s Manual
TwinCAN_X1, V2.1
21-25
V2.2, 2004-01