I2C fast mode frequency

Hi,

We have 2 queries regarding I2C modes,

1. I2C fast speed mode

    We are undergoing test of I2C under I2C_SPEED_FAST - 400Khz 

    when we enable this frequency on our logic analyzer we are able to read 413Khz as attached in screenshot, we are using laird bl653 (document attached - CS-GUIDE-BL653-DVK_v1_0-1855868.pdf)

    we need to know the tolerance of acceptance ? is 413Khz acceptable ?

2. We want to know more about I2C speed modes,

    as per speed configurations in i2c.h there are following configurations 

    I2C Standard Speed: 100kHz - I2C_SPEED_STANDARD
    I2C Fast Speed: 400kHz - I2C_SPEED_FAST
    I2C Fast Plus Speed: 1MHz - I2C_SPEED_FAST_PLUS
    I2C High Speed: 3.4MHz - I2C_SPEED_HIGH
    I2C Ultra Fast Speed: 5MHz - I2C_SPEED_ULTRA 

    as per above configurations & mentioned detail here https://docs.zephyrproject.org/latest/reference/peripherals/i2c.html, we don't have 250Khz config

    and attached in laird bl653 document (CS-GUIDE-smartBASICEXT-BL653 v30_2_2_0_0.pdf) it mentions 250Khz (document and screenshot attached)

    we want to have more clarity about speed configurations in I2C

CS-GUIDE-BL653-DVK_v1_0-1855868.pdf

CS-GUIDE-smartBASICEXT-BL653 v30_2_2_0_0.pdf

Thank you,

Parents
  • short answer:
    There is nothing wrong with that, the device will work.

    and yes, the "Fast +" mode is used only in nrf5340. otherwise only have "standart" and fast modes this is due to the fact that for high exchange frequencies, current control of the lines is already required in order to obtain steep fronts.

    more expanded:
    The standard does not define the bus rate, but rather simply specifies the typical times: low clock duration, clock high duration, and rise time. These parameters add up the exchange rate, but you noticed that the speed is indicated not in bits / s, but in Hz.
    therefore, for a typical speed of 400 kHz, a small variation is allowed. the main thing is to monitor the steepness of the fronts and the capacity of the bus. Capacitance for 400 kHz should not exceed 400 pF. It is better to generally be at the level of 100-200 pF.
    also, the fact that you measured 413kHz does not mean anything, since the next data frame may have a different frequency. this is due to the fact that, by default, nrf52 chips clock the peripherals from an internal source. if you switch forcibly to an external quartz resonator / oscillator, you will get different numbers.

    p.s. see you diagrams in analog mode. then you will see if the pull-up resistors have been chosen correctly. 

    from what I see, I suspect a very weak leading edge. Due to this, the clock pulses are quite narrow.

    and yes, the frequency meter from sale is mediocre. it counts at the level of 0.7 from the one specified in the settings. therefore, often the readings also depend on the selected sampling frequency.

  • Hi CheMax,

    Thank you very much for quick response,

    can you please provide input to query number 2 of I2C speed modes,

    Regards,

    Hitesh

  • Hi,

    can you please provide input to query number 2 of I2C speed modes,

    seems I understand what the question is.

    Zephyr for this board (BL653) suggests using the I2C driver. while for nordic chips, in the same document there is a reference to the use of TWI, when setting which you can explicitly specify the exchange rate in Hz (see here nrf-twim with zephyr).

    Unfortunately, I have practically no experience in working with Zephyr , so if you still have questions, clarify them and wait for a response from the support service.

    best regards,

  • Thank you for response Chemax,

    will wait for support service to acknowledge.

Reply Children
Related