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.

MSP430F6659 internal RTC Issue

Other Parts Discussed in Thread: MSP430F6659

Hi All,

we are using internal RTC in our project, microcontroller is msp430F6659

The below code is RTC initialization. after adding this code to our project.

Total code is not executing.if we observe in disassembly cursor is stooping at 0x3FFF address.

if comment this RTC code in our project code execution happening properly.

please give me your suggetion on this issue.


int Rtc_Init( void)
{

// BCD mode, RTC hold, enable RTC read ready interrupt
RTCCTL01 |= RTCRDYIE + RTCBCD + RTCHOLD;

RTCYEAR = 2012; // Year = 0x2011
RTCMON = 12; // Month = 0x06 = June
RTCDAY = 12; // Day = 0x22 = 22nd
RTCDOW = 05; // Day of week = 0x05 = Friday
RTCHOUR = 11; // Hour = 0x11
RTCMIN = 57; // Minute = 0x59
RTCSEC = 00; // Seconds = 0x45

RTCCTL01 &= ~(RTCHOLD); // Start RTC calendar mode

return 0;

}

Kindly help me for the same issue.

  • You enable the RTC ready interrupt. If you enable interrupts globally and don’t have an ISR to handle this one, the processor will jump into the void once the interrupt happens.

  • Hello Jens


    Thanks for your valuable response.

  • Hello Nilesh,

    I am planning to use msp430F6659 in one my project. As you already working on the controller can you please answer below query.

    Will RTC retain its value after reset? (assuming we will use rtc battery backup)

    Thanks & Regards,

    Pankaj 

  • A reset itself won’t change the RTC values (it will, however, reset the interrupt configuration and stop the RTC). A power loss on AUXVCC3, however, will reset them to random.
    If a pa power loss is detected and captured by the voltage supervisor, the MSP can prepare for the power loss (running from aux supply for some time) and lock the  RTC registers by explicitly entering LPM3.5. From which it will wake once the supply is back again (and with the RTC registers locked, the boot code won’t reset the RTC configuration, or rather, it will change the registers, but without effect, so you can change them back before unlocking)

**Attention** This is a public forum