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

The max speed of i2c support? #4

Open
icepng opened this issue Jul 6, 2023 · 3 comments
Open

The max speed of i2c support? #4

icepng opened this issue Jul 6, 2023 · 3 comments

Comments

@icepng
Copy link

icepng commented Jul 6, 2023

Hello, if setting the clock to 72 MHz, what the max speed support for i2c sniffer?

@icepng
Copy link
Author

icepng commented Jul 6, 2023

Another question, if we use the hardware i2c interface in stm32 as the i2c slave. Any problem if we use this slave as the sniffer? (we can set the slave don't send the ack)

@kongr45gpen
Copy link
Owner

Hello, if setting the clock to 72 MHz, what the max speed support for i2c sniffer?

I don't really remember the max speed this can work with - probably the 100 kbit/s of the standard mode should be achievable. In any case errors should be shown if the speed is too fast, and I would recommend going down to 10 kbps if nothing is working.

Another question, if we use the hardware i2c interface in stm32 as the i2c slave. Any problem if we use this slave as the sniffer? (we can set the slave don't send the ack)

To make sure I understand the question, you want to use the same STM32 device to work as a slave and as a sniffer?

This should be possible, but note that:

  • The B8 and B9 pins (SCL, SDA) must be used as GPIO pins for the sniffer to work. This means that the I2C peripheral cannot be assigned to them. You would need to assign I2C to some other pins (e.g. B6, B7 or B10, B11) and then bridge these pins with B8 and B9. The sniffer needs to be able to read (and receive interrupts from) B8 and B9 constantly, which means that they have to stay as GPIO input/interrupt capture pins.
  • The main loop needs to be running to take care of I2C events and dump all information. If stuff is being sent over the I2C channel and the sniffer needs to read this stuff at the same time, some of the input might be lost.

@icepng
Copy link
Author

icepng commented Jul 7, 2023

If we use the software I2C as the sniffer, it may be slow for sniffing. So I want to use the hardware I2C(B8, B9) as the sniffer(maybe it can be used to 200kbit/s or 400kbit/s?)

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