I am using an STM32F103 and TI's TCA9539 and TCA6408A Port extender. Both of them support 400 kHz (I2C Fastmode) and 100 kHz (I2C standard mode) clock frequencies. I use 3 TCA9539 and 1 TCA6408A. Here is my Schematic diagram:
I use STM32CubeMX and here is the configuration and code:
I tested both 400 kHz mode and 100 kHz mode.
HAL_GPIO_WritePin(TS0_RESET_GPIO_Port, TS0_RESET_Pin, GPIO_PIN_SET);
HAL_GPIO_WritePin(TS1_RESET_GPIO_Port, TS1_RESET_Pin, GPIO_PIN_SET);
HAL_GPIO_WritePin(TS2_RESET_GPIO_Port, TS2_RESET_Pin, GPIO_PIN_SET);
HAL_GPIO_WritePin(TS3_RESET_GPIO_Port, TS3_RESET_Pin, GPIO_PIN_SET);
// ...
while (1) {
uint8_t test_data[3] = {0x08, 0, 0};
HAL_I2C_Master_Transmit(&hi2c1, 0X75<<1, test_data, 2,10);
HAL_I2C_Master_Transmit(&hi2c1, 0X20<<1, test_data, 2,10);
}
// ...
According the datasheet, since I connect the address pin of TCA6408A, the address of it should be 0x20 (7 bits), and the three TCA9539's addresses should be 0x74,0x75 and 0x77. So I sent the test data in the above code.
However, only the TCA6408A responds (ACK), and the TCA9539 doesn't. I changed the different addresses but it doesn't work. Here is the wave:
They are all similar devices from TI. I think the only difference between them is that they have different GPIO bits, so I wonder why they have different situations.