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.

CCS/MSP430G2553: Clock speed is different when debugging

Part Number: MSP430G2553

Tool/software: Code Composer Studio

Dear,

For a little project of mine i'm trying to configure I2C with my MSP430. In the beginning everything worked. But on  one day when I was trying to go further on the program I noticed that the I2C protocol were unusally slow. So I thought I made a mistake in my code. But it turns out that when I am not debugging my MSP430. The clock works just fine. As you can see on the picture (I have configured my clock speed to 16 MHz). But when I am debugging. The clock speed turns down drastically (as you can also see on the picture). In my code I haven't put any breakpoints in it, so that can't be a problem.

To sort things out I have tried an example code of TI itself. The example code is named: "msp430g2xx3_dco_calib.c". I have configured the clock speed to 16 MHz. But then again I have the exact same problem. (slow when debugging; fast when not debugging). Am I missing out something configured in CCS?

I really hope you can help me out on this problem.

Thank you in advance.

Erwin den Boer

Shown here above is the example code from TI itself

Shown here above is the clock frequency set to 16MHz (not debugging the MSP430)

shown here above is the frequency when I am debugging. (the code is just running in debugging mode. There are no breakpoints in my code)

  • I made (I think) the same change you did, and put it on a G2 (also a G2ET) Launchpad, and I see the same results whether the debugger is running or not. I'm not sure what you and I are doing differently.

    The first trace is from P1.4 (SMCLK) with the debugger running:

    This is after I disconnected the debugger:

  • Hi Erwin den Boer,

    If you are connecting the FET to the device in debug mode, the CPU is controlled by the JTAG and running at the JTAG clock speed. I think that's the reason for the slower speed you have seen.

    Best regards,

    Jovi He

  • Hello Jovi,

    Thank you for the response. I have found the cause of the problem. While I was trying out the delay function in my code I had turn on a clock which kept pace of the clock ticks of the MSP430. The clock was visible on the right down corner. By simply going to the left up corner and go to run>clock>disable I had managed to solve the problem.

    Thank you for your time.

    Erwin

  • Dear Bruce,

    While trying other things on Code Composer Studio i've managed to solve the issue. (as you can see on the detailed reply of mine on the same forum). Also I think you may have sent the same pictures instead of a different one. I hope that my reply is also your solution to the problem.

    Kind regards.

    Erwin

**Attention** This is a public forum