About Us Knowledge Base Community Forum Electronics Toolbox FAQ Shipping & Delivery

Community Forum

Share your projects and post your questions

Search
Register or Sign In
Forum

IO Pi Zero problems

702 Views - Created 08/11/2017

08/11/2017

Posted by:
edsousa

Users Avatar

Hello I bought 2 IO Pi Zero to use on a a company project.

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?

08/11/2017

Posted by:
andrew

Users Avatar

Location:
United Kingdom

Users Twitter  Users Website  

Hello

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.

AB Electronics UK Tech Support

08/11/2017

Posted by:
edsousa

Users Avatar

Hello I am no using a raspberry pi. I am using a upboard with the MRAA library.

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)
https://forum.arduino.cc/index.php?topic=437248.0
https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=91209
https://microchip.secure.force.com/microchipknowledge/articles/en_US/FAQ/On-MCP23008-MCP23017-SDA-line-change-when-GPIO7-input-change/?q=mcp23017&l=en_US&fs=Search&pn=1

08/11/2017

Posted by:
andrew

Users Avatar

Location:
United Kingdom

Users Twitter  Users Website  

I haven't tested the IO Pi Zero on an upboard but it should work on any device with an I2C bus.  This is the first time I have come across the issue with GPIO 7 so I am not sure if there is a fix which would work on the upboard. 

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 do.  If you ordered from one of our resellers then you will need to contact them for a refund and expain to them the problem you have had with the board.

AB Electronics UK Tech Support

08/11/2017

Posted by:
edsousa

Users Avatar

But can you confirm that this could happen?

I bougth from one of your reselers thepihut.com

08/11/2017

Posted by:
andrew

Users Avatar

Location:
United Kingdom

Users Twitter  Users Website  

I have not seen this problem before with the IO Pi Zero but the links you provided show that other people have had a similar problem as you so it looks like it could be a problem with the MCP23017 chips.  Microchip doesn't have the issue listed in their errata for the MCP23017 so it could be a specific set of circumstances that causes the problem to show.

If you contact the Pi Hut and explain that the boards are faulty they should give you a full refund.  

AB Electronics UK Tech Support

08/11/2017

Posted by:
edsousa

Users Avatar

CAn you contac microchip (you migth get some better access to theyr suport team) and ask them if there is a solution to this? Or if it is realy a known issue?

 

Thank you for your help anyway...

08/11/2017

Posted by:
andrew

Users Avatar

Location:
United Kingdom

Users Twitter  Users Website  

The link you found earlier from Microchips support forum detailed the same error that you are having and according to their website there isn't a solution to the problem.

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? 

AB Electronics UK Tech Support

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.