
R01UH0336EJ0102 Rev.1.02
Page 1059 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 20 CAN Controller (FCN)
20.4 Bit Set/Clear Functions
The FCN control registers include registers whose bits can be set or cleared
via the CPU and via the CAN controller. These register bits cannot be changed
directly by the CPU by any bit manipulation instructions, such as SET1, CLR1,
and NOT1. Instead, a special bit-set/bit-clear mechanism is used.
All registers where bit manipulation operations are prohibited are organized in
such a way that all bits allowed for changing by the CPU are located in the
lower byte (RWx in the register layout below), while in the upper byte either no
or read-only information is located (ROx in the register layout below).
The registers can be read in the usual way getting all 16 data bits in their
current setting, as described in the register description.
For setting or clearing any of the lower 8 bits, the following mechanism is
implemented:
When writing 16-bit data to the register address,
Bit clear
• Each of the lower 8 data bits (CLx in the register layout below) indicates
whether the corresponding register bit RWx should be
– cleared, i.e. set to 0: if CLx = 1, the corresponding RWx is cleared to 0
– remain unchanged: if CLx = 0, the corresponding RWx does not change
Bit set
• Each of the upper 8 data bits (SEx in the register layout below) indicates
whether the corresponding register bit should be
– set, i.e. set to 1: if SEx = 1, the corresponding RWx is set to 1
– remain unchanged: if SEx = 0, the corresponding RWx does not change
Register layout for read access:
Register layout for write access:
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
RO7
RO6
RO5
RO4
RO3
RO2
RO1
RO0 RW7 RW6 RW5 RW4 RW3
RW2
RW1
RW0
Changing by the CPU not possible
Bits for CPU manipulation via SE7 to SE0 and CL7 to CL0
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
SE7
SE6
SE5
SE4
SE3
SE2
SE1
SE0
CL7
CL6
CL5
CL4
CL3
CL2
CL1
CL0
SEx = 1 sets the corresponding RW7 to RW0
CLx = 1 clears the corresponding RW7 to RW0