Mellow-3D / Fly-Gemini-V3

Fly Gemini v3 information
11 stars 4 forks source link

w1-gpio DS18B20 doesn't work #4

Open real-artswan opened 1 year ago

real-artswan commented 1 year ago

I'm trying to connect this temperature sensor but have no luck. I tried with 4.7k resistor and without. The same sensor with the same wires connected to Arduino works well, so it's not a wiring issue.

root@flygemini:~# cat /boot/armbianEnv.txt
verbosity=1
bootlogo=false
console=serial
overlay_prefix=sun50i-h5
overlays=uart1 uart2 usbhost2 usbhost3 w1-gpio
param_w1_pin=PA9
#param_w1_pin_int_pullup=1
param_spidev_spi_bus=0
rootdev=UUID=30e805ee-4f37-470a-94c5-574c939e7244
rootfstype=ext4
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

if param_w1_pin_int_pullup is 0 then content of the directory is unstable, all this 00-* devices randomly appear and disappear.

root@flygemini:~# ls /sys/bus/w1/devices/
00-600000000000  00-a00000000000  00-e00000000000  w1_bus_master1

if it is 1 then there is only w1_bus_master1 all the time.

root@flygemini:~# cat /sys/kernel/debug/gpio
gpiochip1: GPIOs 0-223, parent: platform/1c20800.pinctrl, 1c20800.pinctrl:
 gpio-9   (                    |onewire@0           ) out lo 
 gpio-10  (                    |fly:green:wifi      ) out lo 
 gpio-13  (                    |spi1 CS0            ) out hi ACTIVE LOW
 gpio-18  (                    |spi0 CS1            ) out hi ACTIVE LOW
 gpio-19  (                    |spi1 CS1            ) out hi ACTIVE LOW
 gpio-67  (                    |spi0 CS0            ) out hi ACTIVE LOW
 gpio-102 (                    |gmac-3v3            ) out lo 
 gpio-203 (                    |fly:green:disk      ) out lo 
 gpio-204 (                    |usb0_id_det         ) in  lo IRQ 

gpiochip0: GPIOs 352-383, parent: platform/1f02c00.pinctrl, 1f02c00.pinctrl:
 gpio-357 (                    |vcc-io              ) out lo ACTIVE LOW
 gpio-359 (                    |reset               ) out lo ACTIVE LOW
 gpio-360 (                    |vcc1v2              ) out hi 
 gpio-361 (                    |vcc-dram            ) out hi 
 gpio-362 (                    |fly:green:pwr       ) out hi 
 gpio-363 (                    |fly:green:emmc      ) out lo 
root@flygemini:~# dmesg | grep -E 'w1|wire' | grep -E 'Driver|gpio-'
[    7.147508] Driver for 1-wire Dallas network protocol.
[    7.168819] gpio-9 (onewire@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file

Any suggestions, please?

real-artswan commented 1 year ago

Is anybody here? How I can connect one wire device, which pin I can use?