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

nrf_sdh_enable_request causes restart with custom board

I have a custom board uses nRF52810. When I flash my board with examples include SoftDevice (sdk 16.0.0) nRF52810 restarts.
I am debugging with oscillascop and seeing that the code stucks on ble_stack_init(), actually nrf_sdh_enable_request(). It returns NRF_SUCCESS but still causes restart The example I am playing is ble_app_uart (peripheral one). I am flashing in pca10040e folder (s112) which is compatible with nRF52810. What is wrong with my board?

  • When I switch NRF_SDH_CLOCK_LF_SRC to RC in sdk_config.h, it passes ble_stack_init() but stucks somewhere else.
  • The problem occurs with other examples includes SoftDevice as well.

 

Parents
  •     NRF_CLOCK->LFCLKSRC = CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos;
        NRF_CLOCK->TASKS_LFCLKSTART = 1;
        while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0){
          print_int_to_io(2,1);
        }
    
        NRF_CLOCK->TASKS_HFCLKSTART = 1;
        while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0){
          print_int_to_io(4,1);
        }

    When I test my hardware with code mentioned above, my program makes an infinite loop in second while (while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0)). My hardware guy says, "Yes we are using HF clock as you can see in our hardware schematic."

Reply
  •     NRF_CLOCK->LFCLKSRC = CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos;
        NRF_CLOCK->TASKS_LFCLKSTART = 1;
        while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0){
          print_int_to_io(2,1);
        }
    
        NRF_CLOCK->TASKS_HFCLKSTART = 1;
        while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0){
          print_int_to_io(4,1);
        }

    When I test my hardware with code mentioned above, my program makes an infinite loop in second while (while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0)). My hardware guy says, "Yes we are using HF clock as you can see in our hardware schematic."

Children
No Data
Related