Sorry, you need to enable JavaScript to visit this website.

Microzed I2C clock speed

Zedboard forums is currently read-only while it under goes maintenance.

2 posts / 0 new
Microzed I2C clock speed

Does anybody have any idea how to set the clock frequency of the PS I2C interface of a microzed running petalinux? Ideally this could be done by an application at runtime but this appears not to be possible.
The only way I have found to do it is to manually edit the pcw.dtsi files created by petalinux-config.
The relevant line is
    clock-frequency = <400000>;
That is not really satisfactory as one day I'll make a change and forget and my devices will fail in the field.
And on a related topic, when I do set it to 400000 I get 285kHz. When I set it to 100000 I get 90kHz. Setting it to 250000 gives you 196kHz. I realise that there are only integer dividers so not all frequencies are possible but my calcs suggest we should get a lot closer. 

Hello @dbbt,

Hello @dbbt,

It sounds like this is not specific to the MicroZed but rather something specific to Zynq-7000 and the Cadence PS I2C hardware and driver. You should definitely request this information on the Xilinx forums as they have detailed product experts who can help as well.

I did a bit of searching to get you started, and it looks like you are not the only one having similar issues. Check these out, and then I'd encourage you to open your own forum post with Xilinx.