This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C1294KCPDT: How to set the V bit in xPSR register

Part Number: TM4C1294KCPDT


Hi everyone:

I'm doing some design for CPU function test (the MCU is TM4C1294KCPDT), one of them is xPSR register test. 

DB1 EQU 0x00
_DB1 EQU 0xFF

DB2 EQU 0x55
_DB2 EQU 0xAA

The following code could set N bit in xPSR

MOVS R0, #DB1
CMP R0, #_DB1
BPL Check_Error
BEQ Check_Pass

The following code could set Z bit in xPSR

MOVS R0, #DB1
CMP R0, #DB1
BGT Check_Error
BEQ Check_Pass

The following code could set C bit in xPSR

MOVS R0, #DB1
CMN R0, #DB1
MOVS R0, #DB2
CMP R0, #DB2
BCC Check_Error
BEQ Check_Pass

but I have no idea how to set the V bit, the V bit means overflow flag

I use 0x7f + 0x1 =  to produce carry bit, but V bit  still remains 0.

It is very kind of you-all if you have any ideas, thank u.