Hi. I'm working with Softdevice 8.0 on Rigado's nRF51 EVK. I've configured a repeated app_timer that works great. but stops just as I connect my phone to the BLE.
main.c Here's the code:
int main(void)
{
uint32_t err_code;
bool erase_bonds;
// Initialize.
APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);
// Create timers.
err_code = app_timer_create(&m_led_timer_id,
APP_TIMER_MODE_REPEATED,
led_timer_handler);
uart_init();
buttons_leds_init(&erase_bonds);
ble_stack_init();
gap_params_init();
services_init();
advertising_init();
conn_params_init();
err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
APP_ERROR_CHECK(err_code);
app_timer_start(m_led_timer_id, LEDS_TOGGLE_INTERVAL, NULL);
// Enter main loop.
for (;;)
{
power_manage();
}
}
What am I doing wrong ?