
BAT32G1x9 user manual | Chapter 22 CAN control
884 / 1149
Rev.1.02
22.6 Bit setting/clear function
CAN control registers include registers whose bits can be set or cleared through the CPU and CAN
interfaces.
If the following registers are written directly, an operation error occurs. Do not write any value directly
through bitwise operations, read/modify/write, or directly write to the target value.
•
CAN Global Control Register (CnGMCTRL
).
•
CAN Global Automatic Block Transfer Control Register
(CnGMABT
).
•
CAN Module Control Register (CnCTRL
).
•
CAN Module Interrupt Enable Register
(CnIE
).
•
CAN Module Interrupt Interrupt Status Register
(CnINTS
).
•
CAN module receives the History List Register
(CnRGPT
).
•
CAN module sends the History List Register
(CnTGPT
).
•
CAN Module Timestamp Register
(CnTS
).
•
CAN Message Control Register
(CnMCTRLm
).
Remark:
m=0 to 15 BAT32G139: n=0.1 BAT32G179: n=0,1,2
All 16 bits in the above registers can be read by common methods. Use the procedure described in
Figure22-23to set or clear the lower 8 bits in these registers.
The setting or clearance of the lower 8 bits in the above register is performed in conjunction with the
higher 8 bits (see 16 bits of data after the write operation in Figure22-24). Figure22-23shows the value of the
set or clear bit in relation to the set/clear/no change operation in the corresponding register.
Figure22-23. Bit setup/clearing operation example
Register current value
Write the value
The register value after
writing
0
0
0
0
0
0
0
0
1
1
0
1
0
0
0
1
0
0
0
0
1
0
1
1
1
1
0
1
1
0
0
0
set 0
0
0
0
1
0
1
1
clear 1
1
0
1
1
0
0
0
B
it s
ta
tu
s
p
u
rg
e
p
u
rg
e
N
o
c
h
a
n
g
e
s
p
u
rg
e
N
o
c
h
a
n
g
e
s
N
o
c
h
a
n
g
e
s
S
e
t u
p
S
e
t u
p
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1