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

change clock source 52832

I config the inner clock source like this

#define NRF_CLOCK_LFCLKSRC      {.source        = NRF_CLOCK_LF_SRC_RC,            \
                                 .rc_ctiv       = 16,                                \
                                 .rc_temp_ctiv  = 2,\
                                 .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}

When using external clock source(32.768khz), the program can be started. But when switching it to inner clock source(take away external crystal), the program can’t be started. Use tweezers to touch GPIO P0, program started. Anybody know why?

Parents
  • Could you debug the application and check that you reach the SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL); in ble_stack_init(). If you are able to reach a breakpoint after this macro call in ble_stack_init() ,then you need to check the error codes of the other functions in ble_stack_init(). Otherwise, step into the SOFTDEVICE_HANDLER_INIT macro and check the error code returned by softdevice_handler_init().

Reply
  • Could you debug the application and check that you reach the SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL); in ble_stack_init(). If you are able to reach a breakpoint after this macro call in ble_stack_init() ,then you need to check the error codes of the other functions in ble_stack_init(). Otherwise, step into the SOFTDEVICE_HANDLER_INIT macro and check the error code returned by softdevice_handler_init().

Children
Related