Texas Instruments Development Kit for TM4C129x,Tiva™ ARM® Cortex™ -M4 Microcontroller DK-TM4C129X DK-TM4C129X 데이터 시트

제품 코드
DK-TM4C129X
다운로드
페이지 2182
message object, starting with object 1, is compared with the incoming message to locate a matching
message object in the message RAM. If a match occurs, the scanning is stopped and the message
handler proceeds depending on whether it is a data frame or remote frame that was received.
23.3.7
Receiving a Data Frame
The message handler stores the message from the CAN controller receive shift register into the
matching message object in the message RAM. The data bytes, all arbitration bits, and the
DLC
bits
are all stored into the corresponding message object. In this manner, the data bytes are connected
with the identifier even if arbitration masks are used. The
NEWDAT
bit of the CANIFnMCTL register
is set to indicate that new data has been received. The CPU should clear this bit when it reads the
message object to indicate to the controller that the message has been received, and the buffer is
free to receive more messages. If the CAN controller receives a message and the
NEWDAT
bit is
already set, the
MSGLST
bit in the CANIFnMCTL register is set to indicate that the previous data
was lost. If the system requires an interrupt on successful reception of a frame, the
RXIE
bit of the
CANIFnMCTL register should be set. In this case, the
INTPND
bit of the same register is set, causing
the CANINT register to point to the message object that just received a message. The
TXRQST
bit
of this message object should be cleared to prevent the transmission of a remote frame.
23.3.8
Receiving a Remote Frame
A remote frame contains no data, but instead specifies which object should be transmitted. When
a remote frame is received, three different configurations of the matching message object have to
be considered:
Table 23-2. Message Object Configurations
Description
Configuration in CANIFnMCTL
At the reception of a matching remote frame, the
TXRQST
bit of this
message object is set. The rest of the message object remains
unchanged, and the controller automatically transfers the data in
the message object as soon as possible.
DIR
= 1 (direction = transmit); programmed in the
CANIFnARB2 register
RMTEN
= 1 (set the
TXRQST
bit of the
CANIFnMCTL register at reception of the frame
to enable transmission)
UMASK
= 1 or 0
At the reception of a matching remote frame, the
TXRQST
bit of this
message object remains unchanged, and the remote frame is
ignored. This remote frame is disabled, the data is not transferred
and nothing indicates that the remote frame ever happened.
DIR
= 1 (direction = transmit); programmed in the
CANIFnARB2 register
RMTEN
= 0 (do not change the
TXRQST
bit of the
CANIFnMCTL register at reception of the frame)
UMASK
= 0 (ignore mask in the CANIFnMSKn
register)
At the reception of a matching remote frame, the
TXRQST
bit of this
message object is cleared. The arbitration and control field (
ID
+
XTD
+
RMTEN
+
DLC
) from the shift register is stored into the message
object in the message RAM, and the
NEWDAT
bit of this message
object is set. The data field of the message object remains
unchanged; the remote frame is treated similar to a received data
frame. This mode is useful for a remote data request from another
CAN device for which the TM4C129XNCZAD controller does not
have readily available data. The software must fill the data and
answer the frame manually.
DIR
= 1 (direction = transmit); programmed in the
CANIFnARB2 register
RMTEN
= 0 (do not change the
TXRQST
bit of the
CANIFnMCTL register at reception of the frame)
UMASK
= 1 (use mask (
MSK
,
MXTD
, and
MDIR
in
the CANIFnMSKn register) for acceptance filtering)
1541
December 13, 2013
Texas Instruments-Advance Information
Tiva
TM4C129XNCZAD Microcontroller