UncleRus / esp-idf-lib

Component library for ESP32-xx and ESP8266
https://esp-idf-lib.readthedocs.io/en/latest/
1.43k stars 441 forks source link

MCP23S17 lib not working #317

Closed aeropagz closed 2 years ago

aeropagz commented 2 years ago

The issue

It is not possible to configure the MCP23S17 chip. Writes are ignored.

    ESP_ERROR_CHECK(mcp23x17_port_set_mode(&dev, 0xFFFF));
    ESP_ERROR_CHECK(mcp23x17_port_get_mode(&dev, &val));

    ESP_LOGI(TAG, "Mode %d\n", val);

val is 0x7FFF which is unexpected. Tested with different MCP23S17 chips.

Which SDK are you using?

esp-idf

Which version of SDK are you using?

4.4

Which build target have you used?

Component causing the issue

mcp23S17

Anything in the logs that might be useful for us?

No response

Additional information or context

No response

Confirmation

aeropagz commented 2 years ago

Solved the issue by lower the SPi Frequency to SPI_MASTER_FREQ_8M