IO Pi Zero problems
2058 Views - Created 08/11/2017
But I noticed a problem.
I am using all the IO's of the IO Zero board as inputs.
And I am trying to read constantly the pins for changes.
But Some times the system stops working.
What I noticed is that If I am issuing a read from the SPI and some Input of the MCP23017 changes (specially the GPIO port B pin 7) it misses the read and after some time the I2C buss stops answering.
Is there something I can do to fix this?
I haven't come across this problem before. Are you using one of our software libraries to access the IO Pi Zero and if so which language are you using?
Accessing the SPI bus shouldn't have any impact on the I2C bus. It may be worth checking that your Linux install is fully up to date using "sudo apt-get update" and "sudo apt-get dist-upgrade" just in case there is a bug with Linux that is causing the problem.
As the I2C protocol is a standard I must assume that they are 100% compatible (also the pinout is the same). The upboard has a hardware periferal that takes care of the I2C comunication.
I am not using the SPI at the same time.
Some other people are having the same problem as me: (with and without a raspberry pi)
Did you order the IO Pi Zeros directly from our shop or through one of our resellers? If it was bought from our shop then I can offer you a full refund as the board is not working as it should. If you ordered from one of our resellers then you will need to contact them for a refund and explain to them the problem you have had with the board.
I bougth from one of your reselers thepihut.com
If you contact the Pi Hut and explain that the boards are faulty they should give you a full refund.
Thank you for your help anyway...
I tried replicating the issue on a Raspberry Pi using our Python library and I couldn't make it fail. The only thing I can think of is our IO Pi libraries all open the I2C bus, read the data and then close the bus so it is opened and closed on every read or write. As the problem with the chip seems to cause a stop condition on the I2C bus, closing the bus may stop the Raspberry Pi from failing as the I2C stop condition may be reset when the bus is opened again for the next read.
With the MRAA library, you are using is it possible to reset the I2C bus between reads and see if that fixes the problem?
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view, download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.