导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页
    1. 主页
    2. lingeasy
    L
    • 资料
    • 关注 1
    • 粉丝 0
    • 我的积分 1604
    • 主题 9
    • 帖子 30
    • 最佳 4
    • 群组 0

    lingeasyLV 5

    @lingeasy

    1604
    积分
    15
    声望
    18
    资料浏览
    30
    帖子
    0
    粉丝
    1
    关注
    注册时间 最后登录

    lingeasy 取消关注 关注

    lingeasy 发布的最佳帖子

    • D1s 哪吒开发板,电阻屏的配置方法

      在配置D1s的RTP(电阻屏)出现了不少问题,现将需要配置的部分和大家分享一下,有出现问题的,可以按照如下方法来试一下。
      1、【tslib-env.sh】配置运行环境

      # 路径:package\libs\tslib\files\tslib-env.sh
      #! /bin/sh
      
      export TSLIB_CALIBFILE=/etc/pointercal	# 指定触摸屏校准文件 pintercal 的存放位置 
      export TSLIB_CONFFILE=/etc/ts.conf		# 指定 TSLIB 配置文件的位置
      export TSLIB_PLUGINDIR=/usr/lib/ts		# 指定触摸屏插件所在路径
      export TSLIB_CONSOLEDEVICE=none			# 设定控制台设备为 none ,否则默认为 /dev/tty ,这样可以避免出现“open consoledevice: No such file or directory KDSETMODE: Bad file descriptor ” 的错误 
      export TSLIB_FBDEVICE=/dev/fb0			# 指定帧缓冲设备 
      export TSLIB_TSDEVICE=/dev/input/event0	 # 指定触屏设备
      

      2、【ts.conf】配置

      # 路径:package\libs\tslib\files\ts.conf
      # Uncomment if you wish to use the one-wire linux input layer S70/A70...
      
      # module_raw one_wire_ts_input
      
      # Uncomment if you wish to use the linux input layer event interface
      module_raw input
      
      # Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d
      # module_raw collie
      
      # Uncomment if you're using a Sharp Zaurus SL-C700/C750/C760/C860
      # module_raw corgi
      
      # Uncomment if you're using a device with a UCB1200/1300/1400 TS interface
      # module_raw ucb1x00
      
      # Uncomment if you're using an HP iPaq h3600 or similar
      # module_raw h3600
      
      # Uncomment if you're using a Hitachi Webpad
      # module_raw mk712
      
      # Uncomment if you're using an IBM Arctic II
      # module_raw arctic2
      
      module pthres pmin=1
      module variance delta=30
      module dejitter delta=100
      module linear
      

      3、【config-5.4】配置,开始相关的驱动

      # 路径:/device/config/chips/d1s/configs/nezha/linux-5.4/config-5.4
      CONFIG_TOUCHSCREEN_SUN4I=y
      

      4、【sun4i-ts.c】配置,解决按下1秒触发和拖到卡顿的问题

      // 路径:lichee/linux-5.4/drivers/input/touchscreen/sun4i-ts.c
      // 修改前
      if (of_device_is_compatible(np, "allwinner,sun8i-ts"))
          writel(ADC_FIRST_DLY(0x1) | ADC_FIRST_DLY_MODE(0x1)
              | ADC_CLK_DIV(0x2) | FS_DIV(2) | T_ACQ(5),
              ts->base + TP_CTRL0);
      // 修改后
      if (of_device_is_compatible(np, "allwinner,sun8i-ts"))
      	writel(ADC_FIRST_DLY(0xf) | ADC_FIRST_DLY_MODE(1)
      		| ADC_CLK_DIV(2) | FS_DIV(6) | T_ACQ(63),
      		ts->base + TP_CTRL0);
      

      5、【测试的方法】

      # 1)用这个先生成校准文件:
      TSLIB_CONSOLEDEVICE=none TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event0 ts_calibrate
      # 2)后台运行 uinput:
      TSLIB_CONSOLEDEVICE=none TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event0 ts_uinput
      # 3)前台执行 测试:
      TSLIB_CONSOLEDEVICE=none TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/eventX ts_test
      
      发布在 MR Series
      L
      lingeasy
    • 回复: D1s调试rtp,触控屏,电阻屏出现open consoledevice: No such file or directory

      @whycan 已经解决了,看到在别一个帖子里面的说明
      修改“lichee/linux-5.4/drivers/input/touchscreen/sun4i-ts.c”文件中相关内容
      【原内容】

      	writel(ADC_CLK_SEL(0) | ADC_CLK_DIV(2) | FS_DIV(7) | T_ACQ(63),
      	       ts->base + TP_CTRL0);
      	if (of_device_is_compatible(np, "allwinner,sun8i-ts"))
      		writel(ADC_FIRST_DLY(0x1) | ADC_FIRST_DLY_MODE(0x1)
      			| ADC_CLK_DIV(0x2) | FS_DIV(2) | T_ACQ(5),
      			ts->base + TP_CTRL0);
      

      【修改后】

      	writel(ADC_CLK_SEL(0) | ADC_CLK_DIV(2) | FS_DIV(7) | T_ACQ(63),
      	       ts->base + TP_CTRL0);
      	if (of_device_is_compatible(np, "allwinner,sun8i-ts"))
      		writel(ADC_FIRST_DLY(0xf) | ADC_FIRST_DLY_MODE(0x1)
      			| ADC_CLK_DIV(0x2) | FS_DIV(6) | T_ACQ(63),
      			ts->base + TP_CTRL0);
      
      发布在 MR Series
      L
      lingeasy
    • 回复: D1s 哪吒开发板,电阻屏的配置方法

      @gaowei15537316965
      开机启动的时候增加这个的初始化代码应该就可以解决这个问题。

      #!/bin/sh
      
      # 判断是否已经校准了屏幕
      if [ ! -f "/etc/pointercal" ]; then
      TSLIB_CONSOLEDEVICE=none TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event0 ts_calibrate
      sleep 1
      fi
      
      # event2是所使用测试硬件使用“ts_uinput ”配置后生成的
      if [ ! -e "/dev/input/event2" ]; then
      TSLIB_CONSOLEDEVICE=none TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event0 ts_uinput &
      sleep 1
      fi
      
      发布在 MR Series
      L
      lingeasy
    • d1s 串口功能配置

      串口配置,本例程以uart5为参考
      1 【sys_config.fex】配置
      配置文件参考https://tina.100ask.net/BasicComponent/Linux_Configuration_DevelopmentGuide-01

      ;路径:\device\config\chips\d1s\configs\nezha\sys_config.fex
      ;----------------------------------------------------------------------------------
      ;uart5 configuration
      ;uart5_used  UART使用控制: 1 使用, 0 不用
      ;uart5_port  UART端口号
      ;uart5_type  UART类型,有效值为:2/4/8;表示2/4/8线模式
      ;uart5_tx    UART TX的GPIO配置
      ;uart5_rx    UART RX的GPIO配置
      ;----------------------------------------------------------------------------------
      [uart5]
      uart5_used = 1
      uart5_port = 5
      uart5_type = 2
      uart5_tx = port:PB4<7><1><default><default>
      uart5_rx = port:PB5<7><1><default><default>
      

      2 【linux-5.4\board.dts】配置

      // 路径:\device\config\chips\d1s\configs\nezha\linux-5.4\board.dts
      uart5_pins_a: uart5_pins@0 {  /* For awol nezha board */
          pins = "PB4", "PB5";
          function = "uart5";
          muxsel = <3>;
          drive-strength = <10>;
          bias-pull-up;
      };
      
      uart5_pins_b: uart5_pins@1 {  /* For awol nezha board */
          pins = "PB4", "PB5";
          function = "gpio_in";
      };
      
      &uart5 {
      	pinctrl-names = "default", "sleep";
      	pinctrl-0 = <&uart5_pins_a>;
      	pinctrl-1 = <&uart5_pins_b>;
      	status = "okay";
      };
      
      发布在 MR Series
      L
      lingeasy

    lingeasy 发布的最新帖子

    • 回复: D1s 哪吒开发板,电阻屏的配置方法

      最近看到使用lvgl开发的软件,使用上面的配置,可能会出现无法获取触屏释放动作的问题 ,现象如下:
      使用ts_test或getevent event0(系统生成的设备号)时可以正常释放;
      使用ts_test或getevent测试使用ts_uinput生成的设备就无法正常获取触屏释放的信号。

      具体成因没有去研究,但可能通过修改ts.conf配置文件来修复这一问题,主要是关闭了灵敏度相关的参数配置,具体代码如下:

      # 路径:package\libs\tslib\files\ts.conf
      # Uncomment if you wish to use the one-wire linux input layer S70/A70...
      
      # module_raw one_wire_ts_input
      
      # Uncomment if you wish to use the linux input layer event interface
      module_raw input
      
      # Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d
      # module_raw collie
      
      # Uncomment if you're using a Sharp Zaurus SL-C700/C750/C760/C860
      # module_raw corgi
      
      # Uncomment if you're using a device with a UCB1200/1300/1400 TS interface
      # module_raw ucb1x00
      
      # Uncomment if you're using an HP iPaq h3600 or similar
      # module_raw h3600
      
      # Uncomment if you're using a Hitachi Webpad
      # module_raw mk712
      
      # Uncomment if you're using an IBM Arctic II
      # module_raw arctic2
      
      # module pthres pmin=1
      # module variance delta=30
      # module dejitter delta=100
      module linear
      
      发布在 MR Series
      L
      lingeasy
    • 回复: D1s 哪吒开发板,电阻屏的配置方法

      @gaowei15537316965
      开机启动的时候增加这个的初始化代码应该就可以解决这个问题。

      #!/bin/sh
      
      # 判断是否已经校准了屏幕
      if [ ! -f "/etc/pointercal" ]; then
      TSLIB_CONSOLEDEVICE=none TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event0 ts_calibrate
      sleep 1
      fi
      
      # event2是所使用测试硬件使用“ts_uinput ”配置后生成的
      if [ ! -e "/dev/input/event2" ]; then
      TSLIB_CONSOLEDEVICE=none TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event0 ts_uinput &
      sleep 1
      fi
      
      发布在 MR Series
      L
      lingeasy
    • 回复: 【求救】D1-哪吒开发板启动异常

      这个问题我们在调试的时候也发现了,可能出现在两个位置,第一个是boot完以后,要打开LCD;别一个位置就是帖子里面所描述的位置。出现也不是必然,有一定的概率。最终确定是由于上电时序问题导致的,看一下手册上的上电时序要求,按照手册的需要改,大概率可以解决这个问题。

      发布在 MR Series
      L
      lingeasy
    • 系统有时出现无法启动的情况,提示如下

      系统启动的时候会出现如下提示,然后系统就停止了。

      [53]HELLO! BOOT0 is starting!
      [56]BOOT0 commit : 88480af
      [59]set pll start
      [61]periph0 has been enabled
      [64]set pll end
      [65][pmu]: bus read error
      [67]board init ok
      [69]ZQ value = 0x2e
      [71]get_pmu_exist() = -1
      [73]DRAM BOOT DRIVE INFO: V0.33
      [76]DRAM CLK = 528 MHz
      [78]DRAM Type = 2 (2:DDR2,3:DDR3)
      [81]DRAMC read ODT  off.
      [84]DRAM ODT off.
      [86]ddr_efuse_type: 0xa
      [88]DRAM SIZE =64 M
      [90]dram_tpr4:0x0
      [92]PLL_DDR_CTRL_REG:0xf8002b00
      [95]DRAM_CLK_REG:0xc0000000
      [97][TIMING DEBUG] MR2= 0x0
      [102]DRAM simple test OK.
      [104]dram size =64
      [106]spinand UBOOT_START_BLK_NUM 8 UBOOT_LAST_BLK_NUM 32
      [111]block from 8 to 32
      [168]Check is correct.
      [170]dma 0x301a8 int is not used yet
      [174]dma 0x301a8 int is free, you do not need to free it again
      [180]Entry_name        = opensbi
      [183]Entry_name        = u-boot
      [187]Entry_name        = dtb
      [189]Jump to second Boot.
      
      OpenSBI auto-t113-linux-V0.8-3-ge39e937
         ____                    _____ ____ _____
        / __ \                  / ____|  _ \_   _|
       | |  | |_ __   ___ _ __ | (___ | |_) || |
       | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
       | |__| | |_) |  __/ | | |____) | |_) || |_
        \____/| .__/ \___|_| |_|_____/|____/_____|
              | |
              |_|
      
      Platform Name          : T-HEAD Xuantie Platform
      Platform HART Features : RV64ACDFIMSUVX
      Platform Max HARTs     : 1
      Current Hart           : 0
      Firmware Base          : 0x41fc0400
      Firmware Size          : 75 KB
      Runtime SBI Version    : 0.2
      
      MIDELEG : 0x0000000000000222
      MEDELEG : 0x000000000000b1ff
      PMP0    : 0x0000000041fc0000-0▒
      
      U-Boot 2018.07-ge987def-dirty (Apr 20 2023 - 11:37:55 +0800) Allwinner Technology
      
      [00.258]DRAM:  64 MiB
      [00.260]Relocation Offset is: 01ee9000
      [00.265]secure enable bit: 0
      can't support chip type 24064
      [00.271]CPU=720 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=300Mhz
      sunxi flash map init
      SPI ALL:   ready
      [00.282]flash init start
      [00.284]workmode = 0,storage type = 0
      [00.292]sunxi-spinand-phy: spinand sample_mode:2 sample_delay:2
      
      device nand0 <nand>, # parts = 4
       #: name                size            offset          mask_flags
       0: boot0               0x00100000      0x00000000      1
       1: uboot               0x00300000      0x00100000      1
       2: secure_storage      0x00100000      0x00400000      1
       3: sys                 0x07b00000      0x00500000      0
      
      active partition: nand0,0 - (boot0) 0x00100000 @ 0x00000000
      
      defaults:
      mtdids  : nand0=nand
      mtdparts: mtdparts=nand:1024k@0(boot0)ro,3072k@1048576(uboot)ro,1024k@4194304(secure_storage)ro,-(sys)
      [00.409]ubi0: attaching mtd4
      [00.526]ubi0: scanning is finished
      [00.533]ubi0: attached mtd4 (name "sys", size 123 MiB)
      [00.538]ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 258048 bytes
      [00.544]ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 2048
      [00.550]ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
      [00.557]ubi0: good PEBs: 492, bad PEBs: 0, corrupted PEBs: 0
      [00.562]ubi0: user volume: 9, internal volumes: 1, max. volumes count: 128
      [00.569]ubi0: max/mean erase counter: 4/1, WL threshold: 4096, image sequence number: 0
      [00.576]ubi0: available PEBs: 0, total reserved PEBs: 492, PEBs reserved for bad PEB handling: 20
      [00.588]sunxi flash init ok
      [00.591]line:703 init_clocks
      [00.594]drv_disp_init
      request pwm success, pwm7:pwm7:0x2000c00.
      [00.615]drv_disp_init finish
      [00.720]Loading Environment from SUNXI_FLASH... OK
      [00.743]boot_gui_init:start
      [00.746]set disp.dev2_output_type fail. using defval=0
      ====LCD_power_on=====!!!!!!![00.755]set disp.fb0_rot_used fail. using defval=0
      [00.759]set disp.fb0_rot_degree fail. using defval=0
      [00.765]boot_gui_init:finish
      partno erro : can't find partition bootloader
      [00.783]bmp_name=b====----=====!!!!!!!ootlogo.bmp size 51798
      [00.795]out of usb burn from boot: not need burn key
      [00.800]Item0 (Map) magic is bad
      partno erro : can't find partition private
      [00.829]update bootcmd
      [00.842]change working_fdt 0x42aa8da0 to 0x42a88da0
      No reserved memory region found in source FDT
      [00.877]update dts
      Hit any key to stop autoboot:  1 ====LCD_bl_open=====!!!!!!!FDT ERROR:get muxsel err returned FDT_ERR_INTERNAL
      sunxi_pwm_pin_set_state, fdt_set_all_pin, ret=-1
      [00.951]LCD open finish                     
      
      发布在 MR Series
      L
      lingeasy
    • 使用g++编译lvgl出现错误

      应用程序使用到c++的库和功能,但发现在编译lvgl的时候出现错误。
      编译配置如下:

      CTOOL := riscv64-unknown-linux-gnu-
      CCL := ~/workspace/tina-D1s/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702
      CC := ${CCL}/bin/${CTOOL}g++
      LVGL_DIR_NAME ?= lvgl
      LVGL_DIR ?= ${shell pwd}
      CFLAGS ?= -O3 -g0 -I$(LVGL_DIR)/ -Wshadow -Wundef   \
      -Wno-unused-function -Wno-error=strict-prototypes -Wpointer-arith -fno-strict-aliasing -Wno-error=cpp \
      -Wuninitialized -Wmaybe-uninitialized -Wno-unused-parameter -Wtype-limits \
      -Wsizeof-pointer-memaccess -Wno-format-nonliteral -Wno-cast-qual -Wunreachable-code -Wno-switch-default -Wreturn-type \
      -Wmultichar -Wformat-security -Wno-ignored-qualifiers -Wno-error=pedantic -Wno-sign-compare -Wno-error=missing-prototypes \
      -Wdouble-promotion -Wclobbered -Wdeprecated -Wempty-body -Wtype-limits -Wshift-negative-value -Wstack-usage=2048 \
      -Wno-unused-value -Wno-unused-parameter -Wuninitialized -Wmaybe-uninitialized \
      -Wextra -Wno-unused-parameter -Wtype-limits -Wsizeof-pointer-memaccess -Wno-format-nonliteral \
      -Wpointer-arith -Wno-cast-qual  -Wunreachable-code -Wno-switch-default -Wreturn-type -Wmultichar \
      -Wformat-security -Wno-ignored-qualifiers -Wno-sign-compare -std=c++2a -fpermissive -Wmissing-field-initializers
      LDFLAGS ?= -lm
      

      编译出现问题如下,有谁知道如果解决。

      lvgl/src/core/lv_obj.c:79:1: error: designator order for field '_lv_obj_class_t::base_class' does not match declaration order in 'const lv_obj_class_t' {aka 'const _lv_obj_class_t'}
      
      发布在 GUI
      L
      lingeasy
    • 回复: 如何在D1s Tina linux 环境下使用lvgl创建独立应用程序UI

      @aldfaaa 能先看一下demo吗,学习一下😁

      发布在 MR Series
      L
      lingeasy
    • 如何在D1s Tina linux 环境下使用lvgl创建独立应用程序UI

      如何在D1s Tina linux 环境下使用lvgl创建独立应用程序UI。
      求大佬指点一下。

      发布在 MR Series
      L
      lingeasy
    • 回复: 请教一下: Tina 系统在 R818(A133) 如何旋转屏幕 (270°)

      后来是怎么处理的。

      发布在 Linux
      L
      lingeasy
    • d1s python3 功能配置

      1 【sys_partition.fex】配置
      将rootofs的size增加1倍,不然没有pack

      \device\config\chips\d1s\configs\nezha\sys_partition.fex

      ; 修改前
      [partition]
          name         = rootfs
          size         = 48640
          downloadfile = "rootfs.fex"
          user_type    = 0x8000
      
      ; 修改后
      [partition]
          name         = rootfs
          size         = 97280
          downloadfile = "rootfs.fex"
          user_type    = 0x8000
      

      2 【内核配置】

      make menuconfig
      # Language -> Python -> python
      

      0fbd3180-d8f6-4d0e-b1aa-e864b3600ca5-image.png

      发布在 MR Series
      L
      lingeasy
    • 回复: d1s 串口功能配置

      更正一下,

      uart5_pins_a: uart5_pins@0 {  /* For awol nezha board */
          pins = "PB4", "PB5";
          function = "uart5";
          muxsel = <7>;
          drive-strength = <10>;
          bias-pull-up;
      };
      
      发布在 MR Series
      L
      lingeasy