Am 21.10.2015 um 02:45 schrieb Loren Amelang:
> 
> This is the first I've heard that the w1 driver is supposed to
> implement a strong pullup|
> 
Yes, the w1 driver supports it. But you have a beagleboard, which uses a
board definition file to configure its GPIOs, and if that one
accidentally doesn't enable the push transistor, the w1 driver can try
to control the push transistor as much as it wants, it just won't happen
then.

But it's just a guess for now. You should check 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.
> 
There's the very weak pullup inside the GPIO.


> Again, if the pin was open drain, what forces the bus to 3.3 V during
> digital interaction?
> 
There's the very weak pullup inside the GPIO.



> 
> 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? 
>
Loren, I'm a bit too tired to look all this up in the sources. If you
find something which enlightens you, please tell.



> 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.
>
That would mean the driver is built-in. You can use the kernel command
line (bootloader) to set parameters at boot time. The syntax is
"module_name.parameter_name=value"


> Looks like all routes disappear into the cryptic
> "device tree" mechanism of the BBB...
> 
Yes, the BBB is ... special.


> 
> I'd still be interested in any simple debug tests I could do.
> 
Put a small series resistor (~10 Ohm) into the bus. Put the oscilloscope
over it (you need both channels, so substract them, scope's GND still
has to go to board's GND to avoid damage!). You get a measurement of the
supply current over time.


> 
> 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.
> 
Yes, it is that way you write it. If you increase the current through
the drain FET of the DS18B20, it's resistance will be too high to allow
low enough pull and so, disturb communication.

Kind regards

        Jan

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

Reply via email to