910
11054A–ATARM–27-Jul-11
SAM9X25
910
11054A–ATARM–27-Jul-11
SAM9X25
41.7.2.2
Receive Mailbox
When the CAN module receives a message, it looks for the first available mailbox with the low-
est number and compares the received message ID with the mailbox ID. If such a mailbox is
found, then the message is stored in its data registers. Depending on the configuration, the mail-
box is disabled as long as the message has not been acknowledged by the application (Receive
only), or, if new messages with the same ID are received, then they overwrite the previous ones
(Receive with overwrite).
It is also possible to configure a mailbox in Consumer Mode. In this mode, after each transfer
request, a remote frame is automatically sent. The first answer received is stored in the corre-
sponding mailbox data registers.
Several mailboxes can be chained to receive a buffer. They must be configured with the same
ID in Receive Mode, except for the last one, which can be configured in Receive with Overwrite
Mode. The last mailbox can be used to detect a buffer overflow.
41.7.2.3
Transmit Mailbox
When transmitting a message, the message length and data are written to the transmit mailbox
with the correct identifier. For each transmit mailbox, a priority is assigned. The controller auto-
matically sends the message with the highest priority first (set with the field PRIOR in
CAN_MMRx register).
It is also possible to configure a mailbox in Producer Mode. In this mode, when a remote frame
is received, the mailbox data are sent automatically. By enabling this mode, a producer can be
done using only one mailbox instead of two: one to detect the remote frame and one to send the
answer.
Table 41-3.
Mailbox Object Type
Description
Receive
The first message received is stored in mailbox data registers. Data remain available until the
next transfer request.
Receive with overwrite
The last message received is stored in mailbox data register. The next message always
overwrites the previous one. The application has to check whether a new message has not
overwritten the current one while reading the data registers.
Consumer
A remote frame is sent by the mailbox. The answer received is stored in mailbox data register.
This extends Receive mailbox features. Data remain available until the next transfer request.
Table 41-4.
Mailbox Object Type
Description
Transmit
The message stored in the mailbox data registers will try to win the bus arbitration immediately
or later according to or not the Time Management Unit configuration (see
).
The application is notified that the message has been sent or aborted.
Producer
The message prepared in the mailbox data registers will be sent after receiving the next remote
frame. This extends transmit mailbox features.
Summary of Contents for SAM9X25
Page 26: ...26 11054A ATARM 27 Jul 11 SAM9X25...
Page 138: ...138 11054A ATARM 27 Jul 11 SAM9X25 138 11054A ATARM 27 Jul 11 SAM9X25...
Page 162: ...162 11054A ATARM 27 Jul 11 SAM9X25 162 11054A ATARM 27 Jul 11 SAM9X25...
Page 216: ...216 11054A ATARM 27 Jul 11 SAM9X25 216 11054A ATARM 27 Jul 11 SAM9X25...
Page 266: ...266 11054A ATARM 27 Jul 11 SAM9X25 266 11054A ATARM 27 Jul 11 SAM9X25...
Page 330: ...330 11054A ATARM 27 Jul 11 SAM9X25 330 11054A ATARM 27 Jul 11 SAM9X25...
Page 374: ...374 11054A ATARM 27 Jul 11 SAM9X25...
Page 468: ...468 11054A ATARM 27 Jul 11 SAM9X25 468 11054A ATARM 27 Jul 11 SAM9X25...
Page 532: ...532 11054A ATARM 27 Jul 11 SAM9X25 532 11054A ATARM 27 Jul 11 SAM9X25...
Page 692: ...692 11054A ATARM 27 Jul 11 SAM9X25 692 11054A ATARM 27 Jul 11 SAM9X25...
Page 777: ...777 11054A ATARM 27 Jul 11 SAM9X25 777 11054A ATARM 27 Jul 11 SAM9X25...
Page 886: ...886 11054A ATARM 27 Jul 11 SAM9X25 886 11054A ATARM 27 Jul 11 SAM9X25...
Page 962: ...962 11054A ATARM 27 Jul 11 SAM9X25 962 11054A ATARM 27 Jul 11 SAM9X25...
Page 1036: ...1036 11054A ATARM 27 Jul 11 SAM9X25 1036 11054A ATARM 27 Jul 11 SAM9X25...
Page 1128: ...1128 11054A ATARM 27 Jul 11 SAM9X25 1128 11054A ATARM 27 Jul 11 SAM9X25...
Page 1130: ...1130 11054A ATARM 27 Jul 11 SAM9X25...
Page 1132: ...1132 11054A ATARM 27 Jul 11 SAM9X25...
Page 1144: ...xii 11054A ATARM 27 Jul 11 SAM9X25...