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/CC1312R: Power driver fails with TCXO

Part Number: CC1312R
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

Hello,

when using TCXO on CC1312, with simplelink_cc13x2_26x2_sdk_3_30_00_03, and calling Power_init early in main():

simplelink_cc13x2_26x2_sdk_3_30_00_03\source\ti\drivers\power\PowerCC26X2.c :

Power_init() tries to construct TCXO clock, but it is first call to ClockP_construct and this call sets ClockP_tickPeriod.

PowerCC26X2.c : 287: ClockP_construct(&PowerCC26X2_module.tcxoEnableClock, (ClockP_Fxn)&switchToTCXO, (CCFGRead_TCXO_MAX_START()*100)/ClockP_tickPeriod, NULL);

ClockP_tirtos:ClockP_construct:

77:  /* temp workaround, need to reconsider */

78: ClockP_tickPeriod = Clock_tickPeriod;

This results in division by zero and passing 0 as timeout parameter, later failing in ClockP_start() call.

Trivial and ugly workaround:

#include <ti/drivers/dpl/ClockP.h>
#include <ti/sysbios/knl/Clock.h>

int main(void)
{
  ClockP_tickPeriod = Clock_tickPeriod;

  Power_init(); // or Board_init();

Best Regards,

Petr Ledvina