When trying to run the softdevice on my custom board, it seems to be hanging on the ble_stack_handler_init() function. What can be the cause of this?
When trying to run the softdevice on my custom board, it seems to be hanging on the ble_stack_handler_init() function. What can be the cause of this?
If you're able to debug the application, and see that it hangs "inside" the ble_stack_handler_init() function, it is most likely the clock source selected for the softdevice that is wrong. By default, all example applications, including the template application, uses an external 32 kHz crystal, which is mounted on all our kits. If you on your custom board don't have such crystal, and try to enable the softdevice with this as a clock source, you will most likely see a hang as you suggest.
The solution is therefore to change the clock source as passed into this function, to be like this:
BLE_STACK_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION,
...
Could you elaborate on this? NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION is undefined on my end.
However I found this:
in pca10040.h. Should I modify this?