Functional Description
23.3.15.6 Acceptance Filtering of Received Messages
When the arbitration and control bits (Iden IDE + RTR + DLC) of an incoming message are
completely shifted into the shift register of the CAN core, the message handler starts the scan of the
message RAM for a matching valid message object:
•
The acceptance filtering unit is loaded with the arbitration bits from the CAN core shift register.
•
Then the arbitration and mask bits (including MsgVal, UMask, NewDat, and EoB) of message object 1
are loaded into the acceptance filtering unit and are compared with the arbitration bits from the shift
register. This is repeated for all following message objects until a matching message object is found, or
until the end of the message RAM is reached.
•
If a match occurs, the scanning is stopped and the message handler proceeds depending on the type
of the frame (data frame or remote frame) received.
23.3.15.7 Reception of Data Frames
The message handler stores the message from the CAN core shift register into the respective message
object in the message RAM. Not only the data bytes, but all arbitration bits and the data length code are
stored into the corresponding message object. This ensures that the data bytes stay associated to the
identifier even if arbitration mask registers are used.
The NewDat bit is set to indicate that new data (not yet seen by the CPU) has been received. The CPU
should reset the NewDat bit when it reads the message object. If at the time of the reception the NewDat
bit was already set, MsgLst is set to indicate that the previous data (supposedly not seen by the CPU) is
lost. If the RxIE bit is set, the IntPnd bit is set, causing the interrupt register to point to this message
object.
The TxRqst bit of this message object is reset to prevent the transmission of a remote frame, while the
requested data frame has just been received.
23.3.15.8 Reception of Remote Frames
When a remote frame is received, three different configurations of the matching message object have to
be considered:
•
Dir = ‘1’ (direction = transmit), RmtEn = ‘1’, UMask = ‘1’ or ‘0’
The TxRqst bit of this message object is set at the reception of a matching remote frame. The rest of
the message object remains unchanged.
•
Dir = ‘1’ (direction = transmit), RmtEn = ‘0’, UMask = ‘0’
The remote frame is ignored, this message object remains unchanged.
•
Dir = ‘1’ (direction = transmit), RmtEn = ‘0’, UMask = ‘1’
The remote frame is treated similar to a received data frame. At the reception of a matching Remote
Message Frame, the TxRqst bit of this message object is reset. The arbitration and control bits
(Iden IDE + RTR + DLC) from the shift register are stored in the message object in the message
RAM and the NewDat bit of this message object is set. The data bytes of the message object remain
unchanged.
23.3.15.9 Reading Received Messages
The CPU may read a received message any time via the IFx interface register. The data consistency is
guaranteed by the message handler state machine. Typically the CPU will write first 0x7F to bits [23:16]
and then the number of the message object to bits [7:0] of the command register. That combination will
transfer the entire received message from the message RAM into the interface register set. Additionally,
the bits NewDat and IntPnd are cleared in the message RAM (not in the interface register set). The values
of these bits in the message control register always reflect the status before resetting the bits. If the
message object uses masks for acceptance filtering, the arbitration bits show which of the different
matching messages has been received.
The actual value of NewDat shows whether a new message has been received since last time when this
message object was read. The actual value of MsgLst shows whether more than one message has been
received since the last time when this message object was read. MsgLst will not be automatically reset.
3904
Controller Area Network (CAN)
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated