
274
Chapter 16
CAN Controller
User’s Manual U16504EE1V1UD00
(3)
Receive Identifier Definition
These memory locations define the receive identifier of the arbitration field of the CAN protocol.
IDREC0 to IDREC4 can be set with a 1-bit or an 8-bit memory manipulation instruction.
RESET input sets IDREC0 to IDREC4 to an undefined value.
Figure 16-29:
Receive Identifier
The identifier of the receive message has to be defined during the initialization of the DCAN.
The DCAN uses this data for the comparison with the identifiers received on the CAN bus. For normal
message buffers without mask function this data is only read by the DCAN for comparison. In combina-
tion with a mask function this data is overwritten by the received ID that has passed the mask.
The identifier of the receive messages should not be changed without being in the initialization phase or
setting the receive buffer to redefinition in the RDEF register, because the change of the contents can
happen at the same time when the DCAN uses the data for comparison. This can cause inconsistent
data stored in this buffer and also the ID-part can be falsified in case of using mask function.
Remarks: 1.
The unused parts of the identifier (IDREC1 bit 4 - 0 always and IDREC4 bit 5 - 0 in case
of extended frame reception) may be written by the DCAN to “0”. They are not released
for other use by the CPU.
2.
RTR
REC
is the received value of the RTR message bit when this buffer is used together
with a mask function.
By using the mask function a successfully received identifier overwrites the IDREC0
and IDREC1 registers for standard frame format and the IDREC0 to IDREC4 registers
for extended frame format.
For the RTR
REC
bit exists two modes:
RTR bit in the MCON register of the dedicated mask is set to “0”. In this case
RTR
REC
bit will always be written to “0” together with the update of the IDn bits
(n = 18 to 20) in IDREC1. The received frame type (data or remote) is defined by
the RTR bit in IDCON of the buffer.
RTR bit in the MCON register of the dedicated mask is set to “1” (data and remote
frames are accepted). In this case the RTR bit in IDCON register has no meaning.
The received message type passed the mask is shown in RTR
REC
bit.
If a buffer is not dedicated to a mask function (mask 1, mask 2 or global mask) the
IDREC0 to IDREC4 registers are only read for comparing. All receive identifiers should
be defined to “0” before the application sets up its specific values.
Symbol
IDREC0
7
6
5
4
3
2
1
0
Address After Reset R/W
xxx2H
undefined R/W
ID28
ID27
ID26
ID25
ID24
ID23
ID22
ID21
IDREC1
ID20
ID19
ID18
0
0
0
0
RTR
REC
xxx3H
undefined R/W
IDREC2
ID17
ID16
ID15
ID14
ID13
ID12
ID11
ID10
xxx4H
undefined R/W
IDREC3
ID9
ID8
ID7
ID6
ID5
ID4
ID3
ID2
xxx5H
undefined R/W
IDREC4
ID1
ID0
0
0
0
0
0
0
xxx6H
undefined R/W