TCA9548A I2C multiplexer interface with nRF52832 DK

I was able to interface a 9 axis MPU9250 sensor with nRF52832 via TWI. Now I want to read more number of sensor's data i.e., I want to read 8 IMU sensors data. Since, nRF52832 has only 2 TWI ports, I have interfaced all the sensors via a I2C multiplexer i.e., TCA 9548A. When I am initializing the i2c multiplexer using its address 0x70, the flow is struck inside the while (m_xfer_done == false){} only. m_xfer_done state is not becoming true at any time. Is it because of the error handling function? if so how to debug the error handling function? Please throw me some answer soon.

Thanks 

  • HI,

    I understood the context. I will let you know the steps need to be followed, please explain me about the relevant programming functions of the nrf52 to perform these steps:

    1. first step is to check whether the device with address 0x70 is connected to the microcontrller

    2. One control register of the above mentioned device is to be enabled by writing 0x01 into it to select first channel

    3. The control register has to be changed to 0x20 to select the next channel

    4. Next, the control register address has to changed to 0x40 to select the next channel and so on.

  • So the control register is part of the TWI payload, right? You said in your initial post that you already succeeded in interfacing one MPU (I assume that was without the I2C multiplexer), so you have the basic I2C up and running, right? Did you try to modify that application to communicate with the I2C Multiplexer instead of the MPU directly?

    BR,

    Edvin

Related