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

Application timer in Secure bootloader.

Dear team,

Device - nRF52832
SDK - nRF_SDK_15.0.0
Softdevice - s132_nrf_6.0.0
IDE - Segger embedded studio

My application needs to toggle one gpio pin using app timer in secure bootloader code. I tried to create app timer in bootloader code but advertisement stops. I can't understand the reason behind that.

Here is my main function as below.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
static void Min1_lowpower_event_timeout_handler(void * p_context) {
ret_code_t err_code;
UNUSED_PARAMETER(p_context);
nrf_gpio_cfg_output(4);
nrf_gpio_pin_set(4);
nrf_delay_us(10)
nrf_gpio_pin_clear(4);
//Min1CompletionCheck = true;
}
/**@brief Function for application main entry. */
int main(void) {
uint32_t ret_val;
ret_code_t err_code;
// Protect MBR and bootloader code from being overwritten.
APP_SCHED_INIT(SCHED_MAX_EVENT_DATA_SIZE, SCHED_QUEUE_SIZE);
//timers_init();
err_code = app_timer_init();
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Please give me some possible solutions on that.