Data Sheet
Table Of Contents
- 1.0 Device Overview
- 2.0 Can Message Frames
- 3.0 Message Transmission
- 4.0 Message Reception
- 5.0 Bit Timing
- 6.0 Error Detection
- 7.0 Interrupts
- 8.0 Oscillator
- 9.0 RESET
- 10.0 Modes of Operation
- 11.0 Register Map
- 12.0 SPI™ Interface
- 12.1 Overview
- 12.2 Reset Instruction
- 12.3 Read Instruction
- 12.4 Read RX Buffer Instruction
- 12.5 Write Instruction
- 12.6 Load TX Buffer Instruction
- 12.7 Request-To-Send (RTS) Instruction
- 12.8 Read Status Instruction
- 12.9 RX Status Instruction
- 12.10 Bit Modify Instruction
- Figure 12-1: Bit Modify
- Table 12-1: SPI™ Instruction Set
- Figure 12-2: Read instruction
- Figure 12-3: Read RX Buffer Instruction
- Figure 12-4: Byte Write instruction
- Figure 12-5: Load TX Buffer
- Figure 12-6: Request-to-send (RTS) instruction
- Figure 12-7: BIT Modify instruction
- Figure 12-8: Read Status instruction
- Figure 12-9: RX StatUs Instruction
- Figure 12-10: SPI™ Input Timing
- Figure 12-11: SPI™ Output TIming
- 13.0 Electrical Characteristics
- 14.0 PackAging Information

MCP2515
DS21801D-page 58 Preliminary © 2005 Microchip Technology Inc.
10.4 Loopback Mode
Loopback mode will allow internal transmission of
messages from the transmit buffers to the receive
buffers without actually transmitting messages on the
CAN bus. This mode can be used in system
development and testing.
In this mode, the ACK bit is ignored and the device will
allow incoming messages from itself just as if they were
coming from another node. The Loopback mode is a
silent mode, meaning no messages will be transmitted
while in this state (including error flags or acknowledge
signals). The TXCAN pin will be in a recessive state.
The filters and masks can be used to allow only
particular messages to be loaded into the receive
registers. The masks can be set to all zeros to provide
a mode that accepts all messages. The Loopback
mode is activated by setting the mode request bits in
the CANCTRL register.
10.5 Normal Mode
Normal mode is the standard operating mode of the
MCP2515. In this mode, the device actively monitors all
bus messages and generates acknowledge bits, error
frames, etc. This is also the only mode in which the
MCP2515 will transmit messages over the CAN bus.
REGISTER 10-1: CANCTRL – CAN CONTROL REGISTER
(ADDRESS: XFh)
R/W-1 R/W-0 R/W-0 R/W-0 R/W-0 R/W-1 R/W-1 R/W-1
REQOP2 REQOP1 REQOP0 ABAT OSM CLKEN CLKPRE1 CLKPRE0
bit 7 bit 0
bit 7-5 REQOP: Request Operation Mode bits <2:0>
000 = Set Normal Operation mode
001 = Set Sleep mode
010 = Set Loopback mode
011 = Set Listen-only mode
100 = Set Configuration mode
All other values for REQOP bits are invalid and should not be used
Note: On power-up, REQOP = b’111’
bit 4 ABAT: Abort All Pending Transmissions bit
1 = Request abort of all pending transmit buffers
0 = Terminate request to abort all transmissions
bit 3 OSM: One Shot Mode bit
1 = Enabled. Message will only attempt to transmit one time
0 = Disabled. Messages will reattempt transmission, if required
bit 2 CLKEN: CLKOUT Pin Enable bit
1 = CLKOUT pin enabled
0 = CLKOUT pin disabled (Pin is in high-impedance state)
bit 1-0 CLKPRE: CLKOUT Pin Prescaler bits <1:0>
00 =F
CLKOUT = System Clock/1
01 =F
CLKOUT = System Clock/2
10 =F
CLKOUT = System Clock/4
11 =F
CLKOUT = System Clock/8
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown