beautypg.com

8 arbitration/masking considerations -55, 1 message center 15 -55 – Maxim Integrated MAXQ7666 User Manual

Page 185

background image

MAXQ7665/MAXQ7666 User’s Guide

4-55

4.8 Arbitration/Masking Considerations

The CAN processor is designed to evaluate and determine if an incoming message is loaded into one of the 15 message centers.
Acceptance of a message is determined by comparing the message’s ID and/or data field against the corresponding arbitration infor-
mation defined for each message center. Messages that contain bit errors or which fail arbitration are discarded. The incoming mes-
sage is tested in order against each enabled message center (enabled by the MSRDY bit in the CAN message control register) from
1 to 15. The first message center to successfully pass the test receives the incoming message and ends the testing, and the message
is loaded into the respective message center.

The MAXQ7665/MAXQ7666 CAN module supports two types of arbitration: basic and media. Basic arbitration compares either the 29-
bit (EX/

ST = 1) or 11-bit (EX/ST = 0) incoming message ID against the corresponding bits in the message center CAN arbitration reg-

isters (C0MxAR0:C0MxAR3). This depends upon whether the message center has been configured for 29- or 11-bit operation. An
optional masking feature can also be used with basic arbitration. The format register (C0MxF) for each message center contains a mes-
sage identification mask enable bit (MEME). If MEME is set, the CAN module factors in the standard global mask registers
(C0SGM0:C0SGM1) when EX/

ST = 0 or the extended global mask registers (C0EGM0:C0EGM3) when EX/ST = 1 when deciding if there

is an ID match. A comparison between bits in the incoming message ID and arbitration register bits is only made for bit positions that
correspond to 1 in the appropriate mask register. Bits corresponding to 0 in the mask register are ignored, creating a don’t care con-
dition. Filling the mask register with all 0s while MEME = 1 causes the arbitration circuitry to automatically match all message IDs. Filling
the mask register with all 1s while MEME = 1 requires an exact match between the incoming message ID and the arbitration registers,
just as is the case when MEME = 0.

Media arbitration is an optional second arbitration performed if the media identification mask enable bit (MDME) is set in the C0MxF
message center register. Media arbitration compares the first and second byte of the data field in each incoming message against two
8-bit media arbitration bytes (stored at locations C0MA0, C0MA1). Each media arbitration byte has an associated media identification
mask: C0MID0 for C0MA0 and C0MID1 for C0MA1. Media byte comparison is made only for those bits corresponding to 1 in the media
identification mask registers. When MDME = 1, the first two data bytes of the incoming message must pass media byte arbitration as
defined by C0MA0:C0MA1 and C0MID0:C0MID1 before being loaded into the respective message center. Unlike the identification
mask enable (MEME), however, when MDME = 0 no testing is performed of the first two bytes of the incoming data field.

4.8.1 Message Center 15

Message center 15 supports an additional set of masks to supplement basic arbitration. While this message center performs basic
and media arbitration as per message centers 1–14, it also uses the C015M3:C015M0 mask registers to perform an additional level of
filtering during basic (i.e., not media) arbitration. When determining arbitration for message center 15, the contents of C015M3:C015M0
are logically ANDed with either C0EGM3:C0EGM0 (if EX/

ST = 1 for message center 15) or C0SGM1:C0SGM0 (if EX/ST = 0 for mes-

sage center 15). This ANDed value is then used in place of C0EGM3:C0EGM0 or C0SGM1:C0SGM0 when performing basic arbitra-
tion as previously described. If the MDME bit is set, the incoming message must also pass the media arbitration test.

Message center 15 has a buffered FIFO arrangement to allow up to two received messages to be received without being lost prior to
the microcontroller reading of the first message. The first message received by message center 15 is stored in the normal dual port
memory location for message center 15, if the previous message has been already read by the microcontroller. If the first message has
not been read, then the incoming message is buffered internally until the first message is read, at which time the second message is
automatically loaded into the first (dual port) message 15 slot, allowing software to then read the second message. The CAN module
determines that the first message has been read (allowing the buffered message to be transferred) when software clears the DTUP
and EXTRQ bits. If a third message arrives before the second message has been copied into the dual port message 15 slot, then the
third message writes over the second buffered message. Software should clear the INTRQ bit as well as the DTUP and EXTRQ bits
after reading each message in the dual port message center 15. The WTOE bit associated with message center 15 has unique oper-
ating considerations, described in this section.

Maxim Integrated

This manual is related to the following products: