Open SinglWolf opened 2 years ago
The I2C drivers of ESP-IDF do not allow for different frequencies on the same I2C port. So if you are using the same port, you will have to use the frequency of the slave with the lowest frequency. Using higher frequencies on the bus doesn't make sense, because it can lead to unspecified behaviour of the devices not supporting the frequency.
If you use a different port (with different GPIO nums), you can act independently of the LVGL driver and implement your own thread safety mechanisms, but you will still need to use the lowest frequency supported by all of the devices on the same port.
In my project, I use several devices that are controlled via
I2C
. Thei2cdev
component is used to resolve multithreading conflicts. I decided to implementssd1306
display support in my project. In this regard, I have a few questions. The most rational option is to abandon the vanillai2cdev
component and use 1i2c_manager
component ini2cdev
compatibility mode. But, as I understood from thei2c_manager
documentation,i2c_manager
does not support separate clock frequency settings for each device. I have devices that operate at100kHz
,400kHz
and1MHz
. What should I do ifi2c_manager
is used? Set the maximum frequency to1MHz
? Will devices with a maximum frequency of, for example,100kHz
work? If I installi2c_manager
for the entire project, how do I set thessd1306
driver to work properly ifi2c_manager
runs ini2cdev
compatibility mode?