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.
How to reconfigure I2C speed on-the-fly?
-
- Posts: 151
- Joined: Thu Jun 15, 2017 4:54 am
- Location: New Zealand
Re: How to reconfigure I2C speed on-the-fly?
You can use i2c_param_config again with the updated config
Who is online
Users browsing this forum: Bing [Bot], Gaston1980, Google [Bot] and 210 guests