
BAT32G1x9 user manual | Chapter 22 CAN control
932 / 1149
Rev.1.02
22.10
Message sending
22.10.1
Message sending
In all operating modes, if the TRQ bit is set to 1 in the packet buffer that meets the following criteria, the
search for the packet buffer to transmit the message begins.
-
It is used for packet caching
(MA0 position 1 of the CnMCONFm register).
-
Set to send message caching
(The MT[2:0] bit of the CnMCONFm register is set to 000B.).
-
Ready to send
(RDY position of the CnMCTRLm register 1.).
The CAN system is a multi-master communication system. In such a system, the priority of the
message transmission is determined according to the message identifier (ID), in order to achieve software
transmission processing when there are multiple messages waiting to be transmitted, the CAN module
uses hardware to detect the message ID with the highest priority and automatically identify the message,
which eliminates the need for software priority control.
The send priority is controlled by an identifier (ID).
Figure 22-55. Example of message handling
message No
message waiting to be transmitted
CAN module will transmit messages based on
following order:
1.message 6
2.message 1
3.Message 8
4.Message 5
5.message2
After sending a packet search, sends the highest priority send message with the highest priority of the
send message buffer that has the pending send request (the message buffer with the TRQ bit set to 1).
If a new send request is set, the send packet buffer with the new send request is compared to the send
packet buffer with the pending send request. If a new send request has a higher priority, the request is
transmitted unless a lower priority message has already begun. However, if the transmission of lower
priority messages has already begun, a new send request will be sent later. To address this priority
reversal effect, the software can perform a transmit abort request on a low-priority message. The highest
priority is determined according to the following rules.