完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
问:有没有 EK140p上蜂鸣器的测试例程
答:默认管脚配置为PWM,来测试蜂鸣器,以下是手册:测试环境
1)请按照《MY-IMX6-EK140P 启动手册》中的“Linux快速启动” -> “连接设备”进行连接。 2)请按照《MY-IMX6-EK140P 启动手册》中的“Linux快速启动” -> “启动设备”进行启动。 测试项目 网口测试 MY-IMX6-EK140P 支持两个百兆网口。 接口属性 Eth0 接口位置:P10 Eth1 接口位置:P8 测试方法 1)配置计算机IP 设置计算机有线网卡IP为 192.168.137.99 2)Eth0 连接测试 连接网线:将评估板“Eth0”对应的接口与计算机有线网卡的接口用网线相连接。 注意:检查跳线帽,保证是接上状态
连接网线:将评估板“Eth1”对应的接口与计算机有线网卡的接口用网线相连接。 注意:检查跳线帽,保证是接上状态
接口属性 接口位置:P20 测试方法 1)开始测试 将USB设备插入底板USB接口,系统会输出类似如下信息: u*** 1-1.4: new high-speed USB device number 4 using ci_hdrc u***-storage 1-1.4:1.0: USB Mass Storage device detected scsi host0: u***-storage 1-1.4:1.0 scsi 0:0:0:0: Direct-Access Mass Storage Device 1.00 PQ: 0 ANSI: 0 CCS sd 0:0:0:0: [sda] 7716864 512-byte logical blocks: (3.95 GB/3.67 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] No Caching mode page found sd 0:0:0:0: [sda] Assuming drive cache: write through sda: sda1 sda2 sd 0:0:0:0: [sda] Attached SCSI removable disk 2)结束测试 将USB设备从底板拔出,系统会输出类似如下信息: u*** 1-1.4: USB disconnect, device number 4 TF卡测试 接口属性 接口位置:P13 接口类型:MicroSD 测试方法 1)开始测试 开发板断电,往TF卡安装好TF卡。 输入如下命令: # dmesg | grep mmc0 系统输出类似以下信息,即表示 TF 接口正常: mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA mmc0: host does not support reading read-only switch, assuming write-enable mmc0: new high speed SDHC card at address 1234 mmcblk0: mmc0:1234 SA04G 3.67 GiB 2)查看系统的TF卡设备 输入如下命令: # ls /dev/mmcblk0* 系统会输出类似以下信息: /dev/mmcblk0 /dev/mmcblk0p1 /dev/mmcblk0p2 标准 GPIO 测试 接口属性 接口位置:P21 1)GPIO输出测试 标准GPIO的测试以P21:35和P21:36为例,其它GPIO测试可参照此测试方法。
2)控制输出电平 输入如下命令: # echo 0 > /sys/class/gpio/gpio${OUT_IO_OUT_NUM}/value # echo 1 > /sys/class/gpio/gpio${OUT_IO_OUT_NUM}/value 可以实现控制输出电平。
led-heartbeat
# echo 1000 > /sys/class/leds/led-timer/delay_off 2)更改亮的时间 # echo 2000 > /sys/class/leds/led-timer/delay_on led-default
Default-on可以通过brightness控制 ,Default-on的实现是初始触发状态为on,即初始触发后为高电平。 输入如下命令: # echo 1 > /sys/class/leds/default/brightness 2)使 D11 灭 往brightness写0即可检测到低电平。 输入如下命令: # echo 0 > /sys/class/leds/default/brightness PWM 测试 PWM-LED 输入如下命令: # PWM_DEV=pwmchip4# echo 0 > /sys/class/pwm/$PWM_DEV/export # echo 1000000000 > /sys/class/pwm/$PWM_DEV/pwm0/period# echo 100000000 > /sys/class/pwm/$PWM_DEV/pwm0/duty_cycle# echo 1 > /sys/class/pwm/$PWM_DEV/pwm0/enable
输入如下命令: # PWM_DEV=pwmchip1# echo 0 > /sys/class/pwm/$PWM_DEV/export # echo 1000000000 > /sys/class/pwm/$PWM_DEV/pwm0/period# echo 100000000 > /sys/class/pwm/$PWM_DEV/pwm0/duty_cycle# echo 1 > /sys/class/pwm/$PWM_DEV/pwm0/enable
测试说明:采用串口自发自收测试。 UART2 接口属性
Starting send data...finishStarting receive data:ASCII: 0x77 Character: w ASCII: 0x77 Character: w ASCII: 0x77 Character: w ASCII: 0x2e Character: . ASCII: 0x6d Character: m ASCII: 0x79 Character: y ASCII: 0x7a Character: z ASCII: 0x72 Character: r ASCII: 0x2e Character: . ASCII: 0x63 Character: c ASCII: 0x6f Character: o ASCII: 0x6d Character: m ASCII: 0x2e Character: . ASCII: 0x63 Character: c ASCII: 0x6e Character: n ASCII: 0x0 Character: UART3 接口属性
Starting send data...finishStarting receive data:ASCII: 0x77 Character: w ASCII: 0x77 Character: w ASCII: 0x77 Character: w ASCII: 0x2e Character: . ASCII: 0x6d Character: m ASCII: 0x79 Character: y ASCII: 0x7a Character: z ASCII: 0x72 Character: r ASCII: 0x2e Character: . ASCII: 0x63 Character: c ASCII: 0x6f Character: o ASCII: 0x6d Character: m ASCII: 0x2e Character: . ASCII: 0x63 Character: c ASCII: 0x6e Character: n ASCII: 0x0 Character: CAN 测试 测试说明;MY-IMX6-EK140P有两组CAN接口,采用CAN1发送,CAN0接收的方式。 接口属性 位置:CAN1 P7:1,2 位置:CAN2 P9:1,2 1)测试准备 将CAN1的CAN_L(P7:1)与CAN2的CAN_L (P9:1)连接;将CAN1的CAN_H (P7:2)与CAN2的CAN_H (P9:2)连接。 2)输入测试指令
flexcan 2090000.can can0: writing ctrl=0x0e312005IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
flexcan 2094000.can can1: writing ctrl=0x0e312005IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready
[1] 589
can0 1F334455 [8] 11 22 33 44 55 66 77 88 SPI测试 测试说明;评估板一共有2路SPI。 ECSPI1 测试 接口属性
spi mode: 0bits per word: 8max speed: 500000 Hz (500 KHz)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ECSPI2 测试 接口属性
spi mode: 0bits per word: 8max speed: 500000 Hz (500 KHz)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Watchdog 测试 测试说明:WatchDog测试包括2项:一项是复位测试,一项是喂狗测试。 超时复位测试 1)测试说明 复位测试将启动WatchDog,但是并不喂狗,超时后系统将会复位。 2)输入测试指令 # /unit_tests/wdt_driver_test.out 10 15 1 运行测试命令后等待10秒后,WatchDog超时,系统被复位。 将会在终端看到系统重新启动输出的信息类似如下: Starting wdt_driver (timeout: 10, sleep: 15, test: write)Trying to set timeout value=10 secondsThe actual timeout was set to 10 secondsNow reading back -- The timeout is 10 secondsrandom: nonblocking pool is initializedU-Boot 2016.03-svn270 (Oct 08 2018 - 16:52:53 +0800)CPU: Freescale i.MX6ULL rev1.0 528 MHz (running at 396 MHz)CPU: Industrial temperature grade (-40C to 105C) at 51CReset cause: WDOGBoard: MYIMX6EK140P-6Y 喂狗测试 1)测试说明 喂狗测试将启动WatchDog,并且每2秒钟进行1次喂狗,系统将会在超时时间(这里是4秒)内复位。 2)输入测试指令 # /unit_tests/wdt_driver_test.out 4 2 1 & 测试结果类似如下输出,则表示测试通过: [1] 585Starting wdt_driver (timeout: 4, sleep: 2, test: write)Trying to set timeout value=4 secondsThe actual timeout was set to 4 secondsNow reading back -- The timeout is 4 seconds RTC 测试 1)测试说明 断电重启设备,查看当前系统时间和硬件时间
Wed Sep 19 17:39:19 UTC 2018 2)查看当前RTC芯片时钟 命令如下: # hwclock 系统输出信息如下: Wed Sep 19 17:40:05 2018 0.000000 seconds 3)设置系统时钟,并同步到RTC芯片 命令如下: # date -s "2018-09-21 12:34:56" 系统输出信息如下: Fri Sep 21 12:34:56 UTC 2018 4)将系统时钟写入硬件时钟 # hwclock -w 5)断电重启评估板,查看当前系统时钟和硬件时钟 命令如下: # date 系统输出信息如下: Fri Sep 21 12:36:02 UTC 2018 6)查看当前RTC芯片时钟 命令如下: # hwclock 系统输出信息如下: Fri Sep 21 12:36:12 2018 0.000000 seconds 定时唤醒测试 1)设定 10 秒后产生唤醒事件 # echo +10 > /sys/class/rtc/rtc1/wakealARM 2)使设备进入 # echo mem > /sys/power/state 3)睡眠信息 PM: Syncing filesystems ... done.Freezing user space processes ... Freezing remaining freezable tasks ... (elapsed 0.006 seconds) done.Suspending console(s) (use no_console_suspend to debug) 4)唤醒信息 (elapsed 0.001 seconds) done.PM: suspend of devices complete after 708.601 msecsPM: suspend devices took 0.710 secondsPM: late suspend of devices complete after 2.543 msecsPM: noirq suspend of devices complete after 2.410 msecsDisabling non-boot CPUs ...PM: noirq resume of devices complete after 1.494 msecsPM: early resume of devices complete after 1.571 msecsPM: resume of devices complete after 223.182 msecsPM: resume devices took 0.230 secondsRestarting tasks ... done. 音频测试 播放音频 测试说明:这项测试是通过播放音频文件验证评估板的音频功能。 1)测试准备 2)执行测试命令 # aplay /unit_tests/audio8k16S.wav 3)执行上面的测试命令后会听到音频设备输出的声音。 系统会输出类似如下信息: Playing WAVE '/unit_tests/audio8k16S.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo 音频录音 1)测试准备 2)输入测试命令
4G模块EC20(选配)测试 接口位置:P19 测试说明:在断电下接入4G模块,接入天线并插入SIM卡后启动评估板 输入如下命令: # /my-demo/linux-4.1.15/MY_EC20_QuectelCM_L4115_MYIMX6A7.out & 系统会输出类似如下信息: [1] 607[09-21_13:36:14:352] WCDMA<E_QConnectManager_Linux&Android_V1.1.34[09-21_13:36:14:353] /my-demo/linux-4.1.15/MY_EC20_QuectelCM_L4115_MYIMX6A7.out profile[1] = (null)/(null)/(null)/0, pincode = (null)[09-21_13:36:14:356] Find /sys/bus/u***/devices/1-1.2 idVendor=2c7c idProduct=0125[09-21_13:36:14:356] Find /sys/bus/u***/devices/1-1.2:1.4/net/eth2[09-21_13:36:14:356] Find u***net_adapter = eth2[09-21_13:36:14:356] Find /sys/bus/u***/devices/1-1.2:1.4/GobiQMI/qcqmi2[09-21_13:36:14:357] Find qmichannel = /dev/qcqmi2[09-21_13:36:14:403] Get clientWDS = 7[09-21_13:36:14:435] Get clientDMS = 8[09-21_13:36:14:467] Get clientNAS = 9[09-21_13:36:14:499] Get clientUIM = 10[09-21_13:36:14:532] Get clientWDA = 11[09-21_13:36:14:563] requestBaseBandVersion EC20CEFAR02A10M4G[09-21_13:36:14:659] requestGetSIMStatus SIMStatus: SIM_READY[09-21_13:36:14:692] requestGetProfile[1] cmnet///0[09-21_13:36:14:724] requestRegistrationState2 MCC: 460, MNC: 0, PS: Attached, DataCap: LTE[09-21_13:36:14:755] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED[09-21_13:36:14:819] requestRegistrationState2 MCC: 460, MNC: 0, PS: Attached, DataCap: LTE[09-21_13:36:16:036] requestSetupDataCall WdsConnectionIPv4Handle: 0x87756f40[09-21_13:36:16:132] requestQueryDataCall IPv4ConnectionStatus: CONNECTED[09-21_13:36:16:163] ifconfig eth2 up[09-21_13:36:16:193] busybox udhcpc -f -n -q -t 5 -i eth2[09-21_13:36:16:211] udhcpc (v1.24.1) started[09-21_13:36:16:318] Sending discover...[09-21_13:36:16:378] Sending select for 10.151.159.101...[09-21_13:36:16:438] Lease of 10.151.159.101 obtained, lease time 7200[09-21_13:36:16:522] /etc/udhcpc.d/50default: Adding DNS 221.179.38.7[09-21_13:36:16:522] /etc/udhcpc.d/50default: Adding DNS 120.196.165.7 显示屏(选配)测试 在系统启动过程中,可以看到 Linux 小企鹅和 OpenEmbedded 启动画面。 FXLS8471(选配)测试
No device specified, trying to scan all of /dev/input/event*Available devices:/dev/input/event0: 20cc000.snvs:snvs-powerkeySelect the device event number [0-0]: FXAS2100(选配)测试
No device specified, trying to scan all of /dev/input/event*Available devices:/dev/input/event0: 20cc000.snvs:snvs-powerkeySelect the device event number [0-0]: |
|
|
|
只有小组成员才能发言,加入小组>>
「含关键代码」基于AM3352/AM3354/AM3359的Linux开发案例分享
4880 浏览 0 评论
87375 浏览 0 评论
【高手问答】如何做到精通linux技术?资深工程师带你突破难点
4700 浏览 2 评论
3590 浏览 2 评论
解读Linux :先从创建一个文件夹用来存放jdk压缩文件开始
2465 浏览 0 评论
1977浏览 3评论
这是i.mx6ull的关于usb的宏定义,能解释下这些宏定义的意思
1339浏览 1评论
1246浏览 1评论
求解:aarch64交叉编译工具已经安装成功,环境变量已经配置,怎么将系统架构切换为ARM的架构
1315浏览 0评论
电脑和虚拟机可以互ping,电脑和开发板也可以互ping,但是虚拟机和开发板ping不通是什么原因
1221浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-3 22:48 , Processed in 0.998391 second(s), Total 70, Slave 52 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号