“MYZR-SAMA5 Linux-3.18 测试手册”的版本间的差异

来自明远智睿的wiki
跳转至: 导航搜索
第1行: 第1行:
 
<div>
 
<div>
  
= '''测试前的准备(preparation before test)''' =
+
= '''测试前的准备''' =
 
----
 
----
1)请按照《Linux快速启动手册》中的“Linux快速启动” -> “连接设备”进行连接。<br>
+
1)请按照《Linux快速启动手册》中的“Linux快速启动” -> “连接设备”进行连接。<br>
  <span style="background:#CCCCCC">please refer to "connection of device"->"Linux fast boot"  in 《Linux fast boot manual》 for the connection。</span><br>
+
2)请按照《Linux快速启动手册》中的“Linux快速启动” -> “启动设备”进行启动。<br>
2)请按照《Linux快速启动手册》中的“Linux快速启动” -> “启动设备”进行启动。<br>
 
  <span style="background:#CCCCCC">please refer to "booting device" ->"Linux fast boot" in 《Linux fast boot manual》 for the booting。</span><br>
 
  
= '''测试项目(test item)''' =
+
= '''测试项目''' =
 
----
 
----
== '''网口测试(lan port test)''' ==
+
== '''网口测试''' ==
 
MY-SAMA5-EK200支持双网口(1个百兆网口,一个千兆网口)。<br>
 
MY-SAMA5-EK200支持双网口(1个百兆网口,一个千兆网口)。<br>
<span style="background:#CCCCCC">MY-SAMA5-EK200 support dual lan port(one Mbps ethernet lan port,one Gbps ethernet lan port)</span><br>
 
  
=== 测试说明(test instruction) ===
+
=== 测试说明 ===
 
* 第1个以太网口位置底板正面“J3”,第2个以太网口位置底板正面“J2”。<br>
 
* 第1个以太网口位置底板正面“J3”,第2个以太网口位置底板正面“J2”。<br>
<span style="background:#CCCCCC">MY-SAMA5-EK200 support dual lan port(one Mbps ethernet lan port,one Gbps ethernet lan port)</span><br>
 
  
=== 测试方法(test method) ===
+
=== 测试方法 ===
 
1) 测试第1个以太网口(百兆网口)<br>
 
1) 测试第1个以太网口(百兆网口)<br>
<span style="background:#CCCCCC">test the first ethernet lan port(Mbps ethernet lan port)</span><br>
 
 
* 连接网线:用网络连接评估板“J3”与计算机网口<br>
 
* 连接网线:用网络连接评估板“J3”与计算机网口<br>
<span style="background:#CCCCCC">connect lan line:connect “J3”on evaluation board with computer lan port through network</span><br>
 
 
* 设置计算机IP:设置计算机网口IP为192.168.18.18<br>
 
* 设置计算机IP:设置计算机网口IP为192.168.18.18<br>
<span style="background:#CCCCCC">set computer IP:set computer lan port IP as 192.168.18.18</span><br>
 
 
[[文件:MY-SAMA5 Linux-3.18_2.1.2.1.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.1.2.1.png]]<br>
 
* 设置评估板IP:<br>
 
* 设置评估板IP:<br>
<span style="background:#CCCCCC">set IP of evaluation board</span><br>
 
 
# ifconfig eth0 192.168.18.81 # configure the eth0<br>
 
# ifconfig eth0 192.168.18.81 # configure the eth0<br>
 
# ifconfig eth1 down<br>
 
# ifconfig eth1 down<br>
 
* 执行测试命令:<br>
 
* 执行测试命令:<br>
<span style="background:#CCCCCC">execute test command</span><br>
 
 
# ping 192.168.18.18 -c 2 -w 4         # send ICMP to HOST<br>
 
# ping 192.168.18.18 -c 2 -w 4         # send ICMP to HOST<br>
 
* 观察测试结果:系统会输出类似如下信息:<br>
 
* 观察测试结果:系统会输出类似如下信息:<br>
<span style="background:#CCCCCC">observe test result:system will output information like below:</span><br>
 
 
--- 192.168.18.18 ping statistics ---
 
--- 192.168.18.18 ping statistics ---
  
第40行: 第30行:
  
 
* 测试结果:“0% packet loss”表示测试通过<br>
 
* 测试结果:“0% packet loss”表示测试通过<br>
<span style="background:#CCCCCC">test result:“0% packet loss”represent test passing</span><br>
 
 
* 附图<br>
 
* 附图<br>
<span style="background:#CCCCCC">figure</span><br>
 
 
[[文件:MY-SAMA5 Linux-3.18_2.1.2.2.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.1.2.2.png]]<br>
 
2) 测试第2个以太网口(千兆网口)<br>
 
2) 测试第2个以太网口(千兆网口)<br>
<span style="background:#CCCCCC">test the second ethernet lan port</span><br>
 
 
* 连接网线:拔下第1个网口的网线接口插入到评估板“J2”,网线另一端保持与计算机网口相连。<br>
 
* 连接网线:拔下第1个网口的网线接口插入到评估板“J2”,网线另一端保持与计算机网口相连。<br>
<span style="background:#CCCCCC">connect lan line:take out lan line from the first lan port then plug in “J2”on evaluation board,another end of lan line is kept in connection with lan port of computer</span><br>
 
 
* 设置计算机IP:设置计算机网口IP为192.168.18.18(如已经设置过可执行下一步骤)。<br>
 
* 设置计算机IP:设置计算机网口IP为192.168.18.18(如已经设置过可执行下一步骤)。<br>
<span style="background:#CCCCCC">set computer IP:set computer lan port IP as 192.168.18.18(if the setting was already done then go direclty into next step)</span><br>
 
 
* 设置第2个网口IP:<br>
 
* 设置第2个网口IP:<br>
<span style="background:#CCCCCC">set the second lan port IP:</span><br>
 
 
# ifconfig eth1 192.168.18.82 # configure the eth1<br>
 
# ifconfig eth1 192.168.18.82 # configure the eth1<br>
 
# ifconfig eth0 down<br>
 
# ifconfig eth0 down<br>
 
设置后系统会输出第2个网口的工作状态信息,类似如下:<br>
 
设置后系统会输出第2个网口的工作状态信息,类似如下:<br>
<span style="background:#CCCCCC">after the setting system will output working condition of the second lan port, as below</span><br>
 
 
macb f0028000.ethernet eth1: link up (1000/Full)<br>
 
macb f0028000.ethernet eth1: link up (1000/Full)<br>
 
* 执行测试命令:<br>
 
* 执行测试命令:<br>
<span style="background:#CCCCCC">run test command</span><br>
 
 
# ping  192.168.18.18 -c 2 -w 4 # send ICMP to HOST<br>
 
# ping  192.168.18.18 -c 2 -w 4 # send ICMP to HOST<br>
 
* 观察测试结果:系统会输出类似如下信息:<br>
 
* 观察测试结果:系统会输出类似如下信息:<br>
<span style="background:#CCCCCC">observe test result:system will output the following message:</span><br>
 
 
--- 192.168.18.18 ping statistics ---
 
--- 192.168.18.18 ping statistics ---
  
第67行: 第48行:
 
----
 
----
 
* 测试结果:“0% packet loss”表示测试通过<br>
 
* 测试结果:“0% packet loss”表示测试通过<br>
<span style="background:#CCCCCC">test result:“0% packet loss”represent test passing</span><br>
 
 
* 附图<br>
 
* 附图<br>
<span style="background:#CCCCCC">figures</span><br>
 
 
[[文件:MY-SAMA5 Linux-3.18_2.1.2.3.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.1.2.3.png]]<br>
  
== '''USB测试(USB test)''' ==
+
== '''USB测试''' ==
=== 测试说明(test instruction) ===
+
=== 测试说明===
 
MY-IMX6-EK200有2个USB HOST接口,位于底板正面“J8”。<br>
 
MY-IMX6-EK200有2个USB HOST接口,位于底板正面“J8”。<br>
<span style="background:#CCCCCC">MY-IMX6-EK200 has two USB HOST ports,in“J8”in top view of base board</span><br>
 
  
=== 测试方法(test method) ===
+
=== 测试方法 ===
 
1) 开始测试<br>
 
1) 开始测试<br>
<span style="background:#CCCCCC">start test</span><br>
 
 
将USB设备插入底板USB接口,系统会输出类似如下信息:<br>
 
将USB设备插入底板USB接口,系统会输出类似如下信息:<br>
<span style="background:#CCCCCC">plug USB device in USB port in base board,system will output the following message:</span><br>
 
 
usb *-*.*: new high-speed USB device number * using atmel-ehci<br>
 
usb *-*.*: new high-speed USB device number * using atmel-ehci<br>
 
……<br>
 
……<br>
  
 
2) 测试结束<br>
 
2) 测试结束<br>
<span style="background:#CCCCCC">complete test</span><br>
 
 
将USB设备从底板拔出,系统会输出类似如下信息:<br>
 
将USB设备从底板拔出,系统会输出类似如下信息:<br>
<span style="background:#CCCCCC">take out USB device from the base board,system will output the following message:</span><br>
 
 
usb *-*.*: USB disconnect, device number *<br>
 
usb *-*.*: USB disconnect, device number *<br>
  
=== 附图(figures) ===
+
=== 附图 ===
 
[[文件:MY-SAMA5 Linux-3.18_2.2.3.1.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.2.3.1.png]]<br>
 
说明:在USB口上插拔U盘时,系统输出信息类似如下:<br>
 
说明:在USB口上插拔U盘时,系统输出信息类似如下:<br>
<span style="background:#CCCCCC">instruction:insert U disk in USB port, system will output information like below:</span><br>
 
  
== '''SD卡接口测试(SD card interface test)''' ==
+
== '''SD卡接口测试''' ==
=== 测试说明(test instruction ) ===
+
=== 测试说明===
 
SD卡接口位于底板背面“J29”。<br>
 
SD卡接口位于底板背面“J29”。<br>
<span style="background:#CCCCCC">SD card interface is in“J29”in bottom view of base board。</span><br>
 
  
=== 开始测试(start test) ===
+
=== 开始测试 ===
  1) 往SD卡槽插入设备<br>
+
1) 往SD卡槽插入设备<br>
  <span style="background:#CCCCCC">insert device in SD card slot</span><br>
+
插入SD卡到底板SD卡接口。系统输出以下信息(见附图)即表示SD接口正常:<br>
  插入SD卡到底板SD卡接口。系统输出以下信息(见附图)即表示SD接口正常:<br>
 
  <span style="background:#CCCCCC">insert SD card in SD card port in base board, system will output following message(see attached image),e.g.SD port is normal:</span><br>
 
 
mmc*: new high speed SD card at address ****<br>
 
mmc*: new high speed SD card at address ****<br>
 
……<br>
 
……<br>
  2)从SD卡槽弹出设备<br>
+
2)从SD卡槽弹出设备<br>
  <span style="background:#CCCCCC">pop-up device from SD card slot</span><br>
+
再次住SD卡槽按下SD卡,底板会弹出SD卡。系统输出以下信息(见附图)表示SD卡接口弹出正常:<br>
  再次住SD卡槽按下SD卡,底板会弹出SD卡。系统输出以下信息(见附图)表示SD卡接口弹出正常:<br>
 
  <span style="background:#CCCCCC">press again SD card in SD card slot,base board will pop-up SD card。system will output following message(see attached image),e.g.function of SD card port pop-up is normal:</span><br>
 
 
mmc*: card **** removed<br>
 
mmc*: card **** removed<br>
  3) 结束测试<br>
+
3) 结束测试<br>
  <span style="background:#CCCCCC">complete test</span><br>
 
 
SD卡弹出后拨出SD卡即结束测试。<br>
 
SD卡弹出后拨出SD卡即结束测试。<br>
<span style="background:#CCCCCC">take out SD card after SD card pop-up,to end the test。</span><br>
+
=== 附图 ===
=== 附图(figures) ===
 
 
[[文件:MY-SAMA5 Linux-3.18_2.3.3.1.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.3.3.1.png]]<br>
  
== '''LED(GPIO)测试(LED(GPIO)test)''' ==
+
== '''LED(GPIO)测试''' ==
=== LED(GPIO)定义(LED(GPIO)definition) ===
+
=== LED(GPIO)定义 ===
 
在MY-SAMA5-EK200底板正面有4个LED,详细如下:<br>
 
在MY-SAMA5-EK200底板正面有4个LED,详细如下:<br>
<span style="background:#CCCCCC">there are 4 LEDs on the base board of MY-SAMA5-EK200,details as below:</span><br>
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
|丝印<br>(silkscreen)
+
|丝印
|CPU引脚<br>(CPU pin)
+
|CPU引脚
|LED属性<br>(LED property)
+
|LED属性
|用途<br>(application)
+
|用途
 
|-
 
|-
 
|D12
 
|D12
 
|PE1
 
|PE1
 
|default
 
|default
|内核启动后点亮<br>(brighten after booting of kernel)
+
|内核启动后点亮
 
|-
 
|-
 
|D13
 
|D13
 
|PE2
 
|PE2
 
|heartbeat
 
|heartbeat
|CPU工作时闪烁<br>(flash when CPU is in working)
+
|CPU工作时闪烁
 
|-
 
|-
 
|D14
 
|D14
 
|PE3
 
|PE3
 
|gpio
 
|gpio
|用户控制输出<br>(user control output)
+
|用户控制输出
 
|-
 
|-
 
|D15
 
|D15
 
|PE4
 
|PE4
 
|timer
 
|timer
|Timer演示<br>(Timer demonstration)
+
|Timer演示
 
|}
 
|}
  
=== led-default测试(led-default test) ===
+
=== led-default测试 ===
 
led-default对应D12。系统启动完成后,该LED默认被点亮,通常可用作供电指示。就是说在用户没有控制该指示灯的情况下,亮表示设备通电(即电源工作正常)。当然,用户也可以控制该指示灯的亮灭,但这时候灯灭与电源是否工作不存在关联。<br>
 
led-default对应D12。系统启动完成后,该LED默认被点亮,通常可用作供电指示。就是说在用户没有控制该指示灯的情况下,亮表示设备通电(即电源工作正常)。当然,用户也可以控制该指示灯的亮灭,但这时候灯灭与电源是否工作不存在关联。<br>
<span style="background:#CCCCCC">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.</span><br>
 
 
控制命令如下:<br>
 
控制命令如下:<br>
<span style="background:#CCCCCC">control command as below:</span><br>
 
 
# echo 0 > /sys/class/leds/default/brightness<br>
 
# echo 0 > /sys/class/leds/default/brightness<br>
 
# echo 1 > /sys/class/leds/default/brightness<br>
 
# echo 1 > /sys/class/leds/default/brightness<br>
第163行: 第126行:
 
=== led-heartbeat ===
 
=== led-heartbeat ===
 
led-heartbeat对应D13。系统启动后,该LED闪烁,该LED的状态可表示CPU的工作状态。闪烁表示CPU工作正常。常亮或常灭表示CPU工作不正常(即可能是CPU不工作了)。<br>
 
led-heartbeat对应D13。系统启动后,该LED闪烁,该LED的状态可表示CPU的工作状态。闪烁表示CPU工作正常。常亮或常灭表示CPU工作不正常(即可能是CPU不工作了)。<br>
<span style="background:#CCCCCC">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)</span><br>
 
  
=== led-gpio测试(led-gpio test) ===
+
=== led-gpio测试===
 
led-gpio对应D14。系统启动后,该LED默认保持常灭的状态。进入系统后,我们可通过指令来控制该LED的亮灭。<br>
 
led-gpio对应D14。系统启动后,该LED默认保持常灭的状态。进入系统后,我们可通过指令来控制该LED的亮灭。<br>
<span style="background:#CCCCCC">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</span><br>
 
 
该LED使用的CPU引脚为PE3,在系统中表现由/sys/class/leds/gpioE3/目录下相关的文件表示它的属性。<br>
 
该LED使用的CPU引脚为PE3,在系统中表现由/sys/class/leds/gpioE3/目录下相关的文件表示它的属性。<br>
<span style="background:#CCCCCC">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</span><br>
 
 
控制指令如下:<br>
 
控制指令如下:<br>
<span style="background:#CCCCCC">controling commands as below:</span><br>
 
 
# echo 1 > /sys/class/leds/gpioE3/brightness<br>
 
# echo 1 > /sys/class/leds/gpioE3/brightness<br>
 
# echo 0 > /sys/class/leds/gpioE3/brightness<br>
 
# echo 0 > /sys/class/leds/gpioE3/brightness<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.4.4.1.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.4.4.1.png]]<br>
  
=== led-timer测试(led-timer test) ===
+
=== led-timer测试===
 
led-timer对应D15。这主要演示GPIO作为timer信号。<br>
 
led-timer对应D15。这主要演示GPIO作为timer信号。<br>
<span style="background:#CCCCCC">led-timer corresponds with D15,this mainly demonstrate GPIO as timer signal</span><br>
 
 
在系统中由/sys/class/leds/timer/目录下相关的文件表示它的属性。<br>
 
在系统中由/sys/class/leds/timer/目录下相关的文件表示它的属性。<br>
<span style="background:#CCCCCC">its property is represented by the relevant files under directory of /sys/class/leds/timer in the system</span><br>
 
 
我们可能通过设置delay来控制该GPIO高低电平保持的时间。<br>
 
我们可能通过设置delay来控制该GPIO高低电平保持的时间。<br>
<span style="background:#CCCCCC">we can set dealy to control holding time of high/low electrical level of GPIO</span><br>
 
 
控制指令如下:<br>
 
控制指令如下:<br>
<span style="background:#CCCCCC">controling commands as below:</span><br>
 
 
# echo 1000 > /sys/class/leds/timer/delay_off<br>
 
# echo 1000 > /sys/class/leds/timer/delay_off<br>
 
通过delay_off控制低电平保持的时间,1000即1000ms<br>
 
通过delay_off控制低电平保持的时间,1000即1000ms<br>
<span style="background:#CCCCCC">control holding time of low electrical level via delay_off,1000 means 1000ms</span><br>
 
 
# echo 2000 > /sys/class/leds/timer/delay_on<br>
 
# echo 2000 > /sys/class/leds/timer/delay_on<br>
 
通过delay_on控制低电平保持的时间,2000即2000ms<br>
 
通过delay_on控制低电平保持的时间,2000即2000ms<br>
<span style="background:#CCCCCC">control holding time of low electrical level via delay_on,2000 means 2000ms</span><br>
 
 
执行上面两条指令后,我们看到的效果是:D15灭1秒后,亮2秒,如此循环。<br>
 
执行上面两条指令后,我们看到的效果是:D15灭1秒后,亮2秒,如此循环。<br>
<span style="background:#CCCCCC">after execution of the above two commands,the result: 1 second after D15 goes out,then lit for 2 seconds,cycle this way.</span><br>
 
 
[[文件:MY-SAMA5 Linux-3.18_2.4.5.1.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.4.5.1.png]]<br>
  
== '''串口测试(serial port test)''' ==
+
== '''串口测试''' ==
 
MY-SAMA5-EK200评估板有6个串口,其中5个为用户串口,1个为调试串口(位于底板正面“P1”位置)。<br>
 
MY-SAMA5-EK200评估板有6个串口,其中5个为用户串口,1个为调试串口(位于底板正面“P1”位置)。<br>
<span style="background:#CCCCCC">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)</span><br>
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
!MPU定义<br>(definition)
+
!MPU定义
!功能实现<br>(function realization)
+
!功能实现
!Linux设备文件<br>(Linux device file)
+
!Linux设备文件
!连接位置<br>(position of connection)
+
!连接位置
 
|-
 
|-
 
|DBGU
 
|DBGU
|调试串口<br>(debug serial port)
+
|调试串口
 
|/dev/ttyS0
 
|/dev/ttyS0
 
|P1
 
|P1
第237行: 第187行:
 
|}
 
|}
 
在串口测试中我们测试5个用户串口。<br>
 
在串口测试中我们测试5个用户串口。<br>
<span style="background:#CCCCCC">we will test the 5 user serial port in the test of serial port</span><br>
 
  
=== 测试说明(test instruction) ===
+
=== 测试说明 ===
 
* 测试方法说明:<br>
 
* 测试方法说明:<br>
<span style="background:#CCCCCC">instruction of test method</span><br>
 
 
采用串口自发自收的方式进行。<br>
 
采用串口自发自收的方式进行。<br>
<span style="background:#CCCCCC">adopt method of self-sending & self-receiving of serial port</span><br>
 
 
* 测试结果说明:<br>
 
* 测试结果说明:<br>
<span style="background:#CCCCCC">instruction of test result</span><br>
 
 
通过测试程序向串口发送字符串,并输出串口接收到的字符串。<br>
 
通过测试程序向串口发送字符串,并输出串口接收到的字符串。<br>
<span style="background:#CCCCCC">send charater string to serial port via test program,and output the charater string received by the serial port</span><br>
 
  
=== 测试方法(test method) ===
+
=== 测试方法 ===
 
1)短接串口的收发引脚<br>
 
1)短接串口的收发引脚<br>
<span style="background:#CCCCCC">short connect transceiver pins of serial port</span><br>
 
 
这一步请根据需要测试的串口找到对应的引脚,并仔细检查,确保无误。如不确定请在硬件工程师的支持下进行。错误的短接可能会对评估板造成损坏。<br>
 
这一步请根据需要测试的串口找到对应的引脚,并仔细检查,确保无误。如不确定请在硬件工程师的支持下进行。错误的短接可能会对评估板造成损坏。<br>
<span style="background:#CCCCCC">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</span><br>
 
 
2)准备测试程序<br>
 
2)准备测试程序<br>
<span style="background:#CCCCCC">prepare test program</span><br>
 
 
* 下载测试应用程序<br>
 
* 下载测试应用程序<br>
<span style="background:#CCCCCC">download test application</span><br>
 
 
将uart_test.out下载到评估板,参考命令如下:<br>
 
将uart_test.out下载到评估板,参考命令如下:<br>
<span style="background:#CCCCCC">download uart_test.out to the evaluation board,reference command as below:</span><br>
 
 
# tftp –gr uart_test.out 192.168.18.18<br>
 
# tftp –gr uart_test.out 192.168.18.18<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.5.2.1.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.5.2.1.png]]<br>
 
* 为测试程序添加可执行权限<br>
 
* 为测试程序添加可执行权限<br>
<span style="background:#CCCCCC">add executable authority for the test program</span><br>
 
 
# chmod +x uart_test.out<br>
 
# chmod +x uart_test.out<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.5.2.2.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.5.2.2.png]]<br>
 
3)测试USART0(ttyS1)<br>
 
3)测试USART0(ttyS1)<br>
<span style="background:#CCCCCC">test USART0(ttyS1)</span><br>
 
 
* 指定需要测试的串口<br>
 
* 指定需要测试的串口<br>
<span style="background:#CCCCCC">specify serial port which need to be tested</span><br>
 
 
指定USART0为被测试设备,根据前面的表格,UASRT0对应ttyS1<br>
 
指定USART0为被测试设备,根据前面的表格,UASRT0对应ttyS1<br>
<span style="background:#CCCCCC">specify USART0 as device tested,according to the previous form,UASRT0 correspond with ttyS1</span><br>
 
 
# USART_DEV="/dev/ttyS1"<br>
 
# USART_DEV="/dev/ttyS1"<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.5.2.3.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.5.2.3.png]]<br>
 
* 执行测试命令<br>
 
* 执行测试命令<br>
<span style="background:#CCCCCC">execute test command</span><br>
 
 
# ./uart_test.out $USART_DEV "www.myzr.com.cn"<br>
 
# ./uart_test.out $USART_DEV "www.myzr.com.cn"<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.5.2.4.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.5.2.4.png]]<br>
 
3)其它串口测试<br>
 
3)其它串口测试<br>
<span style="background:#CCCCCC">test of other serial ports</span><br>
 
 
测试其它串口同样需要指定对应的设备文件,并执行测试命令,参考如下:<br>
 
测试其它串口同样需要指定对应的设备文件,并执行测试命令,参考如下:<br>
<span style="background:#CCCCCC">likewise,corresponding device file need to be specified for the test of other serial ports and execute test command,reference as below:</span><br>
 
 
# USART_DEV="/dev/ttyS2"<br>
 
# USART_DEV="/dev/ttyS2"<br>
 
# ./uart_test.out $USART_DEV "www.myzr.com.cn"<br>
 
# ./uart_test.out $USART_DEV "www.myzr.com.cn"<br>
第295行: 第228行:
 
[[文件:MY-SAMA5 Linux-3.18_2.5.2.8.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.5.2.8.png]]<br>
  
== '''RTC测试(RTC test)''' ==
+
== '''RTC测试''' ==
===  测试说明(test instruction) ===
+
===  测试说明 ===
  受快递运输影响,MY-SAMA5-EK200 评估板发货时不带电池。测试RTC前请自备纽扣电池并安装到底板背面“BT1”上(在丝印“RTC”旁边)。<br>
+
受快递运输影响,MY-SAMA5-EK200 评估板发货时不带电池。测试RTC前请自备纽扣电池并安装到底板背面“BT1”上(在丝印“RTC”旁边)。<br>
  <span style="background:#CCCCCC">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”)</span><br>
 
  
===  测试方法(test method) ===
+
===  测试方法 ===
1)断电重启设备,查看当前系统时间和硬件时间。<br>
+
1)断电重启设备,查看当前系统时间和硬件时间。<br>
  <span style="background:#CCCCCC">power off then reboot device,to check the current time of system and hardware。</span><br>
 
 
* 查看当前系统时钟命令如下:<br>
 
* 查看当前系统时钟命令如下:<br>
<span style="background:#CCCCCC">command to check current system clock as below</span><br>
 
 
# date<br>
 
# date<br>
 
* 系统输出信息如下:<br>
 
* 系统输出信息如下:<br>
<span style="background:#CCCCCC">message outputed by system as below:</span><br>
 
 
Tue Nov 17 06:07:13 UTC 2015<br>
 
Tue Nov 17 06:07:13 UTC 2015<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.6.2.1.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.6.2.1.png]]<br>
2)查看当前RTC芯片时钟命令如下:<br>
+
2)查看当前RTC芯片时钟命令如下:<br>
  <span style="background:#CCCCCC">command to check clock of RTC chip as below:</span><br>
 
 
# hwclock <br>
 
# hwclock <br>
 
* 系统输出信息如下:<br>
 
* 系统输出信息如下:<br>
<span style="background:#CCCCCC">message outputed by system as below:</span><br>
 
 
Tue Nov 17 06:08:14 2015  0.000000 seconds<br>
 
Tue Nov 17 06:08:14 2015  0.000000 seconds<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.6.2.2.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.6.2.2.png]]<br>
3)设置系统时钟,并同步到RTC芯片<br>
+
3)设置系统时钟,并同步到RTC芯片<br>
  <span style="background:#CCCCCC">set system clock and synchronously set to RTC chip)</span><br>
 
 
* 设置系统时钟命令参考如下:<br>
 
* 设置系统时钟命令参考如下:<br>
 
<span style="background:#CCCCCC">command to set system clock as below:</span><br>
 
<span style="background:#CCCCCC">command to set system clock as below:</span><br>
# date -s "2015-11-23 12:34:56"<br>
+
# date -s "2015-11-23 12:34:56"<br>
 
* 将系统时钟写入硬件时钟命令如下:<br>
 
* 将系统时钟写入硬件时钟命令如下:<br>
<span style="background:#CCCCCC">command to write system clock into hardware as below:</span><br>
+
# hwclock –w<br>
# hwclock –w<br>
+
[[文件:MY-SAMA5 Linux-3.18_2.6.2.3.png]]<br>
[[文件:MY-SAMA5 Linux-3.18_2.6.2.3.png]]<br>
+
4)断电重启评估板,查看当前系统时钟和硬件时钟<br>
4)断电重启评估板,查看当前系统时钟和硬件时钟<br>
+
请参考第1步<br>
  <span style="background:#CCCCCC">power off and reboot evaluation board,to check current system clock and hardware clock)</span><br>
 
请参考第1步<br>
 
<span style="background:#CCCCCC">please refer to the first step</span><br>
 
 
5)测试结果<br>
 
5)测试结果<br>
<span style="background:#CCCCCC">test result</span><br>
 
 
执行第3步以后看到的时钟为新设定的时钟。<br>
 
执行第3步以后看到的时钟为新设定的时钟。<br>
<span style="background:#CCCCCC">it will be a newly-set clock after execution of step 3</span><br>
 
  
== '''SPI测试 (SPI test)''' ==
+
== '''SPI测试 ''' ==
 
MY-SAMA5-EK200上有一组SPI接口,在“J22”位置上。<br>
 
MY-SAMA5-EK200上有一组SPI接口,在“J22”位置上。<br>
<span style="background:#CCCCCC">there are a group of SPI interfaces on MY-SAMA5-EK200,they are on "J22"</span><br>
 
  
=== 测试说明(test instruction) ===
+
=== 测试说明===
 
SPI测试采用自发送(输出)自接收(输入)的方式。<br>
 
SPI测试采用自发送(输出)自接收(输入)的方式。<br>
<span style="background:#CCCCCC">method of self-sending(output)self-receiving(input) is adopted for SPI test</span><br>
 
 
测试需要用到SPI接口的MISO和MOSI管脚。SPI接口的 MISO管脚在底板“J22的5号”,MOSI管脚为“J22的1号”。<br>
 
测试需要用到SPI接口的MISO和MOSI管脚。SPI接口的 MISO管脚在底板“J22的5号”,MOSI管脚为“J22的1号”。<br>
<span style="background:#CCCCCC">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”。)</span><br>
 
  
=== 测试方法(test method) ===
+
=== 测试方法 ===
 
1)短接SPI的收发引脚<br>
 
1)短接SPI的收发引脚<br>
<span style="background:#CCCCCC">short connect transceiver pin of SPI</span><br>
 
 
短接J22的1号和5号管脚,并仔细检查,确保无误。如不确定请在硬件工程师的支持下进行。错误的短接可能会对评估板造成损坏。<br>
 
短接J22的1号和5号管脚,并仔细检查,确保无误。如不确定请在硬件工程师的支持下进行。错误的短接可能会对评估板造成损坏。<br>
<span style="background:#CCCCCC">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</span><br>
 
 
2)准备测试程序<br>
 
2)准备测试程序<br>
<span style="background:#CCCCCC">prepare test program</span><br>
 
 
* 下载测试应用程序<br>
 
* 下载测试应用程序<br>
<span style="background:#CCCCCC">download test application</span><br>
 
 
将spi_test.out下载到评估板,参考命令如下:<br>
 
将spi_test.out下载到评估板,参考命令如下:<br>
<span style="background:#CCCCCC">download spi_test.out to evaluation board, reference command as below:</span><br>
 
 
# tftp –gr spidev_test.out 192.168.18.18<br>
 
# tftp –gr spidev_test.out 192.168.18.18<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.7.2.1.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.7.2.1.png]]<br>
 
* 为测试程序添加可执行权限<br>
 
* 为测试程序添加可执行权限<br>
<span style="background:#CCCCCC">add executable authority for the test program</span><br>
 
 
# chmod +x spidev_test.out<br>
 
# chmod +x spidev_test.out<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.7.2.2.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.7.2.2.png]]<br>
 
3)执行测试<br>
 
3)执行测试<br>
<span style="background:#CCCCCC">execute test</span><br>
 
 
# ./spidev_test.out -D /dev/spidev32765.0<br>
 
# ./spidev_test.out -D /dev/spidev32765.0<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.7.2.3.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.7.2.3.png]]<br>
 
4)测试结果<br>
 
4)测试结果<br>
<span style="background:#CCCCCC">test result</span><br>
 
 
如果SPI正常,在终端上会看到如下字符:<br>
 
如果SPI正常,在终端上会看到如下字符:<br>
<span style="background:#CCCCCC">if SPI is normal,you can see on terminal the following charaters:</span><br>
 
 
FF FF FF FF FF FF <br>
 
FF FF FF FF FF FF <br>
 
40 00 00 00 00 95 <br>
 
40 00 00 00 00 95 <br>
第378行: 第287行:
 
F0 0D<br>
 
F0 0D<br>
  
== '''CAN接口测试 (CAN infterface test)''' ==
+
== '''CAN接口测试''' ==
=== 测试说明(test instruction) ===
+
=== 测试说明===
 
CAN测试需要用到示波器,没有示波器的客户请跳过CAN测试。<br>
 
CAN测试需要用到示波器,没有示波器的客户请跳过CAN测试。<br>
<span style="background:#CCCCCC">oscilloscope will be used for CAN test,please skip this step for users who don't have oscilloscope。</span><br>
 
 
这里演示CAN0的测试,CAN1测试类似。<br>
 
这里演示CAN0的测试,CAN1测试类似。<br>
<span style="background:#CCCCCC">here demonstrate the test for CAN0,the same way for CAN1</span><br>
 
  
=== 测试方法(test method) ===
+
=== 测试方法 ===
 
1)配置CAN0<br>
 
1)配置CAN0<br>
<span style="background:#CCCCCC">configure CAN0</span><br>
 
 
示例命令如下:<br>
 
示例命令如下:<br>
<span style="background:#CCCCCC">exampled command as below:</span><br>
 
 
# ip link set can0 up type can bitrate 125000<br>
 
# ip link set can0 up type can bitrate 125000<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.8.2.1.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.8.2.1.png]]<br>
 
2)配置连接示波器<br>
 
2)配置连接示波器<br>
<span style="background:#CCCCCC">configure connection to oscilloscope</span><br>
 
 
将示波器的CH1和CH2连接到评估板的“J12”(在底板正面最上面的蓝色座子)。<br>
 
将示波器的CH1和CH2连接到评估板的“J12”(在底板正面最上面的蓝色座子)。<br>
<span style="background:#CCCCCC">connect CH1 and CH2 of oscilloscope with “J12”of evaluation board(the blue stand on topside on top view of base board)</span><br>
 
 
配置示波器(不会使用示波器的客户请找硬件工程师协助)。<br>
 
配置示波器(不会使用示波器的客户请找硬件工程师协助)。<br>
<span style="background:#CCCCCC">configure oscilloscope(for users who don't know how to use oscilloscope ,please ask hardware engineers for assistance )</span><br>
 
 
3)执行测试命令<br>
 
3)执行测试命令<br>
<span style="background:#CCCCCC">execute test command</span><br>
 
 
# cansend can0 5A1#11.2233.44556677.88<br>
 
# cansend can0 5A1#11.2233.44556677.88<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.7.2.2.png]]<br>
 
[[文件:MY-SAMA5 Linux-3.18_2.7.2.2.png]]<br>
 
4)测试结果<br>
 
4)测试结果<br>
<span style="background:#CCCCCC">test result</span><br>
 
 
执行测试命令的同时会在示波器上看到波形的变化。<br>
 
执行测试命令的同时会在示波器上看到波形的变化。<br>
<span style="background:#CCCCCC">when exectue the test command,at the same time you can see a change of wave shape on oscilloscope。</span><br>
 
  
== '''WIFI测试(WIFI test)''' ==
+
== '''WIFI测试''' ==
 
1)在网盘“4_烧录支持/mysama5ek200_image”下载编译好的 WIFI 驱动模块“8188eu.ko”。<br>
 
1)在网盘“4_烧录支持/mysama5ek200_image”下载编译好的 WIFI 驱动模块“8188eu.ko”。<br>
<span style="background:#CCCCCC">download WIFI module “8188eu.ko”compiled under directory of “4_programing support/mysama5ek200_image”on the network disk</span><br>
 
 
2)把 8188eu.ko 传输到开发板的 “~/my-demo/linux-3.18/” 目录。<br>
 
2)把 8188eu.ko 传输到开发板的 “~/my-demo/linux-3.18/” 目录。<br>
<span style="background:#CCCCCC">transfer 8188eu.ko to the directory of “~/my-demo/linux-3.18/”of development board</span><br>
 
 
3)测试<br>
 
3)测试<br>
<span style="background:#CCCCCC">test</span><br>
 
 
# insmod ~/my-demo/linux-3.18/8188eu.ko<br>
 
# insmod ~/my-demo/linux-3.18/8188eu.ko<br>
 
# wpa_passphrase WIFI名称 WIFI密码 > /etc/wpa_supplicant.conf<br>
 
# wpa_passphrase WIFI名称 WIFI密码 > /etc/wpa_supplicant.conf<br>
<span style="background:#CCCCCC"># wpa_passphrase WIFI name  WIFI password> /etc/wpa_supplicant.conf</span><br>
 
 
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B<br>
 
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B<br>
 
# udhcpc -i wlan0<br>
 
# udhcpc -i wlan0<br>
 +
 
</div>
 
</div>

2018年7月27日 (五) 11:38的版本

测试前的准备


1)请按照《Linux快速启动手册》中的“Linux快速启动” -> “连接设备”进行连接。
2)请按照《Linux快速启动手册》中的“Linux快速启动” -> “启动设备”进行启动。

测试项目


网口测试

MY-SAMA5-EK200支持双网口(1个百兆网口,一个千兆网口)。

测试说明

  • 第1个以太网口位置底板正面“J3”,第2个以太网口位置底板正面“J2”。

测试方法

1) 测试第1个以太网口(百兆网口)

  • 连接网线:用网络连接评估板“J3”与计算机网口
  • 设置计算机IP:设置计算机网口IP为192.168.18.18

MY-SAMA5 Linux-3.18 2.1.2.1.png

  • 设置评估板IP:

# ifconfig eth0 192.168.18.81 # configure the eth0
# ifconfig eth1 down

  • 执行测试命令:

# ping 192.168.18.18 -c 2 -w 4 # send ICMP to HOST

  • 观察测试结果:系统会输出类似如下信息:

--- 192.168.18.18 ping statistics ---

2packets transmitted, 2 packets received, 0% packet loss

  • 测试结果:“0% packet loss”表示测试通过
  • 附图

MY-SAMA5 Linux-3.18 2.1.2.2.png
2) 测试第2个以太网口(千兆网口)

  • 连接网线:拔下第1个网口的网线接口插入到评估板“J2”,网线另一端保持与计算机网口相连。
  • 设置计算机IP:设置计算机网口IP为192.168.18.18(如已经设置过可执行下一步骤)。
  • 设置第2个网口IP:

# ifconfig eth1 192.168.18.82 # configure the eth1
# ifconfig eth0 down
设置后系统会输出第2个网口的工作状态信息,类似如下:
macb f0028000.ethernet eth1: link up (1000/Full)

  • 执行测试命令:

# ping 192.168.18.18 -c 2 -w 4 # send ICMP to HOST

  • 观察测试结果:系统会输出类似如下信息:

--- 192.168.18.18 ping statistics ---

2packets transmitted, 2 packets received, 0% packet loss


  • 测试结果:“0% packet loss”表示测试通过
  • 附图

MY-SAMA5 Linux-3.18 2.1.2.3.png

USB测试

测试说明

MY-IMX6-EK200有2个USB HOST接口,位于底板正面“J8”。

测试方法

1) 开始测试
将USB设备插入底板USB接口,系统会输出类似如下信息:
usb *-*.*: new high-speed USB device number * using atmel-ehci
……

2) 测试结束
将USB设备从底板拔出,系统会输出类似如下信息:
usb *-*.*: USB disconnect, device number *

附图

MY-SAMA5 Linux-3.18 2.2.3.1.png
说明:在USB口上插拔U盘时,系统输出信息类似如下:

SD卡接口测试

测试说明

SD卡接口位于底板背面“J29”。

开始测试

1) 往SD卡槽插入设备
插入SD卡到底板SD卡接口。系统输出以下信息(见附图)即表示SD接口正常:
mmc*: new high speed SD card at address ****
……
2)从SD卡槽弹出设备
再次住SD卡槽按下SD卡,底板会弹出SD卡。系统输出以下信息(见附图)表示SD卡接口弹出正常:
mmc*: card **** removed
3) 结束测试
SD卡弹出后拨出SD卡即结束测试。

附图

MY-SAMA5 Linux-3.18 2.3.3.1.png

LED(GPIO)测试

LED(GPIO)定义

在MY-SAMA5-EK200底板正面有4个LED,详细如下:

丝印 CPU引脚 LED属性 用途
D12 PE1 default 内核启动后点亮
D13 PE2 heartbeat CPU工作时闪烁
D14 PE3 gpio 用户控制输出
D15 PE4 timer Timer演示

led-default测试

led-default对应D12。系统启动完成后,该LED默认被点亮,通常可用作供电指示。就是说在用户没有控制该指示灯的情况下,亮表示设备通电(即电源工作正常)。当然,用户也可以控制该指示灯的亮灭,但这时候灯灭与电源是否工作不存在关联。
控制命令如下:
# echo 0 > /sys/class/leds/default/brightness
# echo 1 > /sys/class/leds/default/brightness
MY-SAMA5 Linux-3.18 2.4.2.1.png

led-heartbeat

led-heartbeat对应D13。系统启动后,该LED闪烁,该LED的状态可表示CPU的工作状态。闪烁表示CPU工作正常。常亮或常灭表示CPU工作不正常(即可能是CPU不工作了)。

led-gpio测试

led-gpio对应D14。系统启动后,该LED默认保持常灭的状态。进入系统后,我们可通过指令来控制该LED的亮灭。
该LED使用的CPU引脚为PE3,在系统中表现由/sys/class/leds/gpioE3/目录下相关的文件表示它的属性。
控制指令如下:
# echo 1 > /sys/class/leds/gpioE3/brightness
# echo 0 > /sys/class/leds/gpioE3/brightness
MY-SAMA5 Linux-3.18 2.4.4.1.png

led-timer测试

led-timer对应D15。这主要演示GPIO作为timer信号。
在系统中由/sys/class/leds/timer/目录下相关的文件表示它的属性。
我们可能通过设置delay来控制该GPIO高低电平保持的时间。
控制指令如下:
# echo 1000 > /sys/class/leds/timer/delay_off
通过delay_off控制低电平保持的时间,1000即1000ms
# echo 2000 > /sys/class/leds/timer/delay_on
通过delay_on控制低电平保持的时间,2000即2000ms
执行上面两条指令后,我们看到的效果是:D15灭1秒后,亮2秒,如此循环。
MY-SAMA5 Linux-3.18 2.4.5.1.png

串口测试

MY-SAMA5-EK200评估板有6个串口,其中5个为用户串口,1个为调试串口(位于底板正面“P1”位置)。

MPU定义 功能实现 Linux设备文件 连接位置
DBGU 调试串口 /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个用户串口。

测试说明

  • 测试方法说明:

采用串口自发自收的方式进行。

  • 测试结果说明:

通过测试程序向串口发送字符串,并输出串口接收到的字符串。

测试方法

1)短接串口的收发引脚
这一步请根据需要测试的串口找到对应的引脚,并仔细检查,确保无误。如不确定请在硬件工程师的支持下进行。错误的短接可能会对评估板造成损坏。
2)准备测试程序

  • 下载测试应用程序

将uart_test.out下载到评估板,参考命令如下:
# tftp –gr uart_test.out 192.168.18.18
MY-SAMA5 Linux-3.18 2.5.2.1.png

  • 为测试程序添加可执行权限

# chmod +x uart_test.out
MY-SAMA5 Linux-3.18 2.5.2.2.png
3)测试USART0(ttyS1)

  • 指定需要测试的串口

指定USART0为被测试设备,根据前面的表格,UASRT0对应ttyS1
# USART_DEV="/dev/ttyS1"
MY-SAMA5 Linux-3.18 2.5.2.3.png

  • 执行测试命令

# ./uart_test.out $USART_DEV "www.myzr.com.cn"
MY-SAMA5 Linux-3.18 2.5.2.4.png
3)其它串口测试
测试其它串口同样需要指定对应的设备文件,并执行测试命令,参考如下:
# USART_DEV="/dev/ttyS2"
# ./uart_test.out $USART_DEV "www.myzr.com.cn"
MY-SAMA5 Linux-3.18 2.5.2.5.png
# USART_DEV="/dev/ttyS3"
# ./uart_test.out $USART_DEV "www.myzr.com.cn"
MY-SAMA5 Linux-3.18 2.5.2.6.png
# USART_DEV="/dev/ttyS4"
# ./uart_test.out $USART_DEV "www.myzr.com.cn"
MY-SAMA5 Linux-3.18 2.5.2.7.png
# USART_DEV="/dev/ttyS5"
# ./uart_test.out $USART_DEV "www.myzr.com.cn"
MY-SAMA5 Linux-3.18 2.5.2.8.png

RTC测试

测试说明

受快递运输影响,MY-SAMA5-EK200 评估板发货时不带电池。测试RTC前请自备纽扣电池并安装到底板背面“BT1”上(在丝印“RTC”旁边)。

测试方法

1)断电重启设备,查看当前系统时间和硬件时间。

  • 查看当前系统时钟命令如下:

# date

  • 系统输出信息如下:

Tue Nov 17 06:07:13 UTC 2015
MY-SAMA5 Linux-3.18 2.6.2.1.png
2)查看当前RTC芯片时钟命令如下:
# hwclock

  • 系统输出信息如下:

Tue Nov 17 06:08:14 2015 0.000000 seconds
MY-SAMA5 Linux-3.18 2.6.2.2.png
3)设置系统时钟,并同步到RTC芯片

  • 设置系统时钟命令参考如下:

command to set system clock as below:
# date -s "2015-11-23 12:34:56"

  • 将系统时钟写入硬件时钟命令如下:

# hwclock –w
MY-SAMA5 Linux-3.18 2.6.2.3.png
4)断电重启评估板,查看当前系统时钟和硬件时钟
请参考第1步
5)测试结果
执行第3步以后看到的时钟为新设定的时钟。

SPI测试

MY-SAMA5-EK200上有一组SPI接口,在“J22”位置上。

测试说明

SPI测试采用自发送(输出)自接收(输入)的方式。
测试需要用到SPI接口的MISO和MOSI管脚。SPI接口的 MISO管脚在底板“J22的5号”,MOSI管脚为“J22的1号”。

测试方法

1)短接SPI的收发引脚
短接J22的1号和5号管脚,并仔细检查,确保无误。如不确定请在硬件工程师的支持下进行。错误的短接可能会对评估板造成损坏。
2)准备测试程序

  • 下载测试应用程序

将spi_test.out下载到评估板,参考命令如下:
# tftp –gr spidev_test.out 192.168.18.18
MY-SAMA5 Linux-3.18 2.7.2.1.png

  • 为测试程序添加可执行权限

# chmod +x spidev_test.out
MY-SAMA5 Linux-3.18 2.7.2.2.png
3)执行测试
# ./spidev_test.out -D /dev/spidev32765.0
MY-SAMA5 Linux-3.18 2.7.2.3.png
4)测试结果
如果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测试需要用到示波器,没有示波器的客户请跳过CAN测试。
这里演示CAN0的测试,CAN1测试类似。

测试方法

1)配置CAN0
示例命令如下:
# ip link set can0 up type can bitrate 125000
MY-SAMA5 Linux-3.18 2.8.2.1.png
2)配置连接示波器
将示波器的CH1和CH2连接到评估板的“J12”(在底板正面最上面的蓝色座子)。
配置示波器(不会使用示波器的客户请找硬件工程师协助)。
3)执行测试命令
# cansend can0 5A1#11.2233.44556677.88
MY-SAMA5 Linux-3.18 2.7.2.2.png
4)测试结果
执行测试命令的同时会在示波器上看到波形的变化。

WIFI测试

1)在网盘“4_烧录支持/mysama5ek200_image”下载编译好的 WIFI 驱动模块“8188eu.ko”。
2)把 8188eu.ko 传输到开发板的 “~/my-demo/linux-3.18/” 目录。
3)测试
# insmod ~/my-demo/linux-3.18/8188eu.ko
# wpa_passphrase WIFI名称 WIFI密码 > /etc/wpa_supplicant.conf
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B
# udhcpc -i wlan0