0

I’m trying to set up an MCP23017 GPIO expander on my Raspberry Pi running latest raspbian, but I’ve run into an issue. Here’s what I’ve done:

  • I updated the /boot/firmware/config.txt file as follows:

    dtoverlay=mcp23017

  • Rebooted the system.

  • After rebooting, I see the following error in the dmesg output:

    [ 9.787178] mcp230xx 1-0020: error -EIO: can't write IOCON 32
    [ 9.790285] mcp230xx: probe of 1-0020 failed with error -5

My setup:

  • Raspberry Pi zero w running latest openhabian.

  • MCP23017 connected via I2C.

Questions:

  • What does this error mean (-EIO: can't write IOCON 32)?

  • Could this be a wiring or addressing issue with the I2C bus?

Are there additional steps or configurations required to properly load the MCP23017 overlay?

Rohit Gupta
  • 343
  • 2
  • 4
  • 11
Test
  • 1

1 Answers1

0

EIO (Input/Output Error) means the Raspberry Pi cannot communicate with the MCP23017. can't write IOCON 32 suggests the driver attempted to write to the IOCON register (register 0x0A or 0x05 depending on bank settings) on the MCP23017 but failed, likely due to a communication issue.Run i2cdetect -y 1 to scan the I2C bus for devices.Also check if the Raspberry Pi I2C interface is enabled. Check all of your connections and the values of pull-up resistors. You can make a breadboard friendly MCP23017 breakout board like this: https://www.pcbway.com/project/shareproject/Breadboard_friendly_MCP23017_Breakout_board_TSSOP28_version_3b99655f.html

liaifat85
  • 257
  • 1
  • 4