Hello everybody,
i want to add a timer to my secure bootloader example, so it waits some time and then, if no DFU is in progress, starts the beacon apllication automatic if there is one available.
I tried this by using the app_timer module, but it seems to crash the bootloader and i cant connect to it anymore.
These are some code snippets:
nrf_dfu.c
APP_TIMER_DEF(m_start_timer_id);
nrf_dfu.c in nrf_dfu_init()
app_timer_create(&m_start_timer_id,
APP_TIMER_MODE_SINGLE_SHOT,
start_timer_handler);
app_timer_start(m_start_timer_id, 0x000FFF, start_timer_handler)
dfu_req_handling.c in nrf_dfu_req_handler_on_req()
app_timer_stop(m_start_timer_id);
I was reading the thread about using a Watchdog timer, but i think i cant use that, because it resets the device and starts the booloader again and again because i modified it to be buttonless.
I am using SDK12.3 and an NRF51822 XXAC chip
Thanks for your help!