SAM3X8E Atmel Corporation, SAM3X8E Datasheet - Page 1209

no-image

SAM3X8E

Manufacturer Part Number
SAM3X8E
Description
Manufacturer
Atmel Corporation
Datasheets
40.7.2.1
11057A–ATARM–17-Feb-12
11057A–ATARM–17-Feb-12
Message Acceptance Procedure
If the MIDE field in the CAN_MIDx register is set, the mailbox can handle the extended format
identifier; otherwise, the mailbox handles the standard format identifier. Once a new message is
received, its ID is masked with the CAN_MAMx value and compared with the CAN_MIDx value.
If accepted, the message ID is copied to the CAN_MIDx register.
Figure 40-3. Message Acceptance Procedure
If a mailbox is dedicated to receiving several messages (a family of messages) with different
IDs, the acceptance mask defined in the CAN_MAMx register must mask the variable part of the
ID family. Once a message is received, the application must decode the masked bits in the
CAN_MIDx. To speed up the decoding, masked bits are grouped in the family ID register
(CAN_MFIDx).
For example, if the following message IDs are handled by the same mailbox:
The CAN_MIDx and CAN_MAMx of Mailbox x must be initialized to the corresponding values:
If Mailbox x receives a message with ID6, then CAN_MIDx and CAN_MFIDx are set:
If the application associates a handler for each message ID, it may define an array of pointers to
functions:
ID0 101000100100010010000100 0 11 00b
ID1 101000100100010010000100 0 11 01b
ID2 101000100100010010000100 0 11 10b
ID3 101000100100010010000100 0 11 11b
ID4 101000100100010010000100 1 11 00b
ID5 101000100100010010000100 1 11 01b
ID6 101000100100010010000100 1 11 10b
ID7 101000100100010010000100 1 11 11b
CAN_MIDx = 001 101000100100010010000100 x 11 xxb
CAN_MAMx = 001 111111111111111111111111 0 11 00b
CAN_MIDx = 001 101000100100010010000100 1 11 10b
CAN_MFIDx = 00000000000000000000000000000110b
void (*pHandler[8])(void);
CAN_MFIDx
CAN_MIDx
Message Accepted
&
CAN_MAMx
==
Yes
No
&
Message Received
Message Refused
SAM3X/A
SAM3X/A
1209
1209

Related parts for SAM3X8E