top of page
Search

Kria Kriations 0

This is the first episode of Kria Kriations, where I am flexing my Xilinx SoC skills posting content for Kria SoC. For this episode I speak about the complex "kriation" of adding AXI I2C to your Vivado design.


0) create the vivado design with the AXI II


note that I have two AXI IIC , one I grabbed from the dev kit and the second I am using to drive an external OLED Display
note that I have two AXI IIC , one I grabbed from the dev kit and the second I am using to drive an external OLED Display

1) set the pins and the pull up

The pins for IIC are on the bottom, you can see the matching in the get_ports name, for the other IIC it was set by Vivado automatically
The pins for IIC are on the bottom, you can see the matching in the get_ports name, for the other IIC it was set by Vivado automatically

2) compile the design, generate the bitstream and export the XSA to your petalinux design, update the project with hw-get-description and build the project


3) edit the pl.dtsi to add which address of the i2c device you will be interfacing

ree

4) compile this pl.dtsi to generate pl.dtbo

dtc -@ -O dtb -o pl.dtbo pl.dtsi


5) get your pl.dtbo and the .bit file of the fpga design named to the app that you will use in the design

I rename pl.dtbo to kv260_i2c.dtbo and kv260_i2c.bit.bin


6) create the jason file, named shell.json:

{

    "shell_type": "XRT_FLAT",

    "num_slots": "1"

}


7) copy all of them to petalinux:

asa@nasa:~/kria/pmod/2peta$ scp shell.json kv260_i2c.bit.bin kv260_i2c.dtbo petalinux@192.168.2.52:/home/petalinux


dont forget to change to your ip and details ...


8) create the name of the app , as the same name of the files kv260_i2c:


xilinx-kv260-starterkit-20222:~$ sudo mkdir /lib/firmware/xilinx/kv260_i2c


9) move the files to the folder :

xilinx-kv260-starterkit-20222:~$ sudo mv kv260_i2c.dtbo kv260_i2c.bit.bin shell.json /lib/firmware/xilinx/kv260_i2c


10) unload the app:


xilinx-kv260-starterkit-20222:~$ sudo xmutil unloadapp


11) load the recently created app:

xilinx-kv260-starterkit-20222:~$ sudo xmutil loadap kv260_i2c


12) detect the i2c:


ree

ree


 
 
 

Recent Posts

See All
10 Professional VHDL Coding tips

Besides knowing how to program in VHDL for FPGA projects, they will require from you extra coding skills to make your code more...

 
 
 

Comments


+17782284975

©2021 by dr.maikon. Proudly created with Wix.com

bottom of page