@jugg COOLPI CM5就是核心板,连接类型是金手指。
Posts made by george
-
RE: merge back to armbian source
@igorp
Recently, I have been working hard to push CM5 NOTEBOOK to the ARMBIAN mainline. Further information will be released as soon as possible. Thank you for your support.
https://www.cool-pi.com/topic/384/cool-pi-arm-notebook-preview
-
RE: CoolPI 4B-PRO Product Introduction
@Mz3D-0 Please contact the following merchants to purchase
https://www.aliexpress.com/store/1102584120?spm=a2g0o.detail.1000007.1.741341e6SybgoR -
RE: CoolPI 4B-PRO Product Introduction
@Mz3D-0 This product is currently not in mass production, and a separate prototype can be provided. Alternatively, it is recommended to pay attention to the CM5 machine, which offers two types of products: EVB and NOTEBOOK.
-
RE: CoolPi 4B硬件扩展一:40PIN接口介绍
@AugustRobot_Zou 按照5V 3A的标准来配置。一般散热按照12W评估。正常工作也就5W左右。
-
RE: RK3588 coolpi 4b找不到测试8k解码的方法
@test 3588 8K视频解码是有部分限制,目前ubuntu22.04使用GST可以比较流畅播放。其它系统版本暂时不行。这里不是解码的问题,是显示的数据格式转换问题。如果开发8K视频类应用建议直接使用ubuntu22.04或者android。
-
RE: google coral tpu 计算棒测试
@花月 能否帮忙提供一份coolpi下层USB3.0接口不能识别的dmesg信息,我们针对性的分析一下,谢谢。
-
RE: Cool Pi ARM Notebook Preview
@大法师 补充一张内部图片,支持全国产化定制。
统信专业版,QQ 微信 WPS 邮件 CAD等软件流畅运行,办公追剧毫无压力。
-
RE: android 12系统怎么加入特殊分辨率?
@yushaotai 还有就是EDIE读取回来的时序,要和实际写到代码里边的数组一致,否则也不能正常显示的,你需要什么分辨率?
-
AD7606 QT demo
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
-
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.
-
COOLPI CM5 AD7606 8-channel synchronous sampling
-
Using SPI serial communication interface, the circuit is as follows
-
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.
-