AP29000
Connecting C166 and C500 Microcontroller to CAN
Ways of handling the SAE 81C90/91 and the CAN Module on the C167CR / C515C
Application Note
67
V 1.0, 2004-02
6.6.2
The Monitor Mode of the SAE 81C90/91
The Monitor Mode of the SAE 81C90/91 works with message object 0 and is enabled
by setting bit MM in the CTRL Register (CTRL.0) to "1" (otherwise MO 0 responds like
all other MOs). Now MO 0 receives all identifiers that are not accepted by other
memory locations, which corresponds to a Basic-CAN receive register. The identifier,
the data length code and the RTR-bit in the descriptor bytes of MO 0 are "don't care".
If a
Data Frame
arrives (that does not match with one of the other MOs (1..15)), the
Data Frame is stored in MO 0:
•
The descriptor bytes are updated with the identifier and the data length code (DLC)
of the Data Frame. The RTR bit is set to 0.
•
The data bytes of MO 0 are overwritten by the data bytes of the Data Frame.
•
Bit RR0 in Receive Ready Register 1 (RRR1) is set.
•
If bit ERI in the IMSK register and bit RIM0 in the RIMR1 register both are set, an
interrupt is generated.
If a
Remote Frame
arrives
1
(that does not match with one of the other MOs (1..15)), the
Remote Frame is stored in MO 0:
•
The descriptor bytes are updated with the identifier and the data length code (DLC)
of the Remote Frame (= 0). The RTR bit is set to 1.
•
The data bytes of MO 0 are not overwritten by the Remote Frame because the
Remote Frame contains no data bytes.
•
Bit RR0 in Receive Ready Register 1 (RRR1) is set.
•
If bit ERI in the IMSK register and bit RIM0 in the register RIMR1 both are set, an
interrupt is generated.
Note:
Bit RRP0 in the Remote Request Pending Register and bit RFI in the Interrupt
Register are not set (as it is normally done when a Remote Frame has been
received).
Remote frames received in MO 0 in Monitor Mode should be read out by the CPU
(identifier) and if necessary should be answered by another MO configured for the
transmission of Data Frames.
Please note that in Monitor Mode, MO 0 acts like a Basic CAN receive register. You
shouldn't transmit messages with MO 0 if the Monitor Mode is enabled (although it is
still possible).
1
Please note: The D13 Step of the SAE 81C90/91 is not yet able to receive Remote Frames in Monitor Mode