beautypg.com

Maxim Integrated MAXQ7666 User Manual

Page 189

background image

MAXQ7665/MAXQ7666 User’s Guide

4-59

Case 4: Software-Initiated Reply

(Reply through different message center, using TIH as gating control.) CAN controller wants to receive an RFR in a message center
(denoted MC1) configured to receive data (T/

R = 0) and to wait for software to select another message center (denoted MC2) to send

data back to remote request node.

1) Software sets T/

R = 0, MSRDY = 1, and DTUP = 0 in MC1 and awaits either data frame or RFR. Note: Software does not change

MTRQ = 0 in MC1 from previously completed transmission.

2) CAN successfully receives RFR in MC1.

3) CAN forces EXTRQ = 1 and DTUP = 1 in MC1. MTRQ cannot be written to 1 by the CAN when T/

R = 0 and is left as MTRQ =

0.

4) CAN loads DTBYC from RFR and ID into arbitration registers in MC1.

5) CAN waits for software to read message center and determine the fact that EXTRQ = 1.

6) Software disables MC1 to transfer information to MC2.

a. Software clears MSRDY = 0 to disable MC1. Software leaves EXTRQ = 1.

b. Software clears MSRDY = 0 in MC2.

7) Software forces MC2 to transmit mode T/

R = 1.

8) Software loads ID and DTBYC values from MC1 into ID and DTBYC values in MC2.

9) Software writes MSRDY = 0, DTUP = 0, and TIH = 1 in MC2 in preparation to load data to MC2.

10) Software loads data into MC2.

11) Software writes MSRDY = 1, MTRQ = 1, EXTRQ = 0, DTUP = 1, and TIH = 0 in MC2 in same instruction. Note that CAN has not

set EXTRQ in MC2, and is not required to be set for transmission of data from MC2.

12) CAN automatically transmits data (as per RFR requested DTBYC) in MC2.

13) CAN clears MTRQ = 0 (leaving previous EXTRQ = 0 cleared).

14) Software sets T/

R = 0, MSRDY = 1, EXTRQ = 0, and DTUP = 0 in MC1 and awaits either next RFR or data frame. Note that

MTRQ is still cleared in MC1, since MC1 has not been set to a transmit mode.

4.10 Remote Frame Handling in Relation to the DTBYC Bits

The DTBYC bits function slightly differently when remote frames are used. The data length code currently programmed in the message
center is overwritten by the data length code field of the incoming remote request frame, so that the requested number of data bytes
can be sent in response to the remote request. The following example demonstrates how the DTBYC bits are modified by a received
remote frame request.

1) Assume the microcontroller has programmed the following into a message center:

DTBYC = 5, data field = 75 AF 43 2E 12 78 90 00

(Note that only the first through fifth data bytes are recognized because DTBYC = 5.)

2) When the CAN module successfully receives a remote frame with the following data:

Identifier = ID, DTBYC = 2, RTR = 1

3) The incoming message overwrites the identifier and the data length code. The new data in the message center is: DTBYC = 2,

data field = 75 AF 43 2E 12 78 90 00

(Note that only the first and second data bytes are recognized because DTBYC is now 2.)

4) The outgoing response is a data frame containing the following information:

DTBYC = 2, data field = 75 AF

Maxim Integrated

This manual is related to the following products: