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.

MSP430F5510: MSP430F5510 RTC doesn't work.

Part Number: MSP430F5510

Dear All,

I have designed a PCB that has a XT1 external 32.768KHz crystal attached across XIN & XOUT.

I am trying to configure the RTC_A and to toggle P1.1 and P1.2  output every minute in software.

But RTC doesn't work. What's wrong?

Here is my code;

 #include <msp430f5510.h>

 #pragma vector = RTC_VECTOR      //RTC interrupt service

 __interrupt void TOG_min(void)

 {  

    if(RTCTEVIFG == 1) 

    {

       P1OUT ^= 0x06;

    }

 }



int main(void)

{

  WDTCTL = WDTPW | WDTHOLD;



  P1SEL &=~(0x06);

  P1DIR |= (BIT1 + BIT2);

  P1OUT |= 0x06;

  P5SEL = 0x30;

  P5DIR |= 0x20;



  RTCCTL0 |= (RTCTEVIE + RTCRDYIFG);

  RTCCTL1 |= (RTCBCD + RTCHOLD +RTCMODE + RTCSSEL_ACLK + RTCTEV_0);



  RTCYEARH = 0x20;

  RTCYEARL = 0x22;

  RTCMON = 0x12;

  RTCDAY = 0x05;

  RTCDOW = 0x00;

  RTCHOUR = 0x10;

  RTCMIN = 0x01;

  RTCSEC = 0x01;



  RTCCTL1 &= ~RTCHOLD;

  __bis_SR_register(LPM3_bits + GIE);



 while(1);

}

**Attention** This is a public forum