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.

CC26xx enable external 24Mhz oscilator for TIRIOS

We found out that we were running from the internal oscillator up until now. We'd like to run from the external 24Mhz crystal, but I don't get how I can do this.. http://www.ti.com/lit/ug/swra486/swra486.pdf (section 4.5.1)

This however works only until the TIRTOS power management kicks in: it then disables the external crystal again (you can see that in the registers in the debugger). I can't find any resources describing how I can tell the power management to use the external crystal. So I hope you guys have an idea..?

  • So I tried to trace what's gooing on here. First off, Power.c nicely disable the XOSC_HF before sleep, and the enabled it again at wakeupt. So far so good. But then I noticed that some other code also disables the XOSC_HF:

     Looks like the RCOSC calibration also disables the XOSC_HF. Is this just a timing issue (do I need to enable the XOSC_HF after calibration (and if so, who do I know it is done?), or do I need to do something else?

  • So, I guess I'm going to answer my own question: You can just enable the XOSC_HF with:

    Power_setDependency(XOSC_HF);

    for as long as you need it

  • Hi Christaan,

    I'm checking with the local expert. Which version of TI-RTOS are you using?

    Todd
  • Hi Christiaan,

    You found the proper way to enable XOSC_HF, by calling Power_setDependency(XOSC_HF).  This declares to the power manager that you need the XOSC_HF started up.  Once the crystal is ready the power manager will then switch over the HF clock source.

    Power_setDependency() calls are reference counted.  So the first call will activate the resource.  Additional calls will simply increment the reference count.  Power_releaseDependency() calls will decrement the reference count, and if the release was the last dependency declared, the resource is powered down.  In this case, the last release will also cause a switch back to using the RCOSC_HF.

    What you are seeing in the trace is the RCOSC calibration algorithm using the XOSC_HF (to calibrate the RCOSCs).  When calibration is done, it releases the XOSC_HF dependency.  So if you have declared the dependency in your code, this release by the calibration code will simply decrement the reference count, and the XOSC_HF will remain enabled.

    Regards,
    Scott