I'm trying to use the I2C multiplexer TCA9548A and I can't seem to get any output from the output ports.
I'm using the Nucleo32L031 board connected to a Adafruit TCA9548A 1:8 multiplexer board. I have the board setup properly, Vcc = 3.3, GND, SCA and SCL pins double checked. I have a Sparkfun TMP102 temp sensor board connected to the TCA9548A's port0.
I set the mux channel with:
HAL_StatusTypeDef ret;
uint16_t TCA9548A_ADDR = (0x70 << 1); //default address is 0x70
uint8_t current_buf[3];
channel_buf[0] = 0;
ret = HAL_I2C_Master_Transmit(&hi2c1, TCA9548A_ADDR, channel_buf, 1, 15000); // sets TCA9548A output channel to port 0
ret = OK here
Then I try to communicate with the temp sensor TMP102:
uint16_t SEN_13314_ADDR = (0x48 << 1); // default address is 0x48
uint8_t temp_buf[3];
ret = HAL_I2C_Master_Receive(&hi2c1, SEN_13314_ADDR, temp_buf, 2, 5000);
ret != OK here
I've checked all of the pull-ups are correct. If I connect the TMP102 I2C lines directly to the Nucleo's I2C lines I can read the temperature. I just can't using the mux.
Has anybody successfully used the TCA9548A chip? Any ideas?
Thanks,
Richard