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.

LAUNCHXL-CC26X2R1: OSCClockSourceSet function not working.

Part Number: LAUNCHXL-CC26X2R1

I Planned to set SCLK_LF source explicitly by using OSCClockSourceSet function.

For that I Implement following method inside main:

int main()
{

  OSCClockSourceSet(OSC_SRC_CLK_LF,OSC_RCOSC_LF);
  currentOSC = OSCClockSourceGet(OSC_SRC_CLK_LF);

..............

}

After this configuration I expect currentOSC value is 2(OSC_RCOSC_LF),But I result is currentOSC value is 3(OSC_XCOSC_LF).

May I know what is the reason for this issue?

  • Hi,

    The clock source may take a few micro-seconds to change. If it was not clear, OSCClockSourceSet() and OSCClockSourceGet() do not write/read the same register. The value returned by OSCClockSourceGet() will be updated only once the clock has switched.

    If this does not solve your problem, could you please specify which example you are using? Could you also specify which other changes have been made?

    Thanks and regards,

  • Hi,

    Thank you for the response,I tried by giving more than 1ms delay between OSCClockSourceSet() and OSCClockSourceGet()  ,so it Help to get correct Value( 2(OSC_RCOSC_LF)) return from OSCClockSourceGet() function.

    OSCClockSourceSet(OSC_SRC_CLK_LF,OSC_RCOSC_LF);

    delay(2);                       //2ms delay
    currentOSC = OSCClockSourceGet(OSC_SRC_CLK_LF);

    Result :currentOSC value is 2(OSC_RCOSC_LF)

    Observed if the delay is less than 2ms OSCClockSourceGet() value(3(OSC_XCOSC_LF) is not correct .

    OSCClockSourceSet(OSC_SRC_CLK_LF,OSC_RCOSC_LF);

    delay(1);                       //1ms delay
    currentOSC = OSCClockSourceGet(OSC_SRC_CLK_LF);

    Result : currentOSC value is 3(OSC_XCOSC_LF

    May I know what is the Minimum time taken for switching of SCLK_LF source by using OSCClockSourceSet() function?

  • Hi,

    Interesting measurements, thank you for sharing.

    I do not have other results at my disposal than the ones presented here: https://e2e.ti.com/support/wireless-connectivity/other-wireless-group/other-wireless/f/other-wireless-technologies-forum/176432/32khz-xosc-vs-32khz-rcosc-wakeup-delay. I hope these will help.

    To finish, I have to tell you I am currently out of the office - planning to be back end of July. During this time I will not answer on E2E. If you have additional questions, it would be best if you could open a new thread using the button Ask a related question. That way we will have the right experts assigned to help you.

    Best regards,