Datasheet
771
32117D–AVR-01/12
AT32UC3C
• DIR bit: MOb direction, 0 stands for reception
Once a MOb is enabled (by writing to MOBER), an incoming frame is compared (Section 29.6.4)
with every MOb enabled for reception in order to select the MOb for storing the frame. User can
check if the channel is receiving a frame by reading the CANSR.RS bit.
At the end of the successful reception, the complete message (ID + RTR + IDE + DATA bits) is
stored in RAM, the MOBESR.MENn bit is cleared and MOBSR.RXOK is set. To acknowledge
any interrupt and to free the MOb user must clear this status bit by writing a one to the associ-
ated bit in MOBSCR. The MOBSR.DLCW bit indicates if the received DLC does not correspond
to MOBCTRL.DLC. Any such status should also be cleared by user.
CAN errors detected during reception are reported in CANISR register. A corrupted message is
not stored to RAM but the selected MOb remains enabled.
User can enable/disable several MObs in one operation, by writing to MOBER/MOBDR registers
(Section 29.6.3.2).
If several MObs are enabled, the MOb priority is given by the filtering order which is from low to
high MOb number.
29.6.3.4 Automatic mode
All MObs are configured in automatic mode if the Automatic Mode (MOBCTRL.AM) bit is set.
The main configurations are:
• Remote frame reception - Data frame transmission
MOb configuration: MOBCTRL.AM = 1, MOBCTRL.DIR = 0, IDT.RTR = 1
IDT/IDM can be set to receive any identifier but transmission will be done with identifier
received.
• Remote frame transmission - Data frame reception
MOb configuration: MOBCTRL.AM = 1, MOBCTRL.DIR = 1, IDT.RTR = 1
Remote frame is sent with IDT value. Reception uses current IDT value but IDM can be set to
filter data frame.
Other configurations (IDT.RTR = 0) are possible but does not make sense.
Properties:
– MOb handling is identical to single configuration (priority, access,...) but:
– Bits MOBCTRL.AM and IDT.RTR are inverted at the end of first
reception/transmission
– Bit MOBSR.TXOK (or RXOK) is only set at the end of the transmission (or reception)
29.6.4 Message Filtering
The filtering process uses the ID tag (IDT) and ID mask (IDM) values defined in RAM. Compari-
son is done on the bits IDENTIFIER, RTR and IDE. Messages can therefore be filtered
according to the identifier value, frame type (remote or data frame) and the format (standard or
extended).
Each received bit is compared with the corresponding bit in the ID tag only if the corresponding
bit in ID mask is set. Otherwise the received bit is considered as don’t care. The filtering result is
true if all comparisons are true.
Examples with 11 bits of identifier ( ‘-‘ means don’t care):