BAT32G1x9 user manual | Chapter 22 CAN control
930 / 1149
Rev.1.02
22.9.5
Multi-buffer receive block capability
The Multiple Buffer Receive Block (MBRB) feature is used to store data blocks sequentially in two or
more packet buffers without CPU interaction by setting the same ID to two or more packet buffers with the
same packet buffer type.
For example, suppose the same message buffer type is set to 5 message buffers (message buffers 10
to 14), and they are given the same ID. If the first message ID received is the same as the buffer ID, the
message is stored in the packet buffer 10. At this point, the DN bit of the packet buffer 10 will be set, and
the packet buffer will be disabled when subsequent packets are received.
If the next message with a matching ID is received, the message is received and stored in the
message buffer 11. Each time a message with a matching ID is received, it will be stored sequentially (in
ascending order) in the message buffers 12, 13 and 14. Even if a block of data consisting of multiple
messages is received, the packets are stored and received after scanning, without overwriting the
previously received matching ID data.
It is possible to check whether the data block is received and stored by setting the IE bit of the
CnMCTRLm register of each packet buffer, for example, if the data block consists of k packets, the k
message buffer will be initialized to receive the data block. The IE bit in the packet buffer 0 to (k-2) is
cleared to 0 (disable interrupt), and the IE bit in packet buffer k-1 is set to 1 (interrupt is enabled). In this
case, a receive completion interrupt occurs when a message is received and stored in the message buffer
k-1, indicating that the MBRB is full. Alternatively, by clearing the IE bits of the packet buffer 0 to (k-3) and
setting the IE bits of the packet buffer k-2, you can issue a warning that the MBRB is about to overflow.
The basic conditions for storing the receive data in each packet buffer of the MBRB are the same as
the conditions for storing the data in a single packet buffer.
Note 1. MBRB can be configured for each of the same type of message buffers. Thus, even if there is a gap in the
packet buffer of another MBRB with a matching ID but a different packet buffer type, the received
packet is not stored in that packet buffer, but is discarded.
2.
MBRB does not have a ring cache structure. Therefore, after a message is stored in the packet
buffer with the highest number in the MBRB configuration, the newly received packet will not be
stored in the packet buffer with the lowest number in the packet buffer.
3.
MBRB operates according to receiving and storage conditions; There are no settings specific to MBRB,
such as function enabler bits. MbRB is automatically configured by setting the same packet buffer type
and ID to two or more packet buffers. .
4.
With MBRB, "Match ID" means "Match ID After Mask". Even if the ID set to each packet buffer is
different, if the MASK register masked ID matches, it is considered a matching ID, and the buffer with
this ID is considered the storage target for the packet. .
5.
For the priority of MBRBs, refer to
Note m= 0
to
15