rtel wrote on Friday, November 18, 2016:
Config prio bits is set to 4.
I’m afraid I can’t do anything with that information - first because you
didn’t say which MCU you were using when asked, and second it will be up
to you to determine if this is correct. We have seen the value being
wrong in both the header file and user manuals provided by MCU vendors,
so some times you need to figure it out yourself (which can be done by
writing 255 into a priority register, then reading the value back, to
see how many bits ‘stick’ at 1 and how many are read back as 0 - I think
the very latest versions of FreeRTOS will validate this automatically if
configASSERT() is defined, but it might be that only the head revision
in SVN does it).
There is nothing obviously wrong in your code, provided uart_read() is
doing nothing more than reading a character you know is already
available from a register.
It might be an idea to create a very simple test that does not touch the
UART peripheral, but instead sends dummy characters to the queues from a
timer interrupt, or something similar, so you can see if you can
replicate the issue using basic dummy data from a simple ISR that just
has a few lines of code in it.