• Register
    • Login
    • Search
    • Recent
    • Wiki
    • Github
    • 百度网盘
    • Onedrive
    • Official
    • Shop
    1. Home
    2. george
    3. Posts
    G
    • Profile
    • Following 0
    • Followers 4
    • Topics 67
    • Posts 851
    • Best 73
    • Controversial 4
    • Groups 2

    Posts made by george

    • RE: CM5如何安装网卡驱动?

      @Jake 这个需要把内核的头文件编译生成DEB包,然后系统上安装。

      posted in Pi CM5
      G
      george
    • RE: CM5 EVB可以连接mipi csi相机吗?

      @dff 可以通过MIPI-RX接口链接MIPI相机。

      posted in Pi CM5
      G
      george
    • RE: 4b的两个usb3.0是独立的么

      @shengxia 昨天有提交了一个USB3.0的修改,你可以同步最新代码测试。我手上几个盘都可以使用。

      posted in Pi 4B
      G
      george
    • RE: android 12系统怎么加入特殊分辨率?

      @yushaotai 还有就是EDIE读取回来的时序,要和实际写到代码里边的数组一致,否则也不能正常显示的,你需要什么分辨率?

      posted in Pi 4B
      G
      george
    • RE: android 12系统怎么加入特殊分辨率?

      @yushaotai 你也可以现在linux上面修改测试,正常底层是一样的,没有区别的。

      posted in Pi 4B
      G
      george
    • RE: android 12系统怎么加入特殊分辨率?

      @yushaotai 这个之前有发过一个linux的,按照那个文档修改就好了。
      https://www.cool-pi.com/topic/296/how-to-drive-non-standard-resolution-hdmi-displays?_=1689075950207

      posted in Pi 4B
      G
      george
    • AD7606 QT demo

      901f6b28-80de-48f7-ace5-9c75cbc8fb4a-image.png
      ad7606.pro

      QT       += core gui
      
      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets charts
      
      CONFIG += c++11
      
      # You can make your code fail to compile if it uses deprecated APIs.
      # In order to do so, uncomment the following line.
      #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
      
      SOURCES += \
          main.cpp \
          mainwindow.cpp
      
      HEADERS += \
          mainwindow.h
      
      FORMS += \
          mainwindow.ui
      
      TRANSLATIONS += \
          ad7606_zh_CN.ts
      CONFIG += lrelease
      CONFIG += embed_translations
      
      # Default rules for deployment.
      qnx: target.path = /tmp/$${TARGET}/bin
      else: unix:!android: target.path = /opt/$${TARGET}/bin
      !isEmpty(target.path): INSTALLS += target
      

      mainwindow.h

      #ifndef MAINWINDOW_H
      #define MAINWINDOW_H
      
      #include <QMainWindow>
      #include <QSplineSeries>
      using namespace QtCharts;
      QT_BEGIN_NAMESPACE
      namespace Ui { class MainWindow; }
      QT_END_NAMESPACE
      
      class MainWindow : public QMainWindow
      {
          Q_OBJECT
      
      public:
          MainWindow(QWidget *parent = nullptr);
          ~MainWindow();
          void setChart();
          int getValue(char *channel);
      	int getScale();
      	void timerEvent(QTimerEvent *e);
      
      private slots:
          void on_pushButton_2_clicked();
      
          void on_pushButton_clicked();
      
      private:
          Ui::MainWindow *ui;
          QSplineSeries *serials0;
          QSplineSeries *serials1;
          QSplineSeries *serials2;
          QSplineSeries *serials3;
          QSplineSeries *serials4;
          QSplineSeries *serials5;
          QSplineSeries *serials6;
          QSplineSeries *serials7;
          QChart        *chart;
      	int scale;
      	int timerid1;
      	float value[8];
      };
      #endif // MAINWINDOW_H
      

      mainwindow.cpp

      #include "mainwindow.h"
      #include "ui_mainwindow.h"
      #include <QtCharts>
      #include <QtCharts/QChartView>
      #include <QSplineSeries>
      #include <QProcess>
      #include <QString>
      #include <QTimer>
      #include <fcntl.h>
      #include <unistd.h>
      
      MainWindow::MainWindow(QWidget *parent)
          : QMainWindow(parent)
          , ui(new Ui::MainWindow)
      {
          ui->setupUi(this);
          setChart();
      }
      
      MainWindow::~MainWindow()
      {
          delete ui;
      }
      void MainWindow::setChart()
      {
        scale = getScale();
        serials0 = new QtCharts::QSplineSeries();
        serials1 = new QtCharts::QSplineSeries();
        serials2 = new QtCharts::QSplineSeries();
        serials3 = new QtCharts::QSplineSeries();
        serials4 = new QtCharts::QSplineSeries();
        serials5 = new QtCharts::QSplineSeries();
        serials6 = new QtCharts::QSplineSeries();
        serials7 = new QtCharts::QSplineSeries();
        chart = new QChart();
        chart->addSeries(serials7);
        chart->createDefaultAxes();
        chart->axisX()->setRange(0, 99);
        chart->axisY()->setRange(-10, 10);
        chart->legend()->hide();
        ui->widget->setChart(chart);
      }
      
      int MainWindow::getValue(char *channel)
      {
          int dev_fd,ret;
          char DEV_PATH[64];
          char value[5];
      	QString str_data;
          sprintf(DEV_PATH,"/sys/bus/spi/devices/spi0.0/iio:device0/in_voltage%s_raw",channel);
          dev_fd = open(DEV_PATH,O_RDONLY);
          if(dev_fd == -1)
          {
              perror("open channel failed!\n");
              return -1;
          }
          if(read(dev_fd,value,5)<0)
          {
              perror("read channel failed!\n");
              return -1;
          }
          ::close(dev_fd);
      	str_data = QString::fromLocal8Bit(value,5);
          ret = str_data.toInt();
          return ret;
      }
      
      int MainWindow::getScale()
      {
          int dev_fd;
      	int ret;
          char DEV_PATH[64];
          char value[5];
      	QString str_data;
          sprintf(DEV_PATH,"/sys/bus/spi/devices/spi0.0/iio:device0/in_voltage_scale");
          dev_fd = open(DEV_PATH,O_RDONLY);
          if(dev_fd == -1)
          {
              perror("open scale failed!\n");
              return -1;
          }
          if(read(dev_fd,value,5)<0)
          {
              perror("read scale failed!\n");
              return -1;
          }
          ::close(dev_fd);
      	str_data = QString::fromLocal8Bit(value,5);
          ret = str_data.toFloat()*1000;
          return ret;
      }
      
      void MainWindow::timerEvent(QTimerEvent *e)
      {
      	int i;
          QVector<QPointF> oldData = serials7->pointsVector();
          QVector<QPointF> data;
      	if (oldData.size() < 100) {
              data = serials7->pointsVector();
      	} 
      	else {
      		for (i = 1; i < oldData.size(); ++i) 
      			{
      				data.append(QPointF(i - 1 , oldData.at(i).y()));
      			}
      		}
      	qint64 size = data.size();
      	for(i = 0; i < 1; ++i){
      		value[7] = getValue("7");
      		data.append(QPointF(i + size, value[7]*scale/1000000));
      		}
      	serials7->replace(data);
      }
      
      void MainWindow::on_pushButton_2_clicked()
      {
      	serials7->clear();
          timerid1 = startTimer(1);
      }
      
      
      void MainWindow::on_pushButton_clicked()
      {
      	killTimer(timerid1);
      
      }
      
      

      source code ad7606.zip

      posted in Pi CM5
      G
      george
    • RE: CoolPi 4B硬件扩展四:GPIO

      @zensation
      If you need to use PWM function, it is recommended to use PIN12 (PWM3-M3). This port defaults to the pull-up port, and you can increase the resistance to ground by 2K. The default level can be reduced to below 0.6V. If you need GPIO function, except for PIN3 PIN5 PIN32 PIN40 PIN8 PIN10, all other IOs can use pull-down resistors to change the default level.
      22b20546-a88f-4284-b2d4-b4f5bdea548f-image.png

      posted in Hardware
      G
      george
    • COOLPI CM5 AD7606 8-channel synchronous sampling
      • Using SPI serial communication interface, the circuit is as follows
        8628f295-63f9-4499-90a8-540cc9ec2f03-image.png

      • Standard IIO driver configuration

      diff --git a/arch/arm64/boot/dts/rockchip/rk3588-cpcm5-evb-v11.dts b/arch/arm64/boot/dts/rockchip/rk3588-cpcm5-evb-v11.dts
      index 5b04c9d3f354..550b320403d7 100755
      --- a/arch/arm64/boot/dts/rockchip/rk3588-cpcm5-evb-v11.dts
      +++ b/arch/arm64/boot/dts/rockchip/rk3588-cpcm5-evb-v11.dts
      @@ -486,6 +486,34 @@ &sdmmc {
       	status = "okay";
       };
       
      +&spi0 {
      +	status = "okay";
      +	assigned-clocks = <&cru CLK_SPI0>;
      +	pinctrl-names = "default";
      +	pinctrl-0 = <&spi0m2_cs0 &spi0m2_pins>;	
      +	
      +	ad7606@0 {
      +            compatible = "adi,ad7606-8";
      +            reg = <0>;
      +            spi-max-frequency = <20000000>;
      +            spi-cpol;
      +            spi-cpha;
      +            avcc-supply = <&vcc5v0_sys>;
      +            interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
      +            interrupt-parent = <&gpio1>;
      +            adi,conversion-start-gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
      +			adi,range-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>;
      +            reset-gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
      +            adi,oversampling-ratio-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>,
      +                                           <&gpio3 RK_PB6 GPIO_ACTIVE_HIGH>,
      +                                           <&gpio1 RK_PD6 GPIO_ACTIVE_HIGH>;
      +			pinctrl-names = "default";
      +			pinctrl-0 = <&ad7606_busy &ad7606_conver &ad7606_range &ad7606_reset &ad7606_os0 &ad7606_os1 &ad7606_os2>;						
      +            //adi,sw-mode;
      +			status = "okay";
      +        };
      +};
      +
       &dsi0 {
       	status = "disabled";
       	//rockchip,lane-rate = <1000>;
      @@ -1330,6 +1358,30 @@ &rng {
       };
       
       &pinctrl {
      +	ad7606 {
      +		ad7606_busy: ad7606-busy {
      +			rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
      +		};
      +		ad7606_conver: ad7606-conver {
      +			rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;
      +		};
      +		ad7606_range: ad7606-range {
      +			rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
      +		};
      +		ad7606_reset: ad7606-reset {
      +			rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
      +		};
      +		ad7606_os0: ad7606-os0 {
      +			rockchip,pins = <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
      +		};
      +		ad7606_os1: ad7606-os1 {
      +			rockchip,pins = <3 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>;
      +		};
      +		ad7606_os2: ad7606-os2 {
      +			rockchip,pins = <1 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
      +		};
      +	};
      +
       	hym8563 {
       		hym8563_int: hym8563-int {
       			rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
      diff --git a/arch/arm64/configs/rk3588_cpcm5_evb_defconfig b/arch/arm64/configs/rk3588_cpcm5_evb_defconfig
      index 92e6983d3a40..9365319f866d 100644
      --- a/arch/arm64/configs/rk3588_cpcm5_evb_defconfig
      +++ b/arch/arm64/configs/rk3588_cpcm5_evb_defconfig
      @@ -891,6 +891,8 @@ CONFIG_ARM_ROCKCHIP_BUS_DEVFREQ=y
       CONFIG_ARM_ROCKCHIP_DMC_DEVFREQ=y
       CONFIG_DEVFREQ_EVENT_ROCKCHIP_NOCP=y
       CONFIG_IIO=y
      +CONFIG_AD7606_IFACE_PARALLEL=y
      +CONFIG_AD7606_IFACE_SPI=y
       CONFIG_ROCKCHIP_SARADC=y
       CONFIG_SENSORS_ISL29018=y
       CONFIG_SENSORS_TSL2563=y
      
      • test method

      Single sampling

      cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw
      

      Continuous Samples

       /*Modify node permissions*/
      sudo chmod 777 /sys/bus/iio/devices/iio:device0/ -R   
       /*Enable sampling channel*/
      echo 1 > /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage0_en  //
      echo 1 > /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage1_en
      echo 1 > /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage2_en
      echo 1 > /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage3_en
      echo 1 > /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage4_en
      echo 1 > /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage5_en
      echo 1 > /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage6_en
      echo 1 > /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage7_en
      /*Configure buffer size*/
      echo 128 > /sys/bus/iio/devices/iio:device0/buffer/length
      /*Start sampling*/
      echo 1 > /sys/bus/iio/devices/iio:device0/buffer/enable
      /*View Results*/
      cat /dev/iio\:device0 |xxd -
      
      • The schematic and PCB files can be downloaded from the wiki,Some empty PCBs can also be given away for free.
        实物仿真图.png
      posted in Hardware
      G
      george
    • RE: 编译内核所用的交叉编译器是哪个版本的?

      @零度灬救赎 交叉编译环境内核的代码里边已经集成,直接运行编译脚本即可:
      build-kernel.sh

      posted in Ubuntu
      G
      george
    • RE: Support for Ubuntu 22.04 Server on CoolPi

      @dbtech You can download it from the following website:
      https://coolpi-my.sharepoint.com/personal/coolpi_coolpi_onmicrosoft_com/_layouts/15/onedrive.aspx?ga=1&id=%2Fpersonal%2Fcoolpi_coolpi_onmicrosoft_com%2FDocuments%2Fcoolpi%2Fcoolpi%2FCoolPi 4B%2Fubuntu

      posted in Ubuntu
      G
      george
    • RE: 连接多个屏幕问题

      @jugg weson和这些没有关系的,他只是一个显示界面而已。系统的gst、ffmpeg都可以支持的。

      posted in Pi 4B
      G
      george
    • RE: 连接多个屏幕问题

      @jugg buildroot是weson实现的。可以尝试。

      posted in Pi 4B
      G
      george
    • RE: 连接多个屏幕问题

      @jugg 这个是ubuntu自身的问题,不是底层系统问题,如果应用一定要2屏以上复制,可以考虑使用weson桌面实现。

      posted in Pi 4B
      G
      george
    • RE: CoolPi 4B硬件扩展四:GPIO

      @zensation
      Software modification pull-down:

      • specifies that the default pull-down of GPIO needs to be modified in the kernel DTS file, path:/arch/arm64/boot/dts/rockchip. After the modification is completed, compile and generate a DTB file, and then replace it.

      Hardware modification pull-down:

      • You can change the default pull-down situation of IO by connecting a pull-down resistor to GPIO. The default pull-up change is to connect a 2K resistor to the GND network, and the default pull-down change is to connect a 4.7K resistor to a 3.3V power supply.
      posted in Hardware
      G
      george
    • RE: how about batocera with cool pi 4b

      @cyberwisk
      The firmware can be obtained from the following website
      https://coolpi-my.sharepoint.com/personal/coolpi_coolpi_onmicrosoft_com/_layouts/15/onedrive.aspx?ga=1&id=%2Fpersonal%2Fcoolpi_coolpi_onmicrosoft_com%2FDocuments%2Fcoolpi%2Fcoolpi%2FCoolPi 4B%2Fbatocera]

      posted in Maker
      G
      george
    • RE: apt update的时候报错,添加gpu驱动时添加不进去,是怎么回事啊?(Ubuntu22.04)

      @diudiutong 这个看log是网络连接问题,默认的镜像已经集成GPU驱动。

      posted in Pi 4B
      G
      george
    • RE: 目前的20230613-ubuntu20.04版本预装了rknn-toolkit2、usb-hub支持吗

      @bbsvs2000 有支持

      posted in Ubuntu
      G
      george
    • RE: CM5底板PCB打不开

      @SSHLY 这个是PADS格式的。不是AD.

      posted in Pi CM5
      G
      george
    • RE: DSI显示器和HDMI显示器下mpv播放视频的问题

      @jugg 这个还是从应用软件想办法解决,底层暂时没有可以修改的。可以参考一下MPV播放器的源码实现。

      posted in Ubuntu
      G
      george
    • RE: DSI显示器和HDMI显示器下mpv播放视频的问题

      @jugg 默认MPV播放器是否有问题

      posted in Ubuntu
      G
      george
    • RE: CP4/CM5 debian11 gnome image release

      @jugg 这个只需要替换内核就可以了。跟之前其它FS的方法是一样的。

      posted in Pi CM5
      G
      george
    • RE: CP4/CM5 debian11 gnome image release

      @jugg 你是什么机器CP4B/CM5,需要接什么屏幕?

      posted in Pi CM5
      G
      george
    • RE: Coolpi uses UMS to update the system

      @jugg 更新系统不会破坏loader文件。不需要重新升级loader。

      posted in Pi 4B
      G
      george
    • RE: 连接多个屏幕问题

      @jugg 自己修改一下fstab。

      posted in Pi 4B
      G
      george
    • RE: CoolPi 4B硬件扩展四:GPIO

      @zensation
      The current operation method does not support configuring the up and down status. If you need to modify the up and down status of GPIO, you can use DTS's PINCTRL to achieve it.

      	lcd {
      		lcdpwr_en: lcdpwr-en {
      			rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>;
      		};
      		bl_en: bl-en {
      			rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
      		};
      	};
      
      posted in Hardware
      G
      george
    • RE: CoolPi 4B硬件扩展四:GPIO

      @zensation
      First, set the password for the root user, and then log in as root.

      coolpi@Ubuntu:~$ sudo passwd root
      [sudo] password for coolpi: 
      New password: 
      BAD PASSWORD: The password is shorter than 8 characters
      Retype new password: 
      passwd: password updated successfully
      coolpi@Ubuntu:~$ su
      Password: 
      root@Ubuntu:/home/coolpi# echo 128 > /sys/class/gpio/export
      root@Ubuntu:/home/coolpi# cd /sys/class/gpio/
      root@Ubuntu:/sys/class/gpio# ls
      export   gpiochip0    gpiochip32   gpiochip64  unexport
      gpio128  gpiochip128  gpiochip509  gpiochip96
      root@Ubuntu:/sys/class/gpio# 
      
      posted in Hardware
      G
      george
    • RE: CoolPi 4B硬件扩展四:GPIO

      @zensation
      Can you be more specific about which commands are not working.

      posted in Hardware
      G
      george
    • RE: merge back to armbian source

      @reddfoxx
      Thank you for your suggestion. As I haven't paid too much attention to ARMBIAN, I have only tried to develop the corresponding firmware. Currently, my main focus is on Ubuntu Debian Android and the optimization and expansion of the upper and lower layers of the system. You can try adding the Armbian mainline in the future.

      posted in Armbian
      G
      george
    • RE: 连接多个屏幕问题

      @jugg 目前仅支持三屏扩展的方式,mirror暂时不支持。框架本身就不支持。

      posted in Pi 4B
      G
      george
    • 1
    • 2
    • 15
    • 16
    • 17
    • 18
    • 19
    • 28
    • 29
    • 17 / 29