UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
599 Views
Registered: ‎09-18-2018

reading XADC from user space

Hello everyone,

I am having a Zybo Z7-20 Board and I want to read from the XADC the digitalized voltages as fast as possible in my embedded linux (petalinux 2018.2)-environment.

In my eyes I should read the voltages directly from user space. My problem now, if I read with my application code from /dev/iio:deviceX I only get rubbish or nothing.

I know that it is necessary to add sometimes librarys to read from user space. Is it also in this case possible and if yes which library do I have to add? Or is there a much more simple way?

Btw I already created a driver and it is working, but to slow because opening/closing is taking in my case to much time.

 

Thanks for every help!

Greetings from the helpless guy

0 Kudos
4 Replies
Visitor rcordeau
Visitor
557 Views
Registered: ‎06-01-2016

Re: reading XADC from user space

You can see all of the items in /sys/bus/iio/devices/iio:device0. For voltages and temp, take the (raw + offset) * scale. And for temp, take that equation and divide by 1000.0 to get degrees C.

0 Kudos
Adventurer
Adventurer
546 Views
Registered: ‎09-18-2018

Re: reading XADC from user space

Hi @rcordeau,

thanks for your answer but this is not helping a lot. You are talking about using a driver and read the raw voltages from a file. In my case this is to slowling. Have you ever tried reading directly from user space?

0 Kudos
Moderator
Moderator
534 Views
Registered: ‎07-31-2012

Re: reading XADC from user space

Hi @helplessguy,

 

You may want to refer to user application in XAPP1182 Linux Software based Application C code for command line.

 

Regards

Praveen


-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Adventurer
Adventurer
527 Views
Registered: ‎09-18-2018

Re: reading XADC from user space

Hi @pvenugo

I saw this already but wasn't sure how to work with this. I will have a closer look!

 

Thanks a lot!

Not so helpless guy anymore !

0 Kudos