On 7 February 2018 at 23:52, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
On 7 Feb 2018, at 15:50, Haojian Zhuang haojian.zhuang@linaro.org wrote:
Hi all,
I have an issue on tty terminal. I setup PL011 serial console as the tty terminal on HiKey platform. When it's built in debug mode, arrow key works well. When it's built in release mode, arrow key can't work.
For example, DOWN key is gotten in terminal with "~[B" value in debug build. DOWN key is gotten in terminal with "~" value in release build. These values are fetched by GetOneKeyFromSerial().
But I can't find any difference on PL011 serial driver between debug and release mode.
Do you have any idea on this?
You need to set the FIFO depth to 16 iirc
I think you mean the initialization code in PL011UartInitializePort ().
HardwareFifoDepth = (PL011_UARTPID2_VER (MmioRead32 (UartBase + UARTPID2)) \ > PL011_VER_R1P4) \ ? 32 : 16 ;
I tried to hardcode the value with both 32 and 16. The issue still exists.
Best Regards Haojian