6 Replies Latest reply on Nov 13, 2020 2:41 AM by GaneshD_41

    How to design I2c bridge connected to a multi master I2c controller

    MiHe_282546

      Hi,

      I need to connect two buses of I2c using the psoc5lp and also to share them with the I2c multimaster controller.

      I'm using sio pins if it helps.

       

      Thanks

      Miki

        • 1. Re: How to design I2c bridge connected to a multi master I2c controller
          MiHe_282546

          I'm adding here a diagram of what I'm trying to implement:

          Capture.JPG

          I'm aware of the example at the I2C component datasheet when using the the external OE buffers. There are two examples, one which is for muxing between two I2C busses and the second is how to share two I2C components with one i2c bus.

          In my case I need to bridge two I2C buses and to share them with one I2C component.

           

          Thanks

          Miki

          • 2. Re: How to design I2c bridge connected to a multi master I2c controller
            RakshithM_16

            Hi Miki,

             

            I need to connect two buses of I2c using the psoc5lp and also to share them with the I2c multimaster controller

            It is not recommended to use a single I2C block between two I2C buses as it might result in timing issues. Can you please let us know if you can connect the two I2C buses external to PSoC 5LP?

             

            If not, can you use two I2C blocks to communicate with each of the I2C buses?

             

            Is PSoC 5LP the only master on the I2C line or are there any other bus masters? Can you please provide more information regarding the implementation which might help us in understanding the reason for the requirement?

             

            Thanks and Regards,

            Rakshith M B

            • 3. Re: How to design I2c bridge connected to a multi master I2c controller
              MiHe_282546

              Hi Rakshith,

               

              I cannot connect the two buses externally, if I could I didn't ask for this solution.

              There is no timing issue because I control the external I2c master (FPGA) so no contention issue.

              On bus1 there is an FPGA I2c master, on bus2 there is an I2c slave devices.

              The psoc interface with these slaves and I need to interface with them also from the FPGA. I can sync them so that only one master will be on the line. Probably the solution is bi-directional open drain mux but I don't know how to do that.

               

              Thanks

              Miki

              • 4. Re: How to design I2c bridge connected to a multi master I2c controller
                GaneshD_41

                Hi Miki,

                 

                There is no timing issue because I control the external I2c master (FPGA) so no contention issue.

                 

                Please try the following things once and check at your side if this works for you:

                 

                1. Configure four pins as Bidirectional and connect them back to back as shown in the images below:

                 

                bidirectional.png.PNG

                back_2_back.png.PNG

                 

                2. Now connect I2C master to two of the pins (pin_1 and pin_2) and I2C slave to another two pins (pin_2 and pin_4) and check if you are able to communicate through I2C across the PSOC 5 device.

                 

                3. If the above solution works, and if you need another I2C inside the PSOC 5 device you have to connect I2C master inside PSOC directly to the external I2C bus (anyone of them since both are connected).

                 

                Please check this method once and let us know, Meanwhile I will try to get the hardware and try at my side too.

                 

                Thanks

                Ganesh

                • 5. Re: How to design I2c bridge connected to a multi master I2c controller
                  MiHe_282546

                  Hi Ganesh,

                   

                  If I understood you correctly, this is what you suggested:

                  As you can see it doesn't compiles.

                   

                  Thanks,

                  Miki

                  • 6. Re: How to design I2c bridge connected to a multi master I2c controller
                    GaneshD_41

                    Hi Miki,

                     

                    Sorry for not being clear.

                     

                    1. You cannot connect the I2C master like that you mentioned in the image. The I2C needs to be connected directly to the bus using external pins.

                     

                    2. But, for now please connect the two pairs of bidirectional pins back to back ( as I showed in my previous response) and try if they can join two separate I2C buses (I2C BUS 1 and I2C BUS 2) successfully? To test this you need an external I2C master and external I2C slave.

                     

                    3. Once they work you can follow point 1 for I2C Master connection.

                     

                    Thanks

                    Ganesh