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.

i want to access my system time to generate a timestamp.

Other Parts Discussed in Thread: MSP430FG6426, MSP430WARE

Tool/software: Code Composer Studio

i want to access my system time i.e the local time and generate timestamps based on certain input,like suppose i want to generate a timestamp(current system time) when ever my voltage at a certain pin is v volts.How can i do that using msp430fg6426?

  • Hi,

    I would recommend using the real time clock (RTC_B) module available on this device and using the seconds, hours, and minutes counts to generate a timestamp. There is an example in MSP430Ware showing how to properly setup the RTC_B module and how to read from these registers as well. Let me know if you have any further questions.

    Best regards, 
    Caleb Overbay

  • thankyou.

    What if i want to use with battery backup.Can you please help me with the software implementation of that.I tried the one that is present in the documentation,but i am not able to get the output.

  • Hi,

    Whatt example were you trying to use? To my knowledge, there isn't an example in MSP430Ware that shows how to use the RTC with the battery backup system. Also please be aware of the following from section 3.2 of the user's guide:

    If the backup-supplied subsystem is powered by the secondary supply VBAT, the access and control to modules located in the subsystem is restricted:

    • The data stored in the backup RAM is retained but cannot be accessed.
    • The RTC, if enabled, together with the 32-kHz crystal oscillator continue to operate but the time and date information cannot be accessed.
    • Changes to the LF crystal oscillator setting in the clock system do not take effect.

    This means, while the battery backup is being used, you cannot access the date and time information from the RTC, only that it will continue to operate accordingly. Also, section 3.2.1 of the user's guide describes how to gain access to this information once the device has switched back to main supply. 

    Best regards, 
    Caleb Overbay

**Attention** This is a public forum