DA14585/DA14586 Crystal trimming lost after sleep


Status: Fixed

First reported:

Fixed in:


Trimmed DA14585/DA14586 devices will loose their XTAL16M trim value once they go to sleep. This can cause, depending on the device the DA14585/586 is operating with, degraded RF performance due to the RF frequency not being perfectly centered bluetooth channel frequency. In extreme condition, the device might operate out of the bluetooth specification tolerance.


Make sure xtal16_calibration_check() always call set_xtal16m_trim_value(). This will ensure the crystal trimming is applied up on wake up.

In sdk/platform/arch/main/arch_system.c:

static __inline void xtal16m_calibration_check(void)
    uint16_t trimvalue = GetWord16(CLK_FREQ_TRIM_REG);   //Get the value stored from the booter
    // Apply the default XTAL16M trim value if a trim value has not been programmed in OTP
    if (trimvalue == 0)                    // Override the value if the device is untrimmed and DEFAULT_XTAL16M_TRIM_VALUE_USED is 1
    set_xtal16m_trim_value(trimvalue);  // It is always called