UncleRus/esp-idf-lib

ADS111x driver bug (and fix) dealig with ALERT/RDY signal

Closed this issue · 1 comments

The issue

Problem: The ALERT/RDY pin triggers without apparent cause.
Tested with ADS1015 (ADS111x has same config register fields with ADS1114 and ADS1115).
The problem is located into the two bits offset definition to control the behaviour of that signal, due to de lack of any set value for the bit 0 (the wrong definition starts with the bit 1). The AD is also supposed to have a default value (disabled) on power on, but in some not controlled situations, it changes and gets enabled. Also, the actual wrong definition avoids any attempt to correct the situation.

At:

#define COMP_QUE_OFFSET 1

According with both datasheets (ADS101x and ADS111x, ~pdf page 25 or search COMP_QUE ) should be:

#define COMP_QUE_OFFSET 0

That fixes the issue for me and is tested into my code for ADS1015 board.

Which SDK are you using?

esp-idf

Which version of SDK are you using?

ESP-IDF 4.4.4

Which build target have you used?

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

Component causing the issue

ADS111x ( ADS1015 )

Anything in the logs that might be useful for us?

No response

Additional information or context

https://www.ti.com/document-viewer/ADS1115/datasheet#config-register-p-1-0-1h-reset-8583h-sbas4442806/SBAS4442806
please take a look into COMP_QUE offset

Confirmation

  • This report is not a question nor a request for drivers.

Thank you!