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

I2C clock frequency problem

Hi,

I am using NRF52832 development board , to which i have interfaced LIS3DSH accelerometer sensor(3.3V i2c)

when i  configure it for 1600 sampling rate and all the axis enabled , i am not able to get any data .

could anyone help with this problem.

also the I2c clock frequency, as shown in below image, while i am capturing data when i observe in oscilloscope or logic analyzer , clock frequency is showing 200 all the setting is for 400KHz.

what could be the problem for this or is there any other way i need to follow to set the clock to 400KHz.

help me ASAP...

Thank you

Parents Reply
  • awneil said:
    The LIS3DSH is an ST Product - so you probably need to go back to ST to ask them what might cause their product to behave like this.

    We sit on one-half of the resources needed to solve this issue, ST sits on the other. You need to ask them for inputs as well, as their I2C slave seems to be stretching the clock. 

    It could still be the nRF52832 that causes the issue as it is currently set to use clk of 410kHz. Try setting the FREQUENCY register to 0x06400000 prior to starting the I2C bus.

     

    awneil said:
    Have you looked at the clock with an oscilloscope - to see if there are any weird analogue effects going on?

     What appears to be clock stretching might be some "weird analogue effects", some form of loading on the I2C lines.

    You can also try enabling high drive strength on the GPIOs. 

Children
Related