dsPIC30F Family Reference Manual
DS70070B-page 23-36 © 2004 Microchip Technology Inc.
23.5 CAN Module Operation Modes
The CAN Module can operate in one of several Operation modes selected by the user. These
modes include:
• Normal Operation mode
• Disable mode
• Loopback mode
• Listen Only mode
• Configuration mode
• Listen to All Messages mode
Modes are requested by setting the REQOP<2:0> bits (CiCTRL<10:8>). Entry into a mode is
acknowledged by monitoring the OPMODE<2:0> bits (CiCTRL<7:5>). The module does 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.
23.5.1 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 as described in subsequent sections.
23.5.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. This mode is similar to disabling other peripheral modules by turning off the module
enables. This causes the module internal clock to stop unless the module is active (i.e., receiving
or transmitting a message). If the module 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’, this indicates that the module
successfully entered Module Disable mode (see Figure 23-7).
The WAKIF interrupt is the only module interrupt that is still active in the Module Disable mode.
If the WAKIE bit (CiINTE<6>) is set, the processor will receive an interrupt whenever the CAN
bus detects a dominant state, as occurs with a Start-Of-Frame (SOF).
The I/O pins will revert to normal I/O function when the module is in the Module Disable mode.
Note: Typically, if the CAN module is allowed to transmit in a particular mode of operation
and a transmission is requested immediately after the CAN module has been
placed in that mode of operation, the module 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.