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.

MSP430F5659 Fails to boot without programming pod and CCS debug

Other Parts Discussed in Thread: MSP430F5659

MSP430F5659 on a custom design. CCS 5.5.0 and MSP-FET430UIF programming pod.  Debugging works fine starting from CCS.

Once code is downloaded, I unplug the pod, cycle power, and no joy. Circuitry briefly comes up (LED's on board show that ports go live, at least for a few microseconds).

LED indicators used to flag the status through the early stages of code startup (initialize registers, control other hardware, etc.  All work as expected as long as Debug & 430UIF run the show.

I do disable WDT as first executable instruction after main().

    WDTCTL = WDTPW + WDTHOLD;

Tried the suggestions I reviewed on the forum for handling WDT at pre-initialization stage:

_system_pre_init(void)

{

   WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer

return 1;

}

This hasn't resolved the issue.

The code is fairly large at this point, about 30K.  I don't have alot of global variables - I use about 12 Global pointers that I malloc into existence in the code, so initialization should be minimal.

Appreciate any ideas, and I'll post my results.

Robert

  • Do you clear the oscillator fault flags? Program starts with fault flags set.

  • Yes, Here's the initialization I have: (below)

    I've notice that the problem seems to only occur when the unit is powered totally off, then back on.

    If I keep power on, unplug the FET430UIF, and simply cause a reset (~RST to GND), the unit resets, and goes on its merry way.

    Its when I power it down (no pod connected), then bring power back up that I have the issue.

    There is a small switching pwr supply on board, driven by a lab supply.

    So, I suspect that perhaps the power is fluctuating and causing something to hang - or even re-set the flags you show above.  (Or some others).

    Just a thought.  I'm still hunting.

    Thanks for the ideas.

     SFRIE1_L = 0x0000;
     SFRIE1_H = 0x0000;
     SFRRPCR_L = 0x0000;
     SYSCTL   = 0x0000;      /* System control */

     while(BAKCTL & LOCKIO) BAKCTL &= ~(LOCKIO); // Unlock XT1 pins

     UCSCTL6 &= ~(XT1OFF);    // XT1 On
     UCSCTL6 |= XCAP_3;    // Internal load cap

    // Loop until XT1 fault flag is cleared
     do
     {
      UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + DCOFFG); // Clear XT2,XT1,DCO fault
      SFRIFG1 &= ~OFIFG;    // Clear fault flags
     }
     while (SFRIFG1 & OFIFG);   // Test oscillator fault flag

     UCSCTL6 &= ~(XT1DRIVE_3);
     UCSCTL4 |= SELA_0;

     UCSCTL0  = 0x0000;   /* UCS Control Register 0 */

    //Initialize LFXT1
     if ((UCSCTL6 & XT1DRIVE_3) != XT1DRIVE_3) UCSCTL6_L |= XT1DRIVE1_L + XT1DRIVE0_L;
     UCSCTL6 &= ~(XTS + XCAP_0 + XT1BYPASS);     //Enable LF mode and clear xcap and bypass
     UCSCTL6 |= XCAP_3;

     while (UCSCTL7 & XT1LFOFFG)
     {
      UCSCTL7 &= ~(XT1LFOFFG); //Clear OSC fault Flags
      SFRIFG1 &= ~OFIFG;  //Clear OFIFG fault flag
     }

     UCSCTL6 = ( UCSCTL6 &  ~(XT1DRIVE_3) ) | (XT1DRIVE_3); //set requested Drive mode
     UCSCTL6 &= ~XT1OFF;     //Switch ON XT1 oscillator

    // MCLK and SMCLK to 1.048576 MHz and fDCO = 2.097152 MHz
    // Timer 0 A0
     TA0CTL =  TACLR;  // Timer0_A5 Control: OFF, NO INTERRUPT, CLEAR INTERRUPT FLAG, CLEAR TA0R register
     TA0CCR0  = 2047;  // (Note Value is this +1.  See SLAU208M doc )
     TA0CCTL0 = CCIE;  // Enable Interrupt on CCR match
     TA0CTL = TASSEL__SMCLK | MC__UP | ID__1 ; // Timer0_A5 Control: SMCLK, OFF, NO INTERRUPT, CLEAR INTERRUPT FLAG

     ==========================================

     

  • And what about something simple, like trying P1.0 blink example, just to be sure about supply.


    I have MSP430F5659 board with external 3.3V supply and it's working OK (just using it at the moment for testing my sbw+ flasher).

**Attention** This is a public forum