I2c Clock Speed Change for Navigator

Hi All,

I am trying to get a smart battery BMS to communicate with the navigator board. I am able to successfully poll the battery for information using an esp32 MCU and communication is reliable. However when I hook it up the navigator board it is intermittent and will eventually drop out.

My theory is that the BMS cannot at operate at the fast i2c rate of 400kHz, as the esp32 is using 100kHz, eventually it will drop out and pull the clock line low indicating a locked I2c bus.

I am trying find how to reduce the i2c bus clock speed for the navigator to 100kHz. I have already attempted changing ‘/boot/config.txt’ with the line ‘dtparam=i2c_arm=on,i2c_arm_baudrate=100000’, however afterwards the navigator will not boot.

Any advice on this would be greatly appreciated.

Cheers,

Lewis

@williangalvani - any help would be appreciated Will.

Hi @Lewis_Miles, welcome to the forum :slight_smile:

I asked about this internally and was told BlueOS already specifies baudrates for the different I2C ports in /boot/config.txt, and you should be able to change those lines as relevant. I2C6 is the one that’s exposed externally via the Navigator connectors, and is configured with the line

dtoverlay=i2c6,pins_22_23,baudrate=400000
3 Likes

Eliot,

Sorry to butt in here, but I have an issue with the /boot/config.txt file.
I made the change you suggested to modify the one line:
dtoverlay=i2c6,pins_22_23,baudrate=400000

I changed it to :
dtoverlay=i2c6,pins_22_23,baudrate=100000

After a little bit of time, I noticed that my I2C peripheral was failing to communicate, and I found that the subject line was changed back to 400000.

My line was removed and a new 400000 line was added.
What performed this modification.
And, can it be turned off?

ADDITION:
It looks like i2c6 overlay is changing this parameter.
Can I stop this from happening?
Can I set the parameter to the i2c6 overlay to 100000 (which is the default?)
IGNORE THE ABOVE.
I see that the config.txt does this.
So, what is changing the file
FROM: config.txt
TO: config.txt.before_update_navigator_overlays.bak

Thanks for your help,

Mark K