tinker board 2/2s 硬件接口

[复制链接]
peter 发表于 2022-7-9 18:24:42 | 显示全部楼层 |阅读模式
tb2_qsg_05.jpg

回复

使用道具 举报

Tinker_p0wbvx 发表于 2022-11-27 00:01:25 | 显示全部楼层

通道被占用咋处理
root@alinux:/home/linaro/lcd-prop/luma.examples# python3 examples/clock.py --display 'st7735' --interface  spi  --width 128 --height 160  --spi-port 1 --spi-device 0   
This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.asus_pullUpDnControl: pin=87, pud=0, bank=2, bank_pin=23
This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.asus_pullUpDnControl: pin=124, pud=0, bank=3, bank_pin=28
This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.asus_pullUpDnControl: pin=120, pud=0, bank=3, bank_pin=24
usage: clock.py [-h] [--config CONFIG] [--display DISPLAY] [--width WIDTH]
回复

使用道具 举报

Tinker_p0wbvx 发表于 2022-11-27 00:08:28 | 显示全部楼层
SPI5 脚位和ST7735 TFT_LCD脚位表对应关系。

SPI5

SPI5

st7735

st7735



TFTLCD_20221127000702.jpg

回复

使用道具 举报

sychimu 发表于 2022-11-28 18:12:16 | 显示全部楼层
确认是否有修改,/boot/config.txt文件,并重启使能启动,参考下图方式设定。
批注 2022-11-28 181149.png
回复

使用道具 举报

Tinker_p0wbvx 发表于 2022-11-28 19:59:44 | 显示全部楼层
本帖最后由 Tinker_p0wbvx 于 2022-11-28 20:06 编辑

这个配置我肯定修改过
#overlay=console-uart0-overlay
"/boot/config.txt" 61L, 1785C                                 61,1          Bot
##### Hardware Interface Config #####

## Note: uart4 and spi1 are the same pins. Set the latter one while both on. ##
## Note: DP_Sound is based on spdif function. ##

intf:fiq_debugger=on
intf:uart0=off
intf:uart4=off
intf:i2c6=off
intf:i2c7=off
intf:i2s0=off
intf:spdif=off
intf:spi1=on
intf:spi5=off
intf:pwm0=off
intf:pwm1=off
intf:pwm3a=off
#intf:test_clkout2=off
回复

使用道具 举报

Tinker_p0wbvx 发表于 2022-11-28 20:01:39 | 显示全部楼层
系统配置默认只有
intf:spi1=on
intf:spi5=off

回复

使用道具 举报

Tinker_p0wbvx 发表于 2022-11-28 20:10:07 | 显示全部楼层
您能否提供-通道被占用方法。
root@alinux:/home/linaro/lcd-prop# python3 st7735.py
This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.asus_pullUpDnControl: pin=87, pud=0, bank=2, bank_pin=23
This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.asus_pullUpDnControl: pin=124, pud=0, bank=3, bank_pin=28
This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.asus_pullUpDnControl: pin=120, pud=0, bank=3, bank_pin=24
回复

使用道具 举报

Tinker_p0wbvx 发表于 2022-11-28 20:11:56 | 显示全部楼层
我把中英文论坛,相关资料等都看一遍,暂未发现相关方法。
回复

使用道具 举报

Tinker_p0wbvx 发表于 2022-11-28 20:18:43 | 显示全部楼层
论坛:
可以通过/sys/kernel/debug/gpio查询信息:

root@alinux:/sys/class/gpio# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-31, parent: platform/ff720000.gpio0, gpio0:
gpio-3   (                    |act-led             ) out lo   
gpio-4   (                    |pwr-led             ) out hi   
gpio-5   (                    |GPIO Key Power      ) in  hi   
gpio-10  (                    |rsv-led             ) out lo   
gpio-12  (                    |ep                  ) out hi   

gpiochip1: GPIOs 32-63, parent: platform/ff730000.gpio1, gpio1:
gpio-34  (                    |int-n               ) in  hi   
gpio-35  (                    |vbus-5v             ) out lo   
gpio-38  (                    |PMIC_RESET          ) out lo   
gpio-46  (                    |vsel                ) out lo   
gpio-49  (                    |vsel                ) out lo   

gpiochip2: GPIOs 64-95, parent: platform/ff780000.gpio2, gpio2:
gpio-76  (                    |hub-vbus            ) out hi   

gpiochip3: GPIOs 96-127, parent: platform/ff788000.gpio3, gpio3:
gpio-111 (                    |mdio-reset          ) out hi   
gpio-112 (                    |gmac_wol_io         ) in  lo   

gpiochip4: GPIOs 128-159, parent: platform/ff790000.gpio4, gpio4:
gpio-131 (                    |enable              ) out hi   
gpio-158 (                    |vcc_lcd             ) out lo   
root@alinux:/sys/class/gpio#


回复

使用道具 举报

Tinker_p0wbvx 发表于 2022-11-28 20:19:08 | 显示全部楼层
root@alinux:/sys/class/gpio#  cat /sys/kernel/debug/pinctrl/pinctrl-rockchip-pinctrl/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
pin 0 (gpio0-0): pinctrl (GPIO UNCLAIMED) function gpio_init_config group gpio_init
pin 1 (gpio0-1): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 2 (gpio0-2): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 3 (gpio0-3): (MUX UNCLAIMED) gpio0:3
pin 4 (gpio0-4): (MUX UNCLAIMED) gpio0:4
pin 5 (gpio0-5): gpio-keys gpio0:5 function buttons group pwrbtn
pin 6 (gpio0-6): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 7 (gpio0-7): fe320000.dwmmc (GPIO UNCLAIMED) function sdmmc group sdmmc-cd
pin 8 (gpio0-8): pinctrl (GPIO UNCLAIMED) function testclk group test-clkout2
pin 9 (gpio0-9): 0-001b (GPIO UNCLAIMED) function pmic group pmic-int-l
pin 10 (gpio0-10): (MUX UNCLAIMED) gpio0:10
pin 11 (gpio0-11): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 12 (gpio0-12): (MUX UNCLAIMED) gpio0:12
pin 13 (gpio0-13): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 14 (gpio0-14): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 15 (gpio0-15): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 16 (gpio0-16): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 17 (gpio0-17): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 18 (gpio0-18): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 19 (gpio0-19): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 20 (gpio0-20): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 21 (gpio0-21): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 22 (gpio0-22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (gpio0-23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 24 (gpio0-24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 25 (gpio0-25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (gpio0-26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (gpio0-27): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 28 (gpio0-28): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 29 (gpio0-29): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 30 (gpio0-30): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 31 (gpio0-31): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 32 (gpio1-0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 33 (gpio1-1): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 34 (gpio1-2): 4-0022 gpio1:34 function fusb30x group fusb0-int
pin 35 (gpio1-3): (MUX UNCLAIMED) gpio1:35
pin 36 (gpio1-4): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 37 (gpio1-5): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 38 (gpio1-6): ff260000.tsadc gpio1:38 function tsadc group otp-out
pin 39 (gpio1-7): ff1d0000.spi (GPIO UNCLAIMED) function spi1 group spi1-rx
pin 40 (gpio1-8): ff1d0000.spi (GPIO UNCLAIMED) function spi1 group spi1-tx
pin 41 (gpio1-9): ff1d0000.spi (GPIO UNCLAIMED) function spi1 group spi1-clk
pin 42 (gpio1-10): ff1d0000.spi (GPIO UNCLAIMED) function spi1 group spi1-cs0
pin 43 (gpio1-11): ff3d0000.i2c (GPIO UNCLAIMED) function i2c4 group i2c4-xfer
pin 44 (gpio1-12): ff3d0000.i2c (GPIO UNCLAIMED) function i2c4 group i2c4-xfer
pin 45 (gpio1-13): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 46 (gpio1-14): 4-0060 gpio1:46 function pmic group vsel2-gpio
pin 47 (gpio1-15): ff3c0000.i2c (GPIO UNCLAIMED) function i2c0 group i2c0-xfer
pin 48 (gpio1-16): ff3c0000.i2c (GPIO UNCLAIMED) function i2c0 group i2c0-xfer
pin 49 (gpio1-17): 0-0060 gpio1:49 function pmic group vsel1-gpio
pin 50 (gpio1-18): 0-001b (GPIO UNCLAIMED) function pmic group pmic-dvs2
pin 51 (gpio1-19): ff420020.pwm (GPIO UNCLAIMED) function pwm2 group pwm2-pin-pull-down
pin 52 (gpio1-20): ff3e0000.i2c (GPIO UNCLAIMED) function i2c8 group i2c8-xfer
pin 53 (gpio1-21): ff3e0000.i2c (GPIO UNCLAIMED) function i2c8 group i2c8-xfer
pin 54 (gpio1-22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 55 (gpio1-23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 56 (gpio1-24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 57 (gpio1-25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 58 (gpio1-26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 59 (gpio1-27): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 60 (gpio1-28): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 61 (gpio1-29): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 62 (gpio1-30): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 63 (gpio1-31): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 64 (gpio2-0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 65 (gpio2-1): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 66 (gpio2-2): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 67 (gpio2-3): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 68 (gpio2-4): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 69 (gpio2-5): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 70 (gpio2-6): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 71 (gpio2-7): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 72 (gpio2-8): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 73 (gpio2-9): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 74 (gpio2-10): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 75 (gpio2-11): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 76 (gpio2-12): fe900000.dwc3 gpio2:76 function usb_hub group hub-vbus-gpio
pin 77 (gpio2-13): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 78 (gpio2-14): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 79 (gpio2-15): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 80 (gpio2-16): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 81 (gpio2-17): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 82 (gpio2-18): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 83 (gpio2-19): pinctrl (GPIO UNCLAIMED) function gpio_init_config group gpio_init
pin 84 (gpio2-20): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 85 (gpio2-21): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 86 (gpio2-22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 87 (gpio2-23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 88 (gpio2-24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 89 (gpio2-25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 90 (gpio2-26): f8000000.pcie (GPIO UNCLAIMED) function pcie group pci-clkreqn-cpm
pin 91 (gpio2-27): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 92 (gpio2-28): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 93 (gpio2-29): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 94 (gpio2-30): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 95 (gpio2-31): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 96 (gpio3-0): fe300000.ethernet (GPIO UNCLAIMED) function gmac group rgmii-pins
pin 97 (gpio3-1): fe300000.ethernet (GPIO UNCLAIMED) function gmac group rgmii-pins
pin 98 (gpio3-2): fe300000.ethernet (GPIO UNCLAIMED) function gmac group rgmii-pins
pin 99 (gpio3-3): fe300000.ethernet (GPIO UNCLAIMED) function gmac group rgmii-pins
回复

使用道具 举报

Tinker_p0wbvx 发表于 2022-11-28 20:21:38 | 显示全部楼层
pin 100 (gpio3-4): fe300000.ethernet (GPIO UNCLAIMED) function gmac group rgmii-pins
pin 101 (gpio3-5): fe300000.ethernet (GPIO UNCLAIMED) function gmac group rgmii-pins
pin 102 (gpio3-6): fe300000.ethernet (GPIO UNCLAIMED) function gmac group rgmii-pins
pin 103 (gpio3-7): fe300000.ethernet (GPIO UNCLAIMED) function gmac group rgmii-pins
pin 104 (gpio3-8): fe300000.ethernet (GPIO UNCLAIMED) function gmac group rgmii-pins
pin 105 (gpio3-9): fe300000.ethernet (GPIO UNCLAIMED) function gmac group rgmii-pins
pin 106 (gpio3-10): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 107 (gpio3-11): fe300000.ethernet (GPIO UNCLAIMED) function gmac group rgmii-pins
pin 108 (gpio3-12): fe300000.ethernet (GPIO UNCLAIMED) function gmac group rgmii-pins
pin 109 (gpio3-13): fe300000.ethernet (GPIO UNCLAIMED) function gmac group rgmii-pins
pin 110 (gpio3-14): fe300000.ethernet (GPIO UNCLAIMED) function gmac group rgmii-pins
pin 111 (gpio3-15): (MUX UNCLAIMED) gpio3:111
pin 112 (gpio3-16): (MUX UNCLAIMED) gpio3:112
pin 113 (gpio3-17): fe300000.ethernet (GPIO UNCLAIMED) function gmac group rgmii-pins
pin 114 (gpio3-18): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 115 (gpio3-19): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 116 (gpio3-20): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 117 (gpio3-21): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 118 (gpio3-22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 119 (gpio3-23): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 120 (gpio3-24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 121 (gpio3-25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 122 (gpio3-26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 123 (gpio3-27): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 124 (gpio3-28): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 125 (gpio3-29): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 126 (gpio3-30): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 127 (gpio3-31): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 128 (gpio4-0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 129 (gpio4-1): ff110000.i2c (GPIO UNCLAIMED) function i2c1 group i2c1-xfer
pin 130 (gpio4-2): ff110000.i2c (GPIO UNCLAIMED) function i2c1 group i2c1-xfer
pin 131 (gpio4-3): (MUX UNCLAIMED) gpio4:131
pin 132 (gpio4-4): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 133 (gpio4-5): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 134 (gpio4-6): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 135 (gpio4-7): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 136 (gpio4-8): fe320000.dwmmc (GPIO UNCLAIMED) function sdmmc group sdmmc-bus4
pin 137 (gpio4-9): fe320000.dwmmc (GPIO UNCLAIMED) function sdmmc group sdmmc-bus4
pin 138 (gpio4-10): fe320000.dwmmc (GPIO UNCLAIMED) function sdmmc group sdmmc-bus4
pin 139 (gpio4-11): fe320000.dwmmc (GPIO UNCLAIMED) function sdmmc group sdmmc-bus4
pin 140 (gpio4-12): fe320000.dwmmc (GPIO UNCLAIMED) function sdmmc group sdmmc-clk
pin 141 (gpio4-13): fe320000.dwmmc (GPIO UNCLAIMED) function sdmmc group sdmmc-cmd
pin 142 (gpio4-14): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 143 (gpio4-15): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 144 (gpio4-16): ff940000.hdmi (GPIO UNCLAIMED) function hdmi group hdmi-i2c-xfer
pin 145 (gpio4-17): ff940000.hdmi (GPIO UNCLAIMED) function hdmi group hdmi-i2c-xfer
pin 146 (gpio4-18): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 147 (gpio4-19): fiq-debugger (GPIO UNCLAIMED) function uart2c group uart2c-xfer
pin 148 (gpio4-20): fiq-debugger (GPIO UNCLAIMED) function uart2c group uart2c-xfer
pin 149 (gpio4-21): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 150 (gpio4-22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 151 (gpio4-23): ff940000.hdmi (GPIO UNCLAIMED) function hdmi group hdmi-cec
pin 152 (gpio4-24): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 153 (gpio4-25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 154 (gpio4-26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 155 (gpio4-27): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 156 (gpio4-28): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 157 (gpio4-29): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 158 (gpio4-30): (MUX UNCLAIMED) gpio4:158
pin 159 (gpio4-31): (MUX UNCLAIMED) (GPIO UNCLAIMED)
回复

使用道具 举报

sychimu 发表于 2022-11-28 20:41:54 | 显示全部楼层
Tinker_p0wbvx 发表于 2022-11-28 20:01
系统配置默认只有
intf:spi1=on
intf:spi5=off

修改成
intf:spi5=on
回复

使用道具 举报

Tinker_p0wbvx 发表于 2022-11-29 20:30:05 | 显示全部楼层
本帖最后由 Tinker_p0wbvx 于 2022-11-29 20:32 编辑

已开启SPI1 按照 st7355 图脚位接到 40 pin 脚位。报错 (Use GPIO.setwarnings(False) to disable warnings.asus_pullUpDnControl ),这个通道咋解决。

root@alinux:/home/linaro/lcd-prop/luma.examples/examples# python3 clock.py --display 'st7735' --height 128 --interface  spi  --spi-port 1 --spi-device 0This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.asus_pullUpDnControl: pin=87, pud=0, bank=2, bank_pin=23
This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.asus_pullUpDnControl: pin=124, pud=0, bank=3, bank_pin=28
This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.asus_pullUpDnControl: pin=120, pud=0, bank=3, bank_pin=24
Version: luma.lcd 2.10.0 (luma.core 2.4.0)
Display: st7735
Interface: spi
Dimensions: 128 x 128
------------------------------------------------------------
disable



回复

使用道具 举报

sychimu 发表于 2022-11-30 09:37:26 | 显示全部楼层
Tinker_p0wbvx 发表于 2022-11-29 20:30
已开启SPI1 按照 st7355 图脚位接到 40 pin 脚位。报错 (Use GPIO.setwarnings(False) to disable warning ...

具体哪个pin脚,可以描述清楚一些吗?或者照片,或者图示?
回复

使用道具 举报

Tinker_p0wbvx 发表于 2022-12-3 20:45:28 | 显示全部楼层

脚位

脚位

回复

使用道具 举报

Tinker_p0wbvx 发表于 2022-12-3 21:09:22 | 显示全部楼层

1:python3 examples/clock.py --config /home/linaro/lcd-prop/luma.examples/conf/test7735.conf 代码 配置脚位.png

test7735.conf 脚位值

脚位值

脚位值


执行结果
root@alinux:/home/linaro/lcd-prop/luma.examples# python3 examples/clock.py --config /home/linaro/lcd-prop/luma.examples/conf/test7735.conf
Traceback (most recent call last):
  File "examples/clock.py", line 69, in <module>
    device = get_device()
  File "/home/linaro/lcd-prop/luma.examples/examples/demo_opts.py", line 61, in get_device
    device = cmdline.create_device(args)
  File "/usr/local/lib/python3.7/dist-packages/luma/core/cmdline.py", line 244, in create_device
    interface = getattr(make_interface(args), args.interface)()
  File "/usr/local/lib/python3.7/dist-packages/luma/core/cmdline.py", line 159, in spi
    gpio=self.gpio or GPIO)
  File "/usr/local/lib/python3.7/dist-packages/luma/core/interface/serial.py", line 305, in __init__
    bitbang.__init__(self, gpio, transfer_size, reset_hold_time, reset_release_time, DC=gpio_DC, RST=gpio_RST)
  File "/usr/local/lib/python3.7/dist-packages/luma/core/interface/serial.py", line 193, in __init__
    self._DC = self._configure(kwargs.get("DC"))
  File "/usr/local/lib/python3.7/dist-packages/luma/core/interface/serial.py", line 206, in _configure
    self._gpio.setup(pin, self._gpio.OUT)
ValueError: The channel sent is invalid on a ASUS



2:如果把值换成(1,4,5)

145

145



root@alinux:/home/linaro/lcd-prop/luma.examples# python3 examples/clock.py --config /home/linaro/lcd-prop/luma.examples/conf/test7735.conf
This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.asus_pullUpDnControl: pin=126, pud=0, bank=3, bank_pin=30
This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.wrong gpio
This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.asus_pullUpDnControl: pin=72, pud=0, bank=2, bank_pin=8
Version: luma.lcd 2.10.0 (luma.core 2.4.0)
Display: st7735
Interface: spi
Dimensions: 160 x 128
------------------------------------------------------------

3:仿真效果
仿真.jpg







回复

使用道具 举报

sychimu 发表于 2022-12-5 11:04:01 | 显示全部楼层

你把PIN16/PIN18两个,分别接到PIN3/PIN5上试下
参考:https://github.com/TinkerBoard/T ... nker-board-2-series

批注 2022-12-05 110723.png
回复

使用道具 举报

Tinker_p0wbvx 发表于 2022-12-9 18:56:19 | 显示全部楼层
sychimu 发表于 2022-12-5 11:04
你把PIN16/PIN18两个,分别接到PIN3/PIN5上试下
参考:https://github.com/TinkerBoard/T ... nker-board- ...

  你把PIN16/PIN18两个,分别接到PIN3/PIN5上试下 。测试也一样,你们有没有接st7735案例吗。案例资源太少,对产品有影响。
回复

使用道具 举报

Tinker_p0wbvx 发表于 2022-12-9 21:08:32 | 显示全部楼层

改成 PIN3 PIN5
--display=st7735
--interface=spi
--spi-port=1
--spi-device=0
--spi-bus-speed=32000000
--gpio-reset=74
--gpio-data-command=73
--gpio-backlight=120
--width=160
--height=128
--backlight-active=high
--gpio-reset-hold-time=0.1
--gpio-reset-release-time=0.1
------------报错--------------------
root@alinux:/home/linaro/lcd-prop/luma.examples# python3 examples/demo.py --config /home/linaro/lcd-prop/luma.examples/conf/test7735.conf
Traceback (most recent call last):
  File "examples/demo.py", line 99, in <module>
    main()
  File "examples/demo.py", line 54, in main
    device = get_device()
  File "/home/linaro/lcd-prop/luma.examples/examples/demo_opts.py", line 61, in get_device
    device = cmdline.create_device(args)
  File "/usr/local/lib/python3.7/dist-packages/luma/core/cmdline.py", line 244, in create_device
    interface = getattr(make_interface(args), args.interface)()
  File "/usr/local/lib/python3.7/dist-packages/luma/core/cmdline.py", line 159, in spi
    gpio=self.gpio or GPIO)
  File "/usr/local/lib/python3.7/dist-packages/luma/core/interface/serial.py", line 305, in __init__
    bitbang.__init__(self, gpio, transfer_size, reset_hold_time, reset_release_time, DC=gpio_DC, RST=gpio_RST)
  File "/usr/local/lib/python3.7/dist-packages/luma/core/interface/serial.py", line 193, in __init__
    self._DC = self._configure(kwargs.get("DC"))
  File "/usr/local/lib/python3.7/dist-packages/luma/core/interface/serial.py", line 206, in _configure
    self._gpio.setup(pin, self._gpio.OUT)
ValueError: The channel sent is invalid on a ASUS
------------------------------------

回复

使用道具 举报

sychimu 发表于 2023-1-5 11:28:02 | 显示全部楼层
Tinker_p0wbvx 发表于 2022-12-9 21:08
改成 PIN3 PIN5
--display=st7735
--interface=spi

完整的教程,可以参考这篇帖子。
https://www.tinkerboard.cn/thread-272-1-1.html
回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

 
QQ在线咨询
点击这里给我发消息
点击这里给我发消息
电话咨询
0755-23012315
快速回复 返回顶部 返回列表