adafruit / adafruit/Adafruit-MCP23017-Arduino-Library

GPIO7 bug hacking

Open
#96 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
385
Forks
204
PR merge metrics
No merged PRs in 30d

Description

Concerning this warning

Some people have reported an undocumented bug that can potentially corrupt the I2C bus. It occurs if an MCP230XX input pin state changes during I2C readout. This should be very rare. For more information, see this [forum post](https://www.microchip.com/forums/m646539.aspx) and this [knowledge base article](https://microchipsupport.force.com/s/article/On-MCP23008-MCP23017-SDA-line-change-when-GPIO7-input-change%3E).

It may appear that you can bypass this problematic by using the software interrupt and the interrupt capture register. Doing so you simulate a buffer that avoid the real time change bug which affect the SDA line.

Just a thought by now that I've to test, but first I have to found a solution to replicate the bug efficiently.

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file or test is named. Start by reading the warning, forum post, and knowledge base article, then determine how to reproduce the MCP230XX GPIO7 change during I2C readout and whether the proposed software-interrupt approach avoids the SDA corruption; done means the behavior is reproducible and a validated fix or documented limitation is established.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.