Hi
I did DFU with button, i can enter and load zip pack over nrfToolbox mobile.
I tried butonlessDFU, i copied services "experimental_ble_app_buttonless_dfu" and with sending request device enter to boot but jump back apk quickly with a reset.
With buton i hold pushing more so continues bootcode but with butonless after reset, i think NRF_POWER->GPREGRET became 0.
I use SDK13.0 "bootloader_secure_ble" code and almost orginal.
Another issue, I couldnt get BLE_GATTS_EVT_HVC event with nrfconnect, so i add (void)bootloader_start(); to BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST:
This works but as i told jumping back to apk about 3sec.
void ble_dfu_on_ble_evt(ble_dfu_t * p_dfu, ble_evt_t * p_ble_evt) { VERIFY_PARAM_NOT_NULL_VOID(p_dfu); VERIFY_PARAM_NOT_NULL_VOID(p_ble_evt); switch (p_ble_evt->header.evt_id) { case BLE_GAP_EVT_CONNECTED: on_connect(p_dfu, p_ble_evt); break; case BLE_GAP_EVT_DISCONNECTED: on_disconnect(p_dfu, p_ble_evt); break; case BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST: //(void)bootloader_start(); NRF_POWER->GPREGRET = 0xB1; NVIC_SystemReset(); on_rw_authorize_req(p_dfu, p_ble_evt); break; case BLE_GATTS_EVT_WRITE: on_write(p_dfu, p_ble_evt); break; case BLE_GATTS_EVT_HVC: on_hvc(p_dfu, p_ble_evt); break; default: // no implementation break; } }
Regards
Ferhat