Hello,
I would like to use the serial port library with free RTOS. I read several threads that timeouts do not work when using free RTOS. So I tried to use the lib without it.
I always try to read one byte (in an own task). It works in general but every other byte I get wrong (something between 0xE0 and 0xFF). I use a serial terminal to send some keyboard keys.
I am using SDK Version 15.3 with the PCA10056.
NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uarte0_drv_config, RX_PIN_NUMBER,ARDUINO_SCL_PIN, RTS_PIN_NUMBER, CTS_PIN_NUMBER, NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED, NRF_UART_BAUDRATE_38400, UART_DEFAULT_CONFIG_IRQ_PRIORITY); #define SERIAL_FIFO_TX_SIZE 128 #define SERIAL_FIFO_RX_SIZE 128 NRF_SERIAL_QUEUES_DEF(serial0_queues, SERIAL_FIFO_TX_SIZE, SERIAL_FIFO_RX_SIZE); #define SERIAL_BUFF_TX_SIZE 1 #define SERIAL_BUFF_RX_SIZE 1 NRF_SERIAL_BUFFERS_DEF(serial0_buffs, SERIAL_BUFF_TX_SIZE, SERIAL_BUFF_RX_SIZE); NRF_SERIAL_CONFIG_DEF(serial0_config, NRF_SERIAL_MODE_DMA, &serial0_queues, &serial0_buffs, NULL, NULL); NRF_SERIAL_UART_DEF(serial0_uarte, 0); // Task method void UART_Read_E10_Task() { char c; ret_code_t ret; while(true) { ret = nrf_serial_read(&serial0_uarte, &c, sizeof(c), NULL,0); if (ret == NRF_SUCCESS) { NRF_LOG_DEBUG("READ E10 %c %i %i",c,c) } } }
Does anyone know what I am doing wrong? Or does anyone have the same problem?
The best would be a working example using both UARTs with free RTOS...
Thanks,
Andreas