38.2.6.1 Sleep Mode

In the CAN module, special conditions need to be met for Sleep mode. The module must first be switched to Disable mode by setting REQOPx = 001. When OPMODx = 001, indicating Disable mode has been achieved, the CAN Protocol Module enters Sleep mode after a Sleep mode request.

In Sleep mode, the register content does not change, so the OPMODx bits do not change. At the end of Sleep, the module will continue in the mode specified by the OPMODx bits previous to Sleep mode (which needs to be Disable mode, OPMODx = 001). If the user executes a SLEEP instruction without switching to Disable mode, the module assumes a clock is available to read/write from RAM. Since the system clock input is not available in Sleep mode, the CAN module cannot run as it requires a system clock to transmit or receive. Also, the FIFO is in system RAM, which has no clock in Sleep mode.

Recommended steps:

1. Write the REQOP[2:0] bits to ‘001’; the module will enter Disable mode.

2. Poll the OPMOD[2:0] bits to verify whether they are ‘001’, which indicates that the module has successfully entered Disable mode.

3. Execute the SLEEP instruction.