I'm using a Raspberry Pi 3, with a Raspberry Pi OS (arm64) official image to communicate with a PMBus compatible device (rpb1600-48 battery charger).
I was experiencing communication problems. Sometimes the problems were constant and sometimes they were sporadic. Search the web for this sort of problem gave all sort of different reasons, none of them resolved my problem.
It was until I hookup an Oscilloscope that I realized that the real baudrate was changing. Initially I couldn't figure out why, then it came to me the fact that many arm core microcontrollers get their baudrates from a main clock line.
Checking with this program: https://github.com/Eideen/Raspberry_pi_throttle I confirmed that the real baudrate was changing exactly when the pi was adjusting the core speed.
I mainly "fixed" the problem by forcing the Pi to "performance" scaling mode:
echo performance | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
But, this leaves the PI consuming more energy than needed (this is a battery driven application: a robot).
I tried to use both kernel drivers: i2c-bcm2708 and i2c-bcm2835
Both give the same result. They don't seem to have a module parameter to deal with changing core clocks.
There is a bug report, that was closed, related to this:
https://github.com/raspberrypi/firmware/issues/212
Has somebody solved this issue completely (constant I2C baudrate + ondemand frequency scaler for Rpi)?