807
Chapter 18
AFCAN Controller
User’s Manual U16580EE3V1UD00
18.8 CAN
Controller
Initialization
18.8.1 Initialization of CAN module
Before CAN module operation is enabled, the CAN module system clock needs to be determined by
setting the CCP[3:0] bits of the CnGMCS register by software. Do not change the setting of the CAN
module system clock after CAN module operation is enabled.
The CAN module is enabled by setting the GOM bit of the CnGMCTRL register.
For the procedure of initializing the CAN module, refer to “Operation of CAN Controller” on page 840.
18.8.2 Initialization of message buffer
After the CAN module is enabled, the message buffers contain undefined values. A minimum initializa-
tion for all the message buffers, even for those not used in the application, is necessary before switch-
ing the CAN module from the initialization mode to one of the operation modes.
•
Clear the RDY, TRQ, and DN bits of all CnMCTRLm registers to 0.
•
Clear the MA0 bit of all CnMCONFm registers to 0.
•
18.8.3 Redefinition of message buffer
Redefining a message buffer means changing the ID and control information of the message buffer
while a message is being received or transmitted, without affecting other transmission/reception opera-
tions.
(1)
To redefine message buffer in initialization mode
Place the CAN module in the initialization mode once and then change the ID and control informa-
tion of the message buffer in the initialization mode. After changing the ID and control information,
set the CAN module to an operation mode.
(2)
To redefine message buffer during reception
Perform redefinition as shown in <~Reference>Figure 18-38.
(3)
To redefine message buffer during transmission
To rewrite the contents of a transmit message buffer to which a transmission request has been set,
perform transmission abort processing (see “Transmission abort process except for in normal
operation mode with automatic block transmission (ABT)” on page 820 and “Transmission abort
process except for ABT transmission in normal operation mode with automatic block transmission
(ABT)” on page 821). Confirm that transmission has been aborted or completed, and then rede-
fine the message buffer. After redefining the transmit message buffer, set a transmission request
using the procedure described below. When setting a transmission request to a message buffer
that has been redefined without aborting the transmission in progress, however, the 1-bit wait time
is not necessary.
Summary of Contents for V850E/PH2
Page 6: ...6 Preface User s Manual U16580EE3V1UD00...
Page 16: ...16 User s Manual U16580EE3V1UD00...
Page 28: ...28 User s Manual U16580EE3V1UD00...
Page 32: ...32 User s Manual U16580EE3V1UD00...
Page 84: ...84 Chapter 2 Pin Functions User s Manual U16580EE3V1UD00 MEMO...
Page 144: ...144 Chapter 3 CPU Functions User s Manual U16580EE3V1UD00 MEMO...
Page 192: ...192 Chapter 5 Memory Access Control Function PD70F3187 only User s Manual U16580EE3V1UD00 MEMO...
Page 312: ...312 Chapter 9 16 Bit Timer Event Counter P User s Manual U16580EE3V1UD00 MEMO...
Page 534: ...534 Chapter 11 16 bit Timer Event Counter T User s Manual U16580EE3V1UD00...
Page 969: ...969 Chapter 20 Port Functions User s Manual U16580EE3V1UD00 MEMO...
Page 970: ...970 Chapter 20 Port Functions User s Manual U16580EE3V1UD00...
Page 976: ...976 Chapter 22 Internal RAM Parity Check Function User s Manual U16580EE3V1UD00 MEMO...
Page 984: ...984 Chapter 23 On Chip Debug Function OCD User s Manual U16580EE3V1UD00 MEMO...
Page 1006: ...1006 Chapter 24 Flash Memory User s Manual U16580EE3V1UD00 MEMO...
Page 1036: ...1036 Chapter 27 Recommended Soldering Conditions User s Manual U16580EE3V1UD00 MEMO...
Page 1046: ...1046 Appendix A Index User s Manual U16580EE3V1UD00 MEMO...
Page 1052: ...1052 User s Manual U16580EE3V1UD00...
Page 1053: ......