redmaze Posted April 30, 2020 Share 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. Link to comment Share on other sites More sharing options...
martinayotte Posted April 30, 2020 Share 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 ? Link to comment Share on other sites More sharing options...
redmaze Posted April 30, 2020 Author Share Posted April 30, 2020 it says "okay" Others i2c have the same sintaxis: Link to comment Share on other sites More sharing options...
martinayotte Posted April 30, 2020 Share 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 ? Link to comment Share on other sites More sharing options...
redmaze Posted April 30, 2020 Author Share 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 Link to comment Share on other sites More sharing options...
martinayotte Posted April 30, 2020 Share 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 ... Link to comment Share on other sites More sharing options...
redmaze Posted April 30, 2020 Author Share Posted April 30, 2020 I test in 3 boards... I put a 1KOhm pullup resistor and the port keeps searching and nothing is detected. Link to comment Share on other sites More sharing options...
martinayotte Posted April 30, 2020 Share 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 ? Link to comment Share on other sites More sharing options...
redmaze Posted April 30, 2020 Author Share Posted April 30, 2020 The same, I use 2K in both SDA and SCK for PL0/PL1 and it does't work. Link to comment Share on other sites More sharing options...
Recommended Posts