37.5.1.1 Software Initialization
Software initialization is started by setting the CCCR.INIT bit, either by software or by a hardware reset, when an uncorrected bit error was detected in the Message RAM, or by going Bus_Off. While CCCR.INIT is set, message transfer from and to the CAN bus is stopped, the status of the CAN bus output CAN_TX is ‘recessive’ (HIGH). The counters of the Error Management Logic EML are unchanged. Setting CCCR.INIT does not change any configuration register. Resetting CCCR.INIT finishes the software initialization. Next, the Bit Stream Processor BSP synchronizes itself to the data transfer on the CAN bus by waiting for the occurrence of a sequence of 11 consecutive ‘recessive’ bits (= Bus_Idle) before it can take part in bus activities and start the message transfer.
Access to the CAN configuration registers is only enabled when both the CCCR.INIT and CCCR.CCE bits are set (protected write).
CCCR.CCE can only be set/reset while CCCR.INIT = ‘1’. CCCR.CCE is automatically reset when CCCR.INIT is reset.
The Timeout Counter value, TOCV.TOC, is preset to the value configured by TOCC.TOP when CCCR.CCE is set. In addition the state machines of the Tx Handler and Rx Handler are held in idle state while CCCR.CCE = 1.
CCCR.TEST and CCCR.MON can only be set by the CPU while CCCR.INIT = 1 and CCR.CCE = 1. Both bits may be reset at any time. CCCR.DAR can only be set/reset while CCCR.INIT = 1 and CCCR.CCE = 1.
