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
  • "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."
    That's unlikely, I think you're measuring the clock frequency incorrectly.


    Why have you enabled pulldowns on your IO pins?

  • actually that's not the part of code , sorry excluding that is the actual code

  • Do you have a scope of the communication?

  • scope in the sense, where i am using it right.

    i am using it to aquire acceleration data

  • We need more information on your issue, a scope will help us greatly.

  • ok , like i am configuring I2c fast  for acquiring acceleration data from  lis3dsh accelerometer sensor, as it is shown in the image , i have set clock frequency to 400 kHz

    but output i am able to get is 200kHz at oscilloscope as well as in logic analyzer.

    i want  a clock frequency 400Khz for this application, so help how to configure in any other ways.

Reply
  • ok , like i am configuring I2c fast  for acquiring acceleration data from  lis3dsh accelerometer sensor, as it is shown in the image , i have set clock frequency to 400 kHz

    but output i am able to get is 200kHz at oscilloscope as well as in logic analyzer.

    i want  a clock frequency 400Khz for this application, so help how to configure in any other ways.

Children
  • We need that logic analyzer scope...

  • We need that logic analyzer scope

    What he means is that he needs you to post the trace from the oscilloscope.

    Use your oscilloscope's screenshot facility - not a photo!

    Also - how to properly post source code:

  • logic analyzer output for clock and data line, for above set clock frequency of 400 Khz 

  • c code

  • I see what you mean now, that clock is definitely set to 200kHz.