I would like to use my nrf51 applications working without DMA on nrf52810.
In nrf52810_peripherals.h there is no such settings.
When defined "manually", the project does not compile. Error: "NRF_UART_Type" is undefined
My main file functions (from example given by Petter Myhre):
#include "nrf.h"
#include "nrf52.h"
#include "app_uart.h"
#include "nrf_uart.h"
#include "app_error.h"
#include "nrf_delay.h"
#include "boards.h"
#include "app_error.h"
void uart_error_handle(app_uart_evt_t * p_event)
{
if (p_event->evt_type == APP_UART_COMMUNICATION_ERROR)
{
APP_ERROR_HANDLER(p_event->data.error_communication);
}
else if (p_event->evt_type == APP_UART_FIFO_ERROR)
{
APP_ERROR_HANDLER(p_event->data.error_code);
}
}
void uart_init()
{
uint32_t err_code;
const app_uart_comm_params_t comm_params =
{
RX_PIN_NUMBER,
TX_PIN_NUMBER,
RTS_PIN_NUMBER,
CTS_PIN_NUMBER,
APP_UART_FLOW_CONTROL_DISABLED,
false, // no parity
//UART_BAUDRATE_BAUDRATE_Baud9600
UART_BAUDRATE_BAUDRATE_Baud115200
};
APP_UART_FIFO_INIT(&comm_params, // UART unique initialisation macro
32, //UART_RX_BUF_SIZE in bytes
512, //UART_TX_BUF_SIZE in bytes
uart_error_handle, // callback function address
APP_IRQ_PRIORITY_LOW,
err_code); // error code output is put in error_code variable by macro
if (err_code!=NRF_SUCCESS)
;
//quick_blink(); // optical error alert
}