2.9
Remote-Frame-Pending Register (CANRFP)
2.9.1 Handling of Remote Frames
Remote-Frame-Pending Register (CANRFP)
www.ti.com
Whenever a remote frame request is received by the CAN module, the corresponding bit RFP[
n
] in the
remote frame pending register is set. If a remote frame is stored in a receive mailbox (AAM=0,
CANMD=1), the RFP
n
bit will not be set.
To prevent an auto-answer mailbox from replying to a remote frame request, the CPU has to clear the
RFP[
n
] flag and the TRS[
n
] bit by setting the corresponding transmission request reset bit TRR[
n
]. The
AAM bit can also be cleared by the CPU to stop the module from sending the message.
If the CPU tries to reset a bit and the CAN module tries to set the bit at the same time, the bit is not set.
The CPU cannot interrupt an ongoing transfer.
Figure 2-9. Remote-Frame-Pending Register (CANRFP)
31
0
RFP.31:0
RC-0
LEGEND: RC = Read/Clear; -
n
= value after reset
Table 2-9. Remote-Frame-Pending Register (CANRFP) Field Descriptions
Bit
Field
Value
Description
31:0
RFP.31:0
Remote-frame-pending register.
For a receive mailbox, RFP
n
is set if a remote frame is received and TRS
n
is not affected.
For a transmit mailbox, RFP
n
is set if a remote frame is received and TRS
n
is set if AAM of the
mailbox is 1. The ID of the mailbox must match the remote frame ID.
1
A remote-frame request was received by the module.
0
No remote-frame request was received. The register is cleared by the CPU.
If a remote frame is received (the incoming message has RTR (MSGCTRL.4) = 1), the CAN module
compares the identifier to all identifiers of the mailboxes using the appropriate masks starting at the
highest mailbox number in descending order.
In the case of a matching identifier (with the message object configured as send mailbox and AAM
(MSGID.29) in this message object set) this message object is marked as to be sent (TRS[
n
] is set).
In case of a matching identifier with the mailbox configured as a send mailbox and bit AAM in this mailbox
is not set, this message is not received in that mailbox.
After finding a matching identifier in a send mailbox no further compare is done.
With a matching identifier and the message object configured as receive mailbox, this message is handled
like a data frame and the corresponding bit in the receive message pending (CANRMP) register is set.
The CPU then has to decide how to handle this situation. For information about the CANRMP register, see
.
For the CPU to change the data in a mailbox that is configured as a remote frame mailbox (AAM set) it
has to set the mailbox number and the change data request bit (CDR [MC.8]) in the MCR first. The CPU
can then do the access and clear the CDR bit to tell the eCAN that the access is finished. Until the CDR
bit is cleared, the transmission of this mailbox is not permitted. Therefore, the newest data is sent.
To change the identifier in that mailbox, the mailbox must be disabled first (CANME
n
= 0).
For the CPU to request data from another node it configures the mailbox as a receive mailbox and sets
the TRS bit. In this case the module sends a remote frame request and receives the data frame in the
same mailbox that sent the request. Therefore, only one mailbox is necessary to do a remote request.
Note that the CPU must set RTR (MSGCTRL.4) to enable a remote frame transmission. Once the remote
frame is sent, the TRS bit of the mailbox is cleared by CAN. In this case, bit TA
n
will not be set for that
mailbox.
34
eCAN Registers
SPRU074F – May 2002 – Revised January 2009