Jump to content

rockstiff

Members
  • Posts

    2
  • Joined

  • Last visited

rockstiff's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. HI, sorry i didnt answer before, i had some issues with the computer and with petalinux so i wasnt able to test the solution. Still doesnt work. petalinux-config was ok, i tryied to modify the device-tree like in the example to use the xlnx driver but the linux doesnt register the /dev/i2c module. This is my current configuration. If i remove "cdns,i2c-r1p10" then when booting i have no /dev/i2c-0. i2c@e0004000 { compatible = "cdns,i2c-r1p10", "xlnx,axi-iic-2.0", "xlnx,xps-iic-2.00.a", "xlnx,axi-iic-2.1"; status = "okay"; clocks = <0x1 0x26>; interrupts = <0x0 0x19 0x4>; reg = <0xe0004000 0x1000>; #address-cells = <0x1>; #size-cells = <0x0>; clock-frequency = <100000>; phandle = <0xe>; }; I added one more compatible according to this driver but still doesnt detect it as xiic-i2c so i dont know if its a driver issue or another issue. Always the i2c-detect -r -y returns "--". In putty the log says "cdns-i2c e0005000.i2c: timeout waiting on completion". Also i added PULLUP for the JC ports but the same.
  2. Hello. Im trying to read an I2C sensor (ADXL357) with a Zybo Z7-10. Im kinda lost since im not an expert on fpgas. Im using this design on vivado 2019.2 ##Clock signal set_property -dict { PACKAGE_PIN K17 IOSTANDARD LVCMOS33 } [get_ports { sysclk }]; #IO_L12P_T1_MRCC_35 Sch=sysclk create_clock -add -name sys_clk_pin -period 8.00 -waveform {0 4} [get_ports { sysclk }]; ##Pmod Header JC set_property -dict { PACKAGE_PIN V15 IOSTANDARD LVCMOS33 } [get_ports { port_i2c_scl_io }]; #IO_L10P_T1_34 Sch=jc_p[1] set_property -dict { PACKAGE_PIN W15 IOSTANDARD LVCMOS33 } [get_ports { port_i2c_sda_io }]; #IO_L10N_T1_34 Sch=jc_n[1] ls /dev gives only i2c-0 interface. Im working with a pynq framework that uses petalinux as base. For now im not using python but im trying first to detect the sensor address (from linux) and then do the logic (python or with sdk) When i connect to the Pin 1 and 2 of the PMOD JC i dont detect nothing with "sudo i2c -r -y 0" only "--" on all the addresses. I have tried other ports but no response yet. What am i doing wrong? Is Pin 1/2 correct on JC? i dont understand why linux doesn't detect the sensor. The reference manual says that any pin can be routed throug PMOD but how do i said to the linux that P1-2 of JC is the i2c? (i have all pmods available so i can use all). Thanks EDIT: cat ./petalinux_project/build/tmp/work-shared/plnx-zynq7/kernel-source/arch/arm/boot/dts/zynq-7000.dtsi amba: amba { u-boot,dm-pre-reloc; compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; interrupt-parent = <&intc>; ranges; ... ... i2c0: i2c@e0004000 { compatible = "cdns,i2c-r1p10"; status = "disabled"; clocks = <&clkc 38>; interrupt-parent = <&intc>; interrupts = <0 25 4>; reg = <0xe0004000 0x1000>; #address-cells = <1>; #size-cells = <0>; }; i2c1: i2c@e0005000 { compatible = "cdns,i2c-r1p10"; status = "disabled"; clocks = <&clkc 39>; interrupt-parent = <&intc>; interrupts = <0 48 4>; reg = <0xe0005000 0x1000>; #address-cells = <1>; #size-cells = <0>; }; Is I2C disabled right? what should be the device tree to enable the pins on a pmod? modifying the dts then i should recompile boot.bind and image.ub and replace it on the sd?
×
×
  • Create New...