cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
3,264 Views
Registered: ‎09-09-2015

XADC PS-Side external measurement

Jump to solution

Dear All,

For the first time im trying to get the XMOD working with the PS side and print the values in a terminal. I tried a bunch of tutorials like the microzed chronicles. I managed to get the internal signals working but whatever i try for measuring one of the external input it doesnt work. I ended up using the tutorial posted as attachment, as attechments I also included my sourcecode and block design.

I tried debugging by making several prints and I know the code works untll at least the "Test2" printf. During the build, no errors or anything appear. So i'm a bit confused into finding out where it all goed wrong.


Hope someone can help me out.
Best regards,
Remco Vink

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer
Observer
5,444 Views
Registered: ‎09-09-2015
0 Kudos
6 Replies
Highlighted
Voyager
Voyager
3,259 Views
Registered: ‎06-24-2013

Hey @remcovink

 

I know it doesn't help much, but seems to work out-of-the-box on Linux:

for n in /sys/devices/soc0/amba/*.adc/iio*/in_voltage*raw; do
    b=${n%_raw}

    ZVN=V${b##*_v}
    ZVR=`cat $n`
    ZVS=`cat ${b}_scale`

    ZV=`dc -e "5k ${ZVR/-/_} $ZVS * 1000 / p"`

    printf "%-14.14s\t%8.4f V\n" $ZVN $ZV
done
Vccint        	  0.9946 V
Vccaux        	  1.7864 V
Vccbram       	  0.9961 V
Vccpint       	  0.9932 V
Vccpaux       	  1.7900 V
Vccoddr       	  1.4919 V
Vrefp         	  1.2451 V
Vrefn         	 -0.0029 V

Best,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
Highlighted
Observer
Observer
3,243 Views
Registered: ‎09-09-2015
I am indeed not trying to use linux or anything.

Aren't these also just the internal values? (Ive succeeded in reading out those)
Im just trying to read out Vaux14 now
0 Kudos
Highlighted
Voyager
Voyager
3,238 Views
Registered: ‎06-24-2013

@remcovink  Aren't these also just the internal values?

 

Completely right you are, sorry I am ...

 

But skimming over UG480, I stumbled upon the following note (which is repeate at least 8 times):

 

Auxiliary channels 6, 7, 13, 14, and 15 are not supported on Kintex-7 devices. Some auxiliary analog channels might also not be supported in certain Virtex, Artix, and Zynq-7000 All Programmable SoC device package options. Users should consult the package file for the device.

 

So maybe this helps ...

 

Best,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
Highlighted
Observer
Observer
5,445 Views
Registered: ‎09-09-2015
0 Kudos
Highlighted
Voyager
Voyager
3,195 Views
Registered: ‎06-24-2013

@remcovink Hmm, the thread there seems to be open and ongoing, maybe you could elaborate a little on your solution?

 

Thanks in advance,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
Highlighted
Observer
Observer
2,974 Views
Registered: ‎09-09-2015

Sorry for the late reply, of course I can.

 

https://forum.digilentinc.com/topic/3765-xadc-on-zybo-gives-inaccurate-voltages/#comment-14225
I used the two files posted by sbobrowicz (all credits go to him)


I added my own xadc file to enable the constraints to the output I desired and it seemed to work.
Also I used the Vivado 2016.4 vivado to succesfully build the TCL file since it was made in the same Vivado 2016.4 version.

0 Kudos