I have a code build on top of nrfx 2.0 and after a few received bytes I get NRFX_ERROR_INTERNAL back from nrfx_uarte_rx call in blocking mode.
So I can process around 20 or so bytes before I start getting the error.
Every subsequend call to nrfx_uarte_rx yelds the error until the board is reset.
Im unsure where to move from here as the documentation is not specific in what this error may be related to.
prj:
CONFIG_NRFX_UARTE0=y
code:
static nrfx_uarte_t uarte_instance = NRFX_UARTE_INSTANCE(0);
nrfx_uarte_config_t uarte_config = {
.pselrxd = NRF_GPIO_PIN_MAP(0, 15),
.pseltxd = NRF_GPIO_PIN_MAP(0, 14),
.pselcts = NRF_UARTE_PSEL_DISCONNECTED,
.pselrts = NRF_UARTE_PSEL_DISCONNECTED,
.hal_cfg = {.hwfc = NRF_UARTE_HWFC_DISABLED, .parity = NRF_UARTE_PARITY_EXCLUDED, .stop = NRF_UARTE_STOP_ONE},
.baudrate = NRF_UARTE_BAUDRATE_115200,
.skip_gpio_cfg = 0,
.skip_psel_cfg = 0};
nrfx_uarte_init(&uarte_instance, &uarte_config, NULL);
LOG_INF("Done with UART init.");
char uart_rx_data[100] = { 0 };
// test code
while (1) {
retcode = nrfx_uarte_rx(&uarte_instance, uart_rx_data, 10);
if (retcode == NRFX_SUCCESS) {
LOG_INF("UARTE RX OK: %d\n", retcode);
} else if (retcode == NRFX_ERROR_BUSY) {
LOG_INF(" NRFX_ERROR_BUSY");
} else if (retcode == NRFX_ERROR_FORBIDDEN) {
LOG_INF(" NRFX_ERROR_FORBIDDEN");
} else if (retcode == NRFX_ERROR_INTERNAL) {
LOG_INF(" NRFX_ERROR_INTERNAL");
} else if (retcode == NRFX_ERROR_INVALID_ADDR) {
LOG_INF(" NRFX_ERROR_INVALID_ADDR");
}
k_sleep(K_SECONDS(1));
}