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
65
V 1.0, 2004-02
It is therefore not possible to configure MO 15 to receive both Data Frames and
Remote Frames! The DLC and the contents of the Arbitration Registers is "don't care".
Which kind of identifiers will be stored in MO 15 depends on the configuration of the
Mask of Last Message (MOLM) and the Global Mask (GM). For the acceptance
filtering of MO 15, the GM is ANDed with the MOLM. Identifier bits that are set to "0" in
one of these masks will be treated as "don't care". If all identifiers that cannot be stored
in any other MO shall be received in MO 15 (= Basic-CAN receive register), then all
identifier bits in the MOLM should be set to "0".
Example for standard frames:
Global Mask Short:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ANDed with
& & & & & & & & & & & & & & & &
Upper Mask of
| | | | | | | | | | | | | | | |
Last Message :
0 0 0 x x x x x 0 0 0 0 0 0 0 0
=> bits to be masked
| | | | | | | | | | | | | | | |
(to be "don't care" (d)):
d d d - - - - - d d d d d d d d
| | | | | | | | | | | | | | | |
Upper Arbitration
| | | | | | | | | | | | | | | |
Register of MO 15:
x x x x x x x x x x x x x x x x
| | | | | | | | | | | | | | | |
Identifiers stored:
d d d x x x x x d d d d d d d d
= Identifiers ddddddddddd (00000000000 .. 11111111111)
Scenario for MO 15:
Assumptions:
•
SIE = 0, IE = 1 (Control Register)
•
RXIE = set (Message Control Register 15)
1.
If a frame arrives that fits into MO 15 (and in none of the other objects), the identifier
and (in case of a Data Frame) the data bytes are stored into one of the two buffers
of MO 15:
•
If Buffer1 = released and Buffer2 = released: store into Buffer1.
•
If Buffer1 = allocated and Buffer2 = released: store into Buffer2.
•
If Buffer1 = released and Buffer2 = allocated: store into Buffer1.
•
If Buffer1 = allocated and Buffer2 = allocated: store into the buffer that was filled with
the previous data; set MSGLST.