ESP32_C6_THREAD thrown an ArgumentException at I2cDevice for busId = 2
Target name(s)
ESP32_C6_THREAD
Firmware version
all versions
Was working before? On which version?
none
Device capabilities
No response
Description
There is an issue at creating the I2cDevice for busId = 2. It looks like there is missing a driver for LP I2C controller.
The following exception is thrown:
++++ Exception System.ArgumentException - 0xfd000000 (1) ++++ ++++ Message: ++++ System.Device.I2c.I2cDevice::NativeInit [IP: 0000] ++++ ++++ System.Device.I2c.I2cDevice::.ctor [IP: 001c] ++++ Exception thrown: 'System.ArgumentException' in System.Device.I2c.dll
How to reproduce
Configuration.SetPinFunction(14, DeviceFunction.I2C2_DATA); Configuration.SetPinFunction(15, DeviceFunction.I2C2_CLOCK); I2cDevice i2c_sht = new(new I2cConnectionSettings(2, Sht4X.I2cDefaultAddress)); // <= thrown exception
Expected behaviour
No response
Screenshots
No response
Aditional information
No response
The issue here is the 2nd I2C port is a low power port which isn't supported in the legacy I2C API we are using. To use this I2C port we would need to do following:
- Update I2C driver to use the new I2C driver API
- Update ESP32 build to use espressif IDF 5.3 as LP_I2C is not supported in current IDF
Blocked by #1580 .