C8051F040/1/2/3/4/5/6/7
18.1. Bosch CAN Controller Operation
The CAN Controller featured in the C8051F04x family of devices is a full implementation of Bosch’s full
CAN module and fully complies with CAN specification 2.0B. A block diagram of the CAN controller is
shown in Figure 18.2. The CAN Core provides shifting (CANTX and CANRX), serial/parallel conversion of
messages, and other protocol related tasks such as transmission of data and acceptance filtering. The
message RAM stores 32 message objects which can be received or transmitted on a CAN network. The
CAN registers and message handler provide an interface for data transfer and notification between the
CAN controller and the CIP-51.
The function and use of the CAN Controller is detailed in the Bosch CAN User’s Guide. The User’s Guide
should be used as a reference to configure and use the CAN controller. This Silicon Labs data sheet
describes how to access the CAN controller.
The CAN Controller is typically initialized using the following steps:
Step 1. Set the SFRPAGE register to CAN0_PAGE.
Step 2. Set the INIT the CCE bits to ‘1’ in the CAN0CN Register. See the CAN User’s Guide for bit
definitions.
Step 3. Set timing parameters in the Bit Timing Register and the BRP Extension Register.
Step 4. Initialize each message object or set it’s MsgVal bit to NOT VALID.
Step 5. Reset the INIT bit to ‘0’.
The CAN Control Register (CAN0CN), CAN Test Register (CAN0TST), and CAN Status Register
(CAN0STA) in the CAN controller can be accessed directly or indirectly via CIP-51 SFR’s. All other CAN
registers must be accessed via an indirect indexing method described in Section “18.2.5. Using
CAN0ADR, CAN0DATH, and CANDATL to Access CAN Registers” on page 232.
CANTX
CANRX
C8051F04x
CAN Controller
S
TX
RX
CAN
CAN_CLK
Y
BRP
S
Prescaler
(fsys)
C
L
Core
K
Message RAM
(32 Message Objects)
REGISTERS
CIP-51
MCU
S
F
R
's
Message Handler
Interrupt
Figure 18.2. CAN Controller Diagram
228
Rev. 1.5