Try increasing I2C IRQ priorities above the other sources, 5 for example, and see if it makes a difference.
The IRQ priorities for both I2C1 and I2C2 were already 5. I changed it to 7. Same issue.
Some other common issues are listed in this article: http://wiki.chibios.org/dokuwiki/doku.p ... e_shooting
I already studied this guide before opening this thread.
After numerous resets, I was once able to read the correct values with two different i2c read requests. Output:
Code: Select all
Init error: 0
Add: 34
Sleep: 1
Yet the next reset produced the same error again:
Code: Select all
Init error: 0
Add: 34
I2C STATUS: -1
I2C ERROR: 0
Sleep: 0
Just hooked the sensor module to rpi-3. Works like a charm.
I have read virtually all the posts on this forum about I2C, and still got no idea whats bugging my very simple code.