![Geehy SEMICONDUCTOR APM32F405 Series Скачать руководство пользователя страница 395](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f405-series/apm32f405-series_user-manual_573630395.webp)
www.geehy.com Page 394
Figure 110 CAN Works in Normal Mode
TX
RX
MCU
CANTX
CANRX
Data transmission
Conversion of transmiting mailbox state
Conversion process of transmiting mailbox state:
First select an empty mailbox to set, submit the transmitting request to
the CAN bus controller by setting the TXMREQ bit of the configuration
register CAN_TXMIDx to 1, and then the mailbox immediately enters the
registration state.
When multiple mailboxes are in the registered state, conduct priority
scheduling. When an mailbox has the highest priority, it will enter the
predetermined state.
When the message in the transmiting mailbox is sent to the bus, it will
enter the transmitting state.
After the message is sent successfully, the mailbox will become idle
again.
Transmitting priority
When multiple messages are waiting for transmitting, determine the transmitting
sequence through the TXFPCFG bit of the configuration register CAN_MCTRL:
When the TXFPCFG bit is set to 0, the priority is determined by the
message identifier, the identifier is the lowest, the priority is the
highest, the identifier is equal, and the message with small mailbox
number will be sent first
When the TXFPCFG bit is set to 1, the priority will be determined by
the sequence of transmitting request
Abort
Transmit the abort request by setting the ABREQFLG bit of the configuration
register CAN_TXSTS to 1.
If the mailbox is in registered or predetermined state, stop transmitting the
request immediately; if the mailbox is in the transmitting state, there are two
conditions: one is that the mailbox is successfully sent, the mailbox becomes
empty, in such case, the TXSUSFLG bit of the CAN_TXSTS register is set to 1