13-77
13
32180 Group User’s Manual (Rev.1.0)
CAN MODULE
Initialize the CAN module
Set the Input/Output Port
Operation Mode Register
Set the Interrupt Controller
Set the CAN related interrupt
request enable registers
Set the CAN
Configuration Register
Set the ID Mask Register
Set the CAN operation mode
Negate CAN reset
CAN module initialization
completed
Set interrupt priority
• Set the bit timing (baud rate)
• Set the number of times sampled
Set the ID mask bit
Set BasicCAN mode
• Set the CAN Extended ID Register
• Set IDs in message slots 14 and 15
• Set the Message Slot Control Register
Release the CAN module from reset
Set the CAN Error Interrupt Request
Enable Register
• Enable/disable CAN bus error
interrupt request
• Enable/disable CAN error
passive interrupt request
• Enable/disable CAN bus off
interrupt request
Set the CAN Slot Interrupt
Request Enable Register
• Enable/disable the interrupt
request to be generated when
transmission or reception in
the relevant slot has finished
Set loopback mode
• Clear the CAN Control Register (CANnCNT)'s
FRST and RST bits
Figure 13.4.2 Initializing the CAN Module
13.4 Initializing the CAN Module