(faulty) external xtal 32Khz with status 'not ready'

Hi,

From a batch of pcba flashed with our custom test firmware, some of them do reset continuously as the application stall during initialisation. I found out that the XTAL is not ‘ready’ as it polls in a while loop in method Sleep_Mode_Configure, which seem to indicate a faulty 32k oscillator.

while (ACS_XTAL32K_CTRL->READY_ALIAS != XTAL32K_OK_BITBAND)

1- I flashed on these devices a firmware which output xtal clock on aout (no BLE, sysclock @3Mhz).
ACS_XTAL32K_CTRL Enable XTAL and ACS_AOUT_CTRL with AOUT_XTAL_CLK (0x1E)
I observe on AOUT a 32khz signal as expected

2- I updated our application by setting XTAL32K_FORCE_READY and i have a mode to prevent the application to enter in BLE sleep mode

    hpmMode = hpmGetHighPwrActivity();
    if(hpmMode == 0)
    {
        appTraceDisableForLpm();
        Sleep_Mode_Enter();
    }

The application goes throught initialisation until execution of the main loop (device advertizes and is connectable). If i enable the BLE sleep mode, the device reset as it seem logical as the sleep mode is configured to use the XTAL 32Khz.

3- I flashed a code sample ‘peripheral_server_sleep’ built with sleep mode configured to use internal RC 32Khz as clock source.
I updated the define as follow:
#define RTC_CLK_SRC RTC_CLK_SRC_RC_OSC
Device initializes and advertises as expected.

Which conditions could lead to the XTAL not detected as ‘ready’ but with oscillator likely operationnal? (internal capacitances config? XTAL input supply? …)
I checked the hardware schematic and oscillator cannot be inverted, if so i would not expect to output 32khz on aout.

@sylvain.mariteau

The product spec seems to suggest that the ‘XTAL_READY’ status is based off of the automatic amplitude control of the 32kHz XTAL block. That is, if the amplitude of the output signal is not found to be constant, the ‘READY’ register will never be set to ‘OK’.

As a first step, please check the amplitude of your XTAL signal to see if there is any variance in the amplitude of the clock.

If you find there is a variance, double check that the Load Capacitance you have set matches what is expected within the 32kHz XTAL product specification. If this does not work, it might also be worth trying to disable the ‘EN_AMPL_CTRL’ setting to see if this is altering the output of your XTAL in a way that is not expected.

Thank you for using our community forum!

1 Like