Xilinx Zynq console rx not working

Kinsey Moore kinsey.moore at oarcorp.com
Mon Aug 16 13:03:05 UTC 2021


On 8/16/2021 04:45, Chris Johns wrote:
> On 16/8/21 6:38 pm, Chris Johns wrote:
>> I have taken a closer look at the driver. I am receiving RX 
>> interrupts and the
>> characters are being queued however the receive FIFO trigger interrupt is only
>> raised when the FIFO reaches the set threshold of half the FIFO size. I suspect
>> there is an assumption the RX timeout will fire but it is not.
>>
> Doing this is questionable ....
>
> https://git.rtems.org/rtems/tree/bsps/shared/dev/serial/zynq-uart.c#n222
>
> You cannot send a character when touching the attributes. Where is this hardware
> bug documented by Xilinx?
The attributes are done being touched and the TX/RX enable flags are set 
again before sending the character. I was seeing the same behavior on 
Zynq QEMU even with this code removed.

I couldn't find the hardware bug documented anywhere, but out of the 3 
ZynqMP boards I have one requires this consistently.
>
> My application does this ...
>
>      if (tcgetattr(fileno(stdout), &term) < 0)
>          error_message();
>      cfsetispeed (&term, B115200);
>      cfsetospeed (&term, B115200);
>      if (tcsetattr (fileno(stdout), TCSADRAIN, &term) < 0)
>          error_message();
>      if (tcgetattr(fileno(stdin), &term) < 0)
>          error_message();
>      cfsetispeed (&term, B115200);
>      cfsetospeed (&term, B115200);
>      if (tcsetattr (fileno(stdin), TCSADRAIN, &term) < 0)
>          error_message();
>
> and this kills the receive interrupts.

Does removing the null character kick restore functionality for you in 
this case?


Kinsey



More information about the devel mailing list