Difference between revisions of "iMX6 TinyRex Lite Accessing and Testing Peripherals"

From Voipac Wiki
Jump to navigation Jump to search
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:iMX6 TinyRex Development kit]]
+
[[Category:iMX6 TinyRex Development Kit]]
 
[[Category:iMX6 TinyRex Lite]]
 
[[Category:iMX6 TinyRex Lite]]
 
[[Category:iMX6 TinyRex Peripherals]]
 
[[Category:iMX6 TinyRex Peripherals]]
Line 5: Line 5:
 
<div style="float:right">__TOC__</div>
 
<div style="float:right">__TOC__</div>
  
Elemental operations of iMX6 TinyRex Development kit interfaces in Lite configuration are shown on this page. For more specified information such as HDMI Input port or Wireless oprions, refer to the dedicated [[iMX6 TinyRex Lite#Peripherals|Peripherals section]].
+
Elemental operations of iMX6 TinyRex Development Kit interfaces in Lite configuration are shown on this page. For more specified information such as Wireless options, refer to the dedicated [[iMX6 TinyRex Lite#Peripherals|Peripherals section]].
  
 
== Prerequisites ==
 
== Prerequisites ==
Line 11: Line 11:
 
* DC power supply (5V, 2A)
 
* DC power supply (5V, 2A)
 
* iMX6 TinyRex Module Lite
 
* iMX6 TinyRex Module Lite
* iMX6 TinyRex Baseboard
+
* iMX6 TinyRex Base Board
  
 
=== Peripherals and Accessories ===
 
=== Peripherals and Accessories ===
 
* 1x FullHD monitor with Audio output
 
* 1x FullHD monitor with Audio output
* 1x HDMI signal generator (such as PC with HDMI interface or GoPro camera)
 
 
* 1x MicroSD card
 
* 1x MicroSD card
 
* 1x MiniPCIe WiFi card
 
* 1x MiniPCIe WiFi card
* 1x RPi camera module
 
 
* 2x USB FLASH drive
 
* 2x USB FLASH drive
  
 
=== Cables ===
 
=== Cables ===
 
* HDMI cable
 
* HDMI cable
* Micro HDMI cable
 
 
* Micro USB cable
 
* Micro USB cable
 
* USB to UART cable
 
* USB to UART cable
Line 113: Line 110:
 
root@imx6-tinyrexlite:~#  can0  123  [4]  DE AD BE EF
 
root@imx6-tinyrexlite:~#  can0  123  [4]  DE AD BE EF
 
</syntaxhighlight>
 
</syntaxhighlight>
 
== Camera Input  ==
 
'''''Input:''''' Connect RPi camera module into CSI interface and check if it is detected on I2C bus<br />
 
'''''Output:''''' I2C address 0x36 is occupied and under use
 
<syntaxhighlight lang="bash">
 
root@imx6-tinyrexlite:~# i2cdetect -y 1
 
    0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
 
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 
30: -- -- -- -- -- -- UU -- -- -- 3a -- -- -- -- --
 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 
70: -- -- -- -- -- -- -- --
 
</syntaxhighlight><br/>
 
 
'''''Input:''''' Connect RPi camera module into CSI interface and check kernel modules<br />
 
'''''Output:''''' Device driver ov5647_camera_mipi_int(or ov5647_camera_mipi) is loaded
 
<syntaxhighlight lang="bash">
 
root@imx6-tinyrexlite:~# lsmod
 
Module                  Size  Used by
 
mxc_v4l2_capture      28532  2
 
ipu_bg_overlay_sdc      5401  1 mxc_v4l2_capture
 
ipu_still              2528  1 mxc_v4l2_capture
 
ipu_prp_enc            5943  1 mxc_v4l2_capture
 
ipu_csi_enc            3863  1 mxc_v4l2_capture
 
ipu_fg_overlay_sdc      6217  1 mxc_v4l2_capture
 
ov5647_camera_mipi    30980  0
 
adv7610_video          6270  0
 
v4l2_int_device        2930  3 ov5647_camera_mipi_int,adv7610_video,mxc_v4l2_capture
 
mxc_dcic                6569  0
 
evbug                  1875  0
 
</syntaxhighlight><br />
 
 
'''''Input:''''' Connect RPi camera module into CSI interface and capture image<br />
 
'''''Output:''''' The image is displayed on HDMI monitor
 
<syntaxhighlight lang="bash">
 
root@imx6-tinyrexlite:~# echo 2 > /sys/bus/i2c/devices/1-0036/ov5647_mode
 
root@imx6-tinyrexlite:~# gst-launch-1.0 v4l2src device="/dev/video1" ! video/x-bayer,width=1920,height=1080,framerate=30/1 ! queue ! bayer2rgb ! videoconvert ! fbdevsink
 
display(/dev/fb0) resolution is (1920x1080).
 
ipu_csi_window_size_crop: Error left=0 top=56595559
 
ERROR: unrecognized std! 0 (PAL=ff, NTSC=b000
 
 
(gst-plugin-scanner:1175): GStreamer-CRITICAL **: gst_caps_simplify: assertion 'GST_IS_CAPS (caps)' failed
 
 
(gst-plugin-scanner:1175): GStreamer-CRITICAL **: gst_caps_append: assertion 'GST_IS_CAPS (caps2)' failed
 
 
(gst-plugin-scanner:1175): GStreamer-CRITICAL **: gst_caps_simplify: assertion 'GST_IS_CAPS (caps)' failed
 
 
(gst-plugin-scanner:1175): GStreamer-CRITICAL **: gst_caps_append: assertion 'GST_IS_CAPS (caps2)' failed
 
ipu_csi_window_size_crop: Error left=0 top=56595559
 
ipu_csi_window_size_crop: Error left=0 top=56595559
 
Setting pipeline to PAUSED ...
 
Pipeline is live and does not need PREROLL ...
 
Setting pipeline to PLAYING ...
 
New clock: GstSystemClock
 
ERROR: v4l2 capture: unsupported ioctrl!
 
WARNING: from element /GstPipeline:pipeline0/GstFBDEVSink:fbdevsink0: A lot of buffers are being dropped.
 
Additional debug info:
 
/home/marek/workdir/imx6/yocto/fsl-release-bsp-tinyrex/build-x11/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer1.0/1.4.1-r0/gstreamer-1.4.1/libs/gst/base/gstbasesin:
 
There may be a timestamping problem, or this computer is too slow.
 
power_down_callback: ipu0/csi0
 
^Chandling interrupt.
 
Interrupt: Stopping pipeline ...
 
Execution ended after 0:00:19.269515335
 
Setting pipeline to PAUSED ...
 
Setting pipeline to READY ...
 
Setting pipeline to NULL ...
 
Freeing pipeline ...
 
power_down_callback: ipu0/csi1
 
</syntaxhighlight><br />
 
 
=== Alternative test ===
 
'''''Input:''''' Connect RPi camera module into CSI interface and capture image<br />
 
'''''Output:''''' The image is displayed on HDMI monitor
 
<syntaxhighlight lang="bash">
 
root@imx6-tinyrexlite:~# echo 1 > /sys/bus/i2c/devices/1-0036/ov5647_mode
 
root@imx6-tinyrexlite:~# gst-launch-1.0 v4l2src device="/dev/video1" ! video/x-bayer,width=1280,height=720,framerate=30/1 ! queue ! bayer2rgb ! videoconvert ! fbdevsink
 
ipu_csi_window_size_crop: Error left=0 top=56595559
 
Setting pipeline to PAUSED ...
 
Pipeline is live and does not need PREROLL ...
 
Setting pipeline to PLAYING ...
 
New clock: GstSystemClock
 
ERROR: v4l2 capture: unsupported ioctrl!
 
power_down_callback: ipu0/csi0
 
^Chandling interrupt.
 
Interrupt: Stopping pipeline ...
 
Execution ended after 0:00:09.472884668
 
Setting pipeline to PAUSED ...
 
Setting pipeline to READY ...
 
Setting pipeline to NULL ...
 
Freeing pipeline ...
 
root@imx6-tinyrexlite:~# power_down_callback: ipu0/csi1
 
</syntaxhighlight>
 
 
Software integration and additional commands or settings of CSI camera interface are available on separate [[iMX6 TinyRex Camera|iMX6 TinyRex Camera page]].
 
 
== HDMI Input ==
 
'''''Input:''''' Plug HD signal generator (1280x720p) (e.g. HDMI output from a PC or GoPro camera) into micro HDMI Input connector and capture input signal<br />
 
'''''Output:''''' Input signal is visible on the connected monitor
 
<syntaxhighlight lang="bash">
 
root@imx6-tinyrexlite:~# gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-raw,width=1280,height=720,framerate=30/1 ! videoconvert ! autovideosink
 
Setting pipeline to PAUSED ...
 
display(/dev/fb0) resolution is (1920x1080).
 
====== OVERLAYSINK: 4.1.4 build on Jan 23 2017 13:24:12. ======
 
display(/dev/fb0) resolution is (1920x1080).
 
display(/dev/fb0) resolution is (mxc_v4l2_output v4l2_out: Bypass IC.
 
1920x1080).
 
mxc_v4l2_output v4l2_out: Bypass IC.
 
Pipeline is live and does not need PREROLL ...
 
Setting pipeline to PLAYING ...
 
New clock: GstSystemClock
 
ERROR: v4l2 capture: unsupported ioctrl!
 
ERROR: v4l2 capture: unsupported ioctrl!
 
^Chandling interrupt.
 
Interrupt: Stopping pipeline ...
 
Execution ended after 0:00:09.216782001
 
Setting pipeline to PAUSED ...
 
Setting pipeline to READY ...
 
Total showed frames (256), display master blited (256), playing for (0:00:09.217285001), fps (27.774).
 
Setting pipeline to NULL ...
 
Freeing pipeline ...
 
</syntaxhighlight>
 
 
or
 
 
<syntaxhighlight lang="bash">
 
root@imx6-tinyrexlite:~# gst-launch imxv4l2src ! autovideosink
 
ipu_csi_window_size_crop: Error left=0 top=56595559
 
MAX resolution 1920x1080
 
 
(gst-plugin-scanner:1024): GLib-GObject-WARNING **: cannot register existing type 'GstVorbisDec'
 
 
(gst-plugin-scanner:1024): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
 
 
(gst-plugin-scanner:1024): GStreamer-CRITICAL **: gst_element_register: assertion 'g_type_is_a (type, GST_TYPE_ELEMENT)' failed
 
power_down_callback: ipu0/csi0
 
MFW_GST_V4LSRC_PLUGIN 4.0.3 build on Jan 19 2016 21:47:11.
 
Setting pipeline to PAUSED ...
 
ipu_csi_window_size_crop: Error left=0 top=56595559
 
MFW_GST_V4LSINK_PLUGIN 4.0.3 build on Jan 19 2016 21:46:56.
 
ipu_csi_window_size_crop: Error left=0 top=56595559
 
ipu_csi_window_size_crop: Error left=0 top=56595559
 
Pipeline is live and does not need PREROLL ...
 
Setting pipeline to PLAYING ...
 
New clock: GstSystemClock
 
full screen size:1920x1080
 
[V4L Update Display]: left=0, top=0, width=1920, height=1080
 
set v4l display crop sucessfully
 
set v4l rotate sucessfully
 
>>V4L_SINK: Actually buffer status:
 
        hardware buffer : 12
 
        software buffer : 0
 
power_down_callback: ipu0/csi1
 
imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x00080000
 
imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x00080000
 
imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x00080000
 
imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x00080000
 
imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x00080000
 
imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x00080000
 
Caught interrupt -- handling interrupt.
 
Interrupt: Stopping pipeline ...
 
 
(gst-launch-0.10:1023): GLib-CRITICAL **: Source ID 16 was not found when attempting to remove it
 
Execution ended after 186220685689 ns.
 
Setting pipeline to PAUSED ...
 
Running time 0:03:06.221020022 render fps 16.131
 
Setting pipeline to READY ...
 
Setting pipeline to NULL ...
 
Total rendered:3004
 
[--->FINALIZE v4l_sink
 
Freeing pipeline ...
 
power_down_callback: ipu0/csi0
 
</syntaxhighlight><br />
 
 
Software integration of HDMI Receiver ADV7610, additional commands and operation options are available on separate [[iMX6 TinyRex HDMI Input|iMX6 TinyRex HDMI Input page]].
 
  
 
== HDMI Output ==
 
== HDMI Output ==
'''''Input:''''' Connect LCD monitor to baseboard<br />
+
'''''Input:''''' Connect LCD monitor to the base board<br />
'''''Output:''''' Desktop UI is correctly displayed<br />
+
'''''Output:''''' Desktop UI is displayed correctly<br />
[[image:iMX6_TinyRex_Development_kit-HDMI_terminal.jpg|600px]]
+
[[image:iMX6_TinyRex_Development_Kit-HDMI_terminal.png|580px]]
  
 
== I2C ==
 
== I2C ==
Line 314: Line 134:
  
 
'''''Input:''''' Scan I2C bus 1<br />
 
'''''Input:''''' Scan I2C bus 1<br />
'''''Output:''''' Available devices:<br />
+
'''''Output:''''' The bus is reserved for external use
* CSI Camera (0x36)
 
* HDMI Input HDCP (0x3a)
 
* HDMI Input EDID (0x50)
 
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
root@imx6-tinyrexlite:~# i2cdetect -y 1
 
root@imx6-tinyrexlite:~# i2cdetect -y 1
Line 324: Line 141:
 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
30: -- -- -- -- -- -- UU -- -- -- 3a -- -- -- -- --  
+
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
+
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
 
70: -- -- -- -- -- -- -- --     
 
70: -- -- -- -- -- -- -- --     
Line 332: Line 149:
  
 
'''''Input:''''' Scan I2C bus 2<br />
 
'''''Input:''''' Scan I2C bus 2<br />
'''''Output:''''' Available devices:<br />
+
'''''Output:''''' The bus is reserved for external use
* HDMI Input chip (0x22 0x26 0x32 0x34 0x36 0x3e 0x40 0x4c)
 
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
root@imx6-tinyrexlite:~# i2cdetect -y 2
 
root@imx6-tinyrexlite:~# i2cdetect -y 2
Line 339: Line 155:
 
00:          -- -- -- -- -- -- -- -- -- -- -- -- --  
 
00:          -- -- -- -- -- -- -- -- -- -- -- -- --  
 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
20: -- -- UU -- -- -- UU -- -- -- -- -- -- -- -- --  
+
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
30: -- -- UU -- UU -- UU -- -- -- -- -- -- -- UU --  
+
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
40: UU -- -- -- -- -- -- -- -- -- -- -- UU -- -- --  
+
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
Line 356: Line 172:
 
0-0057
 
0-0057
 
root@imx6-tinyrexlite:~# ls /sys/bus/i2c/devices/i2c-1 | grep ^[1]
 
root@imx6-tinyrexlite:~# ls /sys/bus/i2c/devices/i2c-1 | grep ^[1]
1-0036
+
 
 
root@imx6-tinyrexlite:~# ls /sys/bus/i2c/devices/i2c-2 | grep ^[2]
 
root@imx6-tinyrexlite:~# ls /sys/bus/i2c/devices/i2c-2 | grep ^[2]
2-0022
+
 
2-0026
 
2-0032
 
2-0034
 
2-0036
 
2-003e
 
2-0040
 
2-004c
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 380: Line 189:
 
== DDR memory ==
 
== DDR memory ==
 
'''''Input:''''' None<br />
 
'''''Input:''''' None<br />
'''''Output:''''' Memory test passes without any error
+
'''''Output:''''' Memory test passes without any errors
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
root@imx6-tinyrexlite:~# memtester 2G 1
 
root@imx6-tinyrexlite:~# memtester 2G 1
Line 604: Line 413:
  
 
== UART serial console ==
 
== UART serial console ==
'''''Input:''''' Connect USB to UART cable into baseboard connector and open serial console with baud rate 115200 8n1<br />
+
'''''Input:''''' Connect USB to UART cable into the base board connector and open serial console with baud rate 115200 8n1<br />
 
'''''Output:''''' The board is controlled and responsive to serial terminal commands
 
'''''Output:''''' The board is controlled and responsive to serial terminal commands
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 639: Line 448:
  
 
== USB OTG ==
 
== USB OTG ==
'''''Input:''''' Load USB serial gadget driver and connect baseboard to host PC over micro USB cable<br />
+
'''''Input:''''' Load USB serial gadget driver and connect base board to host PC over micro USB cable<br />
 
'''''Output:''''' Driver is successfully loaded and host PC detects a new USB serial gadget device<br /><br />
 
'''''Output:''''' Driver is successfully loaded and host PC detects a new USB serial gadget device<br /><br />
  
iMX6 Rex Development kit:
+
iMX6 Rex Development Kit:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
root@imx6-tinyrexlite:~# modprobe -i g_serial
 
root@imx6-tinyrexlite:~# modprobe -i g_serial

Latest revision as of 08:53, 24 April 2022

Elemental operations of iMX6 TinyRex Development Kit interfaces in Lite configuration are shown on this page. For more specified information such as Wireless options, refer to the dedicated Peripherals section.

Prerequisites

Hardware

  • DC power supply (5V, 2A)
  • iMX6 TinyRex Module Lite
  • iMX6 TinyRex Base Board

Peripherals and Accessories

  • 1x FullHD monitor with Audio output
  • 1x MicroSD card
  • 1x MiniPCIe WiFi card
  • 2x USB FLASH drive

Cables

  • HDMI cable
  • Micro USB cable
  • USB to UART cable

User button

Input: Press the USER button
Output: Button events 1 and 0 are generated

root@imx6-tinyrexlite:~# evtest /dev/input/by-path/platform-gpio-keys*-event
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100pio-keys.16-event .
Input device name: "gpio-keys.16"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 116 (KEY_POWER)
Properties:
Testing ... (interrupt to exit)
Event: time 1453240251.571826, type 1 (EV_KEY), code 116 (KEY_POWER), value 1
Event: time 1453240251.571826, -------------- EV_SYN ------------
Event: time 1453240251.711820, type 1 (EV_KEY), code 116 (KEY_POWER), value 0
Event: time 1453240251.711820, -------------- EV_SYN ------------

Alternative test

Input: Press the USER button
Output: Button events 1 and 0 are generated

root@imx6-tinyrexlite:~# hexdump -C /dev/input/event0 
00000000  18 f4 d1 56 47 40 09 00  01 00 74 00 01 00 00 00  |...VG@....t.....|
00000010  18 f4 d1 56 47 40 09 00  00 00 00 00 00 00 00 00  |...VG@..........|
00000020  18 f4 d1 56 17 15 0b 00  01 00 74 00 00 00 00 00  |...V......t.....|
00000030  18 f4 d1 56 17 15 0b 00  00 00 00 00 00 00 00 00  |...V............|

Reset button

Input: Press the RESET button
Output: Module will execute bootloader immediately with "Reset cause: POR"
Note: Module should never freeze or hang after the reset button was pressed. Testing the operation 10 times gives a reliable result

U-Boot 2014.10 (Jan 19 2016 - 20:37:48)

CPU:   Freescale i.MX6SOLO rev1.1 at 792 MHz
Reset cause: POR
Board: MX6 TinyRex - lite
I2C:   ready
DRAM:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   FEC [PRIME]
Hit any key to stop autoboot:  0

CAN

Input: None
Output: Device driver is available

root@imx6-tinyrexlite:~# ip addr show dev can0
2: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
    link/can


Input: Connect a pair of iMX6 TinyRex Development boards and a couple of dedicated CAN evaluation modules
Output: Boards communicate between each other. Sent messages are received successfully

Board 1 (receiver) commands and outputs:

root@imx6-tinyrexlite:~# ip link set can0 type can bitrate 1000000
root@imx6-tinyrexlite:~# ip link set can0 up
flexcan 2090000.flexcan can0: writing ctrl=0x01232054
root@imx6-tinyrexlite:~# candump can0 &
[1] 833
root@imx6-tinyrexlite:~#   can0  123   [4]  DE AD BE EF

Board 2 (transmitter and receiver) commands and outputs:

root@imx6-tinyrexlite:~# ip link set can0 type can bitrate 1000000
root@imx6-tinyrexlite:~# ip link set can0 up
flexcan 2090000.flexcan can0: writing ctrl=0x01232054
root@imx6-tinyrexlite:~# candump can0 &
[1] 847
root@imx6-tinyrexlite:~# cansend can0 123#DEADBEEF
root@imx6-tinyrexlite:~#   can0  123   [4]  DE AD BE EF

HDMI Output

Input: Connect LCD monitor to the base board
Output: Desktop UI is displayed correctly
iMX6 TinyRex Development Kit-HDMI terminal.png

I2C

Input: Scan I2C bus 0
Output: Available devices:

  • HDMI Output EDID (0x50)
root@imx6-tinyrexlite:~# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: 30 -- -- -- -- -- -- 37 -- -- 3a -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

Input: Scan I2C bus 1
Output: The bus is reserved for external use

root@imx6-tinyrexlite:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

Input: Scan I2C bus 2
Output: The bus is reserved for external use

root@imx6-tinyrexlite:~# i2cdetect -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

Altarnative test

Input: List I2C bus 0, 1 and 2
Output: Available devices are displayed

root@imx6-tinyrexlite:~# ls /sys/bus/i2c/devices/i2c-0 | grep ^[0]
0-0050
0-0056
0-0057
root@imx6-tinyrexlite:~# ls /sys/bus/i2c/devices/i2c-1 | grep ^[1]

root@imx6-tinyrexlite:~# ls /sys/bus/i2c/devices/i2c-2 | grep ^[2]

User LED

Input: None
Output: Red LED assembled on module switches from ON to OFF state with heartbeat pulses afterwards

root@imx6-tinyrexlite:~# echo -n "none" > /sys/devices/soc0/leds*/leds/module-led/trigger 
root@imx6-tinyrexlite:~# echo -n "1" > /sys/devices/soc0/leds*/leds/module-led/brightness
root@imx6-tinyrexlite:~# echo -n "0" > /sys/devices/soc0/leds*/leds/module-led/brightness
root@imx6-tinyrexlite:~# echo -n "heartbeat" >  /sys/devices/soc0/leds*/leds/module-led/trigger

DDR memory

Input: None
Output: Memory test passes without any errors

root@imx6-tinyrexlite:~# memtester 2G 1
memtester version 4.1.3 (32-bit)
Copyright (C) 2010 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).

pagesize is 4096
pagesizemask is 0xfffff000
want 2048MB (2147483648 bytes)
got  267MB (280412160 bytes), trying mlock ...locked.
Loop 1/1:
  Stuck Address       : ok         
  Random Value        : ok
  Compare XOR         : ok
  Compare SUB         : ok
  Compare MUL         : ok
  Compare DIV         : ok
  Compare OR          : ok
  Compare AND         : ok
  Sequential Increment: ok
  Solid Bits          : ok         
  Block Sequential    : ok         
  Checkerboard        : ok         
  Bit Spread          : ok         
  Bit Flip            : ok         
  Walking Ones        : ok         
  Walking Zeroes      : ok         

Done.


Further information about DDR3 memories and its calibration can be accessed in Memory Calibration details.

PCI Express

The procedure uses a WiFi wireless card to test PCIe interface. More details concerning wireless cards are located on WiFi and Bluetooth Cards page .

Input: Plug Wireless WiFi Link 4965AGN mini PCIe card into mini PCIe slot
Output: Card is detected by system

root@imx6-tinyrexlite:~# lspci 
00:00.0 PCI bridge: Device 16c3:abcd (rev 01)
01:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)

Input: Plug Wireless WiFi Link 4965AGN mini PCIe card into mini PCIe slot
Output: Wireless WiFi card firmware is loaded

root@imx6-tinyrexlite:~# dmesg | grep iwl4965
iwl4965: Intel(R) Wireless WiFi 4965 driver for Linux, in-tree:
iwl4965: Copyright(c) 2003-2011 Intel Corporation
iwl4965 0000:01:00.0: Detected Intel(R) Wireless WiFi Link 4965AGN, REV=0x4
iwl4965 0000:01:00.0: device EEPROM VER=0x36, CALIB=0x5
iwl4965 0000:01:00.0: Tunable channels: 13 802.11bg, 19 802.11a channels
iwl4965 0000:01:00.0: loaded firmware version 228.61.2.24

Input: Plug Wireless WiFi Link 4965AGN mini PCIe card into mini PCIe slot
Output: Card scans neighbour networks

root@imx6-tinyrexlite:~# rfkill unblock wlan
root@imx6-tinyrexlite:~# ip link set wlan0 up
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
root@imx6-tinyrexlite:~# iw dev wlan0 scan
BSS 20:aa:4b:7e:21:97(on wlan0)
        TSF: 4605781864521 usec (53d, 07:23:01)
        freq: 5220
        beacon interval: 100 TUs
        capability: ESS Privacy ShortPreamble (0x0031)
        signal: -76.00 dBm
        last seen: 0 ms ago
        SSID: OpenWrt5g
        Supported rates: 6.0* 9.0 12.0* 18.0 24.0* 36.0 48.0 54.0 
        DS Parameter set: channel 44
        Country: CZ     Environment: Indoor/Outdoor
                Channels [36 - 48] @ 23 dBm
        RSN:     * Version: 1
                 * Group cipher: CCMP
                 * Pairwise ciphers: CCMP
                 * Authentication suites: PSK
                 * Capabilities: 16-PTKSA-RC 1-GTKSA-RC (0x000c)
        WPA:     * Version: 1
                 * Group cipher: CCMP
                 * Pairwise ciphers: CCMP
                 * Authentication suites: PSK
        Extended capabilities: 6
        WMM:     * Parameter version 1
                 * BE: CW 15-1023, AIFSN 3
                 * BK: CW 15-1023, AIFSN 7
                 * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
                 * VO: CW 3-7, AIFSN 2, TXOP 1504 usec

Alternative test

Input: Plug Wireless WiFi Link 4965AGN mini PCIe card into mini PCIe slot
Output: Card scans neighbour networks

root@imx6-tinyrexlite:~# ip link set wlan0 up
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
root@imx6-tinyrexlite:~# iwlist wlan0 scan
wlan0     Scan completed :
          Cell 01 - Address: 20:AA:4B:7E:21:97
                    Channel:44
                    Frequency:5.22 GHz (Channel 44)
                    Quality=38/70  Signal level=-72 dBm  
                    Encryption key:on
                    ESSID:"OpenWrt5g"
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
                              36 Mb/s; 48 Mb/s; 54 Mb/s
                    Mode:Master
                    Extra:tsf=0000072735a29d05
                    Extra: Last beacon: 30ms ago
                    IE: Unknown: 00094F70656E5772743567
                    IE: Unknown: 01088C129824B048606C
                    IE: Unknown: 03012C
                    IE: Unknown: 0706435A20240417
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: WPA Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: 7F080000000000000040
                    IE: Unknown: DD180050F2020101000003A4000027A4000042435E0062322F00

SD card

Input: SD card is plugged in
Output: Files stored on SD card are listed

root@imx6-tinyrexlite:~# dmesg | grep mmc
mmc0: new high speed SD card at address aaaa
mmcblk1: mmc0:aaaa SU02G 1.84 GiB
 mmcblk1: p1
root@imx6-tinyrexlite:~# mount /dev/mmcblk1p1 /media/
root@imx6-tinyrexlite:~# ls -la /media
total 118084
drwxr-xr-x  4 root root        8192 Jan  1  1970 .
drwxr-xr-x 22 root linaro      4096 Dec 20 09:30 ..
-rwxr-xr-x  1 root root   120886176 Dec 22 15:11 78.avi
drwxr-xr-x  8 root root        8192 Oct 10 16:48 Pictures processed
drwxr-xr-x  2 root root        8192 Oct 10 16:44 iMX6 Rex Moduel Layout videos

SPI Flash Memory

Input: Trigger M25P80 flash detection
Output: SPI Flash sst25vf032b is detected

root@imx6-tinyrexlite:~# echo -n "spi0.0" > /sys/bus/spi/drivers/m25p80/unbind
root@imx6-tinyrexlite:~# echo -n "spi0.0" > /sys/bus/spi/drivers/m25p80/bind 
m25p80 spi0.0: found sst25vf032b, expected m25p32
m25p80 spi0.0: sst25vf032b (4096 Kbytes)

Suspend

Input: Put module into suspend state (mem state). Wait 10s and then press USER button
Output: Module wakes up

root@imx6-tinyrexlite:~# echo mem > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.005 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
fec 2188000.ethernet eth0: Graceful transmit stop did not complete!
PM: suspend of devices complete after 31.996 msecs
PM: suspend devices took 0.030 seconds
PM: late suspend of devices complete after 0.511 msecs
PM: noirq suspend of devices complete after 11.941 msecs
Disabling non-boot CPUs ...
PM: noirq resume of devices complete after 20.111 msecs
PM: early resume of devices complete after 0.399 msecs
PM: resume of devices complete after 412.384 msecs
PM: resume devices took 0.410 seconds
Restarting tasks ... done.
root@imx6-tinyrexlite:~#

Input: Put module into suspend state (standby state). Wait 10s and then press USER button
Output: Module wakes up

root@imx6-tinyrexlite:~# echo standby > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.005 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
fec 2188000.ethernet eth0: Graceful transmit stop did not complete!
PM: suspend of devices complete after 31.989 msecs
PM: suspend devices took 0.030 seconds
PM: late suspend of devices complete after 0.532 msecs
PM: noirq suspend of devices complete after 11.862 msecs
Disabling non-boot CPUs ...
PM: noirq resume of devices complete after 20.186 msecs
PM: early resume of devices complete after 0.397 msecs
PM: resume of devices complete after 412.337 msecs
PM: resume devices took 0.410 seconds
Restarting tasks ... done.
root@imx6-tinyrexlite:~#

Input: Set RTC wakeup event after 10s and put module into suspend state (standby state)
Output: Module wakes up by itself

root@imx6-tinyrexlite:~# echo +10 > /sys/class/rtc/rtc0/wakealarm && echo standby > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.005 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
fec 2188000.ethernet eth0: Graceful transmit stop did not complete!
PM: suspend of devices complete after 32.020 msecs
PM: suspend devices took 0.030 seconds
PM: late suspend of devices complete after 0.515 msecs
PM: noirq suspend of devices complete after 11.887 msecs
Disabling non-boot CPUs ...
PM: noirq resume of devices complete after 19.990 msecs
PM: early resume of devices complete after 0.392 msecs
PM: resume of devices complete after 412.311 msecs
PM: resume devices took 0.410 seconds
Restarting tasks ... done.
root@imx6-tinyrexlite:~#

UART serial console

Input: Connect USB to UART cable into the base board connector and open serial console with baud rate 115200 8n1
Output: The board is controlled and responsive to serial terminal commands

root@imx6-tinyrexlite:~# uname -a
Linux imx6-tinyrexlite 3.14.43-yocto+g4b13aeb #1 SMP PREEMPT Tue Jan 19 21:42:39 CET 2016 armv7l GNU/Linux

USB

Input: Plug USB flash drive with single VFAT partition into bottom USB connector
Output: Filesystem recognises the flash drive and automatically mounts it

root@imx6-tinyrexlite:~# lsusb
Bus 001 Device 002: ID 125f:d31a A-DATA Technology Co., Ltd. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@imx6-tinyrexlite:~# mount | grep /run/media/sd*
/dev/sda1 on /run/media/sda1 type vfat (rw,relatime,gid=6,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

Input: Generate a dummy file and copy it into USB flash drive
Output: Generated file and copied file have the same checksum

root@imx6-tinyrexlite:~# rm -f file.txt /run/media/sda1/file.txt 
root@imx6-tinyrexlite:~# dd if=/dev/urandom of=file.txt count=1024 bs=1024
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.435065 s, 2.4 MB/s
root@imx6-tinyrexlite:~# cp file.txt /run/media/sda1/
root@imx6-tinyrexlite:~# md5sum file.txt /run/media/sda1/file.txt 
b8e8141b61813fcc08a6164833729e3b  file.txt
b8e8141b61813fcc08a6164833729e3b  /run/media/sda1/file.txt
root@imx6-tinyrexlite:~# rm file.txt /run/media/sda1/file.txt

USB OTG

Input: Load USB serial gadget driver and connect base board to host PC over micro USB cable
Output: Driver is successfully loaded and host PC detects a new USB serial gadget device

iMX6 Rex Development Kit:

root@imx6-tinyrexlite:~# modprobe -i g_serial
g_serial gadget: Gadget Serial v2.4
g_serial gadget: g_serial ready
root@imx6-tinyrexlite:~# g_serial gadget: high-speed config #2: CDC ACM config

Host PC:

user@voipac:~$ lsusb 
...
Bus 001 Device 014: ID 0525:a4a7 Netchip Technology, Inc. Linux-USB Serial Gadget (CDC ACM mode)
...