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

SDK16, S112, 52810. can't boot after power off and on again

SDK16, S112, 52810. I have DCDC set up and external 32.768 crystal oscillator on my board.

Here is my code part:

main()

nrf_power_dcdcen_set(true);
nrf_delay_ms(100);
// Initialize. 
log_init();
timers_init();
power_management_init();
ble_stack_init();
adc_configure();
gap_params_init();
gatt_init();
advertising_init();
services_init();
conn_params_init();
peer_manager_init();
advertising_start(erase_bonds);

In the stack_init(), I have these codes at last:

err_code = sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE);
APP_ERROR_CHECK(err_code);

nrf_delay_ms(500);

It works fine with debugger right after programing. But once I power off/on, it doesn't reboot, even with debugger. 

If I comment out the sd_power_dcdc_mode_set code from stack_init, It can reboot with debugger. But, it can NOT reboot once I take the debugger off.

In the sdk_config.h,  I use the default set up for the softdevice clock configuration, as I thought I do have external crystal oscillator:


#define NRF_SDH_CLOCK_LF_SRC 1

#define NRF_SDH_CLOCK_LF_RC_CTIV 0

#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 0

#define NRF_SDH_CLOCK_LF_ACCURACY 7

I don't know what to do now. Please help me out here, thanks

Related