
286
Chapter 16
CAN Controller
User’s Manual U16504EE1V1UD00
Figure 16-39:
CAN Error Status Register (3/3)
This bit is set and an error interrupt is generated under the following circumstances:
a) A CAN bus activity occurs during DCAN Sleep mode.
b) Any attempt to set the SLEEP bit in the CAN control register during receive or transmit opera-
tion will immediately set the WAKE bit.
The CPU must clear this bit after recognition in order to receive further error interrupts, because the
error interrupt line is kept active as long as this bit is set.
Cautions: 1. The WAKE bit is cleared to “0” if CPU writes an “1” to it, or when the INIT bit in
CANC register is set.
2. Writing a “0” to the WAKE bit has no influence.
The overrun condition is set whenever the CAN can not perform all RAM accesses that are necessary
for comparing and storing received data or fetching transmitted data. Typically, the overrun condition is
encountered when the frequency for the macro is too low compared to the programmed baud rate. An
error interrupt is generated at the same time.
The DCAN interface will work properly (i. e. no overrun condition will occur) with the following settings:
The DCAN clock as defined with the PRM bits in the BRPRS register is set to a minimum of 16 times of
the CAN baudrate
and
the selected CPU clock (defined in the PCC register) is set to a minimum of 16
times of the baudrate.
Possible reasons for an overrun condition are:
Too many messages are defined.
DMA access to RAM area is too slow compared to the CAN Baudrate.
The possible reactions of the DCAN differ depending on the situation, when the overrun occurs.
WAKE
Wake up Condition
0
Normal operation
1
Sleep mode has been cancelled
or sleep/stop mode request was not granted
OVER
Overrun Condition
0
Normal operation
1
Overrun occurred during access to RAM