YMMV. If the PM2.5 device can't handle 400kHz then it needs its own I2C bus or to be put behind an I2C switch like a PCA9548. There is no guarantee that the slow PM2.5 device won't interfere or act strangely due to its bus interface being run at a higher speed than its designed for. The I2C switch would allow it to be isolated on its own branch of the bus and never see the 400kHz traffic.I have a dozen sensors operating on this bus, including a M10Q GPS module that has clock stretching, and all work at the normal bus speed set (typically 400kHz but cpu governing at "ondemand" instead of performance knocks it down to 300kHz) but the outlier was a PM2.5 sensor requiring 100kHz. Note that my interval is 1 second for these sensors so your results may vary.
I thought there was an ioctl for changing the speed on the fly but I appear to be mistaken.
Statistics: Posted by trejan — Mon Jan 06, 2025 11:47 pm