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.

LP-EM-CC2340R5: initialization of the RTC module

Part Number: LP-EM-CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

Hi 

According to swcu193 technical reference manual there are no specific enablers/disablers of RTC module(at least I didn’t find them in RTC section of this document) and it seems that RTC should start its work right after MCU reset. However we’ve noticed that registers TIME524M and TIME8U(that are used to request time from RTC) are not changed and always are 0. At first we’ve observed this issue in our project, then we’ve verified the same behavior in uart2echo example(that is provided by TI in simplelink_lowpower_f3_sdk_7_40_00_64). Could you help us to deal with this issue?

 

The second unexpected behavior, that has been revealed, relates to LFCLK source. If we set LFCLK_LFXT source in device configuration of uart2echo example, it seems that LFCLK is not configured correctly: LFCLKSEL.MAIN=2(ok), LFCLKSTAT.GOOD=0(!!), LFCLKSTAT.LFTICKSRC=1 (LFTICK generated from CLKULL (LFCLK not available)!!). Also I tried to call functions PowerLPF3_selectLFOSC() and PowerLPF3_selectLFXT() manually in our project. Situation is even worse than in uart2echo example , because in both cases(even for LFCLK_LFOSC ) I got LFCLKSTAT.GOOD=0(!!).  Why has this happened?”

Thanks 

Calex

  • Hi Calex,

    I can use the following code in a uart2echo example (no SysConfig changes) with an unmodified LP-EM-CC2340R5 to view the RTC value incrementing.

    #include <ti/devices/DeviceFamily.h>
    #include DeviceFamily_constructPath(inc/hw_rtc.h)
    #include DeviceFamily_constructPath(inc/hw_types.h)
    #include DeviceFamily_constructPath(inc/hw_memmap.h)
    uint32_t rtcTime = 0;
    //...
    rtcTime = HWREG(RTC_BASE + RTC_O_TIME524M);

    My register view also shows LFCLKSTAT.LFTICKSRC = 0, and the same settings as provided otherwise, so I gather that the crystal on the board being tested is defective, there is a custom board design issue, or modifications have been made to the uart2echo example which I am not aware of.

    Regards,
    Ryan