• Register
    • Login
    • Search
    • Recent
    • Github
    • 百度网盘
    • Onedrive
    1. Home
    2. george
    3. Best
    G
    • Profile
    • Following 0
    • Followers 1
    • Topics 21
    • Posts 112
    • Best 24
    • Controversial 2
    • Groups 2

    Best posts made by george

    • ubuntu22.04一键安装ROS2环境

      root登录shell键入如下命令:

      root@ubuntu:/# wget http://fishros.com/install -O fishros && bash fishros
      

      65bc42ac-9e54-4d88-95f4-d878d7e9d65f-image.png
      选择更新源速度会大幅度提高
      3d931b9f-32c6-4d98-b6ac-ac3c444246bd-image.png
      选择humble
      ebe47f66-66e4-4a6b-be30-06baf544eeaa-image.png
      选择桌面版
      63823059-fe80-4f27-8c51-ac78b01dab03-image.png
      安装成功界面
      9afa9baf-df46-40f2-93af-3c00fe3111f4-image.png
      简单测试:
      两个shell终端分别输入下面两条指令

      $ros2 run demo_nodes_py listener
      $ros2 run demo_nodes_cpp talker
      

      db4ce954-67da-438a-891e-e59b4f85d43a-image.png
      小乌龟测试:
      两个shell终端分别输入下面两条指令

      $ ros2 run turtlesim turtlesim_node
      $ ros2 run turtlesim turtle_teleop_key
      

      9f15386f-a6b8-47ae-a8fb-2dfd51fd91b2-image.png

      posted in Ubuntu
      G
      george
    • RE: 请问coolpi 4b 电源输入功率多大合适,有电流保护吗?

      @night 机器TYPEC前端电源芯片耐压可以达到28V,极限可以到34V,所以你的适配器规格没有任何问题。
      开发板的电源部分一直是我们设计最优先考虑的方向,所以前端第一级电源花了很多功夫,考虑到用户各种各样适配器的规格,最终选择目前国内少数几家真正能做车规级别电源方案的厂家。尽量保证前端电源稳定可靠。
      8ce67976-0b1c-47e3-a993-89024b93d7be-image.png

      posted in Peripheral
      G
      george
    • What is Cool Pi?

      1.Introduction

      Cool Pi has a modern and powerful hexa-core ARM based processor, RK3588S inside, it offers significantly improved performance versus other popular SBC boards. All models are equipped with LPDDR4X RAM and optional high performance eMMC modules, boost all applications.
      2.png

      2.Machine size

      The size is only 56mm × 85mm.

      3.png
      COOLPI-V11-20220911.dxf

      3.Performance

      4-core A76+4-core A55 gold combination, giving consideration to high performance and low power consumption.
      A76.png

      A53.jpg

      posted in Hardware
      G
      george
    • Introduction to COOL PI CM5 interface

      Top-level interface

      1.png

      • The 2X20 pin interface is compatible with CP4 and integrates multiple UART, I2C, SPI, CAN and other functions.

      • Three function keys are PWR, RST and LOADER.

      • 2X2 PIN POE connector,such as CP4.

      • 30pin fpc vertical connector can directly drive standard 30PIN EDP interface LCD. Resolution up to 3840 * 2160

      • The MICRO HDMI-RX interface can support up to 4KP60 video signal input.

      • TF card with self-locking.

      • Two native USB3.0 interfaces, one of which supports OTG function.

      • Two Gigabit Ethernet interfaces, one of which supports POE function.

      • Two HDMI2.1 interfaces with a maximum resolution of 8K.

      • Stereo headphone stand with MIC input function.

      • Two native USB2.0 interfaces.

      • One TYPEC power supply interface, consistent with CP4.

      • The external power interface of 2PIN can support DC power input.

      • 1 standard PCIE 4X connector, currently only supports PCIE3.0 2X/1X mode.

      • SSD interface, only PCIE-M2-2242 size hard disk is supported.

      • Standard 7PIN SATA3.0 interface, 4PIN power interface.

      • M.2 WIFI module interface, supporting multiple general WIFI modules.

      • Dual MIPI LCD interfaces support simultaneous output of two MIPI interface LCDs. The resolution of a single LCD is up to 1920 * 1200. It supports the MIPI DSC function.

      • Four independent MIPI camera interfaces support four camera inputs at the same time. It can be configured as 2X4LINE or 4X2LINE mode.

      Bot-level interface

      2.png

      • One 30PIN EDP interface can directly drive LCD output.

      • MXM 314PIN core board connector.

      Welcome to put forward good suggestions. We can consider revising them.
      posted in Pi CM5
      G
      george
    • Coolpi 4b with Ubuntu22 running panfrost gpu driver performance testing

      CPU

      测试方法:

      sudo apt install sysbench
      

      62ac005d-d40d-43b2-bd6d-93dadacf1d91-image.png

      af34c2a1-48ba-4e9d-a1d2-d65f1d1823ff-image.png
      RK3588S单核心每秒事件数2598,8核每秒事件数13846;同步对比 i7-7700 ,单核每秒事件数1438,8核每秒事件数8469。可见ARM在CPU方面并不比X86弱。

      GPU

      测试方法:

      sudo apt-get install glmark2* -y
      

      X11 gl

      9e53b109-3bc6-4922-925f-2a4285a728ba-image.png

      X11 gles 3.1

      7219e59b-9962-4bf0-9a1c-a917f0aae560-image.png

      WAYLAND gl

      dcbf393c-83db-4aa0-95b1-7a0325af289c-image.png

      WAYLAND gles 3.1

      0108ea28-c38c-486a-ad01-5191a63497f9-image.png

      posted in Ubuntu
      G
      george
    • RE: Heatsync options

      @zensation The radiator can be matched with raspberry pi. A separate fan is OK. Normally, it is not necessary to add aluminum alloy fins on the CPU.

      posted in Peripheral
      G
      george
    • CoolPi-4B硬件资料持续更新
      版本 V10 V11
      WIFI模组 AP6256 AIC8800
      WIFI板载天线 无 双频天线
      EMMC连接器 GB042 BM20B

      V10硬件原理图:COOLPI-4B-Schematic-V10.pdf
      V10位号图:COOLPI-4B-Part-V10.pdf
      V10结构图:coolpi-4b-dxf-v10.dxf
      V11 硬件原理图:COOLPI-4B-Schematic-V11.pdf
      V11位号图:COOLPI-4B-Part-V11.pdf
      V11结构图:COOLPI-4B-DXF-V11.dxf

      posted in Hardware
      G
      george
    • CM5-EVB Commissioning Description
      • Product image
        微信图片_20230319102146.jpg 微信图片_20230319102140.jpg
        微信图片_20230319163604.jpg

      • All interface functions have been debugged and are currently undergoing performance optimization.

      • It is expected to be sold normally in early April.

      posted in Pi CM5
      G
      george
    • RE: [ ubutnu 22.04 ] AP+STA mode 似乎無法同時啟用?

      内核已经更新,同步develop代码到最新,编译替换内核,KO文件解压到/lib/modules目录,重启机器会看到两个WIFI节点。
      7ab4819e-37fc-4a97-83e4-20e42016d7fa-image.png
      使用其中一个连接外网
      7850a016-4711-44c5-90b8-fcf923704241-image.png
      另外一个可以作为热点
      448c111f-6dca-4be2-8016-d80619b31231-image.png

      posted in Ubuntu
      G
      george
    • How to upgrade the boot loader of coolpi 4b?

      If you need to boot armbian normally, you need to update the loader file to version 0104.

      Follow the steps below to update the loader:

      • Download the latest loader file One Drive
        ![5594e1d4-3a7b-46fc-a7b5-2a9fe418dfc0-image.png]
        b03e7436-83de-4ad3-870c-f23a3d057f4d-image.png

      • Short the 2 pins shown by the arrow.
        484cb5bd-12d1-48ed-87f6-0756e04cc019-image.png

      • The USB interface and computer connection.
        2cd71480-ce1c-422c-acb2-501d266d276e-image.png

      • Plug in the power supply and open the upgrade software. The machine enters the maskrom upgrade mode.
        5ab7434e-30a8-4e2d-aa7e-8d613d21256f-image.png

      • choose to write by address
        96f556fc-ab5d-4c4e-a808-b4ca035d4268-image.png

      • Click Execute to complete the loader update.
        909c4f7c-b55a-4e2a-9c5b-af56d097eb01-image.png

      • If the computer prompts that the USB driver cannot be found, please download and install the driver software first.One Drive
        61903b37-cd70-4a57-af0e-93e0d43ea004-image.png

      posted in Pi 4B
      G
      george
    • gstreamer video framework

      The latest ubuntu22.04 firmware(20230303-ubuntu-22.04-preinstall-desktop-arm64) integrates ffmpeg and gstreamer video frames, and can call the hardware codec module of Rockchip, which can greatly improve the video codec performance of the device and reduce the CPU load.

      • With kmssink, the CPU utilization of 4K video playback is reduced to about 10%.The disadvantage is that it occupies one layer.

      • The following command can obtain layer information.

         sudo cat /sys/kernel/debug/dri/0/state | grep "plane"
      
      • Use the following command to play the video and replace xxx.mp4 with the actual path. 88 represents the layer, kmssink only supports the display of Esmart layer.
         gst-play-1.0  xxx.mp4 --videosink='kmssink plane-id=88'
      
      • You can also use other plug-ins, such as xvimagesink glimagesink waylandsink, etc.

      50b880fb-d9d7-4e37-8390-4db38abc1423-image.png
      e5daa33a-b078-41c2-b50d-be1040b17d50-image.png

      posted in Ubuntu
      G
      george
    • Mini-DP转HDMI线材的说明

      CoolPi的MINI-DP接口只能支持标准的DP协议,分辨率可以达到4KP60,不能支持INTEL DP++协议,所以市面上普通的minidp转HDMI线材大部分是不能使用的。DP转HDMI线材需要使用主动式的线材。下图是几个验证过的线材的链接地址:
      1.https://item.jd.com/100021518367.html
      5b33c306-4f26-474b-887b-2c11850a458c-image.png
      2.https://item.jd.com/100018963014.html
      321b6745-3eed-4960-ad11-c6bcf8773d32-image.png

      posted in Hardware
      G
      george
    • Coolpi 4B armbian support

      462ff968-e9f4-4a4a-924a-f3994cb118b0-image.png

      e81e2101-684e-4db3-a7b6-8bec1e776cf4-image.png

      1290fac3-7efb-4d19-91fc-9710f4f8ae52-image.png

      Open source repositories:Github
      Image download:One Drive

      enable 3D acceleration:
      sudo add-apt-repository ppa:george-coolpi/mali-g610
      sudo add-apt-repository ppa:george-coolpi/multimedia
      sudo apt update
      sudo apt dist-upgrade
      
      installing the MPV video player:(Support rkmpp hardware decoding)
      sudo apt-get install mpv
      
      posted in Armbian
      G
      george
    • 尽情提问,探讨交流

      Linux、嵌入式、软件、硬件、产品、创意

      posted in Construction
      G
      george
    • 瑞芯微新一代旗舰Soc芯片RK3588详细介绍
         2021年12月16日,在瑞芯微举办的第六届开发者大会上,瑞芯微发布了新一代高性能旗舰Soc芯片RK3588,对于要实现国产化芯片替代的视讯及监控厂商来说,这是一个期待已久的重磅消息。
      
         华为海思因为被无端制裁,芯片无人代工无法生产,其芯片存货已消耗殆尽,这给瑞星微这样的中小型芯片厂商带来难得的发展契机,也使得芯片的国产化替代进程进入了加速实施阶段。在高性能的海思芯片无法供货的情况下,瑞芯微这些二流厂商也不失为一种退而求其次的选择!
      
         此次瑞芯微重磅发布的高性能RK3688,较以往的产品,性能上有了大幅提升,功能上也得到了进一步的扩展和增强,是一款非常值得期待的旗舰级芯片!
      

      cpu.png

         该芯片采用ARM架构,采用先进的8nm制程工艺,集成了四核Cortex-A76和四核Cortex-A55(共8核),以及单独的NEON协处理器,支持8K视频编解码,提供了许多功能强大的嵌入式硬件引擎,为高端应用提供了极致的性能,同时提供了丰富的功能接口,可满足不同行业的产品定制需求。
      

      1、RK3588的八大应用方向以及基于RK3588的VR/AR解决方案

      087c6986-dd3d-4561-ab65-aadae6a6f881-image.png

         瑞芯微同时发布了新一代旗舰芯片RK3588 VR/AR显示模组及整机解决方案。该方案具有高画质、高刷新率、快速响应、低延迟等特点,可满足影音、游戏、房产、旅游等多领域的应用需求。
      
         瑞芯微RK3588 VR方案依托强大的芯片处理技术,生成交互式的三维动态视景和实际行为的系统仿真,实现沉浸的知觉体验,自如的行为体验,8K全景视频能够让用户以主角的视角全身心融入到电影情节中,让人感受到一种从未体验过的身临其境的感受。另外VR 影院模式观影可以让足不出户体验真正的IMAX 电影。
      
         此外,RK3588 4K90Hz VR低延迟物理双屏方案,采用BOE 2.1英寸Fast-LCD双屏,单目分辨率2160*2160,双目4320*2160分辨率,像素密度达到1454,双屏近眼显示,支持更小的色散和畸变。
      
         瑞芯微RK3588 AR整机解决方案,采用6DoF设计,支持空间定位,除了3个转动角度来检测头部的转动带来的视野角度变化外,再加之上下、前后、左右等3个位置相关的自由度,能够检测到由于身体移动带来的上下前后左右位移的变化,从而在观影、游戏中体验到跨越障碍、躲避子弹和怪兽、以及跳跃、登山、滑雪等超级真实的感受。
      
         瑞芯微RK3588 VR/AR方案能够获得如此绝佳的体验,主要在于RK3588强大的处理能力。它拥有8K60P视频解码能力,采用四核A76+四核A55 CPU,Mali-G610 GPU,6T算力NPU,,能快速根据陀螺仪数据计算姿态定位,实现速度同步,超低延迟,无眩晕感。屏幕方面,瑞芯微提供4K120帧、90帧等方案,用户可以根据自己的需求选择适合自己的方案。
      
         瑞芯微RK3588 VR/AR方案可应用于影视、娱乐、主题公园以及博物馆等艺术展馆,满足消费者对沉浸互动式体验的需求。
      

      2、芯片的主要部件构成

      e02c0c70-14cc-4937-9bd5-3d9eeb4e2c86-image.png

         RK3588集成了嵌入式ARM Mali G610 3D GPU,支持OpenGLES 1.1、2.0、3.2,OpenCL 2.2和Vulkan1.2。带有MMU的特殊2D硬件引擎将最大限度地提高显示性能,并提供非常平稳的操作。
      
         RK3588引入了新一代完全基于硬件的最大4800万像素ISP(图像信号处理器)。它实现了许多算法加速器,如HDR、3A、LSC、3DNR、2DNR、锐化、dehaze、鱼眼校正、伽马校正等。
      
         内置NPU支持INT4/INT8/INT16/FP16混合运算,运算能力高达6TOPS。此外,凭借其强大的兼容性,基于TensorFlow/MXNet/PyTorch/Caffe等一系列框架的网络模型可以轻松转换。
      

      3、芯片的详细参数及具体性能介绍

      3.1 超强算力,性能与功耗的完美平衡

      8d635f1a-23d0-43e5-b364-740db4e85982-image.png

         CPU方面,RK3588采用4核Cortex-A76和4核Cortex-A55的典型大小核架构,大核主频2.4GHz,小核主频1.8GHz,充分考虑了性能和功耗的平衡。1MB L2 Cache和3MB L3 Cache,提供更强的CPU运算能力。
      
         GPU方面,RK3588集成ARM Mali-G610,至少支持2路4K UI,能流畅运行复杂的图形处理及游戏。
      
         NPU方面,RK3588集成了瑞芯微第四代具有完全自主知识产权的人工智能运算引擎,在MAC运算单元的利用率及带宽的消耗上提升了30%。6TOPs的NPU算力,赋能各类AI场景,给复杂场景的本地离线AI计算、复杂视频流分析等应用提供了各种可能
      
      3.2 超强多媒体影像,带来极致体验
         RK3588多媒体影像核心IP的多核架构,使之拥有强大的处理能力,给各位开发者、用户带来极致的视觉体验。多核架构,不仅支持当下的应用需求,而且很容易升级支持未来更高性能的扩展。
      

      b7cd455c-6b76-4968-bc1c-cffb81bc3a49-image.png
      b4933b3d-d837-485b-8a5c-efad27d53a67-image.png

      posted in Hardware
      G
      george
    • RE: Cool Pi 4B can't boot. Need help

      @retroman The armbian image of coolpi will be released soon.

      posted in Construction
      G
      george
    • CoolPi 4B硬件扩展一:40PIN接口介绍

      40PIN扩展接口定义

      原理图

      ROCKCHIP RK3588S GPIO可以复用多种功能,下图原理部分只是定义其中一种,用户可以根据自己产品的需求做修改。RK所有GPIO都可以用作外部中断。可以配置默认上下拉状态及输出驱动强度。

      8763987f-27cc-493c-a395-876c50614de1-image.png

      GPIO功能列表

      序号 功能0 功能1 功能2 功能4 功能5 功能6 功能7 功能8 功能9
      1 3V3                
      3 GPIO0_D5   I2C1_SDA_M2       CAN2_TX_M1    
      5 GPIO0_D4 PWM3_IR_M0 I2C1_SCL_M2       CAN2_RX_M1    
      7 GPIO1_B7       SPDIF1_TX_M0 PWM13_M2      
      9 GND                
      11 GPIO4_A0     I2S1_MCLK_M0          
      13 GPIO4_A1     I2S1_SCLK_M0          
      15 GPIO4_A2     I2S1_LRCK_M0          
      17 3V3                
      19 GPIO1_B2 UART4_RX_M2 PDM1_SDI3_M1   SPI0_MOSI_M2        
      21 GPIO1_B1   PDM1_SDI2_M1   SPI0_MISO_M2        
      23 GPIO1_B3 UART4_TX_M2 PDM1_CLK1_M1   SPI0_CLK_M2        
      25 GND                
      27         I2C6_SDA_M3        
      29 GPIO4_A3         UART0_TX_M2      
      31 GPIO4_A4       I2C3_SCL_M2 UART0_RX_M2      
      33 GPIO4_A5     I2S1_SDI0_M0 I2C3_SDA_M2 UART3_TX_M2      
      35 GPIO4_A6     I2S1_SDI1_M0 I2C5_SCL_M2 UART3_RX_M2      
      37 GPIO4_A7     I2S1_SDI2_M0 I2C5_SDA_M2        
      39 GND                
      2 5V0                
      4 5V0                
      6 GND                
      8               UART2_TXD  
      10               UART2_RXD  
      12 GPIO1_A7   PDM1_SDI0_M1     PWM3_IR_M3      
      14 GND                
      16 GPIO1_A1 UART6_TX_M1              
      18 GPIO1_A0 UART6_RX_M1              
      20 GND                
      22 GPIO1_B0   PDM1_SDI1_M1            
      24 GPIO1_B4 UART7_RX_M2 PDM1_CLK0_M1   SPI0_CS0_M2        
      26 GPIO1_B5 UART7_TX_M2     SPI0_CS1_M2        
      28         I2C6_SCL_M3        
      30 GND                
      32 GPIO3_B1           MIPI_CAM4_CLK_M1 PWM2_M1  
      34 GND                
      36 GPIO4_B2     I2S1_SDO1_M0       PWM14_M1 CAN1_RX_M1
      38 GPIO4_B3     I2S1_SDO2_M0       PWM15_IR_M1 CAN1_TX_M1
      40 GPIO3_C3             PWM15_IR_M0  
      posted in Hardware
      G
      george
    • CoolPi 4B硬件扩展四:GPIO

      40PIN连接器除了debug串口和I2C6,其它都可以用作通用IO。所有的GPIO都支持中断、上下拉和驱动强度配置。

      GPIO列表

      PIN序号 GPIO编号 节点编号 默认状态 IO电平
      3 GPIO0_D5 29 UP TTL 3.3V
      5 GPIO0_D4 28 UP TTL 3.3V
      7 GPIO1_B7 47 UP TTL 3.3V
      11 GPIO4_A0 128 DOWN TTL 3.3V
      13 GPIO4_A1 129 DOWN TTL 3.3V
      15 GPIO4_A2 130 DOWN TTL 3.3V
      19 GPIO1_B2 42 DOWN TTL 3.3V
      21 GPIO1_B1 41 DOWN TTL 3.3V
      23 GPIO1_B3 43 DOWN TTL 3.3V
      29 GPIO4_A3 131 DOWN TTL 3.3V
      31 GPIO4_A4 132 DOWN TTL 3.3V
      33 GPIO4_A5 133 DOWN TTL 3.3V
      35 GPIO4_A6 134 DOWN TTL 3.3V
      37 GPIO4_A7 135 DOWN TTL 3.3V
      12 GPIO1_A7 39 UP TTL 3.3V
      16 GPIO1_A1 33 DOWN TTL 3.3V
      18 GPIO1_A0 30 DOWN TTL 3.3V
      22 GPIO1_B0 40 UP TTL 3.3V
      24 GPIO1_B4 44 UP TTL 3.3V
      26 GPIO1_B5 45 UP TTL 3.3V
      32 GPIO3_B1 105 UP TTL 3.3V
      36 GPIO4_B2 106 UP TTL 3.3V
      38 GPIO4_B3 107 UP TTL 3.3V
      40 GPIO3_C3 115 UP TTL 3.3V

      测试命令

      向内核申请GPIO,写入对应的GPIO值直接申请,比如申请控制GPIO4A0,则使用命令:

      echo 128 > /sys/class/gpio/export
      

      写入后,可以看到已经生成节点:

      /sys/class/gpio/gpio128/
      

      相应gpio节点下面的接口,比如GPIO4A0:

      root@ubuntu:~# ll /sys/class/gpio/gpio128/
      total 0
      drwxr-xr-x 3 root root    0 Nov 21 15:23 ./
      drwxr-xr-x 3 root root    0 Nov 21 15:23 ../
      -rw-r--r-- 1 root root 4096 Nov 21 15:24 active_low
      lrwxrwxrwx 1 root root    0 Nov 21 15:24 device -> ../../../gpiochip4/
      -rw-r--r-- 1 root root 4096 Nov 21 15:24 direction
      -rw-r--r-- 1 root root 4096 Nov 21 15:24 edge
      drwxr-xr-x 2 root root    0 Nov 21 15:24 power/
      lrwxrwxrwx 1 root root    0 Nov 21 15:24 subsystem -> ../../../../../../class/gpio/
      -rw-r--r-- 1 root root 4096 Nov 21 15:23 uevent
      -rw-r--r-- 1 root root 4096 Nov 21 15:24 value
      

      设置GPIO4A0为输出口

      root@ubuntu:/sys/class/gpio/gpio128# echo out >direction 
      root@ubuntu:/sys/class/gpio/gpio128# cat direction 
      out
      

      设置输出高电平

      root@ubuntu:/sys/class/gpio/gpio128# cat value 
      0
      root@ubuntu:/sys/class/gpio/gpio128# echo 1 >value 
      root@ubuntu:/sys/class/gpio/gpio128# cat value 
      1
      实际万用表测试PIN 11输出的电压为3.3V
      

      备注:

      • direction: 参数为“out”(输出)和“in”(输入),可读可写;

      • value: 参数为“0”(低电平)和“1”(高电平),可读可写;

      • edge:可以监听对应引脚的事件,需要把direction设置为输入
        参数为”none”(无中断触发), “rising”(上升沿触发), “falling”(下降沿触发), “both”(上升、下降都沿触发),用户层可以使用poll,设置events为POLLPRI | POLLERR等待事件触发,当对应的模式触发后,会返回事件的消息,此时需要读取value值,以表示改触发已经处理,否则会一直poll到原事件;

      • active_low:此值可以反转value中的值;

      posted in Hardware
      G
      george
    • CoolPi 4B硬件扩展二:Serial port

      串口位置

      下表罗列了40PIN连接器可以用做UART功能的引脚,目前除了debug串口以外还可以扩展5路独立串口。最大波特率1.5M。IO电平是TTL 3.3V。注意:串口号和实际系统的节点不是一一对应,实际操作需要按照表格对应的设备节点。

      序号 端口定义 描述 IO电平 设备节点
      29 UART0_TX_M2 UART0 发送 TTL 3.3V /dev/ttyS6
      31 UART0_RX_M2 UART0 接收 TTL 3.3V /dev/ttyS6
      33 UART3_TX_M2 UART3 发送 TTL 3.3V /dev/ttyS3
      35 UART3_RX_M2 UART3 接收 TTL 3.3V /dev/ttyS3
      19 UART4_RX_M2 UART4 接收 TTL 3.3V /dev/ttyS4
      23 UART4_TX_M2 UART4 发送 TTL 3.3V /dev/ttyS4
      16 UART6_TX_M1 UART6 发送 TTL 3.3V /dev/ttyS2
      18 UART6_RX_M1 UART6 接收 TTL 3.3V /dev/ttyS2
      24 UART7_RX_M2 UART7 接收 TTL 3.3V /dev/ttyS7
      26 UART7_TX_M2 UART7 发送 TTL 3.3V /dev/ttyS7

      DTS配置

      用户需要使用哪个串口在DTS打开对应节点即可,status = "okay"代表开启,status = "disabled"代表关闭。注意不使用UART功能确保对应节点的status是disabled状态,否则可能会导致其它功能异常。

      &uart0 {
      	pinctrl-names = "default";
      	pinctrl-0 = <&uart0m2_xfer>;
      	status = "okay";
      };
      
      &uart3 {
      	pinctrl-names = "default";
      	pinctrl-0 = <&uart3m2_xfer>;
      	status = "okay";
      };
      
      &uart4 {
      	pinctrl-names = "default";
      	pinctrl-0 = <&uart4m2_xfer>;
      	status = "okay";
      };
      
      &uart6 {
      	pinctrl-names = "default";
      	pinctrl-0 = <&uart6m1_xfer>;
      	status = "okay";
      };
      
      &uart7 {
      	pinctrl-names = "default";
      	pinctrl-0 = <&uart7m2_xfer>;
      	status = "okay";
      };
      

      shell测试命令

      功能测试采用回环测试(对应串口的TX RX信号短接)。

      stty -F /dev/ttyS6 raw speed 115200 //配置PIN29 PIN31对应的串口波特率为115200
      echo "hello world" > /dev/ttyS6 //发送字符串
      cat /dev/ttyS6 //接收字符串
      
      

      RS232电路

      RS232.png
      SIT3232EEAE.PDF

      隔离485电路

      485.png
      UTRS485G.PDF
      CA-IS3722LS.PDF
      B0505S-1W.PDF

      posted in Hardware
      G
      george
    • CoolPi 4B硬件扩展三:I2C

      如下表所示,coolpi 4b的40PIN连接器可以引出4组I2C总线出来,其中I2C1 I2C3 I2C5是独立I2C接口,机器内部没有和其它设备复用,I2C6板子内部有接RTC时钟芯片HYM8563,地址为51H,所以外设使用I2C6端口的时候注意地址不要冲突。

      I2C位置

      序号 端口定义 描述 IO状态
      3 I2C1_SDA_M2 I2C1数据 Internal 2.2K Pull up 3.3V
      5 I2C1_SCL_M2 I2C1时钟 Internal 2.2K Pull up 3.3V
      27 I2C6_SDA_M3 I2C6数据 Internal 2.2K Pull up 3.3V
      28 I2C6_SCL_M3 I2C6时钟 Internal 2.2K Pull up 3.3V
      31 I2C3_SCL_M2 I2C3时钟 Internal 2.2K Pull up 3.3V
      33 I2C3_SDA_M2 I2C3数据 Internal 2.2K Pull up 3.3V
      35 I2C5_SCL_M2 I2C5时钟 Internal 2.2K Pull up 3.3V
      37 I2C5_SDA_M2 I2C5数据 Internal 2.2K Pull up 3.3V

      DTS配置

      设备驱动的配置方式参考I2C6节点,注意不使用I2C功能确保节点的status为disabled,否则可能会导致其它功能异常。

      &i2c1 {
      	status = "okay";
      	pinctrl-names = "default";
      	pinctrl-0 = <&i2c1m2_xfer>;
      };
      
      &i2c3 {
      	status = "okay";
      	pinctrl-names = "default";
      	pinctrl-0 = <&i2c3m2_xfer>;
      };
      
      &i2c5 {
      	status = "okay";
      	pinctrl-names = "default";
      	pinctrl-0 = <&i2c5m2_xfer>;
      };
      
      &i2c6 {
      	status = "okay";
      	pinctrl-names = "default";
      	pinctrl-0 = <&i2c6m3_xfer>;
      
      	hym8563: hym8563@51 {
      		compatible = "haoyu,hym8563";
      		reg = <0x51>;
      		#clock-cells = <0>;
      		clock-frequency = <32768>;
      		clock-output-names = "hym8563";
      		pinctrl-names = "default";
      		pinctrl-0 = <&hym8563_int>;
      		interrupt-parent = <&gpio0>;
      		interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
      		status = "okay";
      	};
      
      };
      

      测试工具及方法

      git clone git://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git
      cd i2c-tools
      make -j8
      sudo make install
      root@ubuntu:/# i2cdetect -y 6
           0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
      00:                         -- -- -- -- -- -- -- -- 
      10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
      20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
      30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
      40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
      50: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
      60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
      70: -- -- -- -- -- -- -- --
      I2C6节点上可以扫描到地址为51H的设备,即HYM8563。工具也支持其他读写操作。可以自行研究。
      
      posted in Hardware
      G
      george
    • CoolPi-4B硬件扩展五:PWM

      如下表所示,40pin连接器包含7个可用于输出PWM信号的GPIO,其中PIN5 PIN12共用PWM3,PIN38 PIN40共用PWM15,这两个PWM信号同一时刻只能从一个GPIO输出,不能2个GPIO同时输出,所以40PIN连接器一共有5个独立的PWM口可以同时工作 :

      序号 端口定义 描述 IO电平 设备节点
      5 GPIO0_D4 PWM3_IR_M0 TTL 3.3V /sys/class/pwm/pwmchip3
      7 GPIO1_B7 PWM13_M2 TTL 3.3V /sys/class/pwm/pwmchip13
      12 GPIO1_A7 PWM3_IR_M3 TTL 3.3V /sys/class/pwm/pwmchip3
      32 GPIO3_B1 PWM2_M1 TTL 3.3V /sys/class/pwm/pwmchip2
      36 GPIO4_B2 PWM14_M1 TTL 3.3V /sys/class/pwm/pwmchip14
      38 GPIO4_B3 PWM15_IR_M1 TTL 3.3V /sys/class/pwm/pwmchip15
      40 GPIO3_C3 PWM15_IR_M0 TTL 3.3V /sys/class/pwm/pwmchip15

      DTS配置

      PWM2口配置如下,其它接口类似,首先配置PWM接口对应的pinctrl,比如PWM2为PWM2_M1,然后使能节点即可。

      &pwm2 {
      	pinctrl-0 = <&pwm2m1_pins>;
      	status = "okay";
      };
      

      操作PWM

      • 使用 echo 命令将要操作的 PWM 编号 export,注意操作需要root权限。
      root@coolpi-4b:/# echo 0 >/sys/class/pwm/pwmchip2/export  
      /*export 之后就会生成/sys/class/pwm/pwmchip2/pwm0目录*/
      root@coolpi-4b:/sys/class/pwm/pwmchip2/pwm0# ls
      capture  duty_cycle  enable  output_type  period  polarity  power  uevent
      
      • 使用 echo 命令设置 PWM 的周期:
      echo 1000000 > /sys/class/pwm/pwmchip2/pwm0/period
      /*设置PWM一个周期的时间,单位为ns,即一个周期为1KHZ。*/
      
      • 使用 echo 命令设置 PWM 的占空比:
      echo 500000 > /sys/class/pwm/pwmchip2/pwm0/duty_cycle
      /*设置PWM一个周期中“ON”的时间,单位为ns,即占空比=duty_cycle/period=50%。*/
      
      • 使用 echo 命令使能 PWM
      echo 1 > /sys/class/pwm/pwmchip2/pwm0/enable 
      
      posted in Hardware
      G
      george
    • How to drive a TTL (RGB) interface LCD

      Cool Pi does not have a TTL interface. If you want to drive a TTL interface screen, you need to use a bridge chip. At present, the MIPI to TTL interface chip supports ICN6211 by default. The following details how to use ICN6211 to drive a TTL interface LCD module.

      • Specification
        ICN6211_mipi2rgb.brd
        MIPI_RGB_162.DSN
        ICN6211_MIPI_RGB_specification_V04.pdf

      • Block diagram
        75c6d71e-2ba0-4bc2-a121-22d6f3d09c90-image.png

      • DTS configuration
        Enable the following nodes,mipi_dcphy0 dsi0 dsi0_in_vp3 backlight pwm13 .

      &mipi_dcphy0 {
      	status = "okay";
      };
      
      &dsi0 {
      	status = "okay";
      	dsi0_panel: panel@0 {
      		status = "okay";
      		compatible = "simple-panel-dsi";
      		reg = <0>;
      		backlight = <&backlight>;
      		reset-delay-ms = <60>;
      		enable-delay-ms = <60>;
      		prepare-delay-ms = <60>;
      		unprepare-delay-ms = <60>;
      		disable-delay-ms = <60>;
      		dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
      			MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_EOT_PACKET)>;
      		dsi,format = <MIPI_DSI_FMT_RGB888>;
      		dsi,lanes  = <2>;
      		panel-init-sequence = [
      	    23 00 02 7A C1
      	    23 00 02 20 20
      	    23 00 02 21 E0
      	    23 00 02 22 13
                  23 00 02 23 08
                  23 00 02 24 04
                  23 00 02 25 08
                  23 00 02 26 00
                  23 00 02 27 08
                  23 00 02 28 04
                  23 00 02 29 08
                  23 00 02 34 80
                  23 00 02 86 29
                  23 00 02 B5 A0
                  23 00 02 5C FF
                  23 00 02 2A 01
                  23 00 02 56 92
                  23 00 02 6B 71
                  23 00 02 69 15
                  23 00 02 10 40
                  23 00 02 11 88
                  23 00 02 B6 20
                  23 00 02 51 20
                  23 00 02 09 10
      	    05 78 01 11
      	    05 1E 01 29
      		];
      
      		panel-exit-sequence = [
      			05 00 01 28
      			05 00 01 10
      		];
      
      		disp_timings0: display-timings {
      			native-mode = <&dsi0_timing0>;
      			dsi0_timing0: timing0 {
      				clock-frequency = <25000000>;
      				hactive = <800>;
      				vactive = <480>;
      				hfront-porch = <8>;
      				hsync-len = <4>;
      				hback-porch = <8>;
      				vfront-porch = <8>;
      				vsync-len = <4>;
      				vback-porch = <8>;
      				hsync-active = <0>;
      				vsync-active = <0>;
      				de-active = <0>;
      				pixelclk-active = <0>;
      			};
      		};
      
      		ports {
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			port@0 {
      				reg = <0>;
      				panel_in_dsi: endpoint {
      					remote-endpoint = <&dsi_out_panel>;
      				};
      			};
      		};
      	};
      
      	ports {
      		#address-cells = <1>;
      		#size-cells = <0>;
      
      		port@1 {
      			reg = <1>;
      			dsi_out_panel: endpoint {
      				remote-endpoint = <&panel_in_dsi>;
      			};
      		};
      	};
      
      };
      
      &dsi0_in_vp3 {
      	status = "okay";
      };
      
      &backlight {
      	pwms = <&pwm13 0 25000 0>;
      	status = "okay";
      };
      
      &pwm13 {
      	status = "okay";
      	pinctrl-names = "active";
      	pinctrl-0 = <&pwm13m2_pins>;
      };
      
      • Configure lcdc parameters according to LCD specifications.
        LCD specification 5inch DSI LCD (B).pdf
        adbaa55e-ce50-4a5f-9d53-f499057c54ff-image.png
      		disp_timings0: display-timings {
      			native-mode = <&dsi0_timing0>;
      			dsi0_timing0: timing0 {
      				clock-frequency = <25000000>;
      				hactive = <800>;
      				vactive = <480>;
      				hfront-porch = <8>;
      				hsync-len = <4>;
      				hback-porch = <8>;
      				vfront-porch = <8>;
      				vsync-len = <4>;
      				vback-porch = <8>;
      				hsync-active = <0>;
      				vsync-active = <0>;
      				de-active = <0>;
      				pixelclk-active = <0>;
      			};
      		};
      
      • Generate the initialization sequence of ICN6211 according to the LCD specification.
        ICN6211 initialization tool ICN6211 Config.rar

      c11bfbc5-e02c-4823-be27-ef4fb1e390e7-image.png
      Copy the initialization sequence to DTS according to the command format of rockchip.
      Command format description:
      23 00 02 7A C1
      [Command word] [Delay] [Packet length] [Register] [Value]
      Note that the last 11 29 command is reserved. This is the DSI standard command to open the display.

      panel-init-sequence = [
      	    23 00 02 7A C1
      	    23 00 02 20 20
      	    23 00 02 21 E0
      	    23 00 02 22 13
                  23 00 02 23 08
                  23 00 02 24 04
                  23 00 02 25 08
                  23 00 02 26 00
                  23 00 02 27 08
                  23 00 02 28 04
                  23 00 02 29 08
                  23 00 02 34 80
                  23 00 02 86 29
                  23 00 02 B5 A0
                  23 00 02 5C FF
                  23 00 02 2A 01
                  23 00 02 56 92
                  23 00 02 6B 71
                  23 00 02 69 15
                  23 00 02 10 40
                  23 00 02 11 88
                  23 00 02 B6 20
                  23 00 02 51 20
                  23 00 02 09 10
      	    05 78 01 11
      	    05 1E 01 29
      		];
      
      • The TTL signal can be output normally by recompiling and replacing the kernel.
        d57ec46e-ecd1-42a1-8275-15155403e0e8-image.png
      posted in Hardware
      G
      george
    • CP4散热器模组、底壳保护板套装

      IMG_20230322_235456.jpg IMG_20230322_235321.jpg

      posted in Hardware
      G
      george
    • 1 / 1