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.

tms320c6748 RTC module - scratch registers

Hi All

I am a bit confused about the RTC module's scratch registers which are general purpose registers.

i was trying to read form those registers after a power up sequence and i was expecting to see the reset value mentioned in the data sheet which is 0, but instead i get  a different values

the values i get are:

in scratch register 0 0x00000000.

in  scratch register 1 0x00000100.

in scratch register  2 0x00200400.

isn't the expected value after hardware reset is 0x00000000 ???

even if i unplug the device from any voltage supply and give it a few minute reset i see  those unexpected values.

1.has any one encountered such behavior running rtc module ???

2. do i need to call software reset prior to reading those registers?

  • Hi Alex,

    Thanks for your post.

    When the device is initially powered on, the RTC may issue spurious interrupt signals to the CPU, so, it needs a software reset. Please ensure in the code whether a software reset is performed on the RTC which shall be done by setting the SWRESET bit in the oscillator register (OSC). Also, the RTC requires three 32.768-kHz reference clocks to run before accessing RTC registers.

    The above details shall be available in the Section 26.2.10 (Reset considerations) in the C6748 TRM as below:

    http://www.ti.com/lit/ug/spruh79a/spruh79a.pdf

    Also, refer Section 26.3.19 for Oscillator register (OSC) since OSC register will be write protected after it is taken out of reset,

    Thanks & regards,
    Sivaraj K

    ------------------------------------------------------------------------------------------------------- 
    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • Hi,  Sivaraj K

     

    thanks for the replay.

    i have read the following sections. i am tryning to implement an indication for unintentional power down i am using an external watch battery as mentioned in section 26.2.3.3- power considerations i am writing a uniqe sequence to scratch0 and after removing all power supplies ( usb cable  and ex.battery)  i expect to see according to section 26.2.7, the writen value is supposed to be cleard, i know that i can can clear it using the software reset but then how would i indicate the power down. my moulde is based on the idea that after allpower rmoveal all scratch regisers are cleard, is this assmption  correct?

  • Alex,

    There is no hardware reset to the RTC module. After a SWRESET, the Scratch registers should be cleared.

    There is a Wiki article about using the sleep mode. Have you looked at it and the example code that comes with it? I have to admit I have not looked at the code, but I found the article and expect it should be helpful to you.

    You can search the TI Wiki Pages for "c6748 rtc" (no quotes) to find this article. Please let me know if you have trouble finding it.

    Regards,
    RandyP

  • Hi Randy,

    thanks for clearing out this subject for me.

    my rtc module works just as expected but only aftre a SWERSET.

    best regrads,

    Alex L.