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

nrfx_uarte event handler not being called

I've been trying to create a simple SPI to UART bridge starting with the peripheral template example from the nRF5 SDK 16. I want to read 5 bytes from uart, send them via SPI, and return the SPI result. Unfortunately, my uart handler isn't being called, after initializing successfully and nrfx_uarte_rx (successfully).

Is there some 'enable' I'm supposed to be calling after nrfx_uarte_init?

I'm using the nRF52840 DK. I've attached my code at the bottom.

For relevant config I have:

$ grep -e "#define.*UART.* 1" ../config/sdk_config.h
#define NRFX_UARTE_ENABLED 1
#define NRFX_UARTE1_ENABLED 1
#define NRFX_UARTE_CONFIG_LOG_ENABLED 1
#define NRFX_UART_ENABLED 1
#define UART_ENABLED 1
#define UART_EASY_DMA_SUPPORT 1
#define UART_LEGACY_SUPPORT 1
#define UART0_ENABLED 1
#define UART0_CONFIG_USE_EASY_DMA 1
#define UART1_ENABLED 1
#define APP_UART_ENABLED 1
#define NRF_CLI_UART_ENABLED 1
#define NRF_LOG_BACKEND_UART_ENABLED 1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
* SPI <-> UART bridge
*/
#include <stdbool.h>
#include <stdint.h>
#include "nrf.h"
#include "nordic_common.h"
#include "nrf_delay.h"
#include "nrf_gpio.h"
#include "nrf_log.h"
#include "nrf_log_ctrl.h"
#include "nrf_log_default_backends.h"
#include "nrfx.h"
#include "nrfx_spim.h"
#include "nrfx_uarte.h"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
app_config.h