Skip to content

SHT4X driver heater timeouts are wrong #99067

@JusbeR

Description

@JusbeR

Describe the bug

Too small wait time causes heater function(sht4x_fetch_with_heater) to try to read results before they are ready and function returns an error.

static const uint32_t heater_wait_ms[SHT4X_HEATER_DURATION_IDX_MAX] = {

static const uint32_t heater_wait_ms[SHT4X_HEATER_DURATION_IDX_MAX] = {
	1000, 100
};

Data sheet says:

min     typical max
0.9     1          1.1

https://sensirion.com/media/documents/33FD6951/6555C40E/Sensirion_Datasheet_SHT4x.pdf

Did not check what all else we should wait, but at least the sensor I am currently wrestling with fails every time with 1000ms (for 1s heat time) and passes with 1100ms.

Regression

  • This is a regression.

Steps to reproduce

I had SHT45 wired. Just call the function and observe it failing. But note that this might work just fine with one sensor and fails with another(if we believe datasheet).

Relevant log output

Impact

Functional Limitation – Some features not working as expected, but system usable.

Environment

NRF9160 + SHT45. Should be reproducible with any zephyr HW/SW. Might need a special SHT45 HW to reproduce.

Additional Context

No response

Metadata

Metadata

Labels

area: SensorsSensorsbugThe issue is a bug, or the PR is fixing a bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions