CC2340R5: Removing HFXT will also disable LFXT

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

From the relatived thread, I know the HFXT is necessary for Radio function.

But we have a special project that using CC2340R5/R22 without using RF function. More precisely, only RTC, Timer and I2C target.

So, we try to remove the HFXT, and keep the LFXT for RTC.

Without HFXT the device seems to work, but the RTC accuracy is quite poor.

Then I realized that after we removed HFXT, LFXT was also deactivated.

Is this some kind of limitation where removing HFXT prevents the system from properly detecting the presence of LFXT?

PS. I had tested to add the crystal back, then LFXT works again, so it should not be HW issue

  • Hi !

    SysConfig generates a file named ti_driver_config.c. In this file, the function Board_init calls "PowerLPF3_selectLFXT".

    This function enables the LFXT by writing to the LFCLKSEL register

    Can you check if this function is correctly called in your Board_init function and if it correctly sets the register ?

    Kind regards,
    Lea

  • Hi,

    Thanks for reply.

    If my understanding is correct. The PowerLPF3_selectLFXT() set the EN bit of LFXTCTL (and yes, the EN bit is 1), the it start a TDC measurement process, it seems to detect if the LFXT works as expect. After the measurement successed, it will set the LFCKSEL for LFXT.

    When the HFXT crystal exists, it works. But when the HFXT crystal has been removed, the TDC measurement seems finished (IMASK.TDCDONE is 1), but LFCKSEL did not changed. Also, all GOOD bit for LFXT registers does not turn to 1.

    That's why I wonder if it would affect the detection process of LFXT if HFXT didn't exist.

    Bast regards,

    Tim

  • Hi !

    From what I can read in the C:\ti\simplelink_lowpower_f3_sdk_9_11_00_18\source\ti\drivers\power\PowerCC23X0.c file, the LFXT clock uses the HFXT for calibration by running TDC measurements. If the HFXT is absent, the measurements will be absent or incorrect, and the LFXT initialization will fail.

    What you could try to do is to change the ti_drivers_config.c file to skip the TDC measurement and to directly enable and select the LFXT as the LFCLK. This is done in the PowerCC23X0_lfoscQual function through the HWREG(CKMD_BASE + CKMD_O_LFCLKSEL) = CKMD_LFCLKSEL_PRE_LFOSC | CKMD_LFCLKSEL_MAIN_LFOSC; line. In any case, your LFXT will be less accurate, since it will not be qualified.

    Kind regards,
    Lea

  • Got it, thanks.

    Best Regard,

    Tim