MCP2510-ESO MICROCHIP [Microchip Technology], MCP2510-ESO Datasheet - Page 51

no-image

MCP2510-ESO

Manufacturer Part Number
MCP2510-ESO
Description
Stand-Alone CAN Controller with SPI Interface
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
9.0
The MCP2510 has five modes of operation. These
modes are:
1.
2.
3.
4.
5.
The operational mode is selected via the CANCTRL.
REQOP bits (see Register 9-1). When changing modes,
the mode will not actually change until all pending mes-
sage transmissions are complete. Because of this, the
user must verify that the device has actually changed
into the requested mode before further operations are
executed. Verification of the current operating mode is
done by reading the CANSTAT. OPMODE bits (see
Register 9-2).
9.1
The MCP2510 must be initialized before activation. This
is only possible if the device is in the configuration mode.
Configuration mode is automatically selected after pow-
erup or a reset, or can be entered from any other mode
by setting the CANTRL.REQOP bits to ‘100’. When con-
figuration mode is entered all error counters are cleared.
Configuration mode is the only mode where the follow-
ing registers are modifiable:
• CNF1, CNF2, CNF3
• TXRTSCTRL
• Acceptance Filter Registers
• Acceptance Mask Registers
Only when the CANSTAT.OPMODE bits read as ‘100’
can the initialization be performed, allowing the config-
uration registers, acceptance mask registers, and the
acceptance filter registers to be written. After the con-
figuration is complete, the device can be activated by
programming the CANCTRL.REQOP bits for normal
operation mode (or any other mode).
9.2
The MCP2510 has an internal sleep mode that is used
to minimize the current consumption of the device. The
SPI interface remains active even when the MCP2510
is in sleep mode, allowing access to all registers.
To enter sleep mode, the mode request bits are set in
the CANCTRL register. The CANSTAT.OPMODE bits
indicate whether the device successfully entered sleep
mode. These bits should be read after sending the
sleep command to the MCP2510. The MCP2510 is
active and has not yet entered sleep mode until these
bits indicate that sleep mode has been entered. When
in internal sleep mode, the wakeup interrupt is still
active (if enabled). This is done so the MCU can also
be placed into a sleep mode and use the MCP2510 to
wake it up upon detecting activity on the bus.
2000 Microchip Technology Inc.
Configuration Mode.
Normal Mode.
Sleep Mode.
Listen-Only Mode.
Loopback Mode.
MODES OF OPERATION
Configuration Mode
Sleep Mode
Preliminary
When in sleep mode, the MCP2510 stops its internal
oscillator. The MCP2510 will wake-up when bus activity
occurs or when the MCU sets, via the SPI interface, the
CANINTF.WAKIF bit to ‘generate’ a wake up attempt
(the CANINTF.WAKIF bit must also be set in order for
the wakeup interrupt to occur). The TXCAN pin will
remain in the recessive state while the MCP2510 is in
sleep mode. Note that Sleep Mode will be entered
immediately, even if a message is currently being
transmitted, so it is necessary to insure that all TXREQ
bits are clear before setting Sleep Mode.
9.2.1
The device will monitor the RXCAN pin for activity while
it is in sleep mode. If the CANINTE.WAKIE bit is set, the
device will wake up and generate an interrupt. Since the
internal oscillator is shut down when sleep mode is
entered, it will take some amount of time for the oscilla-
tor to start up and the device to enable itself to receive
messages. The device will ignore the message that
caused the wake-up from sleep mode as well as any
messages that occur while the device is ‘waking up.’
The device will wake up in listen-only mode. The MCU
must set normal mode before the MCP2510 will be able
to communicate on the bus.
The device can be programmed to apply a low-pass fil-
ter function to the RXCAN input line while in internal
sleep mode. This feature can be used to prevent the
device from waking up due to short glitches on the CAN
bus lines. The CNF3.WAKFIL bit enables or disables
the filter.
9.3
Listen-only mode provides a means for the MCP2510
to receive all messages including messages with
errors. This mode can be used for bus monitor applica-
tions or for detecting the baud rate in ‘hot plugging’ sit-
uations. For auto-baud detection it is necessary that
there are at least two other nodes, which are communi-
cating with each other. The baud rate can be detected
empirically by testing different values until valid mes-
sages are received. The listen-only mode is a silent
mode, meaning no messages will be transmitted while
in this state, including error flags or acknowledge sig-
nals. The filters and masks can be used to allow only
particular messages to be loaded into the receive reg-
isters, or the filter masks can be set to all zeros to allow
a message with any identifier to pass. The error
counters are reset and deactivated in this state. The lis-
ten-only mode is activated by setting the mode request
bits in the CANCTRL register.
Note:
WAKE-UP FUNCTIONS
Listen Only Mode
Care must be exercised to not enter sleep
mode while the MCP2510 is transmitting a
message. If sleep mode is requested while
transmitting, the transmission will stop
without completing and errors will occur on
the bus. Also, the message will remain
pending and transmit upon wake up.
MCP2510
DS21291C-page 51

Related parts for MCP2510-ESO