07-21-2022, 01:39 PM
So, I haven't been able to make it work.
Note: For the sake of simplicity, I'm going to call cm3_pin# and cm4_pin# to refer to what cm4 pin is connected to what pin in my adapter board.
From what I can see, cm3_pin3 is connected to cm4_GPIO0 (cm4_pin36) and cm3_pin5 is connected to cm4_GPIO1 (cm4_pin35).
According to the CM4 documentation, I2C devices can be connected to cm4_GPIO0 for data and cm4_GPIO1 for clock.
I started by tinning cm3_pin3 and cm3_pin5 and soldering magnet wires to them (see attached photos). I soldered the other ends to the Freeplay board's pins 44 and 45 respectively (these pins already have the addon board connected to them). Verified there was a solid connection and that there weren't shorts between them.
On the software side, I changed the i2c overlay in the config.txt to:
Turned on the device and saw the following in dmesg:
When running `raspi-gpio get`, I still don't see GPIO0 and GPIO1 set to receive I2C:
This means that I don't get any device detected by I2C:
Any ideas are more than welcome!
Thanks!!
Note: For the sake of simplicity, I'm going to call cm3_pin# and cm4_pin# to refer to what cm4 pin is connected to what pin in my adapter board.
From what I can see, cm3_pin3 is connected to cm4_GPIO0 (cm4_pin36) and cm3_pin5 is connected to cm4_GPIO1 (cm4_pin35).
According to the CM4 documentation, I2C devices can be connected to cm4_GPIO0 for data and cm4_GPIO1 for clock.
I started by tinning cm3_pin3 and cm3_pin5 and soldering magnet wires to them (see attached photos). I soldered the other ends to the Freeplay board's pins 44 and 45 respectively (these pins already have the addon board connected to them). Verified there was a solid connection and that there weren't shorts between them.
On the software side, I changed the i2c overlay in the config.txt to:
Code:
dtoverlay=i2c1,pins_36_35=1,combine=off
Turned on the device and saw the following in dmesg:
Code:
pi@retropie:~ $ dmesg | grep i2c
[ 3.665462] i2c /dev entries driver
[ 5.051972] bcm2708_i2c fe804000.i2c: BSC1 Controller at 0xfe804000 (irq 37) (baudrate 400000)
When running `raspi-gpio get`, I still don't see GPIO0 and GPIO1 set to receive I2C:
Code:
pi@retropie:~ $ raspi-gpio get
BANK0 (GPIO 0 to 27):
GPIO 0: level=1 fsel=0 func=INPUT pull=UP
GPIO 1: level=1 fsel=0 func=INPUT pull=UP
GPIO 2: level=1 fsel=4 alt=0 func=SDA1 pull=UP
GPIO 3: level=1 fsel=4 alt=0 func=SCL1 pull=UP
GPIO 4: level=1 fsel=0 func=INPUT pull=UP
GPIO 5: level=1 fsel=0 func=INPUT pull=UP
GPIO 6: level=1 fsel=0 func=INPUT pull=UP
GPIO 7: level=1 fsel=0 func=INPUT pull=UP
GPIO 8: level=0 fsel=1 func=OUTPUT pull=UP
GPIO 9: level=0 fsel=4 alt=0 func=SPI0_MISO pull=DOWN
GPIO 10: level=0 fsel=4 alt=0 func=SPI0_MOSI pull=DOWN
GPIO 11: level=0 fsel=4 alt=0 func=SPI0_SCLK pull=DOWN
GPIO 12: level=0 fsel=4 alt=0 func=PWM0_0 pull=DOWN
GPIO 13: level=0 fsel=4 alt=0 func=PWM0_1 pull=DOWN
GPIO 14: level=1 fsel=0 func=INPUT pull=UP
GPIO 15: level=1 fsel=0 func=INPUT pull=UP
GPIO 16: level=1 fsel=0 func=INPUT pull=UP
GPIO 17: level=1 fsel=0 func=INPUT pull=UP
GPIO 18: level=1 fsel=0 func=INPUT pull=UP
GPIO 19: level=1 fsel=0 func=INPUT pull=UP
GPIO 20: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 21: level=1 fsel=1 func=OUTPUT pull=DOWN
GPIO 22: level=1 fsel=1 func=OUTPUT pull=DOWN
GPIO 23: level=1 fsel=0 func=INPUT pull=UP
GPIO 24: level=1 fsel=0 func=INPUT pull=UP
GPIO 25: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 26: level=1 fsel=0 func=INPUT pull=UP
GPIO 27: level=1 fsel=1 func=OUTPUT pull=DOWN
BANK1 (GPIO 28 to 45):
GPIO 28: level=1 fsel=2 alt=5 func=RGMII_MDIO pull=UP
GPIO 29: level=0 fsel=2 alt=5 func=RGMII_MDC pull=DOWN
GPIO 30: level=1 fsel=7 alt=3 func=CTS0 pull=UP
GPIO 31: level=1 fsel=7 alt=3 func=RTS0 pull=NONE
GPIO 32: level=1 fsel=7 alt=3 func=TXD0 pull=NONE
GPIO 33: level=1 fsel=7 alt=3 func=RXD0 pull=UP
GPIO 34: level=0 fsel=7 alt=3 func=SD1_CLK pull=NONE
GPIO 35: level=1 fsel=7 alt=3 func=SD1_CMD pull=UP
GPIO 36: level=1 fsel=7 alt=3 func=SD1_DAT0 pull=UP
GPIO 37: level=1 fsel=7 alt=3 func=SD1_DAT1 pull=UP
GPIO 38: level=1 fsel=7 alt=3 func=SD1_DAT2 pull=UP
GPIO 39: level=1 fsel=7 alt=3 func=SD1_DAT3 pull=UP
GPIO 40: level=1 fsel=0 func=INPUT pull=NONE
GPIO 41: level=1 fsel=0 func=INPUT pull=NONE
GPIO 42: level=1 fsel=1 func=OUTPUT pull=NONE
GPIO 43: level=1 fsel=0 func=INPUT pull=NONE
GPIO 44: level=1 fsel=0 func=INPUT pull=NONE
GPIO 45: level=1 fsel=0 func=INPUT pull=NONE
BANK2 (GPIO 46 to 53):
GPIO 46: level=0 fsel=0 func=INPUT pull=UP
GPIO 47: level=0 fsel=0 func=INPUT pull=UP
GPIO 48: level=0 fsel=4 alt=0 func=SD0_CLK pull=DOWN
GPIO 49: level=0 fsel=4 alt=0 func=SD0_CMD pull=DOWN
GPIO 50: level=0 fsel=4 alt=0 func=SD0_DAT0 pull=DOWN
GPIO 51: level=0 fsel=4 alt=0 func=SD0_DAT1 pull=DOWN
GPIO 52: level=0 fsel=4 alt=0 func=SD0_DAT2 pull=DOWN
GPIO 53: level=0 fsel=4 alt=0 func=SD0_DAT3 pull=DOWN
This means that I don't get any device detected by I2C:
Code:
pi@retropie:~ $ sudo i2cdetect 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1.
I will probe address range 0x03-0x77.
Continue? [Y/n] Y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Any ideas are more than welcome!
Thanks!!