nRF5340 I2C frequency setting

Hi 

In nRF5340 datasheet I2C frequency only have 4 selection as below

But when ask your AI, he response below

Important errata at 400 kHz

For all nRF5340 revisions, there is an erratum: at 400 kHz the SCL low period is about 1.25 µs, which is slightly shorter than the I²C spec minimum of 1.3 µs. This can cause interoperability issues with some I²C devices. [Errata EngAErrata Rev1]

Workaround: use ~390 kHz instead of 400 kHz by writing 0x06200000 to the FREQUENCY register; this gives an SCL low period > 1.3 µs. [Errata Rev1]

But as follow above setting, our SW can't set to 390KHz successfully

So if we can set I2C frequency to any other value? Or just 100K/250K/400K/1000K can set?

Thank you

Poki

 

  • Hello,

    Only the values listed in the datasheet have been qualified and tested, and should be the ones to use.

    The only exception is if an errata exists that provide specific workarounds, and in this case (depending on which ncs version you are using), the workaround should be implemented in the low level drivers, for instance when you try to use 400kHz it will apply the errata like this in ncs v3.2.0:

    Kenneth

Related