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 Clock and Hibernation on CC3200: odd issue (conflicts of some sort)

Other Parts Discussed in Thread: CC3200, CC3200-LAUNCHXL, SYSBIOS

Dear all,

I am experiencing a few oddities with the RTC clock and CCS as well.

I need to use the RTC clock to know the local time after an hibernation, thus i used a template project to experience it first hand. The RTC works flawlessly so far. I can set the time, and get the increased value after the hibernation ends.

Then I include the same procedure in my working project, but every time the CC3200 wake up the RTC clock returns a number that actually matches the number of hybernation cycles with a minus sign on top of it (is that even a feature of some sort ??).

At this point I start stripping the code from the working project, to remove every feature that may cause a conflict. The issue remains.

After stripping the code, the working project is almost identical to the template project. The only difference is the "File search path" in the preferences.

Since the issue is still there, I remove a few entries from the path. The problem is apparently solved but when I put back the same entries, the issue does not show up. What is the meaning of that? If the libraries are not causing a conflict, why the issue kept popping out before I removed them?

If the cause is elsewhere, why did it keep popping out even though I removed the cause, and stopped only after I removed the path from the properties?

Is there some kind of cache in CCS?

And most of all why the hell the RTC keeps stop counting??

Thank you for your kind answers beforehand.

  • Apologies.

    I forgot to mention that the instruction I used to test the RTC together with hibernation are the following:

    unsigned long ulLocalTime;
    unsigned short usMSec;

    if (PRCMRTCInUseGet() == 0)
    {
    Report("RTC clock is not enabled. Enabling the RTC clock.\n");
    PRCMRTCInUseSet();
    PRCMRTCSet(0,0);
    }

    PRCMRTCGet(&ulLocalTime, &usMSec);

    Seconds_set(ulLocalTime);

    Report("Local time set to %d.\n", ulLocalTime );

    unsigned long ulCurrTime;
    // wait a short time for safety

    osi_Sleep(10000);

    PRCMRTCGet(&ulCurrTime, 0);
    Report("RTC time equal to %d.\n", ulCurrTime );
    ulCurrTime = Seconds_get();
    PRCMRTCSet(ulCurrTime, 0);
    Report("RTC time set to %d.\n", ulCurrTime );
    MAP_PRCMHibernateWakeupSourceEnable(PRCM_HIB_SLOW_CLK_CTR | PRCM_HIB_GPIO13);
    MAP_PRCMHibernateWakeUpGPIOSelect( PRCM_HIB_GPIO13, PRCM_HIB_RISE_EDGE);
    // MAP_UtilsDelay(8000000); // Todo: serve? check
    MAP_PRCMHibernateIntervalSet(32768*60); //1 min
    MAP_PRCMHibernateEnter();

    while(1) osi_Sleep(10000);

    This one above is the body of a task that checks the RTC time, and then puts the sistem in hibernation for a minute or so.
    The main task, on the other hand, is used to initialize the board and the uart terminal, no specific hw configuration is actually required.
  • John, Can the issue be reproducible on my setup w/ the above snippet? Since you mentioned the dependency on file search paths etc., I suggest you share the complete CCS project - I'd want to reproduce it on CC3200-LAUNCHXL to investigate it further.

    -/Praneet
  • I think so,

    I will strip the files that are not used just to lower the occupation and the I'll send you the code of both the project and the template.

    Thank you.

  • Hello again...

    Here you can find the project with the issue at hand. 

    If needed I can upload the project without the issue as well.

    Thank You.

    1563.Hibernate with RTC reset.zip

  • Hello there,

    in the following you can find a project where the RTC is working properly during Hibernate, and the time is restored at boot.

    Regards.

    2804.Hibernate with RTC working.zip

  • John,

    I've tried reproducing the issue on my platform w/ 'Hibernate with RTC reset.zip' but see no issues. Attaching the logs and modified project files. Only thing I changed in your project is the path variables (as per my local installation directories) and 'angelha.cfg' (If I use the one you shared, the execution wouldn't get past 'osi_Sleep(10000)' in 'network_task.c'). I've also linked to the libraries under CC3200-SDK (and not under 'Hibernate with RTC reset\Hibernate_RTC\libs')

    -/Praneet

    8540.E2E_515773_Logs_1.txt

    2620.Hibernate_With_RTC_Reset_E2E.zip

  • Hi Praneet,

    Thank you for your reply.

    I must admit that although the file you provided didn't work right away, it has been a precious hint, a very precious one indeed.

    Long story short, what my configuration file has been lacking is the following line:

    Clock.TimerProxy = xdc.useModule('ti.sysbios.family.arm.m3.Timer');

    Since I have find this out by tinkering, I am in need of some explanation to understand what's going on.

    Based on the forum, the right driver is "ti.sysbios.family.arm.cc32xx.Timer", but if I use that, the RTC does not work properly, and this is also mentioned in some cfg files I found in this forum.

    If I enter the wrong driver, namely "ti.sysbios.family.arm.m3.Timer", the RTC works properly, but I get these 2 warnings:

     - The specified Clock.TimerProxy (ti.sysbios.family.arm.m3.Timer) is not compatible with CC3200 sleep modes. The Power policy that can activate sleep modes has been automatically disabled.
    - ti.drivers.Power : The specified Clock.TimerProxy (ti.sysbios.family.arm.m3.Timer) is not compatible with CC3200 sleep modes. The Power policy that can activate sleep modes has been automatically disabled. 

    These warnings also appear if I enter the line:

    TIRTOS.usePower = false;

    Is it really a problem with the timer driver? Or could it be that the power policy actually cripples the RTC?

    Also how should I disable the policy to remove the warning?

    Thank you very much.

    Regards.

    John.

  • It would now be appropriate for TI-RTOS folks to comment - We'd reassign this thread to the right forum.

    -/Praneet
  • John,

    Can you tell me what version of TIRTOS or SYSBIOS are you using?
    There have been some changes in this area with some of the recent releases. Depending on if you want the TIRTOS power policy to be enabled or not....it may limit which Timer you can use. If you let me know what version you are on, I can attempt to sort out what you need to do.

    Judah
  • Hello judahvang,

    in the properties of the project it is named as TIRTOS for SimpleLink Wireless MCUs. The version number is 2.13.1.09.
    Thank you.
  • Hello,

    Did you ever figure out your problem?

    There have been lots of information we have found out since the release that you use.  We've also made lots of changes.  Is it possible that you can move to the latest TIRTOS release and see if you still have an issue?

    "Based on the forum, the right driver is "ti.sysbios.family.arm.cc32xx.Timer", but if I use that, the RTC does not work properly, and this is also mentioned in some cfg files I found in this forum."

    In the release that you are using, the "ti.sysbios.family.arm.cc32xx.Timer" is based upon the RTC clock.  This must be use if you plan on going into different sleep modes.  The other timer "ti.sysbios.family.arm.m3.Timer", is whats available on the ARM M3 cores, but this Timer loses power when going into different sleep modes.

  • I solved here, as you may recall, although the warning in ccs still remains, and I got no answer on that from TI

    e2e.ti.com/.../1878361