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

nrf_drv_uart on NRF52810

Base on nRF5_SDK_15.3.0_59ac345 for NRF52810, I wrote the following codes,

static void _uart_event_handler(nrf_drv_uart_event_t* event, void* context)
{

	switch(event->type){
		
		case NRF_DRV_UART_EVT_RX_DONE:
			break;
		
		case NRF_DRV_UART_EVT_ERROR:
			break;
		
		default:
			break;
		
	}
	
}

static nrf_drv_uart_t _uart;
static nrf_drv_uart_config_t _cfg;

void init(wk_callback_t callback)
{

	_cfg.pseltxd = 6;
	_cfg.pselrxd = 8;
	_cfg.pselcts = NRF_UART_PSEL_DISCONNECTED;
	_cfg.pselrts = NRF_UART_PSEL_DISCONNECTED;
	
	_cfg.baudrate = NRF_UART_BAUDRATE_115200;
	_cfg.parity = NRF_UART_PARITY_EXCLUDED;
	_cfg.hwfc = NRF_UART_HWFC_DISABLED;
	
	_cfg.interrupt_priority = APP_IRQ_PRIORITY_LOWEST;
	
	_uart.inst_idx = 0;
	_uart.uart.p_reg = NRF_UART0;
	_uart.uart.drv_inst_idx = 0;
	
	nrf_drv_uart_init(&_uart, &_cfg, _uart_event_handler);
	
}

Use nrf_drv_uart_tx to send data is successful, and NRF_DRV_UART_EVT_TX_DONE occur normally.

But I can't  receive any data, In other words, NRF_DRV_UART_EVT_RX_DONE never happened.

Who can help me? Thanks!

Parents Reply Children
No Data
Related