Skip to content

W1 DS2484 seems to ignore W1 disconection. #74898

@Martdur

Description

@Martdur

Describe the bug
Using STM32wl55jc with a DS2484 on a I2C bus controlling several DS18B20.
I'm managed to make all working great with all W1 feature I need by using the DS2484 sensor driver.
But when I disconnect some sensors from the W1 bus (not all), I don't get any error from a match rom -> write -> read.
Despite the fact that the sensor that I match isn't on the bus anymore.
This introduce wrong sensor value and no clear way on how to handle sensor disconnection.

To Reproduce
Steps to reproduce the behavior:
You can use the scanner sample as a starter point.

  1. Save the different rom you discovered.
  2. Try to use w1_write_read method (it should work well).
  3. Introduce it in a loop(with some delay).
  4. Print the error and the data.
  5. While the program is running disconnect one sensor.

Expected behavior
You should observe no error from the W1 API w1_write_read function.

Impact
This impact the error handling since we can not know if the sensor is connected or not.
Furthermore the data read from the disconnected device is false.
(ex -0.062500°C for the DS18B20)

Environment (please complete the following information):

  • STM32wl55jc
  • Zephyr v3.7..0-rc1
  • Toolchain Zephyr SDK 0.16.5
  • Commit SHA or Version used

Additional context
My project is OO so sorry If I can not provide a simple example to run atm.

Metadata

Metadata

Assignees

Labels

area: SensorsSensorsarea: W11-WirebugThe issue is a bug, or the PR is fixing a bugplatform: ADIAnalog Devices, Inc.priority: mediumMedium impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions