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/MSP430F5359: no debug information available

Expert 1165 points
Part Number: MSP430F5359

Tool/software: Code Composer Studio

Break at address XXXX with no debug information available, or outside of program code. what does this mean. at what point of code this happening?

  • It just means that there was an exception of some sort outside your program. You need to figure out how you got there.

    Calling through a null function pointer and stack overflow/corruption are easy ways to do this. There aren't many explicit clues, but one can often guess from context.

    What is XXXX? Did the debugger show you any disassembly? Does the stack display (top left) suggest anything?
  • Hi,

    Add some advice to solve this problem.
    First choice: Use break point to find the location of error code in debug mode.
    Second choice: Run the code step by step in debug mode.

    The aim is to find the location where the code jump to address XXXX.


  • My first guess is stack corruption. As Eason says, the way to debug this is to step through the code. The stack trace (top left window) can speed this (somewhat tedious) process up considerably.

    Alternatively (or additionally) if your code isn't very big you can post it and maybe someone here can spot something.
  • the code is large,  if the problem continues i'll attach the zip file.  but whenever i call following function the problem occurs

    #include "msp430.h"
    #include "GPIO.h"
    #include "Airpump.h"
    #include "Membrane_LED.h"
    //  Airpump- Timer_B, PWM TB1-1, Up Mode, DCO SMCLK
    //  Description: This program generates four PWM outputs on P4.1 using
    //  Timer_B configured for up mode. The value in CCR0 2000 in PUMPPWM_CLK() function
    //  defines the PWM period as 2KHz and the values in CCR1 and CCR2 the PWM duty cycles. Using ~1.045MHz
    //  SMCLK as TBCLK, the timer period is ~2000us with a changing duty cycle with every button pressed on P4.1
    //  ACLK = n/a, SMCLK = MCLK = TBCLK = default DCO ~1.045MHz.
    //                MSP430F5359
    //            -------------------
    //        /|\|                   |
    //         | |                   |
    //         --|RST                |
    //           |                   |
    //           |         P4.1/TB4.1|--> CCR1 - 25% PWM, 50% PWM, 75% PWM, 100% PWM
    //           |                   |
    //   K. Adhikari
    //   Kemp Meek Manu.
    //  @param setting from airpump switch pressed by user is passed to Airpumpbuttonpressed
    //  @return none
    void Airpump(unsigned int Airpumpbuttonpressed)
        switch (Airpumpbuttonpressed)
        case 0:                           //AIRPUMP is OFF.
            Ap_MEMBRANE_LED(0);           //Turn off the LED indicator
            TBCCR1 = 0;                   //CCR1 duty cycle zero
            P4SEL &= ~BIT1;               //Set P4.1 SEL for GPIO
        case 1:                           //AIRPUMP is at setting 1
            Ap_MEMBRANE_LED(1);           //Turn ON the Airpump LED indicator 1
            P4SEL |= BIT1;                //Set P4.1. SEL
            TBCCR1 = 1000;                //CCR1 duty cycle = 1000/2000
                                          //The period in microseconds that the power is ON.
                                          //It's translates to a 25% duty cycle.
                                          //Although the duty cycle is not equal to 25%, we consider using this as the lowest speed and
                                          //equivalent to 25% from our design test, similar applies for the upcoming cases 2 and 3.
        case 2:                           //AIRPUMP is at setting 2
            Ap_MEMBRANE_LED(2);           //Turn ON the Airpump LED indicator 2
            P4SEL |= BIT1;                //Set P4.1. SEL
            TBCCR1 = 1333;                //CCR1 duty cycle = 1333/2000
                                          //The period in microseconds that the power is ON.
                                          //It's translates to a 50% duty cycle.
        case 3:                          //AIRPUMP is at setting 3
            Ap_MEMBRANE_LED(3);          //Turn ON the Airpump LED indicator 3
            P4SEL |= BIT1;               //Set P4.1. SEL
            TBCCR1 = 1777;               //CCR1 duty cycle = 1777/2000
                                         //The period in microseconds that the power is ON.
                                         //It's translates to a 75% duty cycle.
        case 4:                          //AIRPUMP is at setting 4
            Ap_MEMBRANE_LED(4);          //Turn ON the Airpump LED indicator 4
            P4SEL |= BIT1;               //Set P4.1. SEL
            TBCCR1 = 2000;               //CCR1 duty cycle = 2000/2000
                                         //The period in microseconds that the power is ON.
                                         //It's translates to a 100% duty cycle.


  • Hi Kary,

    1. Can you run the code step by step when it enter this function? Please find out after which line it runs to, it jumps to 0xc0016.
    2. Can you post the code of Ap_MEMBRANE_LED()?

  • Looks pretty innocent. Is there anything of note in Ap_MEMBRANE_LED()?

    What happens if you step through it?
  • i am passing array to the function, when i'm running other function the interrupt works fine, but when use this function the interrupt is not working, it gets stuck in ISR
  • This function doesn't expect/accept an array, rather an "unsigned". I think the compiler would have caught that.

    I also don't see any ISR here.
  • i'm passing a single value of array like sw[0], the ISR was in different code which increases the counter every time button is pressed and stores it an array.
  • What do you see when you step through this function?
  • void Init_FLL_Settle(uint16_t fsystem, uint16_t ratio)
        volatile uint16_t x = ratio * 32;
        Init_FLL(fsystem, ratio);
        while (x--){
    void Init_FLL(uint16_t fsystem, uint16_t ratio)
        uint16_t d, dco_div_bits;
        uint16_t mode = 0;
        // Save actual state of FLL loop control, then disable it. This is needed to
        // prevent the FLL from acting as we are making fundamental modifications to
        // the clock setup.
        uint16_t srRegisterState = __get_SR_register() & SCG0;
        d = ratio;
        dco_div_bits = FLLD__2;                                     // Have at least a divider of 2
        if (fsystem > 16000){
            d >>= 1;
            mode = 1;
        else {
            fsystem <<= 1;                                          // fsystem = fsystem * 2
        while (d > 512){
            dco_div_bits = dco_div_bits + FLLD0;                    // Set next higher div level
            d >>= 1;
        __bis_SR_register(SCG0);                                    // Disable FLL
        UCSCTL0 = 0x0000;                                           // Set DCO to lowest Tap
        UCSCTL2 &= ~(0x03FF);                                       // Reset FN bits
        UCSCTL2 = dco_div_bits | (d - 1);
        if (fsystem <= 630)                                         //           fsystem < 0.63MHz
            UCSCTL1 = DCORSEL_0;
        else if (fsystem <  1250)                                   // 0.63MHz < fsystem < 1.25MHz
            UCSCTL1 = DCORSEL_1;
        else if (fsystem <  2500)                                   // 1.25MHz < fsystem <  2.5MHz
            UCSCTL1 = DCORSEL_2;
        else if (fsystem <  5000)                                   // 2.5MHz  < fsystem <    5MHz
            UCSCTL1 = DCORSEL_3;
        else if (fsystem <  10000)                                  // 5MHz    < fsystem <   10MHz
            UCSCTL1 = DCORSEL_4;
        else if (fsystem <  20000)                                  // 10MHz   < fsystem <   20MHz
            UCSCTL1 = DCORSEL_5;
        else if (fsystem <  40000)                                  // 20MHz   < fsystem <   40MHz
            UCSCTL1 = DCORSEL_6;
            UCSCTL1 = DCORSEL_7;
        __bic_SR_register(SCG0);                                    // Re-enable FLL
        while (UCSCTL7 & DCOFFG) {                                  // Check DCO fault flag
            UCSCTL7 &= ~DCOFFG;                                     // Clear DCO fault flag
            // Clear the global fault flag. In case the DCO caused the global fault flag to get
            // set this will clear the global error condition. If any error condition persists,
            // global flag will get again.
            SFRIFG1 &= ~OFIFG;
        __bis_SR_register(srRegisterState);                         // Restore previous SCG0
        if (mode == 1) {                                            // fsystem > 16000
            SELECT_MCLK_SMCLK(SELM__DCOCLK + SELS__DCOCLK);         // Select DCOCLK
        else {

    When i did the single step there nothing wrong, the function was working as it should but when i stopped the code i  found the problem. whenever i call  "Init_FLL_Settle(16000, 488); " in the main function the problem occurs I don't know why.

  • It looks like you're setting MCLK to 16MHz. Did you set PMMCOREV to 2 or 3? [See also data sheet (SLAS700d) Fig. 5-1 and Example (SLAC539h) msp430f665x_ucs_03.c]
  • no i haven't set PMMCOREV.
  • If you look at that Example I mentioned, there's a function called SetVCore. It looks as though you can probably just paste it into your program and call it like "SetVCore(3)".

    I haven't tried this with the F5 series, but I did once accidentally run an F2 device faster than its Vcore (Vcc back in those days) would allow. It didn't just stop. Rather, I saw a number of "remarkable" symptoms -- random branches, changing register bits, and breakpoints where none were set. I suspect analogous things can happen on the F5.
  • Hi Kary,

    I am a little confused about your problem. Is it breaking at address XXXX or geting stuck in ISR?
    I am also confused about this function. Is it Airpump() or Ap_MEMBRANE_LED()

    My advice:
    1. Check the optimization level, and close it (turn to off).
    2. Post your code, it may be more clear.

  • Similar things are happening to my code when i call FLL function, I called PMM_setVCore(3) function from msp430f5359 drivers library, still the program function is not working well.
  • The problem is not program code its when its when i call UCS_initFLLSettle(16000, 488) function from msp430f5359 drivers library.
  • #include "msp430.h"
    #include "UserExperience_F54xxA.h"
    #include "audio.h"
    #include "ucs.h"
    #include "pmm.h"
    ///--Calibration constants and user configuration values stored in INFOB Flash--
    // On the MSP430F5359 this memory section is 128B long and ranges from 00197Fh to 001900h
    #    pragma DATA_SECTION(firstAudioByte, ".infoB");
    #    pragma DATA_ALIGN(firstAudioByte, 2);
    unsigned long firstAudioByte;
    #    pragma DATA_SECTION(lastAudioByte, ".infoB");
    #    pragma DATA_ALIGN(lastAudioByte, 2);
    unsigned long lastAudioByte;
    unsigned int Sw;
    void Airpump(unsigned int Airpumpbuttonpressed)
        if (Airpumpbuttonpressed == 1)
            P4SEL |= BIT1;
            TBCCR1 = 1333; //The period in microseconds that the power is ON. It's half the time, which translates to a 25% duty cycle.
        else if (Airpumpbuttonpressed == 2)
            P4SEL |= BIT1;
            TBCCR1 = 1555; //The period in microseconds that the power is ON. It's half the time, which translates to a 50% duty cycle.
        else if (Airpumpbuttonpressed == 3)
            P4SEL |= BIT1;
            TBCCR1 = 1777; //The period in microseconds that the power is ON. It's half the time, which translates to a 75% duty cycle.
        else if (Airpumpbuttonpressed == 4)
            P4SEL |= BIT1;
            TBCCR1 = 2000;
        { //  TA0CCR1 = 0//The period in microseconds that the power is ON. It's half the time, which translates to a 100% duty cycle.
            TBCCR1 = 0;
            P4SEL &= ~BIT1;
            P4OUT &= ~BIT1;
    void PWMCLK(void)
        TBCCR0 = 2000;
        TBCCTL1 = OUTMOD_7 | CLLD_1;            //AIRPUMP
        TBCTL = TBSSEL_2 | MC_1;         // ACLK, upmode, clear TBR
    void ButtonsInterruptEnable(unsigned char buttonIntEnableMask)
        P3OUT &= 0x00;               // Shut down everything
        P3DIR &= 0x00;
        P3DIR &= ~buttonIntEnableMask; // Set button pin as an input pin
        P3REN |= buttonIntEnableMask; // Enable pull up resistor for button to keep pin high until pressed
        P3OUT |= buttonIntEnableMask; // Set pull up resistor on for button
        P3IE |= buttonIntEnableMask; // Enable interrupts on port 3 for the button
        P3IES |= ~buttonIntEnableMask; // Enable Interrupt to trigger on the falling edge (high (unpressed) to low (pressed) transition)
        P3IFG &= ~buttonIntEnableMask; // Clear the interrupt flag for the button
    void UserExperience(void)
    //Initialize clock and peripherals
        UCS_initFLLSettle(16000, 488);
        while (1)                               // main loop
    #pragma vector=PORT3_VECTOR
    void Port3_ISR(void)
        switch (__even_in_range(P3IV, 0x10))
        case 0x00:  //None
        case 0x02: //Pin0
        case 0x04:
        case 0x06:
            //Fix color
        case 0x08:
            //Pin 3
        case 0x0A:
            if (Sw < 4)
                Sw = 0;
            P3IFG = ~BIT4;
        case 0x0C:
        case 0x0E:
        case 0x10:

    I need FLL for audio function. The audio is working fine but whenever i try to integrate airpump function, the code functions erratically. I just posted the small piece of code which i'm working for troubleshooting. userexperience function is called  in main function. here is the attached code.

  • having crystal oscillator in the circuit matters or not? because i don't have one
  • > UCS_initFLLSettle(16000, 488);
    > PMM_setVCore(PMMCOREV_3);
    Based on the Example , I think you need to increase VCore before you speed up the clock. I suggest you reverse the order of these two statements.
  • i figured it out from the MSP430 drivers library user's guide and swapped the position. still the program is stuck. If i set a break point for eg. at interrupt and run then it works fine, if i don't then it's simply stuck 


  • I figured that  the crystal (absence) failover to REFOCLK would just happen if there's no crystal, but User Guide (SLAU208q) Sec 5.2 makes a distinction between dedicated XIN/XOUT pins (your case) and shared XIN/XOUT pins (the case I'm familiar with).

    Try adding these lines some time before calling Init_FLL. This is a guess, but using REFOCLK for the FLL is what you want, so it won't hurt.

    UCSCTL3 |= SELREF__REFOCLK;  // Insist on REFOCLK, not XT1, for FLL.
    UCSCTL4 |= SELA__REFOCLK;    // The same for ACLK, leaving no users of XT1.


    I added this function, and it worked out. thank you so much for all your help.

**Attention** This is a public forum