https://en.wikipedia.org/wiki/1-Wire
I am inputting 1 wire temperature sensors on the Beaglebone. I am using a 3 wire configuration with power, ground and onewire signal. I can only use 10 onewire devices per bus(pins on Beaglebone)
So I wanted to add more pins for more 1-Wire temperature sensors.
To do so you have to modify the device tree. This describes the hardware to the OS similar to plug and play.
So I have to tell the device tree that another pin is now input for onewire data.
To do that I modify the Linux device tree overlay library. This is where devices are cataloged for non-plug and play devices.
Like Arm powered Device Tree boards without plug and play.
https://source.android.com/devices/architecture/dto/
So the standard Linux pin overlay for onewire is for only one GPIO pin use. Like I said I want multiple GPIO pins for onewire. So modifying the device tree overlay is like a black art. There are no instructions. You just need to try things and see what the result is.
I tried from 3 different Linux examples and modified with my knowledge of what the FreeBSD to Linux differences are in the device tree structure.
I could tell from dmesg output that the device tree overlay I created for two pins worked correctly and was actually assigned to the GPIO pins in the proper input capacity.
So then I went looking for culprits to the onewire bus errors I was seeing in dmesg and considered powering the second GPIO onewire pin sensors with a second set of power leads coming from the Beaglebone.
The average plastic breadboard has accommodations for power pins on both sides. I usually only supply 1 set of power connections to the breadboard for all the sensors to share.
I have found that such an arrangement did not work correctly for me and when I supplied a second set of power leads to the breadboard the second onewire bus stopped erroring out and sensors were available.
So each onewire pin needs a separate set of power connectors.
Using 2 onewire pins with one set of power leads for powering the sensors caused the onewire bus errors.
The onewire temp sensors I use have 4K7 resistors on each board.
There is a software mode to turn off parasitic power in the device tree overlay.
I will try that to see if I can isolate the two buses. With parasitic power on and a common power source I can now see trouble.
So this was really a story about troubleshooting. How a hardware power problem led to onewire bus errors.
Similar to sharing a bunch of GPIO grounds and trying to troubleshoot.
Anyway welcome back doc. I have really missed your critiques.
Code:
owc0: <FDT GPIO attached one-wire bus> at pin 15 on gpiobus3
ow0: <1 Wire Bus> on owc0
ow_temp0: <Advanced One Wire Temperature> romid 28:ee:ba:09:2f:16:02:74 on ow0
ow_temp1: <Advanced One Wire Temperature> romid 28:ff:4e:51:70:16:05:c2 on ow0
ow_temp2: <Advanced One Wire Temperature> romid 28:ff:61:b3:70:16:04:45 on ow0
owc1: <FDT GPIO attached one-wire bus> at pin 14 on gpiobus3
ow1: <1 Wire Bus> on owc1
ow_temp3: <Advanced One Wire Temperature> romid 28:ff:a8:08:70:16:04:91 on ow1
gpioc3: <GPIO controller> on gpio3