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.

Strange thing: R10 register's value is modified after this instruction "inc.b R14"

Other Parts Discussed in Thread: MSP430F417

Hi expert,

A strange problem happened to me: I use IAR develop C program for MSP430F417 MCU, a problem happened, and I checked the Disassembly code. Then, I found that the R10 register's value is modified after this instruction "inc.b R14". Shown as bellow:

(R14 stored the first parameter of a function: void dsStoreData( uint8_t* destination, uint8_t* data, uint8_t size ))

figure1: the disassembly window:

 

figure 2: before run the "inc.b R14" instruction, (stopped on this instrunction)

 

 

figure 3: after pressing "F11"(step in), the PC was not changed, but R14 changed, and R10 was also changed

 

  • The assembly code around your breakpoint would be interesting.

    By itself the mentioned assembly instruction won't alter R10, but only R14 (or else almost no program would ever work).

  • I'm not sure about the IAR debuggers behaviour, but in case of CCS the step into will step a complete C code line, and if it's a function call then it will step into that function.

    This might turn out to be quite a lot assembler statements which are stepped over to get to the next C code line - and maybe you are not seeing what you would expect.

    On CCS there is an additional button for assembly single stepping (in the disassembly view) for fine control.

    Only a guess into the blue. 

**Attention** This is a public forum