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.

CC3200 RTC doubt

Other Parts Discussed in Thread: CC3200, CC3200SDK

Hey guys I am using CC3200 launchpad I need to use the RTC but couldn't find any examples or any reference related to it can anybody guide me.In previous controller our company used the RTC module in there had day,month,year register in there how does this work  ?

  • Hi,


    RTC usage is described SimpleLink API programmers guide (CC3200SDK_1.2.0\cc3200-sdk\docs\simplelink_api\). In brief:

    Setting device time and date example:
    SlDateTime_t dateTime= {0};
    dateTime.sl_tm_day =   (_u32)23;          // Day of month (DD format) range 1-31
    dateTime.sl_tm_mon =   (_u32)6;           // Month (MM format) in the range of 1-12 
    dateTime.sl_tm_year =  (_u32)2014;        // Year (YYYY format) 
    dateTime.sl_tm_hour =  (_u32)17;          // Hours in the range of 0-23
    dateTime.sl_tm_min =   (_u32)55;          // Minutes in the range of 0-59
    dateTime.sl_tm_sec =   (_u32)22;          // Seconds in the range of  0-59
    sl_DevSet(SL_DEVICE_GENERAL_CONFIGURATION,
              SL_DEVICE_GENERAL_CONFIGURATION_DATE_TIME,
              sizeof(SlDateTime_t),
              (_u8 *)(&dateTime));
    

    Getting Device time and date example:
    SlDateTime_t dateTime =  {0};  
    _i8 configLen = sizeof(SlDateTime_t); 
    _i8 configOpt = SL_DEVICE_GENERAL_CONFIGURATION_DATE_TIME;
    sl_DevGet(SL_DEVICE_GENERAL_CONFIGURATION,&configOpt, &configLen,(_u8 *)(&dateTime)); 
    printf("Day %d,Mon %d,Year %d,Hour %,Min %d,Sec %d\n",dateTime.sl_tm_day,dateTime.sl_tm_mon,dateTime.sl_tm_year
           dateTime.sl_tm_hour,dateTime.sl_tm_min,dateTime.sl_tm_sec);
    

    Jan

  • Thanks Jan,this is very brief indeed any further explaination or documentation would be helpful we need this urgently as of now