Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NRF52840: I2C Sensor (SHT3XD) driver issue #7076

Closed
arun-kmr opened this issue Apr 15, 2018 · 6 comments
Closed

NRF52840: I2C Sensor (SHT3XD) driver issue #7076

arun-kmr opened this issue Apr 15, 2018 · 6 comments
Assignees
Labels
area: Sensors Sensors bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: medium Medium impact/importance bug

Comments

@arun-kmr
Copy link

I am trying to use I2C SHT3XD sensor with nrf52840. i am getting the following fatal fault.
***** BOOTING ZEPHYR OS v1.11.0 - BUILD: Apr 15 2018 10:42:29 *****
dev 0x20002be8 name SHT3XD
***** BUS FAULT *****
Executing thread ID (thread): 0x20000ce4
Faulting instruction address: 0x4f480588
Instruction bus error
Fatal fault in essential thread! Spinning...

@arun-kmr
Copy link
Author

Please, someone take a look at that. I am sort of stuck here.

@MaureenHelm
Copy link
Member

What board are you using? Have you written your own application or are you using an in-tree sample application?

@MaureenHelm MaureenHelm added bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug area: Sensors Sensors platform: nRF Nordic nRFx labels Apr 17, 2018
@arun-kmr
Copy link
Author

I am using nrf52840 pdk. and actually i am using in-tree sample application bme280 with change in prj.conf.

@anangl
Copy link
Member

anangl commented May 7, 2018

Perhaps this sensor tries to use a bus that is not configured in your app.

I used the "bme280" sample (unmodified) on the pca10056 board and got the same fault.
After adding the following to prj.conf:

CONFIG_SYS_LOG=y
CONFIG_SYS_LOG_SENSOR_LEVEL=4

I could see this additional message:

[BME280] [DBG] bme280_init: i2c master not found: I2C_0

So I added to prj.conf:

CONFIG_I2C_0=y
CONFIG_I2C_NRF5=y
CONFIG_I2C_NRF5_0_GPIO_SDA_PIN=26
CONFIG_I2C_NRF5_0_GPIO_SCL_PIN=27

and then the application started the I2C communication successfully (I haven't got the sensor, so I get only zeros, but the fault is gone).

Does this work for you as well?

@arun-kmr
Copy link
Author

After adding the configuration parameters i got a build error (screen shot has been attached
sensor
) .
So I added to following in prj.conf
CONFIG_I2C_0_IRQ_PRI=7

Now Its working completely fine.

@anangl
Copy link
Member

anangl commented May 15, 2018

@IotPanorama Can we close this issue then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Sensors Sensors bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

4 participants