cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Anonymous
Not applicable
8,097 Views

uartlite driver in linux 2014.4,can't read data from /dev/ttyUL0,but write is ok

     first,I add uartlite IP,and tested in SDK 2014.4 with standalone OS.

     then,I Enable uartlite driver in linux,I can see /dev/ttyUL0,and echo "hello zynq" > /dev/ttyUL0 is OK,

     but when I send "hello zynq" from PC to zynq like this:

              cat  /dev/ttyUL0

     I can't receive any chs from zynq, on the contrary, the PC can receive what I just sent

     I feel that uartlite's TX FIFO and RX FIFO are shared

//------------------------------------------------------------------------

I've modified uartlite.c:

(1)in ulite_startup() :ret = request_irq(port->irq, ulite_isr, IRQF_TRIGGER_RISING, "uartlite", port);

(2)static struct of_device_id ulite_of_match[] __devinitdata = {
     { .compatible = "xlnx,opb-uartlite-1.00.b", },
     { .compatible = "xlnx,xps-uartlite-1.00.a", },
     { .compatible = "xlnx,axi-uartlite-1.02.a", }, 
     {}
   };

 

 

has anybody meet this problem?

Thanks

0 Kudos
2 Replies
vanmierlo
Mentor
Mentor
8,082 Views
Registered: ‎06-10-2008

Have a look at this github issue that doesn't seem to get picked up.

0 Kudos
Anonymous
Not applicable
7,998 Views

finally,I solved the problem.

The reason "cat  /dev/ttyUL0" can't receive chs from PC is that the uartlite is opened with canon mode by default。

so I must send "hello zynq " with a line break, otherwise the cat process is waiting for the line break.

 

Thank you!

0 Kudos