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

How to detect the external low-frequency vibration crystal work?When it doesn't work how to switch frequency crystals?

52832,SDK12.0.0

I met such a situation: In the use of JLink burning program or air upgrade, after the completion of the program card died in initialization low-frequency crystals.

"sd_softdevice_enable(p_clock_lf_cfg, softdevice_fault_handler);"

Parents
  • You need to modify the NRF_CLOCK_LFCLKSRC in the pca10040.h or custom_board.h to the following

    #define NRF_CLOCK_LFCLKSRC      {.source        = NRF_CLOCK_LF_SRC_RC,            \
    
                                     .rc_ctiv       = 16,                             \
    
                                     .rc_temp_ctiv  = 2,                              \
    
                                     .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM }
    
  • Before 52832 program into the main function, initialize the clock: Under normal circumstances: NRF_CLOCK - > LFCLKSTAT = 0; After the abnormal: NRF_CLOCK - > LFCLKSTAT = 0 x00010000, (1 low frequency clock is still running, 00 said RC internal clock)

    Now, initialize the clock before I join lfclk_stop (), the program will stuck waiting for the clock stopped while (nrf_clock_lf_is_running ())

        // Low frequency clock source to be used by the SoftDevice
    #define NRF_CLOCK_LFCLKSRC      {.source        = NRF_CLOCK_LF_SRC_XTAL,            \
                                     .rc_ctiv       = 0,                                \
                                     .rc_temp_ctiv  = 0,                                \
                                     .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
    
Reply
  • Before 52832 program into the main function, initialize the clock: Under normal circumstances: NRF_CLOCK - > LFCLKSTAT = 0; After the abnormal: NRF_CLOCK - > LFCLKSTAT = 0 x00010000, (1 low frequency clock is still running, 00 said RC internal clock)

    Now, initialize the clock before I join lfclk_stop (), the program will stuck waiting for the clock stopped while (nrf_clock_lf_is_running ())

        // Low frequency clock source to be used by the SoftDevice
    #define NRF_CLOCK_LFCLKSRC      {.source        = NRF_CLOCK_LF_SRC_XTAL,            \
                                     .rc_ctiv       = 0,                                \
                                     .rc_temp_ctiv  = 0,                                \
                                     .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
    
Children
No Data
Related