EasyManua.ls Logo

Microchip Technology dsPIC30F - Page 642

Microchip Technology dsPIC30F
738 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
dsPIC30F Family Reference Manual
DS70070B-page 23-44 © 2004 Microchip Technology Inc.
23.6.3 Receiver Overrun
An overrun condition occurs when the Message Assembly Buffer (MAB) has assembled a valid
received message, the message is accepted through the acceptance filters, and when the
receive buffer associated with the filter has not been designated as clear of the previous
message.
The overrun error flag, RXnOVR (CiINTF<15> or CiINTF<14>) and the ERRIF bit (CiINTF<5>)
will be set and the message in the MAB will be discarded. While in the overrun situation, the
module will stay synchronized with the CAN bus and is able to transmit messages, but it will
discard all incoming messages destined for the overflowed buffer.
If the DBEN bit is clear, RXB1 and RXB0 operate independently. When this is the case, a
message intended for RXB0 will not be diverted into RXB1 if RXB0 contains an unread message
and the RX0OVR bit will be set.
If the DBEN bit is set, the overrun for RXB0 is handled differently. If a valid message is received
for RXB0 and RXFUL = 1 (CiRX0CON<7>) indicating that RXB0 is full, and RXFUL = 0
(CiRX1CON<7>) indicating that RXB1 is empty, the message for RXB0 will be loaded into RXB1.
An overrun error will not be generated for RXB0. If a valid message is received for RXB0 and
RXFUL = 1, and RXFUL = 1 indicating that both RXB0 and RXB1 are full, the message will be
lost and an overrun will be indicated for RXB1.
If the DBEN bit is clear, there are six codes corresponding to the six filters. If the DBEN bit is set,
there are six codes corresponding to the six filters plus two additional codes corresponding to
RXF0 and RXF1 filters overrun to RXB1. These codes are given in Table 23-5.
Table 23-5: Buffer Reception and Overflow Truth Table
Message
Matches
Filter
0 or 1
Message
Matches
Filter
2,3,4,5
RXFUL0
Bit
RXFUL1
Bit
DBEN
Bit
Action Results
00XXXNone No message received
01X0XMAB RXB1 Message for RXB1, RXB1 available
01X1XMAB discarded
RX1OVR = 1
Message for RXB1, RXB1 full
100XXMAB RXB0 Message for RXB0, RXB0 available
101X0MAB discarded
RX0OVR = 1
Message for RXB0, RXB0 full,
DBEN not enabled
10101MAB RXB1 Message for RXB0, RXB0 full,
DBEN enabled, RXB1 available
10111MAB discarded
RX1OVR = 1
Message for RXB0, RXB0 full,
DBEN enabled, RXB1 full
110XXMAB RXB0 Message for RXB0 and RXB1,
RXB0 available
111X0MAB discarded
RX0OVR = 1
Message for RXB0 and RXB1,
RXB0 full, DBEN not enabled
00XXXNone No message received
01X0XMAB RXB1 Message for RXB1, RXB1 available
Legend: X =Dont care

Table of Contents

Other manuals for Microchip Technology dsPIC30F