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

I2C function sdk v1.6.0-rc2

Hello,

I need to connect a custom I2C device to the nRF52-DK, and I am using the sdk v1.6.0-rc2.

I am new to this development environment and I don't know how to initialize I2C and what functions to use to write / read a register with I2C.

There is a minimal example where I can see how to initialize the i2c bus (i2c0) and what are the functions to write and read on the i2c bus.

I have seen the examples in the sdk, but I cannot understand how it works.

Thanks in advance.

Parents Reply
  • Thanks, Swathy.

    I was able to make I2C work with my sensor. My sensor works at 50kbps, so I had to change the register in SDK.

    I am using nRF Connect SDK 1.8.0 and I changed the register (TWIM_FREQUENCY_FREQUENCY_K100) value in nrf52_bitfields.h and it worked for me.

    But this change is outside my application i.e. if I migrate to new SDK later on then I'll need to do change in that SDK as well. So, I was just wondering if there is a way to change this register from my application itself?

    Thanks.

Children
No Data
Related