The BANK bit changes the MCP23017 register address map before the end of a multi-byte I²C transaction. Microchip illustrates the case with BANK initially clear and automatic address increment enabled. Writing 0x80 to IOCON at 0x0A sets BANK. The address pointer then advances to 0x0B, which is not a valid register address in the new map. The bus driver cannot use successful transport as proof that the intended registers received the trailing bytes.
A board might use a 24 MHz TXC 7C oscillator as the host reference, with the I²C controller generating SCL through a divider. The host reference is not the I²C bus rate. Even if both clocks are correct, an old address sequence does not become valid by slowing SCL. Check the address-map transition before changing the oscillator or changing pull-ups to address a symptom that may have no electrical cause.
Update BANK with a single-byte IOCON write and finish that transaction. Start the next transaction with an explicit register address from the new map. Preserve the other IOCON fields needed by the board rather than copying the 0x80 illustration unconditionally. If the host can restart while the expander remains powered, make the expander's state part of the recovery design. On an isolated test board, compare the bus trace for the combined write against the split sequence. Then read back port directions using the correct map and verify benign output states. Separately confirm the exact 7C order code and voltage compatibility.
Related selection guide: MERLIN Crystal Timing: Clock oscillators
Resource link: https://www.mecxtal.com.cn/en/products/oscillators.html
