Figure 22-12 shows how a receive object for remote frames can be initialized.
Figure 22-12 Initialization of a
Single Receive Object for Remote FramesMsgVal | Arb | Data | Mask | EoB | Dir | NewDat | MsgLst | RxIE | TxIE | IntPnd | RmtEn | TxRqst |
---|
1 | appl. | appl. | appl. | 1 | 1 | 0 | 0 | appl. | 0 | 0 | 0 | 0 |
- Receive objects for remote frames can be used to
monitor remote frames on the CAN bus. The remote
frame stored in the receive object does not
trigger the transmission of a data frame. Receive
objects for remote frames can be expanded to a
FIFO buffer, see Section 22.9.5.
- UMask must be set to 1. The Mask bits (Msk[28:0],
UMask, MXtd, and MDir bits) can be set to
"must-match" or to "don't care", to allow groups
of remote frames with similar identifiers to be
accepted. The Dir bit must not be masked in
typical applications. For details, see Section 22.10.8.
- The arbitration bits (ID[28:0] and Xtd bit) can
be given by the application. The arbitration bits
define the identifier and type of accepted
received remote frames. If some bits of the Mask
bits are set to "don't care", the corresponding
bits of the arbitration bits are overwritten by
the bits of the stored remote frame. If an 11-bit
Identifier (standard frame) is used (Xtd = 0), the
Identifier is programmed to ID[28:18]. In this
case, ID[17:0] can be ignored. When a remote frame
with an 11-bit Identifier is received, ID[17:0] is
set to 0.
- The data length code (DLC[3:0]) can be given by
the application. When the message handler stores a
remote frame in the message object, the message
handler stores the received data length code. The
data bytes of the message object remain
unchanged.
- If the RxIE bit is set, the IntPnd bit is set
when a received remote frame is accepted and
stored in the message object.