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

How to deinit fully the softdevice_handler?

Hello,

I use the example dfu_dual_bank_ble_132 in the nrf5x sdk 11 (PCA10040). I have had my programe before the OTA, i will have a programme wich would update at any time if i pres on a button.

When i use the software example whitout sd_mbr_command(&com);SOFTDEVICE_HANDLER_APPSH_INIT(&clock_lf_cfg, true); the program with dfu ota work fine but my program doesnt work

if i use the software example with sd_mbr_command(&com);SOFTDEVICE_HANDLER_APPSH_INIT(&clock_lf_cfg, true); My program works fine but the dfu ota doesn't works.

it is possible to deinit sd_mbr_command() and SOFTDEVICE_HANDLER_APPSH_INIT() because i can't use 2 soft in same time i would disable and enable the function with a push button.

i have try to use the function: sd_softdevice_disable(); soft_device_handler_sd_disable(); sd_ble_gap_adv_stop();

but these function don't clear sd_mbr_command(&com);SOFTDEVICE_HANDLER_APPSH_INIT(&clock_lf_cfg, true);

I have no idea for what can i do for that problem.

  • I have found the problem, it's not by the BLE but it's because i have the RTC and softdevice init in same time.

    I try now to use the RTC and deinit for use the BLE and OTA.