On Tuesday, October 20, 2015 at 5:02 AM,
Jan Kandziora j...@gmx.de wrote:

> To me, the conclusion is the "strong pullup" inside your host isn't
> working. 
 
This is the first I've heard that the w1 driver is supposed to implement a 
strong pullup! I guess the early instructions I followed assumed it would "just 
work", and didn't even mention it. 
 
> Chances are you have damaged that GPIO output pin by accidentally
> shortening it to ground. 
 
But if that is true, what is forcing the bus to 3.3 V during the digital 
interaction with the DS18B20? That level does not depend upon my external 
pullup at all. It can only be the output of the GPIO pin. 
 
> Or the w1 part of your board definition file
> errorneously doesn't support push-pull on that GPIO but only open drain.
 
Again, if the pin was open drain, what forces the bus to 3.3 V during digital 
interaction? 
 
 
I see now that w1_therm supposedly provides a strong pullup. 
 
Mine was set to '1' when this board was last booted:
---
-rw-rw-r--  1 root root 4096 Feb 11 13:00 w1_master_pullup
root@arm:/sys/devices/w1_bus_master1# cat w1_master_pullup
1
---

But what does that mean? 
 
<https://www.kernel.org/doc/Documentation/w1/w1.generic>
-----
w1_master_pullup   - (rw) 5V strong pullup 0 enabled, 1 disabled
-----

I'd tend to believe the code, which matches the version in my 
/linux/drivers/w1/slaves/w1_therm.c:
<http://lxr.free-electrons.com/source/drivers/w1/slaves/w1_therm.c>
-----
55  * - strong_pullup = 0  Disable strong pullup completely
56  * - strong_pullup = 1  Enable automatic strong pullup detection
57  * - strong_pullup = 2  Force strong pullup
58  */
59 static int w1_strong_pullup = 1;
...
264                         /* 750ms strong pullup (or delay) after the convert 
*/
265                         if (w1_strong_pullup == 2 ||
266                                         (!external_power && 
w1_strong_pullup))
267                                 w1_next_pullup(dev, tm);
268 
269                         w1_write_8(dev, W1_CONVERT_TEMP);
270 
...
283                         } else if (!w1_strong_pullup) {
284                                 sleep_rem = msleep_interruptible(tm);
-----


Just in case, since it said (rw), I was able to set it to 2: 
---
root@arm:/sys/devices/w1_bus_master1# cat w1_master_pullup
2
---
Nothing changed on the scope or temperature. Maybe that value is only read at 
startup? But if I reboot the whole board, the default value will be 
rewritten...  It is not listed as a service I can restart. Looks like Pi owners 
can use modprobe, but that doesn't show anything relevant on my BBB. Looks like 
all routes disappear into the cryptic "device tree" mechanism of the BBB...  
 
 
Yes, owserver knows my bus is parasitic and it should enable the pullup; I 
assume that means w1 also knows: 
---
OWFS on localhost:4304:
power   NO (0)
---
 
I'd like to see if some kind of restart using '2' makes any difference, but I'm 
afraid I'm burned out on this for today. Assuming the code is correct and my 
strong pullup is enabled in w1, and its query to "power" finds parasitic, it 
should be on, with or without the '2'. 
 
I'd still be interested in any simple debug tests I could do. 

 
>> --> So assuming we are pulling from 3.30 V, using pin 8_11 = GPIO1_13
>> which has a 6 mA buffer, and the VOL Low-level output voltage, driver
>> enabled, IOL = 6 mA, is 0.45 V, the lowest safe pullup value is:
>> (3.30-0.45)/0.006 = 475 Ohms. If the internal pullup worst case was
>> enabled, it would limit our external pullup to 492 Ohms.
>> 
> NO! The sink current of a single DS18B20 may be as low as 4mA, so the
> lowest safest pullup operates at 4mA, not 6mA.
 
Luckily for me I believe the 4 mA spec is the minimum the DS18B20 can sink, not 
an absolute maximum that might destroy it. So it might have failed to 
communicate, but it didn't. 

Loren
 
| Loren Amelang | lo...@pacific.net |




------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to