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

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MiHe_282546
Level 3
Level 3
5 sign-ins 10 questions asked 10 replies posted

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

0 Likes
1 Solution
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Miki,

Please refer to this discussion already in progress. PSoC5LP: Muxing an external I2C master onto an internal I2C Bus through PSoC. Can it be done?

This may shed some light on your question.

Len

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

8 Replies
MiHe_282546
Level 3
Level 3
5 sign-ins 10 questions asked 10 replies posted

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

0 Likes
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

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

Thanks and Regards,
Rakshith M B
0 Likes

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

0 Likes

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

0 Likes

Hi Ganesh,

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

pastedImage_0.png

As you can see it doesn't compiles.

Thanks,

Miki

0 Likes

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

0 Likes

Hi Miki,

Can you please let me know if the proposed method is working?

Thanks

Ganesh

0 Likes
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Miki,

Please refer to this discussion already in progress. PSoC5LP: Muxing an external I2C master onto an internal I2C Bus through PSoC. Can it be done?

This may shed some light on your question.

Len

Len
"Engineering is an Art. The Art of Compromise."