Atmel Evaluation Kit AT91SAM9X25-EK AT91SAM9X25-EK Data Sheet
Product codes
AT91SAM9X25-EK
902
SAM9X25 [DATASHEET]
11054E–ATARM–10-Mar-2014
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 corresponding mailbox data registers.
automatically sent. The first answer received is stored in the corresponding 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.
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 automatically sends the message with the highest priority
first (set with the field PRIOR in CAN_MMRx register).
For each transmit mailbox, a priority is assigned. The controller automatically 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.
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.
41.7.3 Time Management Unit
The CAN Controller integrates a free-running 16-bit internal timer. The counter is driven by the bit clock of the CAN bus
line. It is enabled when the CAN controller is enabled (CANEN set in the CAN_MR register). It is automatically cleared in
the following cases:
line. It is enabled when the CAN controller is enabled (CANEN set in the CAN_MR register). It is automatically cleared in
the following cases:
After a reset
When the CAN controller is in Low-power Mode is enabled (LPM bit set in the CAN_MR and SLEEP bit set in the
CAN_SR)
CAN_SR)
After a reset of the CAN controller (CANEN bit in the CAN_MR register)
In Time-triggered Mode, when a message is accepted by the last mailbox (rising edge of the MRDY signal in the
CAN_MSR
CAN_MSR
last_mailbox_number
register).
The application can also reset the internal timer by setting TIMRST in the CAN_TCR register. The current value of the
internal timer is always accessible by reading the CAN_TIM register.
internal timer is always accessible by reading the CAN_TIM register.
When the timer rolls-over from FFFFh to 0000h, TOVF (Timer Overflow) signal in the CAN_SR register is set. TOVF bit in
the CAN_SR register is cleared by reading the CAN_SR register. Depending on the corresponding interrupt mask in the
CAN_IMR register, an interrupt is generated while TOVF is set.
the CAN_SR register is cleared by reading the CAN_SR register. Depending on the corresponding interrupt mask in the
CAN_IMR register, an interrupt is generated while TOVF is set.
In a CAN network, some CAN devices may have a larger counter. In this case, the application can also decide to freeze
the internal counter when the timer reaches FFFFh and to wait for a restart condition from another device. This feature is
the internal counter when the timer reaches FFFFh and to wait for a restart condition from another device. This feature is
Table 41-4.
Mailbox Object Type
Description
Receive
The first message received is stored in mailbox data registers. Data remain available until the
next transfer request.
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.
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.
This extends Receive mailbox features. Data remain available until the next transfer request.
Table 41-5.
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
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.
frame. This extends transmit mailbox features.