50.8.3.3.1 Producer Configuration

A mailbox is in Producer mode once the CAN_MMRx.MOT field has been configured. Message ID and Message Acceptance masks must be set before Receive mode is enabled.

After Producer mode is enabled, the MRDY flag in CAN_MSR is automatically set until the first transfer command. The software application prepares data to be sent by writing to the Message Data High (CAN_MDHx) and Message Data Low (CAN_MDLx) registers, then by setting the CAN_MCRx.MTCR bit. Data is sent after the reception of a remote frame as soon as it wins the bus arbitration.

The MRDY flag remains at zero as long as the message has not been sent or aborted. No access to the mailbox data register can be done while the MRDY flag is cleared. An interrupt is pending for the mailbox while the MRDY flag is set. This interrupt can be masked according to the mailbox flag in the CAN_IMR global register.

If a remote frame is received while no data are ready to be sent (signal MRDY set in CAN_MSRx), then the MMI signal is set in CAN_MSRx. This bit is cleared by reading CAN_MSRx.

The CAN_MSRx.MRTR field has no meaning. It is used only when using Receive and Receive with Overwrite modes.

After a remote frame has been received, the mailbox functions like a transmit mailbox. The message with the highest priority is sent first. The transmitted message may be aborted by setting the CAN_MCR.MACR bit. See Transmission Handling.

Figure 50-17. Producer Handling