beautypg.com

Overwrite enable/disable feature, Emote, Rame – Maxim Integrated High-Speed Microcontroller Users Guide: DS80C390 Supplement User Manual

Page 147: Andling in, Elation to the, Dtbyc b, Verwrite, Nable, Isable, Eature

background image

High-Speed Microcontroller User’s Guide: DS80C390 Supplement

147 of 158

REMOTE FRAME HANDLING IN RELATION TO THE DTBYC BITS

The DTBYC bits function slightly differently when Remote Frames are used. In that case, the data length
code will be overwritten by the data length code field of the incoming remote request frame. These
requested data bytes will be sent in the data frame which answers 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 the fifth data bytes will be 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 will overwrite the identifier and the data length code. The new data in the

message center will be:
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 will be a data frame containing the following information:

DTBYC = 2, data field = 75 AF

Important Information Concerning ID Changes when Awaiting Data from a Previous Remote
Frame Request:
The use of acceptance filtering (MEME=1) in conjunction with remote frame requests can result in a
modification of the message center arbitration registers. When a message center is configured to transmit
a remote frame request (MTRQ = 1, EXTRQ = 0, T/ R = 0 and MSRDY = 1) it is possible for a second
Frame Request from an external node to modify the initial Arbitration Register value of the current
message center prior to the current message center receiving the requested data if arbitration masks are
used. When a remote frame request is received, the message ID is loaded into that message center’s
arbitration registers. When message identification masking is not used (MEME=0), the message ID will
always match the arbitration value, so the process will be transparent. If masking is used, however, the
message ID ANDed with the appropriate mask will be loaded into that message center’s arbitration
registers, resulting in a change of the arbitration values for that message center. To prevent this situation,
acceptance filtering should be disabled (MEME = 0) for any message center configured for remote frame
handling. An alternate solution would be to disable the overwrite feature for that message center, which
also prevents incoming messages from altering the message center ID.

OVERWRITE ENABLE/DISABLE FEATURE

The Write Over Enable bit (WTOE) located in each message center (CnMxAR3.0) enables or disables the
overwriting of unread messages in message centers 1 through 15. Programming WTOE = 1 following a
system reset or CRST bit-enabled reset allows newly received messages which pass arbitration to
overwrite unread (i.e., message centers with DTUP=1) messages. When an overwrite occurs the Receive
Overwrite (ROW) bit in the respective CAN Message Control Register will be set. When WTOE = 0,
message centers which have data waiting to be read (indicated by DTUP = 1) or transmitted (EXTRQ=1)
will not be overwritten by incoming data.

Special care must be taken when reading data from a message center with the overwrite feature enabled
(WTOE = 1). The caution is needed because the WTOE bit, when set, allows an incoming message to