Open ubombi opened 2 years ago
I struggle enabling I2C on OPI4B. i2cdetect won't detect anything. So far, only noticed that in example of this library SDA/SCL are in ALT3 mode, but in my case, those are IN.
i2cdetect
ALT3
IN
README.md +------+-----+----------+------+---+OrangePi 4+---+---+--+----------+-----+------+ | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ | | | 3.3V | | | 1 || 2 | | | 5V | | | | 64 | 0 | I2C2_SDA | ALT3 | 0 | 3 || 4 | | | 5V | | | | 65 | 1 | I2C2_SCL | ALT3 | 0 | 5 || 6 | | | GND | | | | 150 | 2 | PWM1 | IN | 0 | 7 || 8 | 1 | ALT2 | I2C3_SCL | 3 | 145 | | | | GND | | | 9 || 10 | 1 | ALT2 | I2C3_SDA | 4 | 144 | Actual: ./gpio/gpio readall +------+-----+----------+------+---+OrangePi 4+---+---+--+----------+-----+------+ | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ | | | 3.3V | | | 1 || 2 | | | 5V | | | | 64 | 0 | I2C2_SDA | IN | 1 | 3 || 4 | | | 5V | | | | 65 | 1 | I2C2_SCL | IN | 1 | 5 || 6 | | | GND | | | | 150 | 2 | PWM1 | ALT2 | 1 | 7 || 8 | 1 | ALT2 | I2C3_SCL | 3 | 145 | | | | GND | | | 9 || 10 | 1 | ALT2 | I2C3_SDA | 4 | 144 |
README.md
+------+-----+----------+------+---+OrangePi 4+---+---+--+----------+-----+------+ | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ | | | 3.3V | | | 1 || 2 | | | 5V | | | | 64 | 0 | I2C2_SDA | ALT3 | 0 | 3 || 4 | | | 5V | | | | 65 | 1 | I2C2_SCL | ALT3 | 0 | 5 || 6 | | | GND | | | | 150 | 2 | PWM1 | IN | 0 | 7 || 8 | 1 | ALT2 | I2C3_SCL | 3 | 145 | | | | GND | | | 9 || 10 | 1 | ALT2 | I2C3_SDA | 4 | 144 |
Actual: ./gpio/gpio readall
+------+-----+----------+------+---+OrangePi 4+---+---+--+----------+-----+------+ | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ | | | 3.3V | | | 1 || 2 | | | 5V | | | | 64 | 0 | I2C2_SDA | IN | 1 | 3 || 4 | | | 5V | | | | 65 | 1 | I2C2_SCL | IN | 1 | 5 || 6 | | | GND | | | | 150 | 2 | PWM1 | ALT2 | 1 | 7 || 8 | 1 | ALT2 | I2C3_SCL | 3 | 145 | | | | GND | | | 9 || 10 | 1 | ALT2 | I2C3_SDA | 4 | 144 |
It it okay this way? What does this mean?
I can't change it to ALT3 to check if it's related in any way, gpio fails with SegFault
Hi, Which image do you use?
I struggle enabling I2C on OPI4B.
i2cdetect
won't detect anything.So far, only noticed that in example of this library SDA/SCL are in
ALT3
mode, but in my case, those areIN
.It it okay this way? What does this mean?
I can't change it to
ALT3
to check if it's related in any way, gpio fails with SegFault