Re: I2C running on NRF52840

Diana Rivera

Hi Andrzej,

Thanks a lot for your reply. I checked the version I was using, and it was: v1.11.0-244-gbe52e3c

However, I have just cloned the latest release: v1.12.0-803-g16ff8ca, and I'm unfortunately still getting the same error, as seen in the screen capture attached. Is there something else that I can try or that might be wrong? I have even tried that commit (f58d9ca) in particular, and have the same results.

Once again, thanks in advance for your help.
Best regards,

On Mon, Jul 16, 2018 at 10:48 AM, Głąbek, Andrzej <Andrzej.Glabek@...> wrote:

Hi Diana,


The config you provided is fine and you don’t need any other modifications to build the i2c_fujitsu_fram sample for the nrf52840_pca10056 board. You haven’t specified on which commit from the Zephyr repository you based your work on, so I tried with commit f58d9ca (i.e. release 1.12.0), and the sample built fine. I modified only the “prj.conf” file in this sample and used exactly the settings that you specified.

Can you try the same and see if it works for you?


Best regards,



From: Cufi, Carles
Sent: Friday, July 13, 2018 6:36 PM
To: Diana Rivera <drv3007@...>; users@...; Głąbek, Andrzej <Andrzej.Glabek@...>
Subject: RE: [Zephyr-users] I2C running on NRF52840




From: users@... <users@...> On Behalf Of Diana Rivera
Sent: 13 July 2018 15:26
To: users@...
Subject: [Zephyr-users] I2C running on NRF52840


Hello everyone!

I am currently working on trying to use I2C to read some Grove sensors using the NRF52840 Preview Development Kit. I'm planning on writing an application based on Zephyr's sample code i2c_fujitsu_fram, as instructed in some other replies I've seen.
I have created a prj.conf file which includes the following:



However, when I try to compile the code, I get the error:

In function ‘main’:
/home/diana/zephyr/apps/i2c_fujitsu_fram/src/main.c:85:31: error: ‘I2C_DEV’ undeclared (first use in this function)
  i2c_dev = device_get_binding(I2C_DEV);

I've seen this question from someone who seems to have the same problem. But there was no clear solution to the problem.

And I've also tried solving the problem by following the advice in this post:

And replacing:


Which doesn't make much sense to me, but in any case I get the error shown in the screen shot attached.

Could someone point out what I'm doing wrong, or guide me on the right direction to get I2C running on the NRF52840 board, please?

I've already gone through this post as well, and still can't figure out my problem:

Thank you in advance for your help,

Join { to automatically receive all group messages.