Re: I2C running on NRF52840
Andrzej G??bek
Hi Diana,
Writing "release 1.12.0" I meant this: https://github.com/zephyrproject-rtos/zephyr/releases. Hence, I referred to the commit f58d9ca.
And as I wrote earlier, when you base on this commit, the only thing you need to build the "i2c_fujitsu_fram" sample is to use the following "prj.conf" file:
CONFIG_STDOUT_CONSOLE=y CONFIG_PRINTK=y
CONFIG_I2C=y CONFIG_I2C_NRF5=y CONFIG_I2C_0=y CONFIG_I2C_NRF5_0_GPIO_SDA_PIN=26 CONFIG_I2C_NRF5_0_GPIO_SCL_PIN=27
The value for CONFIG_I2C_0_IRQ_PRI will be taken from Device Tree, so there is no point in writing it in “prj.conf” as it will be discarded anyway. If it does not work for you, make sure you have no other files modified and the build directory is clean. Nothing else comes to my mind, why it would not work.
But you cannot use the same configuration with the recent commits from master. Starting with the commit 1aa61d6, the old driver (i2c_nrf5.c) is not available, and you must use one of the new drivers, actually shims that use nrfx drivers underneath (either TWI or TWIM). Therefore, for the repository version that you cloned (commit 16ff8ca) you'll need the following "prj.conf":
CONFIG_STDOUT_CONSOLE=y CONFIG_PRINTK=y
CONFIG_I2C=y CONFIG_I2C_NRFX=y CONFIG_I2C_0=y CONFIG_I2C_0_NRF_TWI=y
And in the version you were using earlier (commit be52e3c) the issue was that the "i2c0" node was not enabled in DTS for the nrf52840_pca10056 board. Hence, labels NORDIC_NRF5_I2C_40003000_* were not generated. To make this work, a DTS overlay is needed, i.e. a file named “nrf52840_pca10056.overlay” placed in the same directory as “prj.conf” with the following content:
&i2c0 { status = "ok"; };
Best regards, Andrzej
From: Diana Rivera [mailto:drv3007@...]
Sent: Monday, July 16, 2018 7:20 PM To: Głąbek, Andrzej <Andrzej.Glabek@...> Cc: Cufi, Carles <Carles.Cufi@...>; users@... Subject: Re: [Zephyr-users] I2C running on NRF52840
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, Diana
On Mon, Jul 16, 2018 at 10:48 AM, Głąbek, Andrzej <Andrzej.Glabek@...> wrote:
|
|