Hello,
I have little Raspberry Pi 3 B+ and I installed FreeBSD 12.0-RELEASE on it:
I traed to control GPIO via gpioctl():
I have connected LED to PINs
Although I can change pin status, change it to 0 or 1. Change it to IN or OUT status ...
LED status is not changed, it is always ON.
I can not turn off LED via gpioctl()
It is always ON.
Maybe I'm missing some Kernel module?
Or maby logical number of Pin does not correspond with physical position?
Someone has experience with GPIO?
Best regards,
I have little Raspberry Pi 3 B+ and I installed FreeBSD 12.0-RELEASE on it:
Code:
# uname -a
FreeBSD 12.0-RELEASE r341666 GENERIC arm64
I traed to control GPIO via gpioctl():
Code:
# dmesg | grep gpio
gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 22,23 on simplebus0
gpiobus0: <OFW GPIO bus> on gpio0
gpioc0: <GPIO controller> on gpio0
gpioled0: <GPIO LEDs> on ofwbus0
gpioled0: <led1> failed to map pin
Code:
# kldstat
Id Refs Address Size Name
1 17 0xffff000000000000 13d1480 kernel
2 1 0xffff0000013d2000 40e18 cc_htcp.ko
4 1 0xffff000001456000 30698 accf_data.ko
5 1 0xffff000001487000 30a20 accf_http.ko
6 1 0xffff0000014b8000 441c8 fuse.ko
7 1 0xffff0000014fd000 306c8 accf_dns.ko
8 1 0xffff000053400000 41000 tmpfs.ko
9 1 0xffff000053441000 31000 pflog.ko
10 1 0xffff000053472000 61000 pf.ko
Code:
# gpioctl -lv
pin 00: 0 pin 0<OUT>, caps:<IN,OUT,PU,PD,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN>
pin 01: 1 pin 1<IN>, caps:<IN,OUT,PU,PD,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN>
pin 02: 1 pin 2<>, caps:<IN,OUT,PU,PD,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN>
pin 03: 1 pin 3<>, caps:<IN,OUT,PU,PD,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN>
pin 04: 1 pin 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IN,OUT,PU,PD,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN>
pin 46: 1 pin 46<IN>, caps:<IN,OUT,PU,PD,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN>
pin 47: 1 pin 47<OUT>, caps:<IN,OUT,PU,PD,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN>
pin 48: 1 pin 48<>, caps:<IN,OUT,PU,PD,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN>
pin 49: 1 pin 49<PU>, caps:<IN,OUT,PU,PD,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN>
pin 50: 1 pin 50<PU>, caps:<IN,OUT,PU,PD,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN>
pin 51: 1 pin 51<PU>, caps:<IN,OUT,PU,PD,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN>
pin 52: 1 pin 52<PU>, caps:<IN,OUT,PU,PD,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN>
pin 53: 1 pin 53<PU>, caps:<IN,OUT,PU,PD,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN>
I have connected LED to PINs
Although I can change pin status, change it to 0 or 1. Change it to IN or OUT status ...
LED status is not changed, it is always ON.
I can not turn off LED via gpioctl()
It is always ON.
Maybe I'm missing some Kernel module?
Or maby logical number of Pin does not correspond with physical position?
Someone has experience with GPIO?
Best regards,