beautypg.com

Maxim Integrated MAXQ7666 User Manual

Page 191

background image

MAXQ7665/MAXQ7666 User’s Guide

4-61

Case 2: WTOE = 0 (Overwrites Disabled)

1) Software configures message centers 1 and 2 with the same arbitration value (abbreviated AV).

2) Software configures message centers 1 and 2 to receive (T/

R = 0) and to disable message overwrite (WTOE = 0).

3) The first message received that matches AV is stored in message center 1, DTUP = 1.

4) The second message received that matches AV is stored in message center 2, DTUP = 1.

5) Software reads message center 1 and then programs message center 1, DTUP = 0.

6) The third message received that matches AV is stored in message center 1, DTUP = 1.

7) Software reads message center 2 and then programs message center 2, DTUP = 0.

8) The fourth message received that matches AV is stored in message center 2, DTUP = 1.

9) Etc.

Note that in this example, message center 1 or 2 is never overwritten. The user must ensure that the proper number of message cen-
ters be allocated to the same arbitration value when using this arrangement. If software fails to read the allocated message group, an
incoming message can be lost without software realizing it (ROW is never set when WTOE = 0). To put a message center back into
operation, software must force DTUP = 0 and EXTRQ = 0. This indicates that software has read the message center.

4.12 Special Considerations for Message Center 15

Message center 15 incorporates a shadow message center used to buffer incoming messages, in addition to the standard message
center registers. When the message center is empty (DTUP = EXTRQ = 0), incoming messages are loaded directly into the message
center registers. When the message center has unread data (DTUP = 1) or a pending remote frame request (EXTRQ = 1), incoming
messages are loaded into the shadow message center. Unread contents of the shadow message center are automatically loaded into
the message center when it becomes empty (DTUP = 0). An overwrite condition is possible when both the message center 15 and
shadow message centers are full.

The response of message center 15 to the overwrite condition is dependent on the WTOE bit. When overwrite is enabled (WTOE = 1)
and there is unread data (DTUP = 1) or a pending remote frame request (EXTRQ = 1), successfully received messages are stored in
the shadow message center, overwriting existing data. If the shadow message center contained previously unread data at the time of
the overwrite, the message center 15 ROW bit is set. If the shadow message center was empty at the time, then the incoming mes-
sage is simply loaded into the shadow buffer and ROW is not set to 1. Note that the message center 15 ROW bit reflects only an over-
write of the shadow message center, not the message center registers (as with message centers 1–14).

When WTOE = 0, there is unread data (DTUP = 1), or a pending remote frame request (EXTRQ = 1) in message center 15, and there
is already a message stored in the shadow buffer, incoming messages are not stored in either the message center or shadow buffer.

4.13 Using the Autobaud Feature

It is sometimes necessary to connect a CAN node to a network with an unknown baud rate. The MAXQ7665/MAXQ7666’s autobaud
feature provides a simple way for the CAN module to determine the baud rate of the network and reconfigure the
MAXQ7665/MAXQ7666 to operate at that baud rate. Special hardware inside the CAN module allows it to interface to a fully function-
al CAN bus and perform the autobaud feature without disturbing other CAN nodes.

The theory behind the CAN autobaud feature is relatively simple. If a CAN module operating at a particular baud rate listens in on a
CAN bus operating at a different baud rate, it sees a random bit stream. Because the bit stream does not conform to the CAN2.0B pro-
tocol, a large number of bus errors (bit 0 error, bit 1 error, bit stuff error, etc.) are seen by the "listening" CAN. These errors increment
the CAN error-counter register. With only a moderate amount of CAN traffic, enough errors quickly accumulate to set the CAN error-
count-exceeded (EC96/128) bit in the CAN 0 status register (C0S; A4h). This can be used as an indicator that the
MAXQ7665/MAXQ7666 are not operating at the same baud rate as the CAN bus. The MAXQ7665/MAXQ7666 would then adjust their
baud rate and repeat the process.

If, after a period of time, only a small number of errors have accumulated (most likely due to normal transmission noise), the
MAXQ7665/MAXQ7666 are operating at the correct baud rate. The autobaud process is further simplified by the fact that most net-
works only operate at a small number of values. For example, DeviceNet operates at 125kbps, 250kbps, and 500kbps, so a device
attempting to autobaud to a DeviceNet network would only have to test three baud rates.

Maxim Integrated

This manual is related to the following products: