LED属性 (LED property)
<thead>
用途 (application) |
</thead>
<tbody>
D12 |
PE1 |
default |
内核启动后点亮 (brighten after booting of kernel) |
- |
D13 |
PE2 |
heartbeat |
CPU工作时闪烁 (flash when CPU is in working) |
- |
D14 |
PE3 |
gpio |
用户控制输出 (user control output) |
- |
D15 |
PE4 |
timer |
Timer演示 (Timer demonstration) |
} |
</tbody>
led-default测试(led-default test)
led-default对应D12。系统启动完成后,该LED默认被点亮,通常可用作供电指示。就是说在用户没有控制该指示灯的情况下,亮表示设备通电(即电源工作正常)。当然,用户也可以控制该指示灯的亮灭,但这时候灯灭与电源是否工作不存在关联。
led-default corresponds with D12. when booting of system is completed,the LED is brightened defaulty,which is ususally ussed as power indicator,in other words,brightenness of the LED represent a switching on of devices on the condition that user doesn't control the LED.Of course,user can control on and off of the LED,in this case,there is not any relation between on/off of the LED and working condition of power source.
控制命令如下:
control command as below:
# echo 0 > /sys/class/leds/default/brightness
# echo 1 > /sys/class/leds/default/brightness
led-heartbeat
led-heartbeat对应D13。系统启动后,该LED闪烁,该LED的状态可表示CPU的工作状态。闪烁表示CPU工作正常。常亮或常灭表示CPU工作不正常(即可能是CPU不工作了)。
led-heartbeat correspond with D13. after system is booted,the LED flash,so the condition of the LED can represent the working condition of CPU,e.g.flashing means CPU works normally.
solid light or always going out means that CPU doesn't work normally(e.g CPU is unworkable)
led-gpio测试(led-gpio test)
led-gpio对应D14。系统启动后,该LED默认保持常灭的状态。进入系统后,我们可通过指令来控制该LED的亮灭。
led-gpio corresponds with D14.after system is booted,the LED is kept defaulty in state of going out,we can control on/off of the LED through commands after entrance of system
该LED使用的CPU引脚为PE3,在系统中表现由/sys/class/leds/gpioE3/目录下相关的文件表示它的属性。
pin of CPU used by the LED is PE3, its property is represented by the relevant files under directory of /sys/class/leds/gpioE3/ in the system
控制指令如下:
controling commands as below:
# echo 1 > /sys/class/leds/gpioE3/brightness
# echo 0 > /sys/class/leds/gpioE3/brightness
led-timer测试(led-timer test)
led-timer对应D15。这主要演示GPIO作为timer信号。
led-timer corresponds with D15,this mainly demonstrate GPIO as timer signal
在系统中由/sys/class/leds/timer/目录下相关的文件表示它的属性。
its property is represented by the relevant files under directory of /sys/class/leds/timer in the system
我们可能通过设置delay来控制该GPIO高低电平保持的时间。
we can set dealy to control holding time of high/low electrical level of GPIO
控制指令如下:
controling commands as below:
# echo 1000 > /sys/class/leds/timer/delay_off
通过delay_off控制低电平保持的时间,1000即1000ms
control holding time of low electrical level via delay_off,1000 means 1000ms
# echo 2000 > /sys/class/leds/timer/delay_on
通过delay_on控制低电平保持的时间,2000即2000ms
control holding time of low electrical level via delay_on,2000 means 2000ms
执行上面两条指令后,我们看到的效果是:D15灭1秒后,亮2秒,如此循环。
after execution of the above two commands,the result: 1 second after D15 goes out,then lit for 2 seconds,cycle this way.
串口测试(serial port test)
MY-SAMA5-EK200评估板有6个串口,其中5个为用户串口,1个为调试串口(位于底板正面“P1”位置)。
MY-SAMA5-EK200 evaluation board has 6 serial ports, 5 of them are user serial port, 1 of them is debug serial port(in"P1" on top view of based board)
MPU定义 (definition)
|
功能实现 (function realization)
|
Linux设备文件 (Linux device file)
|
连接位置 (position of connection)
|
DBGU
|
调试串口 (debug serial port)
|
/dev/ttyS0
|
P1
|
USART0
|
RS232
|
/dev/ttyS1
|
J27:5,6(RX,TX)
|
USART1
|
RS232,RS485
|
/dev/ttyS2
|
J26:14,11(RX,TX)
|
USART2
|
RS232,RS485
|
/dev/ttyS3
|
J26:10,7(RX,TX)
|
USART3
|
RS232
|
/dev/ttyS4
|
J27:1,2(RX,TX)
|
UART0
|
RS232
|
/dev/ttyS5
|
J27:3,4(RX,TX)
|
在串口测试中我们测试5个用户串口。
we will test the 5 user serial port in the test of serial port
测试说明(test instruction)
instruction of test method
采用串口自发自收的方式进行。
adopt method of self-sending & self-receiving of serial port
instruction of test result
通过测试程序向串口发送字符串,并输出串口接收到的字符串。
send charater string to serial port via test program,and output the charater string received by the serial port
测试方法(test method)
1)短接串口的收发引脚
short connect transceiver pins of serial port
这一步请根据需要测试的串口找到对应的引脚,并仔细检查,确保无误。如不确定请在硬件工程师的支持下进行。错误的短接可能会对评估板造成损坏。
please find the corresponding pins according to the serial ports which need to be tested and check carefully to make sure 100% correct. if you are not sure of how to do it please ask hardware engineer for a support.it may cause damage to the evaluation board by a wrong short connection
2)准备测试程序
prepare test program
download test application
将uart_test.out下载到评估板,参考命令如下:
download uart_test.out to the evaluation board,reference command as below:
# tftp –gr uart_test.out 192.168.18.18
add executable authority for the test program
# chmod +x uart_test.out
3)测试USART0(ttyS1)
test USART0(ttyS1)
specify serial port which need to be tested
指定USART0为被测试设备,根据前面的表格,UASRT0对应ttyS1
specify USART0 as device tested,according to the previous form,UASRT0 correspond with ttyS1
# USART_DEV="/dev/ttyS1"
execute test command
# ./uart_test.out $USART_DEV "www.myzr.com.cn"
3)其它串口测试
test of other serial ports
测试其它串口同样需要指定对应的设备文件,并执行测试命令,参考如下:
likewise,corresponding device file need to be specified for the test of other serial ports and execute test command,reference as below:
# USART_DEV="/dev/ttyS2"
# ./uart_test.out $USART_DEV "www.myzr.com.cn"
# USART_DEV="/dev/ttyS3"
# ./uart_test.out $USART_DEV "www.myzr.com.cn"
# USART_DEV="/dev/ttyS4"
# ./uart_test.out $USART_DEV "www.myzr.com.cn"
# USART_DEV="/dev/ttyS5"
# ./uart_test.out $USART_DEV "www.myzr.com.cn"
RTC测试(RTC test)
测试说明(test instruction)
受快递运输影响,MY-SAMA5-EK200 评估板发货时不带电池。测试RTC前请自备纽扣电池并安装到底板背面“BT1”上(在丝印“RTC”旁边)。
due to restrictions in transportation,MY-SAMA5-EK200 evaluation board doesn't contatin battery in delivery。before RTC test please prepare button cell to install on “BT1”in bottom view of base board(beside silkscreened name of“RTC”)
测试方法(test method)
1)断电重启设备,查看当前系统时间和硬件时间。
power off then reboot device,to check the current time of system and hardware。
command to check current system clock as below
# date
message outputed by system as below:
Tue Nov 17 06:07:13 UTC 2015
2)查看当前RTC芯片时钟命令如下:
command to check clock of RTC chip as below:
# hwclock
message outputed by system as below:
Tue Nov 17 06:08:14 2015 0.000000 seconds
3)设置系统时钟,并同步到RTC芯片
set system clock and synchronously set to RTC chip)
command to set system clock as below:
# date -s "2015-11-23 12:34:56"
command to write system clock into hardware as below:
# hwclock –w
4)断电重启评估板,查看当前系统时钟和硬件时钟
power off and reboot evaluation board,to check current system clock and hardware clock)
请参考第1步
please refer to the first step
5)测试结果
test result
执行第3步以后看到的时钟为新设定的时钟。
it will be a newly-set clock after execution of step 3
SPI测试 (SPI test)
MY-SAMA5-EK200上有一组SPI接口,在“J22”位置上。
there are a group of SPI interfaces on MY-SAMA5-EK200,they are on "J22"
测试说明(test instruction)
SPI测试采用自发送(输出)自接收(输入)的方式。
method of self-sending(output)self-receiving(input) is adopted for SPI test
测试需要用到SPI接口的MISO和MOSI管脚。SPI接口的 MISO管脚在底板“J22的5号”,MOSI管脚为“J22的1号”。
MISO pin and MOSI pin of SPI port will be used for the test。MISO pin of SPI port is “no.5 of J22”on the base board,and MOSI pin is “no.1 of J22”。)
测试方法(test method)
1)短接SPI的收发引脚
short connect transceiver pin of SPI
短接J22的1号和5号管脚,并仔细检查,确保无误。如不确定请在硬件工程师的支持下进行。错误的短接可能会对评估板造成损坏。
short connect pins no.1 and no.5 of J22 ,and check carefully to make sure 100% correct. if you are not sure of how to do it please ask hardware engineer for a support it may cause damage to the evaluation board by a wrong short connection
2)准备测试程序
prepare test program
download test application
将spi_test.out下载到评估板,参考命令如下:
download spi_test.out to evaluation board, reference command as below:
# tftp –gr spidev_test.out 192.168.18.18
add executable authority for the test program
# chmod +x spidev_test.out
3)执行测试
execute test
# ./spidev_test.out -D /dev/spidev32765.0
4)测试结果
test result
如果SPI正常,在终端上会看到如下字符:
FF FF FF FF FF FF
40 00 00 00 00 95
FF FF FF FF FF FF
FF FF FF FF FF FF
FF FF FF FF FF FF
DE AD BE EF BA AD
F0 0D
CAN接口测试 (CAN infterface test)
测试说明(test instruction)
CAN测试需要用到示波器,没有示波器的客户请跳过CAN测试。
oscilloscope will be used for CAN test,please skip this step for users who don't have oscilloscope。
这里演示CAN0的测试,CAN1测试类似。
here demonstrate the test for CAN0,the same way for CAN1
测试方法(test method)
1)配置CAN0
configure CAN0
示例命令如下:
exampled command as below:
# ip link set can0 up type can bitrate 125000
2)配置连接示波器
configure connection to oscilloscope
将示波器的CH1和CH2连接到评估板的“J12”(在底板正面最上面的蓝色座子)。
connect CH1 and CH2 of oscilloscope with “J12”of evaluation board(the blue stand on topside on top view of base board)
配置示波器(不会使用示波器的客户请找硬件工程师协助)。
configure oscilloscope(for users who don't know how to use oscilloscope ,please ask hardware engineers for assistance )
3)执行测试命令
execute test command
# cansend can0 5A1#11.2233.44556677.88
4)测试结果
test result
执行测试命令的同时会在示波器上看到波形的变化。
when exectue the test command,at the same time you can see a change of wave shape on oscilloscope。
WIFI测试(WIFI test)
1)在网盘“4_烧录支持/mysama5ek200_image”下载编译好的 WIFI 驱动模块“8188eu.ko”。
download WIFI module “8188eu.ko”compiled under directory of “4_programing support/mysama5ek200_image”on the network disk
2)把 8188eu.ko 传输到开发板的 “~/my-demo/linux-3.18/” 目录。
transfer 8188eu.ko to the directory of “~/my-demo/linux-3.18/”of development board
3)测试
test
# insmod ~/my-demo/linux-3.18/8188eu.ko
# wpa_passphrase WIFI名称 WIFI密码 > /etc/wpa_supplicant.conf
# wpa_passphrase WIFI name WIFI password> /etc/wpa_supplicant.conf
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B
# udhcpc -i wlan0
|