-
Notifications
You must be signed in to change notification settings - Fork 7.4k
sensor: bme280 regulary fails to fetch samples #89872
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
Comments
Hi @visuphi I’m able to reproduce the issue in both your code and the Zephyr sample. The problem occurs because
|
Thank you for your response. which value for |
Yeah, I increased the duration to 1500 and run a long test, but the issue still occurs after sometime. We need to find a way to handle timeout gracefully. |
|
I could reproduce the issue on the NRF52840DK. My preliminaries investigations let to think that we have some regressions on that platform:
Too early to draw any conclusions yet, however. On a side note, I've observed some suspicious behaviors if a transient I/O errors is occurring on all tested platforms/versions. It's possibly an unrelated issue. |
On my test setup, If BME280 mode is set to forced (CONFIG_BME280_FORCED=y), then the problem disappears... Suspect that it correlates with commit 91e006. |
Hi @ldomaigne I assume you mean I can confirm that the problem disappears when using this config. |
The root cause is an initialization issue, which may cause to use BME_STANDBY_05MS and BME280_FILTER_OFF instead of the application's settings. commit 91e006 exposes this bug due to the 0.5ms standby timeout. |
Describe the bug
I have the following setting
The BME280 regulary fails to fetch samples, returning the error code
-EAGAIN
.It looks like the function
bme280_wait_until_ready
in the bme280 driver regulary runs into a timeout.To Reproduce
samples/sensor/bme280
west build -b nrf52840dk/nrf52840 && west flash
..or use my sample: https://github.com/visuphi/test_bme280_zephyr
Expected behavior
bme280 should be able to fetch sample without running regularly into timeout.
Impact
no samples fetched
Logs and console output
when using zephyr sample:
when using my sample, referenced above:
Environment (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: