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.

CCS/CC1352R: Check by firmware whether the uC is entering in low power mode / if the 32kHz crystal is working properly

Part Number: CC1352R

Tool/software: Code Composer Studio

Hi there,

I'm elaborating a test routine for my sensor board application, which is based on TI 15.4 sensor example. The idea is to test some functionalities only by controlling the coprocessor side.

Is there a way to verify that the sensor uC is entering in low power mode? Or, alternatively, check if the 32kHz crystal is working properly when it sleeps?

The idea is to send this info to the coprocessor.

I went through the link below (PowerCC26XX.h File Reference), but I couldn't find any specific function or macro for that

http://software-dl.ti.com/simplelink/esd/simplelink_cc13x2_26x2_sdk/3.40.00.02/exports/docs/tidrivers/doxygen/html/_power_c_c26_x_x_8h.html#a88d658da388e2fc58328283b3349003e

Thank you for your attention,

Bruno

  • The best way to verify that the device is in a specific power mode is by measuring the power consumption. You cannot use the MCU to figure out if it is sleeping, because the MCU would not be sleeping when it is doing stuff :-)

    You can also check the 32 kHz crystal by outputting the selected 32-kHz clock source in all power states to a pin:

    #include <driverlib/aon_ioc.h>
    
    IOCPortConfigureSet(IOIDn,IOC_PORT_AON_CLK32K,IOC_STD_OUTPUT);
    
    AONIOC32kHzOutputEnable();

    You can also use OSCClockSourceGet to get oscillator source for one of the system source clocks.

    Siri

  • Thanks, Siri,

    So, I intend to test the OSCClockSourceGet approach by forcing the uC to enter low power mode and then get the oscillator source. If I understood it well, this source should be OSC_XOSC_LF (if the crystal circuit is working properly) or OSC_RCOSC_LF if there is a problem with the crystal or its loading capacitors.

    Is my assumption correct?

    Thanks again for your attention,

  • Yes, and no. You cannot do this check in standby mode, as running code and reading registers will keep the MCU busy and prevent it from entering standby mode.

    You can use OSCClockSourceGet to make sure that the OSC_XOSC_LF is running.

    If you have configured

    #define SET_CCFG_MODE_CONF_SCLK_LF_OPTION               0x2      // LF XOSC

    In the ccfg.c, that function (OSCClockSourceGet) will not return OSC_XOSC_LF unless the crystal is good.

    You do not need to enter standby to check this.

    Siri