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.

RTC not update after power cut off

Other Parts Discussed in Thread: MSP430F6779, MSP430F67791

Dear All,

I am using MSP430F6779 controller, In software - I enabled internal charger and It works perfectly, I check voltage on AUXVCC3 pin which is 3.3 volt during power on and internal charger enabled.

Also connecting 3 V battering to AUXVCC3 pin via diode. during power off condition I checked voltage on AUXVCC3 pin which is 2.9V supplied by battery.

Now my program running proper and update values of RTC during power on. But after switch off and on it, Its values go to reset.

any one has any ideas or suggestions

waiting for your reply.

Regards

Bhavdipsinh

  • Hi All Experts,

    From Datasheet of MSP430F6779, I got below information.

    Low-power mode 3.5 (LPM3.5)

    – Internal regulator disabled

    – No RAM retention, Backup RAM retained

    – I/O pad state retention

    – RTC clocked by low-frequency oscillator

    – Wakeup from RST/NMI, RTC_C events, Ports P1 and P2

    so In my program I am doing lots of other activities in active mode, So shall I need to switch my power mode to LPM3.5 mode when power cut down and RTC work on battery ?

    Also, After Power on, do controller automatic switch into active mode from LPM3.5 mode?

    waiting for your reply.

    Thanks & Regards

    Bhavdipsinh

  • Bhavdipsinh,

    For clarification on how the RTC_C module operates during LPM3.5 mode, please see the User Guide section 24.2.9 of the MSP430F6779. when in an LPM3.5 state, the MSP430 will not switch to active mode until an appropriate interrupt wakes up the MSP430 from LPM3.5. Please also see section 1.4.2 of the User Guide to find out more information on how to enter and exit out of LPM3.5 properly.

    Please also see the RTC_C code examples within MSPWare for this device. Example RTC_02 also provides an example for RTC_C with LPM3.5 for your convenience. To get tot hese examples, navigate to the TI Resource Explorer within CCS. Then navigate MSPWare > Devices > MSP430F5xx/6xx > Code Examples > MSP430F677x(1)A . You can also view MSPWare independently via download from ti.com.

    Regards,
    JH
  • Thanks Former Member 

    I have gone through documents for RTC_C and low power mode.

    Query: is it must to make on LPM3.5 mode during main supply off and RTC module powered by battery at AUXVCC3?

    thanks

    Bhavdipsinh

  • Dear All,

    waiting for reply.
    I would like to clarify that, I have tested my system as:

    1:case:. make internal charger for AUXVCC3 off, supply 2.9V using battery on AUXVCC3 pin and run program for RTC set value and read it with different time stem. Its updating perfectly. but when switch off system power and start it again.....RTC values reset to 00 and don't get updated value.

    2: case:. make internal charger for AUXVCC3 on, supply 2.9V using battery on AUXVCC3 pin and run program for RTC set value and read it with different time stem. Its updating perfectly. but when switch off system power and start it again.....RTC values reset to 00 and don't get updated value.

    3:case. make internal charger for AUXVCC3 on, supply 2.9V using battery on AUXVCC3 pin and run program for RTC set value and read it with different time stem, Its updating perfectly. then put controller in LPM3 mode, when switch off system power and start it again.....RTC values reset to 00 and don't get updated value.

    shall I missing some point at hardware or software side.

    Please guide me.

    Thanks & Regards
    Bhavdipsinh
  • Bhavdipsinh,

    I believe the following TI Design can help get the correct configuration of RTC_C , AUX Supply, and HW connections to achieve your desired result. it is a combination of these items in order to get RTC_C working properly in different situations. I'm not sure of your current HW setup, but with what you have shared so far, the software example, MSP430F6779_AUX_05.c seems to best fit your scenario.

    www.ti.com/.../TIDM-AUX-MODULE

    Regards,
    JH
  • Thanks Jace Hall (1875628),



    I checked every points for H/W and S/W, just come to know about my S/W flow which affected it.

    Actually I am configuring RTC via ZigBee(wireless) commands (own command list) which set RTC perfectly but after power off. I need to enable basic resisters of RTC which was I didn't So RTC module was running with battery and update values but I wasn't able to get it. So I put basic configuration and RTC enable function at starting of program.



    know its working perfectly.

    Thanks for your support.

    Regards

    Bhavdipsinh
  • Please, can you show the initialization code of RTC and do you passing the program to LMP mode?

  • Hi  

    You can find it in MSPWare example code. Let me know If you have any problem or error with it.

    Link for your reference: 

    http://dev.ti.com/tirex/#/Package/MSPWare?link=MSPWare

    Regards

    Bhavdipsinh

  • Thank you very much, but i saw this examples. I use msp430f67791 and I have a problem with updating RTC after power cut off. Here are my steps:

    1) On start up programm I initializate RTC(I just strart it)

        RTCCTL0_H = RTCKEY_H;                   // Unlock RTC_C module
        RTCCTL13 |= (RTCHOLD);                  // Start RTC calendar mode      
        RTCCTL13 &= ~(RTCHOLD);                  // Start RTC calendar mode
        RTCCTL0_H = 0;                          // Lock RTC_C module

    2) then I set RTC data

            RTCCTL0_H = RTCKEY_H;                   // Unlock RTC_C module
    
            ... set registers RTCSEC, RTCMIN etc.
    
            RTCCTL0_H = 0;                          // Lock RTC_C module

    3) next I put device to LPM3.5 and turn power off

                    // Enter LPM3.5
    		UCSCTL6 |= XT1OFF;                      // Turn off clock for LPMx.5 operation. ACLK will still
    		// remain active
    		PMMCTL0_H = PMMPW_H;                    // Open PMM Registers for write
    		PMMCTL0_L |= PMMREGOFF;                 // and set PMMREGOFF
    
    		//__disable_interrupt(); 
    		__bis_SR_register(LPM4_bits);     // Enter LPM3.5 mode with interrupts enabled
    		__no_operation();

    but after power on I have values of RTC registers(RTCSEC...) that were at power off moment.

    Please, tell me if you know, what I do wrong

  • Hi ,

    From your code, Please Confirm below points.

    Have you connect external battery 3V or 3.3V at AUX3 pin of controller as per guide?
    Have you enable charger in your code ( FYI: AUX3CHCTL = AUXCHKEY + AUXCHEN + AUXCHC_1 + AUXCHV_1;) ?

    Have you enable RTC time event ?

    In your first Step:
    point 2 and 3 for RTCHOLD: It should be enable before set your parameters in RTC then clear it.

    Please go through proper example code and RTC config in User guide which makes more clear.

    Regards
    Bhavdipsinh
  • Yea, I connect 3V battery to AUX3

    I use this example 

    and I got good result  - RTC work without dvcc supply, but I found new problem, I describe it at several topic - 

    MSP430f67791 RTC not count after power cut off - MSP low-power microcontroller forum - MSP low-power...

    e2e.ti.com
    Other Parts Discussed in Thread: MSP430F6779A , MSP430F67791A , MSP430F67791 Hi All, I have a similar problem, that was in e2e.ti.com/.../1728640 post, but my
     Please look it, thank you

**Attention** This is a public forum