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 Type Description
Receive Allows the reception of the next message
Receive with Overwrite Triggers a new reception
Transmit Sends data prepared in the mailbox as soon as possible
Consumer Sends a remote transmission frame
Producer Sends 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 Type Description
Receive No action
Receive with Overwrite No action
Transmit Cancels transfer request if the message has not been transmitted to the CAN transceiver
Consumer Cancels the current transfer before the remote frame has been sent
Producer Cancels 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 Type Description
Receive No action
Receive with Overwrite No action
Transmit Sets the RTR bit in the sent frame
Consumer No action, the RTR bit in the sent frame is set automatically
Producer No action

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

Mailbox Object Type Description
Receive No action
Receive with Overwrite No action
Transmit Length of the mailbox message
Consumer No action
Producer Length of the mailbox message to be sent after the remote frame reception