SAM3A4C Atmel Corporation, SAM3A4C Datasheet - Page 1224

no-image

SAM3A4C

Manufacturer Part Number
SAM3A4C
Description
Manufacturer
Atmel Corporation
Datasheets
Figure 40-11. Receive Mailbox
Note:
1224
1224
Receive with Overwrite Mailbox
(CAN_MSRx)
(CAN_MSRx)
(CAN_MCRx)
CAN_MDHx)
(CAN_MDLx
In the case of ARM architecture, CAN_MSRx, CAN_MDLx, CAN_MDHx can be read using an optimized ldm assembler
instruction.
SAM3X/A
SAM3X/A
CAN BUS
MRDY
MTCR
MMI
Reading CAN_MDHx & CAN_MDLx
A mailbox is in Receive with Overwrite Mode once the MOT field in the CAN_MMRx register has
been configured. Message ID and Message Acceptance masks must be set before Receive
Mode is enabled.
After Receive Mode is enabled, the MRDY flag in the CAN_MSR register is automatically
cleared until the first message is received. When the first message has been accepted by the
mailbox, the MRDY flag is set. An interrupt is pending for the mailbox while the MRDY flag is set.
This interrupt is masked depending on the mailbox flag in the CAN_IMR global register.
If a new message is received while the MRDY flag is set, this new message is stored in the mail-
box data register, overwriting the previous message. The MMI flag in the CAN_MSRx register
notifies the software that a message has been dropped by the mailbox. This flag is cleared when
reading the CAN_MSRx register.
The CAN controller may store a new message in the CAN data registers while the application
reads them. To check that CAN_MDHx and CAN_MDLx do not belong to different messages,
the application must check the MMI field in the CAN_MSRx register before and after reading
CAN_MDHx and CAN_MDLx. If the MMI flag is set again after the data registers have been
read, the software application has to re-read CAN_MDHx and CAN_MDLx (see
Message 1
Reading CAN_MSRx
Message 2 lost
Message 1
Writing CAN_MCRx
Message 3
Message 3
Message ID = CAN_MIDx
11057A–ATARM–17-Feb-12
11057A–ATARM–17-Feb-12
Figure
40-12).

Related parts for SAM3A4C