Hi,
I'm using a nRF52832 with SDK 14.0.0 and were wondering if there is a way to add support for exiting DFU mode by pressing the button for 3s.
Hi,
I'm using a nRF52832 with SDK 14.0.0 and were wondering if there is a way to add support for exiting DFU mode by pressing the button for 3s.
Thank you for your input. I think that this might have the same problem with the timer handler not working properly. This is probably because the nrf_dfu_init_user() is executed before the nrf_dfu_init() in nrf_bootloader_init() in my code. And in nrf_dfu_init() the clock i initialized which I think is why the handler was never called.
Regarding the release-button-code-not-executed part. The code that wasn't executed was the part that power off the device after the condition that the counter had reached its target.
If you have tested that your above suggestion works you can mark it as the verified answer.
Thank you again for your input!
Yes, the 32 kHz clock must be running for the app timer to work. Assuming you use BLE in the bootloader that will happen anyway though, and in practice it does not actually matter much if you configure the app timer before the clock is started, as the SoftDevice will anyway start soon when entering DFU mode (and if not, the bootloader should start the application so this will not be an issue). You can also start the 32 kHz clock explicitly before enabling the bootloader if you want.