
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
TwinCAN Module
User’s Manual
21-29
V2.2, 2004-01
TwinCAN_X1, V2.1
Figure 21-16 Message Burst in Case of FIFO/Gateway
21.1.6.1
Normal Gateway Mode
The normal gateway mode consumes two message objects to transfer a message from
the source to the destination node. In this mode, different identifiers can be used for the
same message data. Details of the message transfer through the normal gateway are
controlled by the respective MSGFGCR
<s>
and MSGFGCR
<d>
registers. All 8 data bytes
from the source object (even if not all bytes are valid) are copied to the destination object.
The object receiving the information from the source node has to be configured as
receive message object (DIR = 0) and must be associated to the source CAN bus via bit
NODE. Register MSGFGCR
<s>
should be initialized according the following
enumeration:
•
Bitfield MMC
<s>
has to be set to ‘100’ indicating a normal mode gateway for incoming
(data) frames.
•
Bitfield CANPTR
<s>
must be initialized with the number of the message object used
as destination for the data copy process.
•
If no FIFO functionality is required on the destination side, bitfield FSIZE
<s>
has to be
filled with ‘00000’. When FIFO capabilities are needed, bitfield FSIZE
<s>
must contain
the FIFO buffer length, which has to be identical with the content of the FIFO base
object’s FSIZE bitfield on the destination side.
MCA05486
Message 1
Message 2
Message 3
Message 4
Destination Bus
Speed B
To FIFO
Object n + 3
To FIFO
Object n + 2
To FIFO
Object n + 1
To FIFO
Object n
Message 1
To FIFO
Object n
Message 2
To FIFO
Object n + 1
Message 3
To FIFO
Object n + 2
Message 4
To FIFO
Object n + 3
Source Bus
Speed A
TwinCAN
Node A
Node B