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

Nrf52 SOFTDEVICE_HANDLER_INIT fails to init when power is over 2.8V

So this might be one of the most confusing issues i've come across sofar. We're currently developing a product based on NRF52 (more specifically NRF5283 QFAAB0) with a custom made board. XC1/2 is 32MHZ crystal and XL1/2 is 32.768KHZ crystal. (12pf capacitors each). It uses Softdevice 132 and nRF5_SDKv12.1.0

The entire project sofar works perfectly but only under specific circumstances. Initialization only works up to 2.8V (2.845V specifically) otherwise SOFTDEVICE_HANDLER_INIT fails and crashes the IC. if starting from below 2.8V it starts fine and can afterwards even be increased to 3V without problems.

Power supply itself is a Laboratory power supply so i dont suspect power supply itself. I've checked for voltage stability to see if there's any drops in supply voltage or jitter etc and its fine. Stable and exactly as set regardless of power consumption fluctuations.

Both Debug (always) and also flashing (w/o power cycling) work fine starting above 2.8V but as soon as power is cycled the IC wont start until voltage drops below 2.8V.

The only way i have even traced the origin of the fault is by adding a power-consuming task before each function call and then examining the current consumption (current spikes on graph) to see where the functions fail to start.

I cannot debug it (as with debug the project works) and looking at code + comparing it to provided examples is getting me nowhere (even copy-pasted code still exibits these issues)

// Initialize the SoftDevice handler module.
nrf_clock_lf_cfg_t clock_lf_cfg;
clock_lf_cfg.source = NRF_CLOCK_LF_SRC_XTAL;
clock_lf_cfg.rc_ctiv = 0;
clock_lf_cfg.rc_temp_ctiv = 0;
clock_lf_cfg.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM;
SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL);   

I've googled this extensively and the only init issues that seem to be reported and solved are those that never work at any voltage. Working this specifically at specific voltages / circumstances seems to be new. Does anyone have any ideas or suggestions on how to fix these issues? Or atleast explain the behaviour? Damaged IC? Damaged crystal? Perhaps an errata i've missed? If you require any additional information i can provide it if requested.

edit: After some more debugging with osciloscope i've managed to trace it slightly farther. The exact moment the code fails is in softdevice_handler.c at:

#if defined(S212) || defined(S332)
err_code = sd_softdevice_enable(p_clock_lf_cfg, softdevice_fault_handler, ANT_LICENSE_KEY);
#else
err_code = sd_softdevice_enable(p_clock_lf_cfg, softdevice_fault_handler);				//ERROR LOCATION
#endif

Cannot trace it further than this. The IC never manages to go any further and doesn't even enter the softdevice_fault_handler. It crashes and resets exacly 17.54mS after sd_softdevice_enable is called.

Parents Reply Children
No Data
Related