How to reconfigure I2C speed on-the-fly?
Posted: Thu Oct 28, 2021 10:09 pm
I have a device that needs to be configured using a low-speed I2C rate (100 kHz) before it can be used at a faster rate (e.g. 400 - 1000 kHz). I am setting the I2C speed with the i2c_config.t clk_speed field set to the low rate, with the entire struct passed to i2c_param_config() just prior to installing the driver with i2c_driver_install().
Apart from shutting down the I2C driver and reinitialising it with the new, faster speed in clk_speed, is there any other safe way to reconfigure the I2C clock speed on-the-fly?
I am using ESP-IDF v4.3.
Apart from shutting down the I2C driver and reinitialising it with the new, faster speed in clk_speed, is there any other safe way to reconfigure the I2C clock speed on-the-fly?
I am using ESP-IDF v4.3.