
Enhanced Time Processing Unit (eTPU2)
MPC5644A Microcontroller Reference Manual, Rev. 6
918
Freescale Semiconductor
Field CCS/CCSV in microinstructions can force
no update
of all flags. Not all flags are updated in all
ALU operations: Overflow is updated only on addition and absolute value operations, Carry flag is
updated in most ALU operations, and only Zero and Negative are updated in all ALU operations.
ALU flags are never updated when microinstruction starts an MDU operation, regardless of CCS/CCSV,
but are updated normally afterwards, on ALU operations that are executed in parallel with an ongoing
MDU operation (MDU has its own flags).
NOTE
Operation size can be smaller than destination register. For example:
0x0001 (both 16-bit sources) stores 0x10000 in a 24-bit register
and sets Zero and Carry flags because operation size is 16 bits.
Carry Flag (C)
In an unsigned addition without shifting, Carry Flag is the ALU carry from bit 7 to 8, 15 to 16, or 23 to 24
on 8, 16 and 24-bit operation sizes respectively. In an unsigned subtraction without shifting, Carry Flag
represent the sign of ALU’s result considering operation size (Carry Flag equal to 0 means a negative
result).
Carry Flag definition is operation-dependent. The Carry flag in add/subtraction with Post-ALU shift is
defined in
. Find the definitions for other operations in the following sections.
Negative flag (N)
Negative flag indicates the sign of result based on the operation size, regardless of the operation
performed, as shown in
NOTE
The N flag may not reflect the sign of the value actually written into the
destination register, if it does not have the same size of the operation (see
Section 24.5.9.2.3, Flags sampling control
). This is always the case for
registers RAR (14 bits) and CHAN (5 bits).
Overflow (V)
Overflow is updated only on addition (with or without carry) and absolute value operations. In signed
operations, overflow flag indicates that the result of arithmetic operation (add or subtraction) can not be
represented by a word of the size of the operation. Overflow flag behavior for addition is defined in
. Overflow flag for Absolute operation is explained in
Section 24.5.8.2.8, Absolute value
Table 24-60. Negative (N) flag behavior
Operation size
Value
8 bits
N = result[7]
16 bits
N = result[15]
24 bits
N = result[23]
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...