50.9.21 CAN Message Control Register

Name: CAN_MCRx
Offset: 0x021C + x*0x20 [x=0..7]
Reset: 0x00000000
Property: Read/Write

Bit 3130292827262524 
          
Access  
Reset  
Bit 2322212019181716 
 MTCRMACR MRTRMDLC[3:0] 
Access R/WR/WR/WR/WR/WR/WR/W 
Reset 0000000 
Bit 15141312111098 
          
Access  
Reset  
Bit 76543210 
          
Access  
Reset  

Bit 23 – MTCR Mailbox Transfer Command

This flag clears the MRDY and MABT flags in CAN_MSRx.

When several mailboxes are requested to be transmitted simultaneously, they are transmitted in turn. The mailbox with the highest priority is serviced first. If several mailboxes have the same priority, the mailbox with the lowest number is serviced first (i.e., MBx0 will be serviced before MBx 15 if they have the same priority).

It is possible to set MTCR for several mailboxes at the same time by writing to CAN_TCR.

Mailbox Object TypeDescription
ReceiveAllows the reception of the next message
Receive with OverwriteTriggers a new reception
TransmitSends data prepared in the mailbox as soon as possible
ConsumerSends a remote transmission frame
ProducerSends data prepared in the mailbox after receiving a remote frame from a Consumer

Bit 22 – MACR Abort Request for Mailbox x

This flag clears the MRDY and MABT flags in CAN_MSRx.

It is possible to set the MACR field for several mailboxes at the same time, setting several bits to CAN_ACR.

Mailbox Object TypeDescription
ReceiveNo action
Receive with OverwriteNo action
TransmitCancels transfer request if the message has not been transmitted to the CAN transceiver
ConsumerCancels the current transfer before the remote frame has been sent
ProducerCancels the current transfer. The next remote frame will not be serviced

Bit 20 – MRTR Mailbox Remote Transmission Request

Consumer situations can be handled automatically by setting the mailbox object type in Consumer. This requires only one mailbox.

It can also be handled using two mailboxes, one in reception, the other in transmission. The MRTR and the MTCR bits must be set at the same time.

Mailbox Object TypeDescription
ReceiveNo action
Receive with OverwriteNo action
TransmitSets the RTR bit in the sent frame
ConsumerNo action, the RTR bit in the sent frame is set automatically
ProducerNo action

Bits 19:16 – MDLC[3:0] Mailbox Data Length Code

Mailbox Object TypeDescription
ReceiveNo action
Receive with OverwriteNo action
TransmitLength of the mailbox message
ConsumerNo action
ProducerLength of the mailbox message to be sent after the remote frame reception