• Content count

  • Joined

  • Last visited

  1. Program code on PetaLinux

    No there isn't an other path existing. The iio:device0 is the internal XADC. But there is not another iio:device appearing. Should be a problem with the device tree I think. But I don't know what I have to add to user-system.dtsi, or somewhere else. Maybe you can help me here. I added a comment in the code below: /include/ "system-conf.dtsi" / { chosen { bootargs = "console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio"; /*do I have to add here something, and if yes what?*/ }; }; &xadc_wiz_0 { clocks = <&clkc 15>; xlnx,channels { #address-cells = <1>; #size-cells = <0>; channelJA4@7 { reg = <7>; }; channelJA1@15 { reg = <15>; }; }; }; &axi_gpio_rgb_led { compatible = "generic-uio"; }; &axi_gpio_button { compatible = "generic-uio"; }; &axi_gpio_segment { compatible = "generic-uio"; }; The Xilinx_ADC_Driver in petalinux-config > industriell I/O is also enable. And the naming of the xadc_wiz_0 should also be correct, when you compare the posts above! Do you know what could be the problem?
  2. Program code on PetaLinux

    Thank you for your answer! I will add this. Can you tell me, where in /sys/bux/iio/devices/iio\:device0 I can find the external voltages I want to measure. Because in this path I can find the following: My driver is looking like this: &xadc_wiz_0 { clocks = <&clkc 15>; xlnx,channels { #address-cells = <1>; #size-cells = <0>; channelJA4@7 { /*Vaux6*/ reg = <7>; }; channelJA1@15 { /*Vaux14*/ reg = <15>; }; }; }; The voltage files are only counted from 0 to 7, looks a bit strange for me.
  3. Program code on PetaLinux

    Thanks for your answers, they are making the stuff more clear for me. But I still have some questions about the XADC: The driver you send is made for 4 Channels right? So in my case I only have to the register 7 (vaux6) and register 15 (vaux14). I configured the XADC to simultaneous access, but I read that this functions is not available for simultaneous access. Is there an other way to solve this problem? Could I add a XADC module and map it, and read from some registers the voltage values from the simultaneous access? (in this case, I won't need a driver, right?) I also have questions about the GPIO: Is there also a drive like @sbobrowicz posted for XADC existing for GPIO? Is the reading/writing of the GPIO-ports the same than, like XADC? I found this one. Is this correct. It is looking too simple... &axi_gpio_button { compatible = "generic-uio"; }; thanks a lot, and greetings,
  4. Program code on PetaLinux

    Hello! Here is another newbie question from me! I am having a running hardware project from Vivado, and I also debugged bare metal code with SDK. Both was running perfectly. Now I also got a PetaLinux (v2017.4) run on my Zybo Z7-20. So far so good. First I thought, that I could only paste the c code on PetaLinux, compile it and let it run. But of course it didn't worked because I used bare metal code. I wrote already that I have to add drivers to the device tree. Here are my problems/questions: 1) I wrote something the following files: system-user.dtsi, zynq-7000.dtsi, system-top.dts and system-conf.dtsi As I wrote I am only allowed to change stuff in the system-user.dtsi file. But when I compare the driver code from your Zybo Z7-20 and the stuff I found in the internet. It looks completly different. So where and what do I have add? I wrote that I have to enable the kernel configuration (where and how)? Am I doing this with petalinux-config -c kernel, is it also possible that when I use my own hardwaretarget for PetaLinux creating , that the enabeling of the drivers happened already? 2) I want to send the voltage values over ethernet, so do I need one or two drivers (XADC-driver or XADC + ethernet-driver) for it and also a gpio driver, right? Is there code for Zybo Z7-20 somewhere existing, or where can I find some code that is fitting? I made more trys but never the petalinux-build was successfully. Thanks again for your help and time, it is always totally helpful! A+ for your job, helping a totally newbie ;-) greetings,