9 transmitting and receiving messages -56, 1 transmitting data messages -56, 2 receiving data messages -56 – Maxim Integrated MAXQ7666 User Manual

Page 186: 3 transmitting remote frame requests -56

Advertising
background image

MAXQ7665/MAXQ7666 User’s Guide

4-56

4.9 Transmitting and Receiving Messages

All CAN data is sent and received through message centers. All CAN message centers are identical with the exception of message
center 15. Message center 15 has been designed as a receive-only center and is shadow buffered to help prevent the loss of incom-
ing messages when software is unable to read one message before the next one should be loaded. All message centers, with the
exception of message center 15, are capable of four different operations, which include the following.

• Transmitting a data message

• Receiving a data message

• Transmitting a remote frame request

• Receiving a remote frame request

4.9.1 Transmitting Data Messages

Starting with the lowest numbered message center (highest priority), the CAN module sequentially scans each message center until it
finds a message center that is properly enabled for transmission (T/

R = 1, TIH = 0, DTUP = 1, MSRDY = 1, and MTRQ = 1). The con-

tents of the respective message center are then transferred to the transmit buffer, and the CAN module attempts to transmit the mes-
sage. If successful, the appropriate MTRQ bit is cleared to 0, indicating that the message was successfully sent. Following a successful
transmission, loss of arbitration, or an error condition, the CAN module again searches for a properly configured message center, start-
ing with the lowest numbered message center. This search relationship always allows the highest priority message center to be trans-
mitted, independent of the last successful (MTRQ = 0) or unsuccessful (MTRQ = 1) message transmission.

4.9.2 Receiving Data Messages

Each incoming data message is compared sequentially with each receive enabled (T/

R = 0) message center starting with the lowest

numbered message center (highest priority) and proceeding to the highest numbered message center. This testing continues until a
match is found (incorporating masking functions as required), at which time the incoming message is stored in the respective mes-
sage center. Higher numbered message centers that are not reviewed prior to the match are not evaluated during the current message
test. When the WTOE = 1, the CAN module can overwrite receive message centers that have DTUP = 1, which, in turn, set ROW = 1.
When WTOE = 0, incoming messages do not overwrite receive message centers that have DTUP = 1.

Message center 15 is a special receive-only, FIFO-buffered message center designed to receive messages not accepted by the other
message centers. The ROW bit in message center 15 is associated with the overwrite of the shadow buffer for message center 15. The
EXTRQ and DTUP bits are shadow buffered to allow the buffered message and the message center 15 values to take on different rela-
tionships. The EXTRQ and DTUP values read by the microcontroller are not those of the shadow buffer, as is the case with the ROW
bit, but are the current values associated with message center 15. The shadow buffer is automatically loaded into message center 15
when both the DTUP bit and the EXTRQ bit are cleared. If either DTUP or EXTRQ are left set when clearing the other, any message in
the shadow buffer is not transferred to the message 15 registers, and any incoming messages for message 15 are stored in the shad-
ow buffer (if WTOE = 1) or are lost (if WTOE = 0).

4.9.3 Transmitting Remote Frame Requests

Starting with the lowest numbered message center (highest priority), the CAN module sequentially scans each message center. When
it finds a message center properly enabled to transmit a remote frame (T/

R = 0, MSRDY = 1, and MTRQ = 1), the contents of the

respective message center is then transferred to the transmit buffer and the CAN module attempts to transmit the message. If suc-
cessful, the appropriate MTRQ bit is cleared to 0, indicating that the message was successfully sent. Following a successful trans-
mission, loss of arbitration, or an error condition, the CAN module again searches for a properly configured message center, starting
with the lowest numbered message center. This search relationship always allows the highest priority message center to be transmit-
ted, independent of the last successful (MTRQ = 0) or unsuccessful (MTRQ = 1) message transmission. The state of the TIH bit does
not effect the transmission of a remote frame request.

If the microcontroller wants to request data from another node, it first clears the respective MSRDY bit to 0 and then writes the identi-
fier and control bits in this message center, configures the message center as a receive message center (T/

R = 0), and then sets the

MTRQ and MSRDY bits. After a successful transmission, the CAN module clears MTRQ = 0 and sets TXS = 1. In addition to the TXS
bit, if the ETI bit is set, the successful transmission also sets the corresponding INTRQ bit. Requesting data from another node is pos-
sible in message centers 1–14. As seen above, the CAN module sends a remote frame request and receives the data frame in any
other mailbox for which the answering incoming data frame passes the acceptance filtering of identifier and first two data bytes.
Therefore, only one mailbox is necessary to do a remote request. Remote frame requests are not supported during autobaud mode.

Maxim Integrated

Advertising
This manual is related to the following products: