Skip to content

Add 1-Wire driver - #19848

Open
Enoch247 wants to merge 15 commits into
RIOT-OS:masterfrom
Enoch247:add-driver-onewire
Open

Add 1-Wire driver#19848
Enoch247 wants to merge 15 commits into
RIOT-OS:masterfrom
Enoch247:add-driver-onewire

Conversation

@Enoch247

@Enoch247 Enoch247 commented Jul 26, 2023

Copy link
Copy Markdown
Contributor

Contribution description

This patch adds a 1-Wire driver which can handle multiple driver implementations. Included in the patch is a soft 1-Wire driver implementation.

Testing procedure

Attach one or more 1-wire devices to pin C0 of an stm32f429i-disc1 eval board.

Apply the following patch:

diff --git a/tests/drivers/soft_onewire/Makefile b/tests/drivers/soft_onewire/Makefile
index 070eed4df7..d18579e55d 100644
--- a/tests/drivers/soft_onewire/Makefile
+++ b/tests/drivers/soft_onewire/Makefile
@@ -1,5 +1,8 @@
 include ../Makefile.drivers_common
 
+BOARD = stm32f429i-disc1
+CFLAGS += -DSOFT_ONEWIRE_PARAMS_PIN="GPIO_PIN(PORT_C, 0)"
+
 # uncomment and adjust the driver's params as needed below if the board does not
 # already define a 1-wire bus and its params
 #CFLAGS += -DSOFT_ONEWIRE_PARAMS_PIN="GPIO_PIN(PORT_C, 0)"

Run make -C tests/drivers/soft_onewire flash

Observe the something like the following on the board's console:

2026-07-04 12:10:28,935 # main(): This is RIOT! (Version: 2025.10-devel-203-ge638c2-add-driver-onewire)
2026-07-04 12:10:28,939 # searching for 1-wire devices on bus 0...
2026-07-04 12:10:28,961 # found device: 28083C49F62E3C35
2026-07-04 12:10:28,982 # found device: 281AA049F6DB3CF0
2026-07-04 12:10:29,003 # found device: 28E3FB49F6E93C4D

Issues/PRs references

Declaration of AI-Tools / LLMs usage:

AI-Tools / LLMs that were used are:

  • none

@github-actions github-actions Bot added Area: tests Area: tests and testing framework Area: build system Area: Build system Area: drivers Area: Device drivers labels Jul 26, 2023
@Enoch247 Enoch247 changed the title Add 1-Wire driver Draft: Add 1-Wire driver Jul 26, 2023
@Enoch247
Enoch247 force-pushed the add-driver-onewire branch from 9b16584 to cd75a9b Compare July 26, 2023 20:17
@dylad

dylad commented Jul 27, 2023

Copy link
Copy Markdown
Member

Nice PR !
I don't think we need to define a test for the high-level API. IMO, it will be good enough to glue it to some low level driver and ensure the hardware works as expected.
Can I test this PR with a DS18B20 probe ?

@Enoch247

Copy link
Copy Markdown
Contributor Author

I don't think we need to define a test for the high-level API. IMO, it will be good enough to glue it to some low level driver and ensure the hardware works as expected.

Ok. I don't know much about RIOT's test system yet. I will work on getting up to speed and write some tests for this PR.

Can I test this PR with a DS18B20 probe ?

The onewire_search() and onewire_read_rom() should work on a ds18b20 device. I plan to convert the ds18 driver over to use this new API, but haven't yet (that will be a different PR probably). Once that's done then you'll be able to read the device's temperature using the ds18 driver via this new onewire API.

The way I've been testing this API and driver so far is with a ds2433 and driver. The ds2433 driver is functional, but still needs work before I submit it for PR.

Comment thread drivers/include/onewire.h Outdated
Comment thread drivers/include/onewire.h Outdated
Comment thread drivers/include/onewire.h Outdated
Comment thread drivers/include/onewire.h
Comment thread drivers/include/soft_onewire.h Outdated
Comment thread tests/driver_onewire/main.c Outdated
Comment thread drivers/onewire/onewire.c Outdated
Comment thread drivers/soft_onewire/soft_onewire.c Outdated
Comment thread drivers/soft_onewire/soft_onewire.c Outdated
Comment thread tests/driver_onewire/main.c Outdated
@crasbe crasbe added the Type: new feature The issue requests / The PR implemements a new feature for RIOT label Apr 5, 2025
@Enoch247
Enoch247 marked this pull request as draft April 10, 2025 00:02
@Enoch247
Enoch247 force-pushed the add-driver-onewire branch from d92b70d to 39a6876 Compare April 10, 2025 01:40
@Enoch247
Enoch247 force-pushed the add-driver-onewire branch from 39a6876 to a8dd266 Compare April 19, 2025 11:23
@crasbe

crasbe commented Apr 23, 2025

Copy link
Copy Markdown
Contributor

I think the test would need some more instructions, in a README.md file or so. I wasn't really sure how to get it working three weeks ago and wasn't successful in doing so 😅

@Enoch247

Copy link
Copy Markdown
Contributor Author

Yeah, the test is not really complete as is. After writing the test, I realized what a pain it is to define a bus and its params. So I'm reworking that now. I also went ahead and ported the ds18 driver to use the onewire API (coming in a separate PR). I've re-worked the API to use less RAM and ROM when only one back-end is enabled too. You should see some changes in this PR once I am finished. Pretty close...

@Enoch247
Enoch247 force-pushed the add-driver-onewire branch from a8dd266 to 42e088c Compare April 28, 2025 01:37
@github-actions github-actions Bot added Area: doc Area: Documentation and removed Area: build system Area: Build system labels Apr 28, 2025
@Enoch247 Enoch247 added State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet Area: build system Area: Build system and removed Area: doc Area: Documentation labels Apr 28, 2025
@Enoch247

Copy link
Copy Markdown
Contributor Author

At this point. I don't expect to make any more big changes to the driver code. The test code still needs some work and doc. I'm also scratching my head on how the test could be made to be common as it really could be used to test any onewire backend. I hate the thought of each new backend just copying the test and have a bunch of near duplicates.

@Enoch247

Copy link
Copy Markdown
Contributor Author

Can I test this PR with a DS18B20 probe ?

@dylad : a few years later, yes. See my WIP branch for that.

Comment thread drivers/include/onewire.h Outdated
@crasbe

crasbe commented May 7, 2025

Copy link
Copy Markdown
Contributor

Unfortunately I don't have the Discovery at hand, but I tried with an nRF52840DK and a Nucleo-L152RE and L073RZ.

The nRF52840DK just doesn't work, it does not recognize the DS18B20. Neither with the tests/drivers/onewire test (after I added an unconditional .pin = GPIO_PIN(0,3), to the struct) nor with the tests/drivers/ds18 (same modification).

This is the log (with ENABLE_DEBUG = 1 in the drivers/onewire/onewire.c):

2025-05-07 14:37:29,551 # main(): This is RIOT! (Version: 2025.04-devel-500-g42e08-add-driver-onewire)
2025-05-07 14:37:29,552 # _onewire_init
2025-05-07 14:37:29,555 # onewire_write: f0
2025-05-07 14:37:29,578 # found device: 0000000000000000
2025-05-07 14:37:29,581 # onewire_write: f0
2025-05-07 14:37:29,605 # failure to enumerate device: EBADMSG

The same happens on other GPIO pins as well and also with an external 4.7k Pull Up.

It appears like some data is exchanged on the bus, but idk enough about OneWire to tell what might be the fault here.
Without external Pullup:
image

With Pullup:
image

For good measure I tried with an 1k Pullup, but that leads to the same result.

The sensor is a fake, but it does work. I checked it with an Arduino Uno and this tool: https://github.com/cpetrich/counterfeit_DS18B20

Sensor ROM and Current Scratchpad Content:
   1. 28-54-DE-15-C0-21-08-3D, 28-0821C015DE54: 50/05/4B/46/7F/FF/0C/10/1C 85.00 oC
  Number of Sensors: 1.

The Nucleos crash with a failed assertion:

2025-05-07 14:33:03,551 # main(): This is RIOT! (Version: 2025.04-devel-500-g42e08-add-driver-onewire)
2025-05-07 14:33:03,554 # 0x8001537 => FAILED ASSERTION.

