This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I2C clock stretching on nrf52840

Hello !

I would like to know if the nrf52840 is affected by the errata https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev2/ERR/nRF52832/Rev2/latest/anomaly_832_149.html#anomaly_832_149 or something similar ?
(I did not find it in the 52840 errata)

I am struggling to communicate with a 100KHz i2c device which require clock stretching to work. The communication often hang forever.
It sometimes work, the difference seems to be the lenght of the first clock after a stretch.

A non working screenshot :

A working screenshot:


If this is the same issue as the 832 errata, is there a known workarround ?

Thank you for your help.

Parents
  • Hi Kenneth,

    It took some time because we are not directly using the sdk, but I finally managed to use the twi without easy DMA.
    Now I use nrfx_twi.c, (slightly modified to be able to compile with the rest of our codebase)

    However, I can still see the same bug, the 1st clock after a stretch is sometimes 4 times smaller than it should be.
    The device I am communicating with (CY8C95x0A) really does not like that and behave like it is missing the shortened clock.

    (I can provide some screenshots if required)

    Am I missing something ? Any workarround would be appreciated.

    Best Regards,
    Mathieu

Reply
  • Hi Kenneth,

    It took some time because we are not directly using the sdk, but I finally managed to use the twi without easy DMA.
    Now I use nrfx_twi.c, (slightly modified to be able to compile with the rest of our codebase)

    However, I can still see the same bug, the 1st clock after a stretch is sometimes 4 times smaller than it should be.
    The device I am communicating with (CY8C95x0A) really does not like that and behave like it is missing the shortened clock.

    (I can provide some screenshots if required)

    Am I missing something ? Any workarround would be appreciated.

    Best Regards,
    Mathieu

Children
No Data
Related