Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE Peirpheral UART with Timer Problem

Hello,

        I'm using the "ble_app_uart" example without a problem. I need to add a timer to this example. For this purpose, I copied the content of the "peripheral_timer" example into "ble_app_uart" example. I configure the "sdk_config.h" content accordingly.

       The code is crushing in the following line of the "nrfx_timer_init" function.

     NRFX_ASSERT(p_instance->p_reg != NRF_TIMER0);

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
int main(void)
{
bool erase_bonds;
// Initialize.
uart_init();
log_init();
timers_init();
buttons_leds_init(&erase_bonds);
power_management_init();
ble_stack_init();
gap_params_init();
gatt_init();
services_init();
advertising_init();
conn_params_init();
// Start execution.
printf("\r\nUART started.\r\n");
NRF_LOG_INFO("Debug logging for UART over RTT started.");
advertising_start();
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX