From 06df3b29256e4e90abc61505a28852268cf64af7 Mon Sep 17 00:00:00 2001 From: Patrick Van Oosterwijck Date: Wed, 17 Mar 2021 23:15:20 -0600 Subject: [PATCH] extmod/modonewire: Adopt Maxim recommended read timings. The timing of the onewire module was way too fast when reading. This commit adopts read timings as recommended in Maxim application note 126: 6 us (pulse) / 9 us (sample) / 55 us (bit slot). See also: https://www.analog.com/en/technical-articles/1wire-communication-through-software.html Signed-off-by: Damien George --- extmod/modonewire.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extmod/modonewire.c b/extmod/modonewire.c index f440f75a82..dbd519776e 100644 --- a/extmod/modonewire.c +++ b/extmod/modonewire.c @@ -38,9 +38,9 @@ #define TIMING_RESET1 (480) #define TIMING_RESET2 (70) #define TIMING_RESET3 (410) -#define TIMING_READ1 (5) -#define TIMING_READ2 (5) -#define TIMING_READ3 (40) +#define TIMING_READ1 (6) +#define TIMING_READ2 (9) +#define TIMING_READ3 (55) #define TIMING_WRITE1 (10) #define TIMING_WRITE2 (50) #define TIMING_WRITE3 (10)