English
Language : 

70353C Datasheet, PDF (51/76 Pages) Microchip Technology – Section 21. Enhanced Controller Area Network
Section 21. Enhanced Controller Area Network (ECAN™)
21.7.2.1 BUFFER SELECTION
There are four Acceptance Filter Buffer Pointer registers that select which message buffer the
received message is stored into for acceptance filters 0-15.
• CiBUFPNT1: ECAN Filter 0-3 Buffer Pointer Register
• CiBUFPNT2: ECAN Filter 4-7 Buffer Pointer Register
• CiBUFPNT3: ECAN Filter 8-11 Buffer Pointer Register
• CiBUFPNT4: ECAN Filter 12-15 Buffer Pointer Register
When the incoming message identifier is matched by one of the acceptance filters, the internal
logic looks up the buffer pointer (FnBP<3:0>) and uses that as an address for the corresponding
message buffer. The address is provided to the DMA channel by the peripheral. Therefore, the
DMA channel must be configured in the Peripheral Indirect mode.
The values for FnBP<3:0> are interpreted as follows:
• 1111 = Message is received in receive FIFO buffer
• 1110 = Message is received in message buffer 14
•
•
•
• 0001 = Message is received in message buffer 1
• 0000 = Message is received in message buffer 0
Note:
Multi message buffering can be implemented by a user application by configuring
multiple acceptance filters with the same value. In this case, a received message
may match multiple filters, and the ECAN module will assign the message to the
lowest-numbered matching filter pointing to an empty buffer.
21.7.2.2 RECEIVING MESSAGES INTO MESSAGE BUFFERS 0-7
The message buffers 0-7 can be configured to transmit or receive the CAN messages using the
TX/RX Buffer Selection bit (TXENm) in the ECAN TX/RX Buffer m Control register
(CiTRmnCON<7>). The Acceptance Filter Buffer Pointer (FnBP) selects one of the message
buffers to store the received message, provided it is configured as a receive buffer (TXENm = 0).
If a message buffer is set up as a transmitter with the RTRENm bit (CiTRmnCON<2>) set, and
an acceptance filter pointing to that message buffer detects a message, the message buffer will
handle the RTR instead of storing the message. This is the only case where the Acceptance Filter
Buffer Pointer (FnBP) points to a message buffer that is configured for transmission (TXENn = 1).
Note:
The user application should not set the TXREQ bits (CiTRmnCON) when the buffer
is configured for receive operation (TXEN = 0). This could result in unpredictable
module behavior.
21.7.2.3 RECEIVING MESSAGES INTO MESSAGE BUFFERS 8-14
The message buffers 8-14 are receive buffers. The Acceptance Filter Buffer Pointer (FnBP)
determines which message buffer to use.
21.7.2.4 RECEIVING MESSAGES INTO MESSAGE BUFFERS 15-31
The message buffers 15-31 are receive buffers and are only usable as FIFO buffers because the
Acceptance Filter Buffer Pointer bits (FnBP<3:0>) can only directly address 16 entities. When
FnBP<3:0> = 1111, the results of a hit on that filter will write to the next available buffer location
within the FIFO.
21
© 2008-2011 Microchip Technology Inc.
DS70353C-page 21-51