Hello everyone,
I am using Bar 30 sensor. And it connected pixhawk by i2c. Sometimes qgc gives depth sensor error, and depth value increases suddenly 1 to 30 in a moment. I see this issue also here someone solve this problem by ferrit core. I am thinking, chaning i2c speed solve the problem? I checked last version ardusub firmware from github.
Here i found i2c works 100kHz.
#ifndef HAL_I2C_MAX_CLOCK
#define HAL_I2C_MAX_CLOCK 100000
#endif
And here cube orange supports 400 kHz.
#elif defined(STM32H7)
if (businfo[i].busclock <= 100000) {
bus.i2ccfg.timingr = HAL_I2C_H7_100_TIMINGR;
bus.busclock = 100000;
} else {
bus.i2ccfg.timingr = HAL_I2C_H7_400_TIMINGR;
bus.i2ccfg.timingr = HAL_I2C_H7_400_TIMINGR;
bus.busclock = 400000;
}
Should i change these variables? Or ferrit core is the best solution?