29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Controller area network (bxCAN)<br />

RM0008<br />

The transmit mailboxes can be configured as a transmit FIFO by setting the TXFP bit in the<br />

CAN_MCR register. In this mode the priority order is given by the transmit request order.<br />

This mode is very useful for segmented transmission.<br />

Abort<br />

A transmission request can be aborted by the user setting the ABRQ bit in the CAN_TSR<br />

register. In pending or scheduled state, the mailbox is aborted immediately. An abort<br />

request while the mailbox is in transmit state can have two results. If the mailbox is<br />

transmitted successfully the mailbox becomes empty with the TXOK bit set in the<br />

CAN_TSR register. If the transmission fails, the mailbox becomes scheduled, the<br />

transmission is aborted <strong>and</strong> becomes empty with TXOK cleared. In all cases the mailbox<br />

will become empty again at least at the end of the current transmission.<br />

Non-automatic retransmission mode<br />

This mode has been implemented in order to fulfil the requirement of the Time Triggered<br />

Communication option of the CAN st<strong>and</strong>ard. To configure the hardware in this mode the<br />

NART bit in the CAN_MCR register must be set.<br />

In this mode, each transmission is started only once. If the first attempt fails, due to an<br />

arbitration loss or an error, the hardware will not automatically restart the message<br />

transmission.<br />

At the end of the first transmission attempt, the hardware considers the request as<br />

completed <strong>and</strong> sets the RQCP bit in the CAN_TSR register. The result of the transmission is<br />

indicated in the CAN_TSR register by the TXOK, ALST <strong>and</strong> TERR bits.<br />

Figure 198. Transmit mailbox states<br />

EMPTY<br />

RQCP=X<br />

TXOK=X<br />

TME = 1<br />

TXRQ=1<br />

ABRQ=1<br />

PENDING<br />

RQCP=0<br />

TXOK=0<br />

TME = 0<br />

Mailbox has<br />

highest priority<br />

EMPTY<br />

RQCP=1<br />

TXOK=0<br />

TME = 1<br />

Mailbox does not<br />

have highest priority<br />

ABRQ=1<br />

CAN Bus = IDLE<br />

SCHEDULED<br />

RQCP=0<br />

TXOK=0<br />

TME = 0<br />

Transmit failed * NART<br />

TRANSMIT<br />

RQCP=0<br />

TXOK=0<br />

TME = 0<br />

Transmit failed * NART<br />

EMPTY<br />

RQCP=1<br />

TXOK=1<br />

TME = 1<br />

Transmit succeeded<br />

550/995 Doc ID 13902 Rev 9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!