English
Language : 

XC164-16 Datasheet, PDF (318/417 Pages) Infineon Technologies AG – 16-Bit Single-Chip Microcontroller with C166SV2 Core Volume 2 (of 2): Peripheral Units
XC164-16 Derivatives
Peripheral Units (Vol. 2 of 2)
TwinCAN Module
21.1.4.3 Handling of Transmit Message Objects
A message object with direction flag DIR = ‘1’ (message configuration register
MSGCFGn) is handled as transmit object.
All message objects with bitfield MSGVAL = ‘10’ are operable and taken into account by
the CAN node controller operation described below.
During the initialization phase, the transmit request bitfield (TXRQ), the new information
bitfield (NEWDAT) should be reset to ‘01’ and the update in progress by CPU bitfield
(CPUUPD) in register MSGCTRn should be reset to ‘10’. The message bytes to be
transmitted are written into the data partition of the message object (MSGDRn0,
MSGDRn4). The number of message bytes to be transmitted has to be written to bitfield
DLC in register MSGCFGn. The selected identifier has to be written to register MSGARn.
Then, bitfield NEWDAT in register MSGCTRn should be set to ‘10’ and bitfield CPUUPD
should be reset to ‘01’ by the CPU.
When the remote monitoring mode is enabled (RMM = ‘1’ in MSGCFGn), the identifier
and the data length code of a received remote frame will be copied to the corresponding
transmit message object, if a matching identifier was found during the compare and
mask operation with all CAN message objects. The copy procedure may change the
identifier in the transmit message object, if some MSGAMRn mask register bits have
been set to ‘0’.
As long as bitfield MSGVAL in register MSGCTRn is set to ‘10’, the reception of a remote
frame with matching identifier automatically sets bitfield TXRQ to ‘10’. Simultaneously,
bitfield RMTPND in register MSGCTRn is set to ‘10’ in order to indicate the reception of
an accepted remote frame. Alternatively, TXRQ may be set by the CPU via a write
access to register MSGCTRn. If the transmit request bitfield TXRQ is found at ‘10’ (while
MSGVAL = ‘10’ and CPUUPD = ‘01’) by the appropriate CAN controller node, a data
frame based upon the information stored in the respective transmit message object is
generated and automatically transferred when the associated CAN bus is idle.
If bitfield CPUUPD in register MSGCTRn is set to ‘10’, the automatic transmission of a
message object is prohibited and flag TXRQ is not evaluated by the respective CAN
node controller. The CPU can release the pending transmission by clearing CPUUPD.
This allows the user to listen on the bus and to answer remote frames under software
control.
When the data partition of a transmit message object has to be updated by the CPU,
bitfield CPUUPD in message control register MSGCTRn should be set to ‘10’, inhibiting
a read or write access of the associated CAN node controller. If a remote frame with an
accepted identifier arrives during the update of a message object’s data storage, bitfields
TXRQ and RMTPND are automatically set to ‘10’ and the transmission of the
corresponding data frame is pending until CPUUPD is reset again.
User’s Manual
TwinCAN_X41, V2.1
21-18
V2.1, 2004-03