Other Parts Discussed in Thread: TMS320C28346, TMS320F28027, TMS320F28335
Hello fellow coders,
Today I was debugging my code on TMS320C28346 mcu and found strange behavior while inserting (hardware breakpoints) to my code. It seems that the cpu does not execute the instruction if it stops to a breakpoint at the same location.
I have attached minimum working example from the problem. It is basically the standard CodeStartBranch.asm with few lines of additional code. The added few lines are:
c_int00: 00a008: D008 MOVB XAR0, #0x8 00a009: D00A MOVB XAR0, #0xa 00a00a: 7700 NOP
As the cpu executes the code, I would expect that there is 0x0000000A stored to the XAR0 register. However, if you do the following:
1. Put a breakpoint (software or hardware) to address 0x00A009
2. Let the debugger stop the cpu in address 0x00A009
3. Step the 'MOVB XAR0, #0xA' instruction
4. XAR0 register will show value 0x00000008
If I put breakpoint only to address 0x00A00A and run the code, the XAR0 register will show 0x0000000A.
Is my debugger configuration screwed up? This basically renders debugger unusable if it alters the behavior I am trying to observe.
My debugger is XDS100v2 and version of my compiler tools is TI v6.1.0.