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

How to add GPIOTE interrupt in BLE_APP_UART Example?

Hello,

I am using ble_app_uart example in  nRF SDK 15.2.0 in which I have included "nrf_drv_gpiote.h" and initialized gpiote as follows:


static void gpio_init(void)
{
    ret_code_t err_code;

    err_code = nrf_drv_gpiote_init();
    APP_ERROR_CHECK(err_code);

}


/**@brief Application main function.
 */
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();
	
	gpio_init();

    // Start execution.
    printf("\r\nUART started.\r\n");
    NRF_LOG_INFO("Debug logging for UART over RTT started.");
    advertising_start();

    // Enter main loop.
    for (;;)
    {
        idle_state_handle();
    }
}

After making this change, the application no longer works. On looking at some of the existing answers,I understand that the GPIOTE interrupt needs to be at a lower priority than softdevice interrupt. How do I do this and make the application work with GPIOTE interrupt?

Thanks

Parents Reply Children
No Data
Related