cbuec@W11nMate:~/RIOTstuff/riot-onewire/RIOT/tests/drivers/onewire$ arm-none-eabi-objdump -d --start-address 0x8001520 --stop-address 0x8001564 bin/nucleo-l073rz/tests_onewire.elf

bin/nucleo-l073rz/tests_onewire.elf:     file format elf32-littlearm


Disassembly of section .text:

08001520 <_onewire_write_bits+0x44>:
 8001520:       08001341        .word   0x08001341
 8001524:       0800135d        .word   0x0800135d

08001528 <soft_onewire_init>:
 8001528:       b570            push    {r4, r5, r6, lr}
 800152a:       0004            movs    r4, r0
 800152c:       000d            movs    r5, r1
 800152e:       2800            cmp     r0, #0
 8001530:       d101            bne.n   8001536 <soft_onewire_init+0xe>
 8001532:       f7ff f83d       bl      80005b0 <_assert_panic>
 8001536:       2900            cmp     r1, #0
 8001538:       d0fb            beq.n   8001532 <soft_onewire_init+0xa>
 800153a:       f7ff fbe1       bl      8000d00 <_onewire_init>
 800153e:       2301            movs    r3, #1
 8001540:       425b            negs    r3, r3
 8001542:       60a3            str     r3, [r4, #8]
 8001544:       4a05            ldr     r2, [pc, #20]   ; (800155c <soft_onewire_init+0x34>)
 8001546:       0023            movs    r3, r4
 8001548:       4905            ldr     r1, [pc, #20]   ; (8001560 <soft_onewire_init+0x38>)
 800154a:       68a8            ldr     r0, [r5, #8]
 800154c:       f7ff fd2a       bl      8000fa4 <timer_init>
 8001550:       2800            cmp     r0, #0
 8001552:       d1ee            bne.n   8001532 <soft_onewire_init+0xa>
 8001554:       6820            ldr     r0, [r4, #0]
 8001556:       f7ff fe89       bl      800126c <_bus_release.isra.0>
 800155a:       bd70            pop     {r4, r5, r6, pc}
 800155c:       08001265        .word   0x08001265
 8001560:       000f4240        .word   0x000f4240

So it seems like it is the first assertion in the soft_onewire_init function.

@crasbe crasbe added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 6, 2025
@Enoch247
Enoch247 requested a review from jia200x as a code owner July 4, 2026 19:18
Co-authored-by: crasbe <crasbe@gmail.com>
@Enoch247

Copy link
Copy Markdown
Contributor Author

Grr. It would appear applying some of those suggests from withing the GitHub UI buggered up some of the comments. I will fix them locally...

@Enoch247

Enoch247 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Whatever the outcome of PR #22457 becomes, I will give the same treatment to this PR. Either in this PR or the one that migrates the ds18 module to make use of this new one.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Hey @Enoch247, thank you for your contribution to RIOT!

Please note that we require for all PRs to RIOT a declaration of AI-Tools / LLMs usage. It appears as if this section is missing in your PR. Please copy and fill in the section from .github/PULL_REQUEST_TEMPLATE.md.

Thank you!

@github-actions github-actions Bot added AI: Declaration Missing The AI declaration is missing. This should be automatically applied by the CI workflow. and removed AI: Declaration Missing The AI declaration is missing. This should be automatically applied by the CI workflow. labels Aug 1, 2026
@Enoch247

Enoch247 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

I believe the failed header guard check (./dist/tools/headerguards/check.sh) is a false positive. I am not proficient at Python, and thus far have not figured out why.

@crasbe crasbe added the CI: no fast fail don't abort PR build after first error label Aug 1, 2026
@Enoch247

Enoch247 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

I believe the failed header guard check (./dist/tools/headerguards/check.sh) is a false positive. I am not proficient at Python, and thus far have not figured out why.

It would seem that the problem is that the check is falsely identifying the SOFT_ONEWIRE_PARAMS_* macros as classic header guards. It seems that other drivers don't suffer this fate because they all use the pattern DRIVERNAME_PARAM_* (no S). However, most all other drivers do have a macro named DRIVERNAME_PARAM, which will cause false hits for those drivers too if migrated to a #pragma once include guard.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the culprit. The script checks for SOFT_ONEWIRE_PARAMS_H* because the classic headerguards could end with an underscore or just after the H.

I'll see if I can fix the headerguards check script.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh thanks! At any rate, I changed all the SOFT_ONEWIRE_PARAMS_* macros to drop the S at the end of PARAM so that they are in compliance with our driver writing tutorial and unified with the style of all other drivers.

@Enoch247

Enoch247 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

I believe this PR is ready for a squash and merge, if there are not remaining concerns.

@crasbe

crasbe commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

I believe this PR is ready for a squash and merge, if there are not remaining concerns.

The build still fails for some platforms 🤔

I don't know what's up with that, perhaps you have to ping another maintainer in Matrix with that.

@Enoch247

Enoch247 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

I believe this PR is ready for a squash and merge, if there are not remaining concerns.

The build still fails for some platforms 🤔

I don't know what's up with that, perhaps you have to ping another maintainer in Matrix with that.

I'll look into it.

@Enoch247

Enoch247 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

I believe I fixed it. Waiting on CI to complete to find out.

@crasbe crasbe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have to test it on Monday because I don't have Onewire hardware here.

Comment thread drivers/include/onewire.h Outdated
Comment thread drivers/include/onewire.h

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#if IS_USED(MODULE_ONEWIRE_MULTIDRIVER) || DOXYGEN

The IS_USED macro should be used to check if a module is used. Also for the following occurances.

See: https://github.com/RIOT-OS/RIOT/blob/d9eb4c729302aea83a8368424e96ee78b9d5917e/CODING_CONVENTIONS.md#conditional-compilation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coding convention would indicate that the current way I have done it is the preferred way.

If preprocessor conditionals are needed, use #ifdef MODULE_FOO or #if MODULE_FOO instead of #if IS_USED(MODULE_FOO)

Comment thread drivers/include/onewire.h Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you could add a sentence why you would choose either one.

Comment thread drivers/include/soft_onewire.h Outdated
Comment thread drivers/include/soft_onewire.h Outdated
Comment thread drivers/onewire/doc.md

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Devices Inc) specified 1-Wire (or Onewire) Buses. 1-Wire slave device drivers should use it

Perhaps add that so that's easier to search for.

Comment thread drivers/onewire/doc.md Outdated
Comment thread drivers/onewire/rom.c Outdated
@crasbe

crasbe commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

First test with a nucleo-l452re results in a kernel panic with overflowed ISR stack. This is without a sensor connected.

2026-08-03 15:47:11,096 # ��(): This is RIOT! (Version: 2025.10-devel-212-ga3b31-add-driver-onewire)
2026-08-03 15:47:11,096 #
2026-08-03 15:47:11,098 # Context before hardfault:
2026-08-03 15:47:11,100 #    r0: 0x4002104c
2026-08-03 15:47:11,102 #    r1: 0x00000005
2026-08-03 15:47:11,103 #    r2: 0x80000000
2026-08-03 15:47:11,104 #    r3: 0x00000000
2026-08-03 15:47:11,106 #   r12: 0xffffffff
2026-08-03 15:47:11,108 #    lr: 0x08000ca1
2026-08-03 15:47:11,109 #    pc: 0x0800162c
2026-08-03 15:47:11,111 #   psr: 0x210e0000
2026-08-03 15:47:11,111 #
2026-08-03 15:47:11,112 # FSR/FAR:
2026-08-03 15:47:11,113 #  CFSR: 0x00008200
2026-08-03 15:47:11,115 #  HFSR: 0x40000000
2026-08-03 15:47:11,117 #  DFSR: 0x00000008
2026-08-03 15:47:11,118 #  AFSR: 0x00000000
2026-08-03 15:47:11,120 #  BFAR: 0xfffffff0
2026-08-03 15:47:11,120 # Misc
2026-08-03 15:47:11,122 # EXC_RET: 0xfffffffd
2026-08-03 15:47:11,124 # Active thread: 1 "main"
2026-08-03 15:47:11,128 # Attempting to reconstruct state for debugging...
2026-08-03 15:47:11,129 # In GDB:
2026-08-03 15:47:11,131 #   set $pc=0x800162c
2026-08-03 15:47:11,132 #   frame 0
2026-08-03 15:47:11,132 #   bt
2026-08-03 15:47:11,132 #
2026-08-03 15:47:11,136 # ISR stack overflowed by at least 16 bytes.
2026-08-03 15:47:11,138 # *** RIOT kernel panic:
2026-08-03 15:47:11,140 # HARD FAULT HANDLER
2026-08-03 15:47:11,140 #
2026-08-03 15:47:11,141 # *** halted.
2026-08-03 15:47:11,141 #
2026-08-03 15:47:11,142 # Inside isr -13

After increasing the ISR stacksize arbitrarily to 8192, we still hard fault, but not with the ISR stack overflow anymore:

2026-08-03 15:51:14,752 # main(): This is RIOT! (Version: 2025.10-devel-212-ga3b31-add-driver-onewire)
2026-08-03 15:51:14,753 #
2026-08-03 15:51:14,754 # Context before hardfault:
2026-08-03 15:51:14,757 #    r0: 0x4002104c
2026-08-03 15:51:14,758 #    r1: 0x00000005
2026-08-03 15:51:14,759 #    r2: 0x80000000
2026-08-03 15:51:14,760 #    r3: 0x00000000
2026-08-03 15:51:14,764 #   r12: 0xffffffff
2026-08-03 15:51:14,764 #    lr: 0x08000ca1
2026-08-03 15:51:14,767 #    pc: 0x0800162c
2026-08-03 15:51:14,768 #   psr: 0x210e0000
2026-08-03 15:51:14,768 #
2026-08-03 15:51:14,768 # FSR/FAR:
2026-08-03 15:51:14,769 #  CFSR: 0x00008200
2026-08-03 15:51:14,771 #  HFSR: 0x40000000
2026-08-03 15:51:14,773 #  DFSR: 0x00000008
2026-08-03 15:51:14,774 #  AFSR: 0x00000000
2026-08-03 15:51:14,776 #  BFAR: 0xfffffff0
2026-08-03 15:51:14,776 # Misc
2026-08-03 15:51:14,778 # EXC_RET: 0xfffffffd
2026-08-03 15:51:14,780 # Active thread: 1 "main"
2026-08-03 15:51:14,784 # Attempting to reconstruct state for debugging...
2026-08-03 15:51:14,785 # In GDB:
2026-08-03 15:51:14,787 #   set $pc=0x800162c
2026-08-03 15:51:14,788 #   frame 0
2026-08-03 15:51:14,788 #   bt
2026-08-03 15:51:14,790 # *** RIOT kernel panic:
2026-08-03 15:51:14,792 # HARD FAULT HANDLER
2026-08-03 15:51:14,792 #
2026-08-03 15:51:14,793 # *** halted.
2026-08-03 15:51:14,793 #
2026-08-03 15:51:14,794 # Inside isr -13

Attaching a DS18B20 temperature sensor does not change the behavior.
Adding a 4.7k Pull Up resistor does not change the behavior.

With ENABLE_DEBUG 1 in drivers/onewire/onewire.c we get this:

2026-08-03 15:56:50,347 # main(): This is RIOT! (Version: 2026.10-devel-255-g9a12e-add-driver-onewire)
2026-08-03 15:56:50,348 # _onewire_init
2026-08-03 15:56:50,348 #
2026-08-03 15:56:50,351 # Context before hardfault:
2026-08-03 15:56:50,352 #    r0: 0x4002104c
2026-08-03 15:56:50,354 #    r1: 0x00000005
2026-08-03 15:56:50,355 #    r2: 0x80000000
2026-08-03 15:56:50,357 #    r3: 0x00000000
2026-08-03 15:56:50,359 #   r12: 0xffffffff
2026-08-03 15:56:50,360 #    lr: 0x08000cb1
2026-08-03 15:56:50,362 #    pc: 0x08001736
2026-08-03 15:56:50,363 #   psr: 0x210f0000
2026-08-03 15:56:50,363 #
2026-08-03 15:56:50,364 # FSR/FAR:
2026-08-03 15:56:50,366 #  CFSR: 0x00008200
2026-08-03 15:56:50,367 #  HFSR: 0x40000000
2026-08-03 15:56:50,369 #  DFSR: 0x00000008
2026-08-03 15:56:50,370 #  AFSR: 0x00000000
2026-08-03 15:56:50,372 #  BFAR: 0xfffffff0
2026-08-03 15:56:50,372 # Misc
2026-08-03 15:56:50,374 # EXC_RET: 0xfffffffd
2026-08-03 15:56:50,376 # Active thread: 1 "main"
2026-08-03 15:56:50,381 # Attempting to reconstruct state for debugging...
2026-08-03 15:56:50,381 # In GDB:
2026-08-03 15:56:50,383 #   set $pc=0x8001736
2026-08-03 15:56:50,384 #   frame 0
2026-08-03 15:56:50,384 #   bt
2026-08-03 15:56:50,386 # *** RIOT kernel panic:
2026-08-03 15:56:50,388 # HARD FAULT HANDLER
2026-08-03 15:56:50,388 #
2026-08-03 15:56:50,389 # *** halted.
2026-08-03 15:56:50,389 #
2026-08-03 15:56:50,391 # Inside isr -13

For reference:

This is how I compile and flash the application:
BOARD=nucleo-l452re make -C tests/drivers/soft_onewire/ flash term -j

These are the changes I made to the tests/drivers/soft_onewire/Makefile:

cbuec@W11nMate:~/RIOTstuff/riot-vanillaice/RIOT$ git diff
diff --git a/tests/drivers/soft_onewire/Makefile b/tests/drivers/soft_onewire/Makefile
index 070eed4df7..52226300ff 100644
--- a/tests/drivers/soft_onewire/Makefile
+++ b/tests/drivers/soft_onewire/Makefile
@@ -5,6 +5,9 @@ include ../Makefile.drivers_common
 #CFLAGS += -DSOFT_ONEWIRE_PARAMS_PIN="GPIO_PIN(PORT_C, 0)"
 #CFLAGS += -DSOFT_ONEWIRE_PARAMS_TX_PIN="GPIO_PIN(PORT_C, 0)"
 #CFLAGS += -DSOFT_ONEWIRE_PARAMS_RX_PIN="GPIO_PIN(PORT_C, 1)"
+CFLAGS += -DSOFT_ONEWIRE_PARAMS_PIN="GPIO_PIN(PORT_A,0)"
+
+CFLAGS += -DISR_STACKSIZE=8192

 # uncomment to use a dedicated hardware timer for the 1-wire bus
 # Note that TIMER_DEV(0) is often used by ztimer. This test does not need

@crasbe

crasbe commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

The behavior for the nRF52840DK is also unchanged:

2026-08-03 16:00:49,950 # main(): This is RIOT! (Version: 2026.10-devel-255-g9a12e-add-driver-onewire)
2026-08-03 16:00:49,952 # _onewire_init
2026-08-03 16:00:49,955 # searching for 1-wire devices on bus 0...
2026-08-03 16:00:49,958 # onewire_write: f0
2026-08-03 16:00:49,986 # found device: 0000000000000000
2026-08-03 16:00:49,989 # onewire_write: f0
2026-08-03 16:00:50,018 # failure to enumerate device: EBADMSG

I do have a DS24BS33S+ EEPROM now which I'll test later.

@crasbe

crasbe commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Same on the nRF52840DK with the EEPROM, using a 1k Pullup resistor.

Also, when commenting out the timer lines in the Makefile, there is a failed assertion:

2026-08-03 17:09:22,903 # main(): This is RIOT! (Version: 2026.10-devel-255-g9a12e-add-driver-onewire)
2026-08-03 17:09:22,904 # _onewire_init
2026-08-03 17:09:22,907 # 0x1f89 => FAILED ASSERTION.

@Enoch247

Enoch247 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Well that's a bummer. Digging through my other dev boards to see if I can reproduce these issues.

@Enoch247

Enoch247 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Ok the failure on other boards was a silly mistake. I just missed a few renames of SOFT_ONEWIRE_PARAMS_* to SOFT_ONEWIRE_PARAM_*. See commit ffb8be7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: doc Area: Documentation Area: drivers Area: Device drivers Area: tests Area: tests and testing framework CI: no fast fail don't abort PR build after first error CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants