![Microchip Technology dsPIC30F6010 Скачать руководство пользователя страница 119](http://html1.mh-extra.com/html/microchip-technology/dspic30f6010/dspic30f6010_datasheet_1785760119.webp)
2004 Microchip Technology Inc.
Advance Information
DS70119B-page 117
dsPIC30F6010
19.3
Modes of Operation
The CAN Module can operate in one of several opera-
tion modes selected by the user. These modes include:
• Initialization Mode
• Disable Mode
• Normal Operation Mode
• Listen Only Mode
• Loop Back Mode
• Error Recognition Mode
Modes are requested by setting the REQOP<2:0>
bits (CiCTRL<10:8>), except the Error Recognition
Mode which is requested through the RXM<1:0> bits
(CiRXnCON<6:5>, where n =
0
or
1
represents a
particular receive buffer). Entry into a mode is
acknowledged by monitoring the OPMODE<2:0> bits
(CiCTRL<7:5>). The module will not change the mode
and the OPMODE bits until a change in mode is
acceptable, generally during bus idle time which is
defined as at least 11 consecutive recessive bits.
19.3.1
INITIALIZATION MODE
In the Initialization mode, the module will not transmit or
receive. The error counters are cleared and the inter-
rupt flags remain unchanged. The programmer will
have access to configuration registers that are access
restricted in other modes. The module will protect the
user from accidentally violating the CAN protocol
through programming errors. All registers which control
the configuration of the module can not be modified
while the module is on-line. The CAN module will not
be allowed to enter the configuration mode while a
transmission is taking place. The Configuration mode
serves as a lock to protect the following registers.
• All Module Control Registers
• Baud Rate and interrupt Configuration Registers
• Bus Timing Registers
• Identifier Acceptance Filter Registers
• Identifier Acceptance Mask Registers
19.3.2
DISABLE MODE
In Disable Mode, the module will not transmit or
receive. The module has the ability to set the WAKIF bit
due to bus activity, however any pending interrupts will
remain and the error counters will retain their value.
If the REQOP<2:0> bits (CiCTRL<10:8>) = ‘
001
’, the
module will enter the module disable mode. If the mod-
ule is active, the module will wait for 11 recessive bits
on the CAN bus, detect that condition as an idle bus,
then accept the module disable command. When the
OPMODE<2:0> bits (CiCTRL<7:5>) = ‘
001
’, that indi-
cates whether the module successfully went into mod-
ule disable mode. The I/O pins will revert to normal I/O
function when the module is in the module disable
mode.
The module can be programmed to apply a low-pass
filter function to the CiRX input line while the module or
the CPU is in Sleep mode. The WAKFIL bit
(CiCFG2<14>) enables or disables the filter.
19.3.3
NORMAL OPERATION MODE
Normal operating mode is selected when
REQOP<2:0> = ‘
000
’. In this mode, the module is
activated, the I/O pins will assume the CAN bus
functions. The module will transmit and receive CAN
bus messages via the CxTX and CxRX pins.
19.3.4
LISTEN ONLY MODE
If the listen only mode is activated, the module on the
CAN bus is passive. The transmitter buffers revert to
the Port I/O function. The receive pins remain inputs.
For the receiver, no error flags or acknowledge signals
are sent. The error counters are deactivated in this
state. The listen only mode can be used for detecting
the baud rate on the CAN bus. To use this, it is neces-
sary that there are at least two further nodes that
communicate with each other.
19.3.5
ERROR RECOGNITION MODE
The module can be set to ignore all errors and receive
any message. The error recognition mode is activated
by setting the RXM<1:0> bits (CiRXnCON<6:5>) regis-
ters to ‘
11
’. In this mode the data which is in the
message assembly buffer until the time an error
occurred, is copied in the receive buffer and can be
read via the CPU interface.
19.3.6
LOOP BACK MODE
If the loopback mode is activated, the module will con-
nect the internal transmit signal to the internal receive
signal at the module boundary. The transmit and
receive pins revert to their Port I/O function.
Note:
Typically, if the CAN module is allowed to
transmit in a particular mode of operation
and a transmission is requested immedi-
ately after the CAN module has been
placed in that mode of operation, the mod-
ule waits for 11 consecutive recessive bits
on the bus before starting transmission. If
the user switches to Disable Mode within
this 11-bit period, then this transmission is
aborted and the corresponding TXABT bit
is set and TXREQ bit is cleared.
Содержание dsPIC30F6010
Страница 12: ...dsPIC30F6010 DS70119B page 10 Advance Information 2004 Microchip Technology Inc NOTES...
Страница 32: ...dsPIC30F6010 DS70119B page 30 Advance Information 2004 Microchip Technology Inc NOTES...
Страница 38: ...dsPIC30F6010 DS70119B page 36 Advance Information 2004 Microchip Technology Inc NOTES...
Страница 50: ...dsPIC30F6010 DS70119B page 48 Advance Information 2004 Microchip Technology Inc NOTES...
Страница 68: ...dsPIC30F6010 DS70119B page 66 Advance Information 2004 Microchip Technology Inc NOTES...
Страница 72: ...dsPIC30F6010 DS70119B page 70 Advance Information 2004 Microchip Technology Inc NOTES...
Страница 76: ...dsPIC30F6010 DS70119B page 74 Advance Information 2004 Microchip Technology Inc NOTES...
Страница 86: ...dsPIC30F6010 DS70119B page 84 Advance Information 2004 Microchip Technology Inc NOTES...
Страница 108: ...dsPIC30F6010 DS70119B page 106 Advance Information 2004 Microchip Technology Inc NOTES...
Страница 116: ...dsPIC30F6010 DS70119B page 114 Advance Information 2004 Microchip Technology Inc NOTES...
Страница 128: ...dsPIC30F6010 DS70119B page 126 Advance Information 2004 Microchip Technology Inc NOTES...
Страница 150: ...dsPIC30F6010 DS70119B page 148 Advance Information 2004 Microchip Technology Inc NOTES...
Страница 164: ...dsPIC30F6010 DS70119B page 162 Advance Information 2004 Microchip Technology Inc NOTES...
Страница 208: ...dsPIC30F6010 DS70119B page 206 Advance Information 2004 Microchip Technology Inc NOTES...
Страница 220: ...dsPIC30F6010 DS70119B page 220 Advance Information 2004 Microchip Technology Inc NOTES...
Страница 221: ...2004 Microchip Technology Inc Advance Information DS70119B page 221 dsPIC30F6010 NOTES...