I2C bus speed BeagleV fire

Hi!
I am trying to set the I2C0 bus at a speed lower than 100kHz, but I always measure it at 156.25kHz. Just like explained here:
https://forum.microchip.com/s/topic/a5C3l000000Mee0EAC/t386291
From the gateware repo, I have tried changing it with a devicetree overlay.
I also so tried changing the MSS_*CLK_DIV factors in the MSS_configuration.cfg file, to lower the frequency of the clock generating the I2C SCL.
None of this seems to be applied to the gateware I build I and I still get 156.25kHz on the signal coming out of the cape pin.

Just to make sure; did your design version change as you loaded the new build?

Itā€™s a common ā€œgotchaā€ to forget bumping the design version
and then spending hours pondering why your changes didnā€™t takeā€¦

Thanks for the answer!
I think you made me realize that updating the gateware from the ā€˜/usr/share/beagleboard/gateware/change-gateware.shā€™ file does not apply the changes in the MSS_configuration.cfg file. It seems like I need to get a flashpro for this.

Depends on how you change the settings in your mss_configuration.cfg.

If you open it inside of Libero, the thing is read-only, but it can be opened with
the standalone tool, which then makes it read-write.

If you do it right, a flashpro should not be needed; your assumption is wrong.

I havenā€™t been playing with I2C per se, but it sounds odd that you should have
to change clock frequencies in the MSS. I would have thought it had prescaler registers.

In any case, please be advised that thereā€™s a reason the MSS config is protected;
itā€™s very easy to make a bad bitstream this way and you could end up with an unresponsive BVF.

Hi! I have some news regarding this subject.
I indeed had an issue similar to what @lranders was referring to, although unfortunately not the exact same.
The Design Version was correct but the eNVM digest was not changing at each compilation.
This shows that the mpfs_bistream.spi did was not updated with the latest eNVM component and meant that I was deploying the same HSS over and over again.
A quick fix that I found for this was deleting the work directory before running the build_gateware.py file.
Doing so, I was able to lower the internal APB frequency down to 75MHz, which meant that the I2C frequency could not be set to lower values by the driver.
On top of this, I also had to modify the desired I2C frequency using a device tree overlay. Asking for 50kHz throught the dtso I measured 77kHz out of I2C_0.

@lranders, the reason why I thought I needed a Flashpro was because I was also confused by the name of the mpfs_bistream.spi file which contains more that just the fabric bitstream.
Thanks for your help!

Iā€™m not sure if was clear enough on the bumping explanationā€¦
In the screenshot I sent you, the design version is 1003.
Whenever you make a change, you increment this value by one, so 1004, 1005.
You really donā€™t need to delete your work directory every time, although it doesnā€™t hurt.

I will have to play with this some more, but it sounds very odd to me
that one needs to adjust the APB frequencies in the MSS configuration,
to change the I2C operating frequencies.

I suspect thereā€™s still something amiss with the device-tree; asking for 50kHz should yield 50kHz.

@Vauban, care to weigh in here?

1 Like