Dear Sirs!
I used SDK 12.2. Product was developed some years ago and now I am working for upgrade. One of new features is UART. I faced very strange problem.
I send 14 bytes from PC via FTDI UART 3.3V cable to Nordic and Nordic send back different 14 bytes to PC.
This process repeats each 200 ms
Baud rate 115200 no flow control, no parity
#define UART_RX_PIN_NUMBER 3 //UART Rx
#define UART_TX_PIN_NUMBER 2 //UART Tx
#define UART_CTS_PIN_NUMBER 0xFFFFFFFF //Not connected
#define UART_RTS_PIN_NUMBER 0xFFFFFFFF //Not connected
#define UART_HWFC false
static app_uart_comm_params_t comm_params =
{
UART_RX_PIN_NUMBER,
UART_TX_PIN_NUMBER,
UART_RTS_PIN_NUMBER,
UART_CTS_PIN_NUMBER,
APP_UART_FLOW_CONTROL_DISABLED, //Flow control disabled
false, //No parity
UART_BAUDRATE_BAUDRATE_Baud115200
};
buffers.rx_buf = rx_buf;
buffers.rx_buf_size = 64;
buffers.tx_buf = tx_buf;
buffers.tx_buf_size = 64;
err_code = app_uart_init(&comm_params, &buffers, uart_event_handle, APP_IRQ_PRIORITY_HIGHEST);
despite I use EASY_DMA
#ifndef UART_EASY_DMA_SUPPORT
#define UART_EASY_DMA_SUPPORT 1
#endif
// <q> UART_LEGACY_SUPPORT - Driver supporting Legacy mode
#ifndef UART_LEGACY_SUPPORT
#define UART_LEGACY_SUPPORT 0
#endif
I get sometimes event APP_UART_COMMUNICATION_ERROR error_communication = 1
It happens randomly. May happen. immediately or after 2 bytes received or after 6 bytes received
As I understood this value is the same as in register ERRORSRC. Is it correct?
How can I prevent this situation? I put interrupt to highest priority, use easy dma and fifo and despite all this it happens.
What''s wrong? Please help
Best regards
Michael