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: 
Explorer
Explorer
1,568 Views
Registered: ‎10-19-2017

Using I2C to Communicate with ADC in PS

Jump to solution

Is it possible to talk to the ADC via I2C bus in PetaLinux with a similar implementation shown here?

 

https://elinux.org/Interfacing_with_I2C_Devices

 

Thanks.

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
2,385 Views
Registered: ‎03-27-2014

Re: Using I2C to Communicate with ADC in PS

Jump to solution
I guess the ADC you are referring to is the Xilinx 'XADC' which I think is located in the PL (FPGA) and so, not directly connected to the PS (ARM).

I guess Xilinx provides an XADC driver, you should inquire on how to customize your PetaLinux OS so you have that driver available. This will involve:

1) customizing the OS and recompiling a valid image
2) customizing your devicetree description file (XADC description)
3) eventually having some /dev/xadc entry in your Linux filesystem

At this point you have a valid software entry to interact with the ADC.

But the ADC is in the PL, so you also need a valid hardware system to run on the FPGA at the same time, to actually be able to interact with it. You need to generate a hardware system with one 'XADC' IP core and the proper pin connections for your current Zynq board too.

Only a combination of a valid OS/software application & a valid hardware system will allow the whole system to properly work

G.W.,
NIST - Time Frequency metrology
0 Kudos
4 Replies
2,386 Views
Registered: ‎03-27-2014

Re: Using I2C to Communicate with ADC in PS

Jump to solution
I guess the ADC you are referring to is the Xilinx 'XADC' which I think is located in the PL (FPGA) and so, not directly connected to the PS (ARM).

I guess Xilinx provides an XADC driver, you should inquire on how to customize your PetaLinux OS so you have that driver available. This will involve:

1) customizing the OS and recompiling a valid image
2) customizing your devicetree description file (XADC description)
3) eventually having some /dev/xadc entry in your Linux filesystem

At this point you have a valid software entry to interact with the ADC.

But the ADC is in the PL, so you also need a valid hardware system to run on the FPGA at the same time, to actually be able to interact with it. You need to generate a hardware system with one 'XADC' IP core and the proper pin connections for your current Zynq board too.

Only a combination of a valid OS/software application & a valid hardware system will allow the whole system to properly work

G.W.,
NIST - Time Frequency metrology
0 Kudos
Explorer
Explorer
1,552 Views
Registered: ‎10-19-2017

Re: Using I2C to Communicate with ADC in PS

Jump to solution

@guillaumebres what device on the PS might I use I2C to communicate. My boss wants to me to make a practice application that uses Linux capabilities of the PS and the Cadence I2C driver to move some data around. I am not sure what device there is to actually talk to on the board via I2C.

 

Thanks.

0 Kudos
1,536 Views
Registered: ‎03-27-2014

Re: Using I2C to Communicate with ADC in PS

Jump to solution
In case of a running OS, the device is actually the filesystem entry provided by the driver. In case of a Linux OS all filesystem entries are simply files. Reading & writing to that file ends up like reading/writing the SPI bus. The beauty of a driver is the high level interface it provides to some low level peripheral.

In our case we're talking about the XADC linux driver
G.W.,
NIST - Time Frequency metrology
0 Kudos
58 Views
Registered: ‎09-05-2019

Re: Using I2C to Communicate with ADC in PS

Jump to solution

Execuse me, I have the same practice, I would like to use cadence communicate with HDMI or I2C device. Do you done with your device? Can you tell me something about that? Thank you so much.

0 Kudos