[RTEMS Project] #4719: risc-v fe310 console driver uart read error
RTEMS trac
trac at rtems.org
Sun Sep 18 14:28:20 UTC 2022
#4719: risc-v fe310 console driver uart read error
---------------------------+--------------------------
Reporter: Alan Cudmore | Owner: (none)
Type: defect | Status: new
Priority: normal | Milestone:
Component: bsps | Version: 6
Severity: normal | Keywords: risc-v, uart
Blocked By: | Blocking:
---------------------------+--------------------------
In the riscv/riscv fe310_uart_read function, the uart RX data/status
register is read twice when reading a character: once for the status, then
a second time when reading the data. Reading the RX data/status register
twice discards the input data from the first read.
It can be fixed by first reading the RX data/status register into a local
variable.
This was verified on a Kendryte K210 CPU which uses the same SiFive UART.
I will submit a patch to fix it.
--
Ticket URL: <http://devel.rtems.org/ticket/4719>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list