Hi
In order to the silicon errata CPU40
Function : PC is corrupted when executing jump/conditional jump instruction that is followed by
instruction with PC as destination register or a data section
" For example, a conditional jump instruction followed by data section (0140h).
Ti example;
@0x8012 Loop DEC.W R6
@0x8014 DEC.W R7
@0x8016 JNZ Loop
@0x8018 Value1 DW 0140h
I would like to know if is correct the following procedure
loop:
bit.w #bit0,&test ; bit test
jnz loop
nop ; nop here ? "
program again:
......
loop1:
cmp.w #0AH,#0bH
jlo loop1
nop ;* nop here ?
jeq loop2
nop ;* nop here ?
jne loop3
nop ;* nop here ?
jc loop4
nop ;* nop here ?
jmp loopaa
nop ;* in this case need at the same nop instraction?
mova #loopbb,PC ;* this instruction similar to JUMP instruction
nop ;* in this case need here ?
loop2:
.........code
loop3:
.......code
OR
loop1:
nop
cmp.w #0AH,#0bH
jlo loop1
jeq loop2
jne loop3
jc loop4
jmp loopaa
mova #loopbb,PC ;* this instruction similar to JUMP instruction
loop2:
nop
.......code
loop3:
nop
....code
loop4:
nop
....code
loopaa:
nop
.... code
loopbb:
nop
...... code
About the compiler, Code composer studio if is set the errata CPU40 it should report the error
and this happen some times not always so I think is better if I put nop in all program
With this last version the program not runnig properly, and resets,
Furthermore the program have stop in one position without any breackpoint enable.
Put nop on all my program is a problem because have no enought space.
Need to be set something else to enable the control about CPU40 and othe CPU errata?

BEst Regards
Luigi