
Enhanced Time Processing Unit (eTPU2)
MPC5644A Microcontroller Reference Manual, Rev. 6
922
Freescale Semiconductor
24.5.8.2.5
Set Bit / Clear bit operations
These operations set or clear the AS bit determined by BS[4:0]. If the bit number resolves to a value greater
than 23, no bit is set or cleared (i.e., result is equal to AS). On these operations CIN field is ignored and
BINV field inverts (bitwise NOT) BS. C and V flags are never updated for set/clear bit operations. These
operations
override
B-Source size to 8 bits.
set bit (BINV = 1):
result = AS | (1 << BS[4:0])
clear bit (BINV = 1):
result = AS & ~(1 << BS[4:0])
set bit (BINV = 0):
result = AS | (1 << (31 - BS[4:0]))
clear bit (BINV = 0):
result = AS & ~(1 << (31 - BS[4:0]))
24.5.8.2.6
Exchange bit
Exchange the AS bit determined by BS[4:0] with C flag. If the bit number resolves to a value greater than
23, no exchange is performed (i.e., result is equal to AS and C flag is not updated). This operation
overrides
BS size to 8 bits. On this operation, CIN field is ignored and BINV field inverts (bitwise NOT)
BS. V flag is never updated on exchange bit operation. C flag is always updated, regardless of CCSV,
unless BS[4:0] > 23.
Exchange Bit (BINV = 1):
if BS[4:0] <= 23
begin
temp_C_flag = AS[BS[4:0]]
if C_flag == 1
result = AS | (1 << BS[4:0])
else
result = AS & ~(1 << BS[4:0])
C_flag = temp_C_flag
end
Exchange Bit (BINV = 0):
if (31 - BS[4:0]) <= 23
begin
temp_C_flag = AS[31 - BS[4:0]]
if C_flag == 1
result = AS | (1 << (31 - BS[4:0]))
else
result = AS & ~(1 << (31 - BS[4:0]))
C_flag = temp_C_flag
end
Summary of Contents for MPC5644A
Page 2: ...MPC5644A Microcontroller Reference Manual Rev 6 2 Freescale Semiconductor...
Page 24: ...MPC5644A Microcontroller Reference Manual Rev 6 24 Freescale Semiconductor...
Page 26: ...MPC5644A Microcontroller Reference Manual Rev 6 26 Freescale Semiconductor...
Page 52: ...Introduction MPC5644A Microcontroller Reference Manual Rev 6 52 Freescale Semiconductor...
Page 56: ...Memory Map MPC5644A Microcontroller Reference Manual Rev 6 56 Freescale Semiconductor...
Page 1228: ...Decimation Filter MPC5644A Microcontroller Reference Manual Rev 6 1228 Freescale Semiconductor...
Page 1440: ...FlexCAN Module MPC5644A Microcontroller Reference Manual Rev 6 1440 Freescale Semiconductor...