cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
476 Views
Registered: ‎02-28-2019

UART Rx interrupt one event behind

In a Vivado design targetting Zynq7020 I have both UART ports enabled. The purpose of my design is to forward into UART0 any character received from UART1 and vice-versa. Both UART ports are conencted to COM ports in my PC each one with a terminal open so that I can type chars. I am using the Zynq 7020 UARTs in interrupt mode and I have it almost working.

The problem that I am seeing is that the characters forwarded to the forwarding port are always one character behind. For example:

  1. If I first type the char "A" on the COM port connected to UART1; nothing appears in UART0.
  2. If then I type the char "B" on the COM port connected to UART1; the char "A" appears in UART0. 
  3. If then I type the char "C" on the COM port connected to UART1; the char "B" appears in UART0. 

The same happens if I type chars in the COM port connected to UART0: the chars appearing in UART1 are one char behind.

Why could the cause for that?

I am attaching my code; which I leveraged from the "xuartps_intr_example.c".

Tags (2)
0 Kudos
1 Reply
Highlighted
Moderator
Moderator
327 Views
Registered: ‎09-12-2007

Can you shwo your interrupt sensitivity. Is this level, or edge. It might be on level. Also, the interrupt will occur when the fifo is full, half full, ect. So, how is this configured as this would have an impact too

0 Kudos