redmaze Posted April 30, 2020 Posted April 30, 2020 Hello, I have a OrangePi Zero+2 board and I am using i2c ports for connect several devices. Some i2c works OK. But I requiere r-i2c port. But the port does not work I have spend several days trying to make it works. Please, Can somebody help me?. This is turning into a headache. Thanks in advance.
martinayotte Posted April 30, 2020 Posted April 30, 2020 What "cat /proc/device-tree/soc/i2c@1f02400/status" is reporting ? "okay" or "disabled" ? Did you tried to change ' pins = "PL0\0PL1"; ' to ' pins = "PL0", "PL1"; ' instead ?
redmaze Posted April 30, 2020 Author Posted April 30, 2020 it says "okay" Others i2c have the same sintaxis:
martinayotte Posted April 30, 2020 Posted April 30, 2020 11 minutes ago, redmaze said: it says "okay" So, it should work ... Also, "i2cdetect -l" should reveal its presence ... Maybe it is the attached devices that doesn't respond ... Do you have PullUps on those ?
redmaze Posted April 30, 2020 Author Posted April 30, 2020 I attach an accelerometer in i2c address "0x1D" using PA18/19 the answer is OK. But using PL0/1 the i2c keep searching and nothing is obtained
martinayotte Posted April 30, 2020 Posted April 30, 2020 4 minutes ago, redmaze said: But using PL0/1 the i2c keep searching and nothing is obtained This is usually symptom of missing pullups ! According to schematic, the TWI0 and TWI1 has pullups provided by the OPiZ+2, but none are provided for S-TWI, you need to add them yourself ...
redmaze Posted April 30, 2020 Author Posted April 30, 2020 I test in 3 boards... I put a 1KOhm pullup resistor and the port keeps searching and nothing is detected.
martinayotte Posted April 30, 2020 Posted April 30, 2020 2 hours ago, redmaze said: I test in 3 boards... I put a 1KOhm pullup resistor and the port keeps searching and nothing is detected. Normally, other TWI ports are using 2K pullups, but on both SDA and SCK. Did you tried with both pullups ?
redmaze Posted April 30, 2020 Author Posted April 30, 2020 The same, I use 2K in both SDA and SCK for PL0/PL1 and it does't work.
Recommended Posts