cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jackfrye11
Explorer
Explorer
1,959 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
guillaumebres
Scholar
Scholar
2,776 Views
Registered: ‎03-27-2014
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

gw.
Embedded Systems, DSP, cyber

View solution in original post

0 Kudos
4 Replies
guillaumebres
Scholar
Scholar
2,777 Views
Registered: ‎03-27-2014
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

gw.
Embedded Systems, DSP, cyber

View solution in original post

0 Kudos
jackfrye11
Explorer
Explorer
1,943 Views
Registered: ‎10-19-2017

@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
guillaumebres
Scholar
Scholar
1,927 Views
Registered: ‎03-27-2014
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
gw.
Embedded Systems, DSP, cyber
0 Kudos
449 Views
Registered: ‎09-05-2019

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