Page 1 of 1

Accessing E2 UART

Posted: Wed Jul 30, 2014 1:08 pm
by amvasil
Hello,

I'm trying to use UART on E2 connector in my project. It seems to be the easiest way to read and write to it through /dev, but generally it's better to use C code. So what is it's name in /dev and can I use it as usual serial port in linux?

Thanks.

Re: Accessing E2 UART

Posted: Thu Aug 14, 2014 5:19 pm
by amvasil
Maybe I have to rephrase. Is it possible at all to read and write to built-in UART of RedPitaya?

There is the same question about I2C.

Thanks.

_______________

UART is accessible as /dev/ttyPS1 and works fine, just checked it.

Re: Accessing E2 UART

Posted: Mon Sep 01, 2014 10:13 am
by Kev' Ttn
Hello !

I'm trying to read some data on the E2 connector but I don't really know how to read these ones.
I saw, you have succeed to read and write some data. But, did you use a part of C code that you create, or did you implement a FPGA code to read this data ? How are they received (RAW, integer, array) when you read it ?

Thanks in advance for your answer.

Regards.

Kev'

Re: Accessing E2 UART

Posted: Fri Sep 05, 2014 3:57 pm
by amvasil
I use C code and standart linux libraries. Here are helpful code snippets: http://stackoverflow.com/questions/6947 ... -port-in-c. My code in attached file can read/write to serial and handle signal on data received for asynchronous reading.

Re: Accessing E2 UART

Posted: Mon Sep 08, 2014 10:14 am
by Kev' Ttn
Thank you very much for this code. I'll try to understand it. :)

Did you use C++ ? Because I don't understand all the syntax. But doesn't matter, I'll learn to read it ;)

Re: Accessing E2 UART

Posted: Wed Sep 10, 2014 12:56 pm
by Kev' Ttn
I thank you again for your code, it works great ! I adapted it in C code and I don't have any problem. :D