Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCA9548 in multi master mode #12

Open
Manhem opened this issue Sep 20, 2024 · 2 comments
Open

TCA9548 in multi master mode #12

Manhem opened this issue Sep 20, 2024 · 2 comments

Comments

@Manhem
Copy link

Manhem commented Sep 20, 2024

Hi.
Can your library work in multi master mode?
I have a software where I use your library to talk to different I2C buses.
One of this bus, there is also connected another equipment that is also talking to the device on that I2C bus.
This equipment I do not have any control over.
Can your library detect if the bus is already occupied when I turn the bus on?
If it finds it occupied, how can I track this?
It happend very offen that both are talking at the same time and when this is happend everything stops working.

@WifWaf
Copy link
Owner

WifWaf commented Sep 23, 2024

Hey,

This is something which is usually implemented at the project level, rather than library. This library doesn't do anything fancy and it uses your TwoWire instance.

I've never personally used a multi-master setup, however, I imagine you'd need access to the firmware for both devices to stop interference ideally.

I would try identifying the other master device's transmission timing, then you can transmit in between.

You could try setting the SCL line pin to an input and attach an interrupt to detect the start of a transmission (pulled low). Then you can work out the timings and switch the SCL pin from a generic input to I2C sCL when you need to make a transmission.

Might be worth trying.

@Manhem
Copy link
Author

Manhem commented Sep 25, 2024

Do you have any code that you are using that you can share to me?
Maybe something from other projects you have done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants