This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using external low swing clock source with softdevice

Hello,

We're bringing up custom hardware using SiT1532 MEMS 32kHz oscillator.  This part outputs a low swing single ended clock source (300mV +/-55mV p-p).  I'm struggling to find the appropriate way to configure this when using softdevice.

sdk_config.h lists external low swing external source options for the clock driver, but NRF_SDH_CLOCK_LF_SRC has no such option.  When trying to use the 131073 value listed for NRFX_CLOCK_CONFIG_LF_SRC, the compiler throws an error, apparently softdevice can only accept an 8 bit value, even though the LFCLKSRC register documents setting bit 17 for external sources instead of Xtals.  

If I use the clock driver, I'm able to successfully start the clock and measure a good waveform.  But when setting NRF_SDH_CLOCK_LF_SRC to Xtal, my call to nrf_sdh_enable_request() fails with NRF_ERROR_INVALID_PARAM, and it looks like it's propagating up from sd_softdevice_enable().

What's the right way to use an external source with softdevice?  We're on version 16 of the SDK with S140, nRF52840.

Thanks,

Steve

Parents Reply Children
No Data
Related