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

ACK issue in wake up command in SCD4x component #582

Open
2 of 7 tasks
vbieleny opened this issue Oct 20, 2023 · 2 comments
Open
2 of 7 tasks

ACK issue in wake up command in SCD4x component #582

vbieleny opened this issue Oct 20, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@vbieleny
Copy link

The issue

I have tried to connect my SCD41 and I uploaded the example code to my ESP32-C3-DevKitM-1 and I got this error:

E (282) i2cdev: Could not write to device [0x62 at 0]: -1 (ESP_FAIL)

After some troubleshooting, I found out that the issue is in scd4x_wake_up function. So I checked the datasheet and section 3.10.4 has a description where it is mentioned that this command is not acknowledged by SCD4x:

Wake up the sensor from sleep mode into idle mode. Note that the SCD4x does not acknowledge the wake_up
command. The sensor idle state after wake up can be verified by reading out the serial number (Section 3.9.2).

I've checked the code for the wake up function and it's using i2c_dev_write function, which always enables ACK, which I think is why this function fails.

Which SDK are you using?

esp-idf

Which version of SDK are you using?

v5.1.1

Which build target have you used?

  • esp32
  • esp32s2
  • esp32s3
  • esp32c2
  • esp8266
  • other

Component causing the issue

scd4x

Anything in the logs that might be useful for us?

No response

Additional information or context

No response

Confirmation

  • This report is not a question nor a request for drivers.
@UncleRus UncleRus self-assigned this Oct 22, 2023
@UncleRus UncleRus added the bug Something isn't working label Oct 22, 2023
@AxelLin
Copy link
Contributor

AxelLin commented Nov 29, 2023

The issue

I have tried to connect my SCD41 and I uploaded the example code to my ESP32-C3-DevKitM-1 and I got this error:

E (282) i2cdev: Could not write to device [0x62 at 0]: -1 (ESP_FAIL)

I can confirm the same error, I have to remove ESP_ERROR_CHECK around scd4x_wake_up() to make it work.

@nup002
Copy link

nup002 commented Nov 12, 2024

Wasted a couple of hours on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants