Relevant code is:
Code: Select all
if (xQueueReceive(uart_queue, (void *)&event, (TickType_t)portMAX_DELAY)) {
switch (event.type) {
// Event of UART receiving data
case UART_DATA:
// Sometimes this takes > 1sec to read 9 bytes.
bytesRead = uart_read_bytes(SPROC_UART_PORT_NUM, readBuffer, event.size, portMAX_DELAY);
break;