Z3 Technology Z3-DM368-RPS User manual

User’s Guide
Low-Power H.264 HD Multimedia System
High Definition Video Processor Module
DM368 Rapid Prototyping System
Model Name: Z3-DM368-RPS
DOC-USR-0049-01
Manual Version 1.06.03
Software Version 1.06.03
November 11, 2013
Before attempting to connect or operate this product, please read these
instructions carefully and save the manual for future use.
This document contains proprietary and confidential information of Z3 Technology, LLC ("Z3"). This document may
not be used, reproduced, disclosed, or disseminated to anyone without the prior written approval of an authorized
representative of Z3.

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
2
Revision History
Version
Date
Change Note
Author
1.00.00
06/03/09
Original
AC
1.00.01
06/05/09
Many corrections, additions, formatting, suggestions
BM
1.01.00
06/06/09
Corrections
AC
1.02.00
10/21/09
Updating information
BM
1.03.00
02/05/10
Updated version from Z3-DM365 to Z3-DM368
AC
1.04.00
09/25/10
Updated Basic Setup and Software Menu System sections
AC
1.05.00
07/09/13
Updated format and technical info
RC
1.06.00
07/11/13
Formatting, Doc P/N
MC
1.06.03
11/11/13
Updated to same format as other Z3 User’s Guides, updated
information to reflect latest release.
RC

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
3
TABLE OF CONTENTS
1.!General Description.................................................................................................................................... 5!
2.!Included Parts List ...................................................................................................................................... 7!
3.!Features........................................................................................................................................................ 8!
3.1 !Supported Input Resolutions ............................................................................................................ 8!
3.2 !Supported Output Resolutions ......................................................................................................... 8!
4.!Untarring and Building the Sample Code................................................................................................ 9!
4.1!Preparing the Linux Environment.................................................................................................... 9!
4.2!Making the Directories and Running the Make Script .................................................................. 9!
5.!Code Overview .......................................................................................................................................... 11!
6.!Running the Encode Demo ...................................................................................................................... 12!
6.1!Set up the HD Source....................................................................................................................... 12!
6.2!Connect the Board ........................................................................................................................... 12!
6.3!Set up the Terminal Window.......................................................................................................... 13!
6.4!Power on the board ......................................................................................................................... 14!
6.5!Ensure your PC has a proper IP address ....................................................................................... 15!
6.6!Run the Web Interface to Configure CH1 .................................................................................... 15!
6.7!Run VLC to View Stream ................................................................................................................. 17!
6.8!Streaming RTP .................................................................................................................................. 18!
7.!Exercising Other Features ....................................................................................................................... 19!
8.!Running The Code You Built on the Board ........................................................................................... 20!
8.1!Method 1: Updating the Image File ............................................................................................. 20!
8.2!Method 2: Running Your Code through TFTP/NFS .................................................................... 22!
8.3!Other available u-boot commands................................................................................................ 26!
9.!Summary of Options ................................................................................................................................. 27!
9.1!Encode................................................................................................................................................ 27!
9.2!Decode ............................................................................................................................................... 29!
9.3!Both Encode and Decode ................................................................................................................ 31!
Appendix A: Example of Successful Boot Log ............................................................................................ 32!
Appendix B: Updating using an SD card ...................................................................................................... 35!
Appendix C: Troubleshooting........................................................................................................................ 36!

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
4
LIST OF FIGURES
Figure 1 Z3-DM368-MOD......................................................................................... 5
Figure 2 Z3-DM368-RPS App Board ............................................................................ 6
Figure 3 Sample Content of Images Directory after Successful Build ...................................10
Figure 4 Demo Connections for Z3-DM368-RPS .............................................................12
Figure 5 Mapping of A/V Cable to Component Jacks ......................................................13
Figure 6 Z3-DM368-RPS Main Menu ...........................................................................14
Figure 7 Web Interface Main Screen .........................................................................15
Figure 8 Modifications for Encoding Demonstration .......................................................16
Figure 9 VLC Network Screen Setting to Receive Z3 TS Stream .........................................17
Figure 10 Example of Z3 Video Streaming on VLC (UDP) .................................................17
Figure 11 Example of Z3 Video Streaming to VLC (RTP) ..................................................18
Figure 12 Updating the Device Firmware from the Web Interface ......................................20
Figure 13 Browsing for the Image File in the Updater ....................................................21
Figure 14 Editing uboot_envDM368.txt .....................................................................24
Figure 15 Minicom Terminal Settings ........................................................................25
Figure 16 Minicom Paste File Selection......................................................................25
Figure 17 Example of Successful u-boot Configuration ...................................................26

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
5
1. General Description
Measuring only 44x68mm, the Z3-DM368-MOD is the most compact production-ready DM368 based video
encoder / decoder system-on-module on the market. The module has on-board high definition analog
component output, standard definition NTSC/PAL composite video input and output, as well as stereo
audio input and output. It also includes a micro-SD card socket, USB 2.0, Ethernet, a real-time clock, and
an IR sensor.
The Z3-DM368-MOD features a unique edge connector design which supplies all interfaces native to the
DM368 to an application board mate, including I2C, SPI, LCD, USB, Serial, SD/MMC/MS, digital video, digital
audio, analog composite and component video. Figure 1 below shows the Z3-DM368-MOD:
An application board, the Z3-DM365-APP, is included with the Z3-DM368-RPS.This application board uses
the I/O expansion capability of the Z3-DM368-MOD to implement additional functions not present in the
base module. The Z3-DM365-APP application board has 2 HDMI inputs, 2 YPbPr component inputs, 2 analog
stereo audio inputs, an SD card jack and 2 bi-color LEDs. Figure 2 on the next page shows the Z3-DM365-
APP application board.
A Linux-based SDK, additional design services, and support are available from Z3 Technology. Please
contact Z3 at http://www.z3technology.com or e-mail at sales@z3technology.com.
68 mm
44 mm
Figure 1Z3-DM368-MOD

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
6
Figure 2Z3-DM368-RPS App Board
Component In
Component Out
Composite In
Composite Out
Headphone Out
Serial
5V Power
MicroSD
GPIOs
HDMI Out
Ethernet
SD Card
USB

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
7
2. Included Parts List
!1 x Z3-DM368-MOD-01 + 1 Z3-DM365-APP-03
!1 x 5V Power Supply
!1 x Serial Cable
!1 x Gender Changer (to connect to serial cable)
!2 x Video Cables
!1 Content SD Card
!1 x Z3-368-RPS Documentation

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
8
3. Features
!H.264 video encode and decode up to 1080p30
!On-board standard definition video ADC with 2 composite inputs or 1 S-Video input
!On-board standard definition composite and high definition component inputs
!On-board stereo audio ADC/DAC with 6 line level inputs and 4 outputs
!Low power consumption
!Built-in Ethernet MAC, on-board PHY
!USB 2.0 OTG support
!Edge Connector Expansion:
oDigital Video input interface for use with CMOS sensors or other devices
oDigital Video output interface for use with LCD or other devices
oComposite Video input/output
oComponent Analog Video output
oStereo Audio input (3 sets of stereo inputs)
oStereo Audio output, line level plus independent output for headphones
oFast Ethernet I/O
oTwo MMC/SD card ports (one with support for Memory Stick)
oTwo UARTs for serial interface
oGeneral Purpose I/O
oSPI and I2C ports
3.1 Supported Input Resolutions
Composite: 576i25, 480i30, and 480i29.97
Component: WQVGA , QVGA, SIF, CIF, 2SIF, 2-CIF, 640x360, VGA, 4CIF, PAL PAR 12:11, 576i25, 480i29.97,
16:9 PAL, 4/5 720p, 720p, 3/4 1080i, 1080p, and 1080i
3.2 Supported Output Resolutions
Composite: 576i25, 480i30, and 480i29.97
Component: 1080i30, 1080i29.97, 720p60, 720p59.94, 480p60, 480i30, and 480i29.97

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
9
4. Untarring and Building the Sample Code
4.1 Preparing the Linux Environment
Prior to building the Z3 sample code, certain modules are required. In Ubuntu 10.x or later, the following
command can be used to get the required modules:
sudo apt-get install bison flex mtd-utils liblzo2-dev uuid-dev zlib1g-dev
libpcre3-dev autoconf autoconf-archive automake automake1.9 automake1.9-doc
libtool libtool-doc gstreamer-tools libglib2.0-dev mono-gmcs gperf
In Fedora, the command would be:
sudo yum install bison flex mtd-utils mtd-utils-ubi lzo-devel libuuid-devel
pcre-devel automake automake17 automake14 autoconf libtool gstreamer-tools
glib2-devel mono-core gperf
If you are running a 64-bit OS, it may be necessary to install some 32-bit libraries for the cross-compiling
toolchain. You can determine whether your OS is 64-bit by using the “uname –p” command. A 64-bit OS
will return “x86_64,” while a 32-bit OS will return “i386”, “i586”, or “i686”.
For 64-bit Ubuntu, you can get the necessary libraries by typing:
# sudo apt-get install ia32-libs
For 64-bit Fedora, you can type:
# sudo yum install glibc.i686
4.2 Making the Directories and Running the Make Script
The software provided will allow you to re-create the pre-installed software of the Z3-DM368-RPS starting
from the included source code.
On a PC running Linux, create a directory where the released materials are going to be located:
# mkdir /home/z3/z3-dm368
Copy the released tar archive to that directory (note: could also be RPS-SRC, name may slightly vary).
# cp SW-3D1-00013-01_DM368-RPS-20130618.tar.bz2 /home/z3/z3-dm368
Untar the archive (name of tar file may slightly vary):
# tar -xvjf SW-3D1-00013-01_DM368-RPS-20130618.tar.bz2
Note: Untarring could take 5 to 10 minutes.
Then go into the directory just created and run the build script (directory name may slightly vary):
# cd z3-dm368-RPS-20130618
# ./makeall

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
10
Note: Building can take around 30-40 minutes. You will also need to type in the sudo password a few
times towards the end of the build.
The outcome of the build process should be newly created image files in the images directory. You can
confirm this by doing the following:
# cd images
# ls -alt
The result should be something like the following. Note that actual filenames, dates, and times will differ.
Figure 3Sample Content of Images Directory after Successful Build

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
11
5. Code Overview
Once you have untarred the code, you will see the following top-level directories:
build-tools Config files and scripts for building the codebase
dvsdk The DM368 DVSDK from TI with changes for Z3 Technology hardware
filesys The root file system for the DM368 target
flash_utils The UBL and a tool to write it into the board’s NAND flash
kernels The kernel source tree, with added support for the Z3-DM368-MOD
sysapps Source code for the system applications placed in the basic root file system
toolchain ARM compilers, binutils and other build tools
u-boot The u-boot source tree, with support for the Z3-DM368-MOD
z3apps Z3 demo applications, drivers, and utilities

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
12
6. Running the Encode Demo
This section gives step-by-step instructions on taking the Z3-DM368-RPS and using it to stream 1080p or
1080i video to VLC running on your PC.
6.1 Set up the HD Source
(1) Select an HD source with component output.
-Power on the HD Source
-Connect component to a monitor
-Set the HD Source to 1080p or 1080i output
-Select content you would like to stream
6.2 Connect the Board
For these steps, please refer to Figure 4.
(2) Connect the supplied 2.5mm serial cable and NULL modem adapter to your PC.
(3) Take the component cable and connect it to Component In of the board. The red/white/yellow maps
to the red/blue/green of Component as follows:
Figure 4Demo Connections for Z3-DM368-RPS
Component In
Serial
5V Power
Ethernet

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
13
(4) If there is audio, connect it to the red and white audio connectors on the source. Use the red and
white connectors on the video cable (leave the yellow connector unconnected).
(5) Connect the Ethernet
The next step is to set up a terminal to view the activity of the board …
6.3 Set up the Terminal Window
(6) If you are running from a Windows PC, run TeraTerm. Select “Setup – Serial Port” and set the
following:
Port: Whichever serial port the port is connected to
Baud Rate: 115200
Data: 8-bit
Parity: None
Stop: 1-bit
Flow Control: None
(7) If you are running from Linux, type:
# sudo minicom –s
And then configure by doing the following:
-Select “Serial Port Setup”
-Ensure the right Serial Device is specified (typically “/dev/ttyUSB0”)
-Set option E (“Bps/Par/Bits”) to 115200 8N1
-Press <return>
Figure 5Mapping of A/V Cable to Component Jacks

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
14
-Select “Exit”
6.4 Power on the board
(8) Connect the 5V power supply and turn on the switch. If all is configured properly, you should see the
board booting up within the terminal window. After about a minute, you will see the RPS Main Menu:
Figure 6Z3-DM368-RPS Main Menu

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
15
Note the local IP address and netmask (in this example, it is 192.168.0.169 and 255.255.0.0). This is the
IP address of the board. You will need this later to access the web interface.
6.5 Ensure your PC has a proper IP address
(9) To be able to communicate with the board, the PC that you are communicating from needs to have at
least the same first 2 parts of the IP address. For example, if the board has an IP address of
192.168.0.65, your PC would need to have an address of 192.168.x.y, where x.y is anything but 0.65
(and not conflicting with whatever is on your current network, of course). Ensure that this is the case.
If necessary, use the “P” and “Q” options in the RPS menu to modify the address / network mask of the
board to conform to your network. Note that the first 2 parts being the same are based on a value of
netmask of 255.255.0.0. If netmask were 255.255.255.0, for example, then the first 3 parts of the IP
address would have to be the same.
After you are done, make note of the address you set your PC to. This will be important in the
streaming step.
6.6 Run the Web Interface to Configure CH1
(10) In your PC, run a web browser (for best results, Z3 recommends FireFox or Chrome). In this browser,
type the IP address of the board noted in step (7) (for example, if the default value is used, it would
be http://192.168.0.65). After about 3 seconds, the main screen should come up:
Figure 7Web Interface Main Screen

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
16
(11) Change “Video Source” to Component, “Video Resolution” to 1080p, and “Output Format” to MPEG-2
TS.
(12) Change “Dest Address” to the IP address of your PC (in this example, 192.168.0.6). Also change “Dest
Port” to 5004:
(13) Click “Start Encoder.” The status should change to “Running.”
Figure 9Modifications for Encoding Demonstration
(a) Change input to Component
(b) Change Video
Resolution to
1080p
(c) Change Output Format to
MPEG-2 TS
(d) Change Dest
IP Address to
PC IP Address
(e) Change Dest
Port to 5004
(f) Click “Start Encoder”
Figure 8 Modifications for Encoding Demonstration

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
17
6.7 Run VLC to View Stream
(14) Run VLC on your PC (version used in testing at Z3: 2.05)
(15) Select Media – Open Network Stream. In the box, type “udp://@192.168.0.6:5004”, where
“192.168.0.6” is the IP address of your PC.
(16) Press “Enter.”
(17) You should now see video streaming to VLC:
Figure 10 VLC Network Screen Setting to Receive Z3 TS Stream
Figure 11 Example of Z3 Video Streaming on VLC (UDP)

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
18
6.8 Streaming RTP
Once you have UDP streaming running, it is relatively simple to change to RTP streaming. All that
is needed are a change of settings and an SDP file (an example file is provided with the software
release from Z3). To stream using RTP, do the following steps:
(18) Click on “Stop Encoder” to stop the current encoding session.
(19) Change “Output Format” from “MPEG-2 TS” to “RTP” (Note: Do not select “MPEG-TS over
RTP”).
(20) Confirm that “Dest Port” (see Figure 8) is still 5004 (this will be important for the VLC
configuration).
(21) Copy the “z3-dm368_5004.sdp” file received from Z3 to your PC.
(22) Open VLC. Select “Media – Open File” and select the “z3-dm368_5004.sdp” file you just
copied.
(22) You should then see RTP video streaming on VLC:
Figure 12 Example of Z3 Video Streaming to VLC (RTP)

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
19
7. Exercising Other Features
Once you have the base demo in Section 5 running, you can modify the options in the GUI to exercise other
features. These include:
-Encode from Composite
-Adjust the Bit rate
-Adjust the Frame rate
-Adjust the GOP size
-Change the Video Profile used
-Set to decode an incoming stream
You can also store the configuration and store in the default or other files.
Besides using the web-based GUI, you can also use the serial menus. More detailed system information
(such as generating debug logs) can also be gained from the options in the serial interface.
Details on the other parameters available can be found on page 27.

CONFIDENTIAL Z3-DM368-RPS V1.06.03
___________________________________________________________________________________________
Z3 Technology, LLC ♦100 N 8th ST, STE 250 ♦Lincoln, NE 68508-1369 USA ♦+1.402.323.0702
20
8. Running The Code You Built on the Board
There are 2 ways to take the image files you built in Section 4 and run them on the board: (1) Updating
the image file, and (2) Setting up NFS/TFTP to link to your development PC.
8.1 Method 1: Updating the Image File
(1) Run the Web Interface (Steps (1)-(10) Section 6).
(2) Select “UPDATE” from the top of the GUI:
(3) This brings you to the Software Updater screen. Click “Browse” and browse to the directory z3-
dm368/z3-dm368-RPS-(date)/images and select the image file “z3-dm368-rtptx-demo.img”:
Figure 13 Updating the Device Firmware from the Web Interface
Click here
Other manuals for Z3-DM368-RPS
1
Table of contents
Other Z3 Technology Media Player manuals