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.

TM4C129XNCZAD: Internal RTC mode

Part Number: TM4C129XNCZAD
Other Parts Discussed in Thread: EK-TM4C1294XL

I want to use internal RTC mode of TM4C129XCNZAD instead of external RTC.

It is used for displaying current date time of system. What is the initialization code to make to work in simple RTC mode.

I don't  find the hibernate calander code for TM4C129XNCZAD in example code. If you have link please share

Regards,

Rajesh Varma

  • Hi,

      Please reference the hibernate calendar mode example in C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\dk-tm4c129x\hibernate. The example was developed for the DK EVM board. If you don't have the DK EVM board then you can just remove all code related to to the display. Another place for the hibernate calendar mode is C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\hibernate_calendar.

  • Dear Charles,

    Using hibernate example, I am able to generate Real Time Clock  from TM4C129XNCZAD  .

     I am using Hibernate mode (RTC Enabled)

    We have also connected VBAT=3.0(Coin battery)  and as per datasheet nominal current consumption is 1.29 microAmpere@25degree celcius.

    Following configuration 

    SysCtlPeripheralEnable(SYSCTL_PERIPH_HIBERNATE);
    HibernateEnableExpClk(ui32SysClock);
    // Enable RTC mode.
    HibernateRTCEnable();
    // Configure the hibernate module counter to 24-hour calendar mode.
    HibernateCounterMode(HIBERNATE_COUNTER_24HR);

    It will maintain the calendar like external RTC?

    Is any other or more configuration needed?

  •  I am using Hibernate mode (RTC Enabled)

    We have also connected VBAT=3.0(Coin battery)  and as per datasheet nominal current consumption is 1.29 microAmpere@25degree celcius.

    Hi,

      Glad that you got it working very quickly. 

    It will maintain the calendar like external RTC?

    Yes, the internal RTC has its own power domain supplied by the battery. It will maintain the calendar in hibernate mode. 

    Is any other or more configuration needed?

    Not I'm aware of since you have it working if you follow the example.

  • Dear Charles,

    Thanks for your reply.

    As already said that I was connected 3.0 V Coin battery on VBAT Pin and measured the current in series with battery  in power- off mode 

    it show 92.14 micro ampere and when switched on power on mode it show 1 microampere.

    Why it is  taking  so much 92.14 micro ampere? 

    Is any module off is required in code  so that it takes lesser current?

    In datasheet Hibernate mode(RTC enabled )system Clock=OFF is written  what is that?

    Please find our schematic also for refernce.

    RTC_Battery2.pdf

  • Hi,

    it show 92.14 micro ampere and when switched on power on mode it show 1 microampere.

    I suppose you meant to say you are measuring 92.14uA and you are expecting 1uA. Otherwise, It is not clear to me with your statement "and when switched on power on mode it show 1 microampere". 

      I have some doubt with your schematic. Please refer to the datasheet for hibernate mode using battery source. You leave the HIB open and therefore you are not disabling the power supplies to VDD. 

      

  • Dear Charles,

    We only want to use RTC functionality of the Controller, is it possible?

    As in our design we do not have any battery backup for our instrument, so that the instrument can gracefully enter in to Hibernation mode.

    Basically our instrument is an Energy meter running on mains power supply. When Mains supply is present the device is ON and when no power only RTC section should be ON . For that we have connected 3.0V coin battery @VBAT pin.

    As mention in you reply  we have not connected the HIB pin , as it is an out put pin which is generally connected to the Enable pin of the Regulator/Switch. In our design we are using LDO to convert 5.0 VDC to 3.3VDC to power up the controller. The LDO is not having any enable functionality.

    You are requested to guide us further. As mentioned earlier when in power condition we had monitored current drawn around 90 µA from 3.0DV coin battery. 

  • Hi, 

     Please bear in mind that the current consumption given in the table is under the assumption that VDD and VDDA are both 0V. Why don't you remove VDD and VDDA and only keep VBAT and remeasure it again and what do you get?

  • Dear Charles,

    As already mentioned that When mains AC supply is removed from our device and there is no other power backup for the instrument so directly

    when mains supply is removed both VDD and VDDA  becomes Zero.

    And 3.0 V DC coin battery is only connected to VBAT of the controller.

    So i don't understand what you want to say?

  • Hi,

      Thanks for the clarification. 

     Only when VDD is shut down or VDD<VBAT will the hibernate block switches to VBAT. This is why I wanted to make sure VDD is 0V.  

     Something to check on your side:

      - When in hibernate mode the rest of the device is shutdown and the nHIB signal should be asserted low. Can you probe HIB signal? 

      - I see in your schematic the nWAKE pin is tied low. This means you are forcing to wake up if you have configured the nWAKE pin other than RTC as a wake source. Can you confirm if you have configured the nWAKE pin as a wake source. The hibernation module can be programmed to use nWAKE, RTC or GPIO as a wake source. Therefore, it is important to make sure you are not measuring current when you are out of hibernation mode. 

      - Do you have all signals going to the MCU also driven 0V,  not just the VDD? Please see below datasheet note. If you have signals driven high to the MCU then you can backpower the device via the IO even though you remove the VDD supply. 

    7.3.8 Power Control Using HIB
    Important: The Hibernation Module requires special system implementation considerations when
    using HIB to control power, as it is intended to power-down all other sections of the
    microcontroller. All system signals and power supplies that connect to the chip must
    be driven to 0 V or powered down with the same regulator controlled by HIB.
    The Hibernation module controls power to the microcontroller through the use of the HIB pin which
    is intended to be connected to the enable signal of the external regulator(s) providing 3.3 V to the
    microcontroller and other circuits. When the HIB signal is asserted by the Hibernation module, the
    external regulator is turned off and no longer powers the microcontroller and any parts of the system
    that are powered by the regulator. The Hibernation module remains powered from the VBAT supply
    until a Wake event. Power to the microcontroller is restored by deasserting the HIB signal, which
    causes the external regulator to turn power back on to the chip.