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

Any way to control wether ext. 32k XTAL works properly?

Hello all,

Our product based on nRF51 is on preproduction stage. We use both 16MHz and 32kHz external crystals. The question is: Is there any way to check programatically if 32kHz crystal soldered/soldered properly/works fine?

We noticed that on SD110 v8.0.0 device works even without external 32k crystal with software defined as

if (NRF_SUCCESS !=(err_code=sd_softdevice_enable((uint32_t)NRF_CLOCK_LFCLKSRC_XTAL_75_PPM, softdevice_assert_callback)))...

However, in that case the current consumption increased significantly. And it could cause problems in post production testing.

Best regards,

Parents
  • This might not be the best way, but it looks like the failure mode for failure to synchronize on a clock source is that the device will hang at sd_softdevice_enable(...). This can be captured to reset the system.

    If you were to set a non-volatile flag prior to calling sd_softdevice_enable, then you could check on boot if the flag is set. If it is, then you were not able to enable the SD with that clock. Otherwise, once you successfully enable the SD using that clock source, you could clear the flag.

    Of course, then there is a race condition whereby a power cut at just the wrong time could disable your low-power crystal until you reset the flag.

  • Thank you,chalecampb. However, my device become useless without softdevice. So tha main point I want to clarify is to distinct what clock used by softdevice after sd_softdevice_enable call. If external crystal is failed it seems that SD run clock from internal generator prescaled from 16Mhz crystal (so it have to be active all time in this case and this fact causes high current). If I found how to check what clock type is currently in use I will sort out devices vith failure.

Reply
  • Thank you,chalecampb. However, my device become useless without softdevice. So tha main point I want to clarify is to distinct what clock used by softdevice after sd_softdevice_enable call. If external crystal is failed it seems that SD run clock from internal generator prescaled from 16Mhz crystal (so it have to be active all time in this case and this fact causes high current). If I found how to check what clock type is currently in use I will sort out devices vith failure.

Children
No Data
Related