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.

MSP430FR2476: msp430fr2476 code composer Studio Silicon Errata CPU40

Part Number: MSP430FR2476


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 

  • Hey Luigi,

    Sorry about the delay.  Based on my understanding of the errata, you need the NOP immediately after the jump in memory, You don't need a nop to where the branch jumps to.  So like your first two examples, not your last example.  

    Are you writing the code in assembly or just writing it in C and using the MSP430 compiler?  If you are writing c code and using the complier, then it will automatically insert the require NOPs where needed as long as the errata flag is set as you indicated.  

    Thanks,

    JD

  • CPU40 specifies that the error occurs for values of 0X40 or 0X50 which happens in none of your examples. The 0XXX group of instructions includes: MOVA, CMPA, ADDA, SUBA, RRCM, RRAM, RLAM, RRUM. So one of those with the program counter as the destination. Not common operations on the program counter.

  • Hey JD

    thank you for your reply 

    I have write all in Assembler, so yuo mean that in assembler the compiler do not give allarm when reach the CPU40 error ? right because one time I had this error from the compiler, but only 1 time . 

    Thank you 

    Luigi  

**Attention** This is a public forum