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.

Incorrect checksum on CCE 3.1 running MSP430F2350

Other Parts Discussed in Thread: MSP430F2350

Hi All,

            Encountered a strange problem recently. Needed to check the checksum of the MSP430F2350 flash.

            Was having a issue with the checksum wherein the ckecksum calculated is 0x40 (decimal 64) more than the expected value.

            Further investigation lead me to the exact location this happened. This happened when the checksum calculation was done where _abort() function is placed in the flash.

Attached is the disassembly of abort.

        C$$EXIT, abort:
0xc150:   43 03                      NOP

Instead of adding 03 when C150 address was accessed, 43 was being added [ 43 was added once more when c151 address was used ].

Iam using CCE V3.1 and MSP430 USB debug interface along with eval board for doing the testing.

 

Following is the code snippet i used.

 

#define __MSP430F2350__
#include <msp430.h>
#include <intrinsics.h>
#include <stdio.h>

#pragma DATA_SECTION (CHECKSUM_VALUE,".newch");
unsigned long CHECKSUM_VALUE;

int main()
{

    unsigned long checksumm = 0;
    unsigned char* ptr = (unsigned char*)0xC000;
    unsigned int i = 1;
   
    WDTCTL  = WDTPW + WDTHOLD;    //STOP THE WATCHDOG FROM BARKING
   
    for(; i <= 16384;i++,ptr++)
    {
            unsigned char ucVal = 0;
            ucVal = *ptr;                               //this shows correct value @ c150 i,e 0x03 (\3)
            //checksumm += *ptr;
            checksumm += ucVal;          //ucVal is shown incorrectly as 0x43 or 'C'
            if(i%100 ==0)
             _nop();
           
    }
   
    return 0;
}

Has any one faced such/similar problem.?

I can even mail a print screen of the CCE to show this problem in more detail.

  • Hi,

    1. Can you see the issue on several devices? What is the exact device revision?
    2. Does this error occur when you leave the application free running in real-time (not using any profiling modes)? Reason I'm asking is there was a JTAG bug on older devices (JTAG14, on devices rev C and earlier) which could corrupt CPU registers in certain debugging scenarios.
    3. Can you post the screenshot you were talking about? You should be able to attach it to this thread via the "Options" tab as you write the description.

    Regards,
    Andreas

  •  I have only MSP430F2350 with me. So iam unable to check this on other devices.

     When i tried the same code with CCS V4.0.1.01001, it is working properly (even with the old debugger firmware and also with the new firmware).

     But i have attached the screen snapshot FYI.

    It would be good if it can be explained.

     

     

     

  • If you want to get to the root of this I would suggest you do some ASM-level debugging to see if you can tie the behavior to a specific assembler instruction (sequence), and post your disassembly code so that we can have a look at it. It might well be possible that what you were seeing was caused by an issue with an earlier version of code generation tools that since has been addressed.

    Regards,
    Andreas