COMMELL MPX-2515 User Manual
Page 14

Commell MPX-2515 User’s Guide Rev 0100
Taiwan Commate Computer Inc.
14
1.6 CCP_CAN_READ_FMB Service
1.6.1 Introduction to Message Reception
The MCP2515 includes two full receive buffers with multiple acceptance filters for
each. There is also a separate Message Assembly Buffer (MAB) that acts as a third
receive buffer.
Of the three receive buffers, the MAB is always committed to receiving the next
message from the bus. The MAB assembles all messages received. These messages
will be transferred to the RXBn buffers only if the acceptance filter criteria is met.
The remaining two receive buffers, called RXB0 and RXB1, can receive a complete
message from the protocol engine via the MAB. The MCU can access one buffer,
while the other buffer is available for message reception, or for holding a previously
received message.
The entire content of the MAB is moved into the receive buffer once a message is
accepted. This means, that regardless of the type of identifier (standard or extended)
and the number of data bytes received, the entire receive buffer is overwritten with
the MAB contents. Therefore, the contents of all registers in the buffer must be
assumed to have been modified when any message is received.
RXB0, the higher priority buffer, has one mask and two message acceptance filters
associated with it. The receive message is applied to the mask and filters for RXB0
first.
RXB1 is the lower priority buffer, with one mask and four acceptance filters
associated with it.
In addition to the message being applied to the RXB0 mask and filters first, the
lower number of acceptance filters makes the match on RXB0 more restrictive and
implies a higher priority for that buffer.
When a message is received, bits <3:0> of the RXBnCTRL register will indicate
the acceptance filter number that enabled reception and whether the received
message is a remote transfer request.
1.6.2 Firmware Messages Buffer (FMB)
In order to reduce the message overwritten possibility, the MPX-2515 firmware has
reserved a 64-byte buffer in the memory to store acceptance messages that have
received in the MCP2515 message buffer. This Firmware Messages Buffer (FMB)
can hold up to three CAN messages associated with some selected MCP2515
registers values at the time the message is received. Applications is then able to
analyze the situation of controller and the bus by checking these registers values.