Documente Academic
Documente Profesional
Documente Cultură
STAPI SDK
User Manual
8214357 Rev C
May 2010
www.st.com
BLANK
User manual
STAPI SDK
Preliminary Data
Overview
The STAPI SDK provides a unified software development platform for a range of set-top box
(STB) devices and operating systems. In brief, the software stack consists of a set of low-
level STAPI drivers and an application layer. The application layer supports an in-built
diagnostic tool, testtool, that provides a wide range of testing and debugging functions.
This document provides a description of components of the STAPI SDK and information on
how to use the SDK to create applications for set-top boxes.
For more information about STAPI SDK, please contact your local STMicroelectronics FAE.
Contents
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Document identification and control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
License information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Conventions used in this guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Acknowledgements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.1 Hardware setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.1.1 Serial port connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.1.2 Configuring the ST Micro Connect 2 for serial data out . . . . . . . . . . . . . 10
1.2 Toolsets and other software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4 Apilib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5 Patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5.1 OS21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5.2 Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.6 Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.7 Reporting issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
8 Testtool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
8.1 Testtool scripting language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
8.2 Common testtool commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
8.3 STAPI SDK testtool commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
8.3.1 Hard Disk Driver access commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
8.3.2 Audio based commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
8.3.3 Remote control commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
8.3.4 Blitter engine based commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
8.3.5 Close Caption commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
8.3.6 Clock recovery based commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
8.3.7 Cryptography commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
8.3.8 Cursor commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
8.3.9 Demux commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
8.3.10 Digital Encoder (DENC) commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
8.3.11 Direct Memory Access (DMA) commands . . . . . . . . . . . . . . . . . . . . . . . 96
8.3.12 FLASH commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
8.3.13 File system commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
8.3.14 FSK commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
8.3.15 Graphics based commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
8.3.16 Graphical User Interface (GUI) control commands . . . . . . . . . . . . . . . 112
8.3.17 High-Definition Multimedia Interface (HDMI) commands . . . . . . . . . . . 114
8.3.18 I2C interface commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
8.3.19 Internet Protocol (IP) commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
8.3.20 Keyscan based commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
8.3.21 PIO commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
8.3.22 Picture in Picture use case commands . . . . . . . . . . . . . . . . . . . . . . . . 127
9 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Preface
License information
<To be supplied>
Hardware notation
The following conventions are used for hardware notation:
● REGISTER NAMES and FIELD NAMES
● PIN NAMES and SIGNAL NAMES
Software notation
Syntax definitions are presented in a modified Backus-Naur Form (BNF) unless otherwise
specified.
● Terminal strings of the language, that is those not built up by rules of the language, are
printed in teletype font. For example, void.
● Non-terminal strings of the language, that is those built up by rules of the language, are
printed in italic teletype font. For example, name.
● If a non-terminal string of the language is prefixed with a non-italicized part, it is
equivalent to the same non-terminal string without that non-italicized part. For example,
vspace-name.
● Each phrase definition is built up using a double colon and an equals sign to separate
the two sides (‘::=’).
● Alternatives are separated by vertical bars (‘|’).
● Optional sequences are enclosed in square brackets (‘[’ and ‘]’).
● Items which may be repeated appear in braces (‘{’ and ‘}’).
Terminology
The first ST Micro Connect product was named the “ST Micro Connect”; it is now known as
the “ST Micro Connect 1” and the term “ST Micro Connect” is used to refer to the family of
ST Micro Connect devices. The “ST Micro Connect 2” replaces the “ST Micro Connect 1”.
These names are abbreviated to “STMC”, “STMC1” and “STMC2”.
Acknowledgements
Microsoft®, MS-DOS® and Windows® are registered trademarks of Microsoft Corporation in
the United States and other countries.
Linux® is a registered trademark of Linus Torvalds.
Red Hat® is a registered trademark and RPMTM and FedoraTM are trademarks of Red Hat
Software, Inc.
1 Introduction
Toolset running on
Red Hat Linux
Enterprise or MS
Windows
Host-target interconnect
Target System ST Micro Connect 2
a. The original ST Micro Connect product was named the ST Micro Connect. With the introduction of the ST Micro
Connect 2, the original product is now also known as the ST Micro Connect 1, and the generic term ST Micro
Connect refers to the family of ST Micro Connect devices. In this document, the names are often abbreviated to
STMC, STMC1 and STMC2. Both models of ST Micro Connect are supported by STAPI SDK, however, only
the ST Micro Connect 2 is currently supplied by STMicroelectronics.
Both the development board and the ST Micro Connect 2 can be supplied by
STMicroelectronics. For further information, contact your local STMicroelectronics sales
office.
The ST Micro Connect is supplied with the ST Micro Connection Package, which provides
software utilities and firmware for operating the ST Micro Connect.
1.3 Installation
STAPI is supplied as a compressed archive file. This is a ZIP file for MS Windows users, and
a gzip-compressed tar file for Linux users. The release notes for each version of STAPI
provides information on how to obtain the release, including the names of the archive files.
To install STAPI, uncompress the contents of the archive in a suitable location, using the
archive utility that is appropriate to the host operating system.
In this User manual, the root directory of the STAPI SDK installation is <SDK_ROOT> in
pathnames. This directory contains the following directories:
apilib/ This directory contains the source code of all the STAPI drivers. See
Section 1.4 for details.
bin/ The directory contains the configuration file (setenv.bat or
setenv.sh) and various other tools. It also contains the makefile for
compiling the STAPI SDK tree.
docs/ This directory contains the user documentation for STAPI SDK,
including this user manual.
stapp/ This directory contains all the initialization and set up files for the STAPI
drivers. The built STAPI executables are also located here.
stdebug/ This directory contains all the source files that define the testtool
commands.
The STAPI SDK is available for two different host operating systems: MS Windows or a
standard Linux distribution, such as Red Hat Enterprise Linux, or Fedora. The STAPI SDK
can be compiled to run on target platforms running either OS21 (with OSPlus) or STLinux.
● On a Linux host environment, STAPI SDK can be built for both OS21 and STLinux
targets.
● On an MS Windows host environment, STAPI SDK can be built for OS21 targets only.
testtool
stdebug/
1.4 Apilib
The apilib/ directory contains the low level drivers that provide an interface with specific
devices. The library consists of a number of different modules. A full list of the modules is
given in the release notes. Each module has its own API, which is documented separately.
Note: Not all drivers are applicable for all platforms. When using make to build the API libraries,
the makefile only builds those drivers that are applicable to the target platform that has
been specified.
The make apilib command generates a separate library (*.a file) for each of the
apilib/ modules. These are located in a sub directory of <SDK_ROOT>/apilib/lib
which is named for the target board, SoC type and operating system for which it has been
compiled. (See Section 2.5.1: Object directory on page 22 for details.)
1.5 Patches
For older versions of operating systems, toolsets or both, it may be necessary to apply
patches before compiling STAPI SDK. The release notes provide details of the patches that
are required for any given release of operating system or toolset.
Each STAPI SDK distribution includes the patches required for that distribution. The very
latest patch files can also be provided by your local FAE.
1.5.1 OS21
The patches for OS21 are provided as zip files, and are found in the
<SDK_ROOT>\bin\patches\os21\ directory. If a patch exists for a given version of
toolset, then it should be applied to that toolset before building the SDK.
There may be patches for specific SoCs. Patches only need to be installed for the SoCs that
you intend to use. See the release notes for more information.
1.5.2 Linux
STAPI_SDK is compatible with STLinux-2.3. However, the kernels of both versions of
STLinux must be patched with the appropriate patches included with the STAPI-SDK
distribution before being compiled. The patches for STLinux are provided as .tgz tarballs
and located in the <SDK_ROOT>/bin/patches/linux/ directory.
The release notes accompanying the STAPI SDK distribution provides full details of the
various versions of toolset and operating system that require patching. This is likely to
change for different revisions of STAPI SDK and different versions of each toolset and
operating systems.
1.6 Compilation
The STAPI SDK is provided in the form of source files that must be compiled for the required
target using the toolset that is appropriate for the platform. There are slight differences in the
compilation procedure, depending on whether STAPI SDK is being compiled on an MS
Windows or Linux host. The two compilation procedures are described in Chapter 2:
Compiling and running STAPI SDK (OS21) on page 14 and Chapter 3: Compiling and
running STAPI SDK (STLinux) on page 27.
Following installation of the STAPI SDK package, the next step is to configure the
compilation environment for a specific target and then compile the libraries and the STAPI
application. This chapter describes these operations for a host running MS Windows
operating system.
Note: If setenv.bat is run with incorrect file paths, the user must close the current DOS window
and open a new one before running the updated setenv.bat again.
Although environment variables are defined for the full range of toolsets, only the toolsets
required for the platforms you are working with need to be installed.
Note: 1 In most cases, OSPlus is mandatory if compiling for OS21.
2 Before running setenv.bat, either make sure that the <SDK_ROOT>/bin/ directory is in the
PATH, or run setenv directly from the bin directory.
To configure the STAPI SDK environment for a specific platform, run the configuration file as
follows:
setenv <platform>_<SoC>
where <platform> is the name of the board and <SoC> is the name of the backend SoC
that is mounted on that board. For example, to configure the environment for an MB680
board with an STb7105 SoC, enter the following:
setenv MB680_7105
Although environment variables are defined for the full range of toolsets, only the toolsets
required for the platforms you are working with need to be installed.
Note: 1 In most cases, OSPlus is mandatory if compiling for OS21.
2 Before running setenv.sh, either make sure that the <SDK_ROOT>/bin/ directory is in the
PATH, or run setenv directly from the bin directory.
To configure the STAPI SDK environment for a specific platform, run the configuration file as
follows:
source setenv.sh <platform>_<SoC>
where <platform> is the name of the board and <SoC> is the name of the backend SoC
that is mounted on that board. For example, to configure the environment for an MB680
board with an STb7105 SoC, enter the following:
source setenv.sh MB680_7105
The shell scripts responds with the following message:
MB680_7105 Configuration selected!
Run setenv without any arguments to display a list of all the platform and SoC combinations
that it currently supports.
Note: The arguments passed to setenv.sh are case sensitive. Enter the arguments with exactly
the same capitalization as in the list generated by the setenv.sh script.
To compile STAPI_SDK for OS21 on Linux or Unix Machine, ensure that all the required
versions of tools as listed in Figure 4 are properly installed on the appropriate machine.
If a platform and SoC are specified, but setenv.sh outputs a list of all the platform and
SoC combinations it supports instead of giving the Configuration selected!
message, then either the configuration is not supported, or the platform and SoC names
were entered wrongly.
Table 3 lists those environment variables that are not part of setenv.bat(or setenv.sh
for Linux or UNIX), but are available to further customize STAPI SDK.
Use this variable to force the usage of STMC2 for old SoCs
like STi5100, STi7100 or STi7109. These SoCs are
configured for the STMC1 by default.
USE_TARGETPACK is set to 1 by default for newer chipsets
USE_TARGETPACK 1
such as the STi7111. When USE_TARGETPACK is set to 1,
you must install the ST TargetPack, if it is not yet done.
This variable is not set by default in the standard SDK tree
release for older SoCs like the STi7109.
This variable applies to the ST40 toolset only.
Use this variable to force the address mode of the ST40 core
to be with 29 or 32 . The default value (linked to the platform
setup) is selected in the .mak file of the platform, located in
DVD_ADDRESSMODE 32 the platform directory.
This variable is relevant for cores with ST40 architecture only.
This variable is not set by default in the standard SDK tree
release.
Note: Combinations of targets are permitted. The following example is an acceptable gmake
command:
gmake purge_apilib purge_all apilib all run
gmake makes each of the named targets in the order in which they are given on the
command line, reading from left to right.
The following commands are available if the $(MODULES) variable is set to 1. (The default is
0.)
This generates an executable file in the stapp\ directory for the target with the name:
main_$(DVD_PLATFORM)_$(DVD_BACKEND)_(ARCHITECTURE)_(DVD_OS)_[29|32]
BITS.out
DVD_PLATFORM and DVD_BACKEND are the values of the %DVD_PLATFORM% and
%DVD_BACKEND% environment variables, as set by the setenv.bat batch file. This naming
convention ensures that is possible to build different applications for different platforms
within the same build environment.
5. For the host processor, perform the environment setup as described in Section 2.1 to
Section 2.4.
6. Execute the following command from the command prompt to boot the host processor:
make run_kernel
7. When the host processor has been booted successfully, load the modules. This
operation loads the real time binary (as generated at step 3.) at the same time.
8. Execute the application on the host processor. After the application has loaded
successfully, and the various components have been initialized, the testtool prompt
appears in the command window.
2.9.2 Individual boot sequence for host and real time processors
To boot the host and real time processor individually, use the following sequence:
1. Carry out the environment setup for the host processor as described in Section 2.1 to
Section 2.4.
2. Execute the following command to boot the host processor:
make run_kernel
3. Using a new command window, complete the environment setup for the real time
processor, and then (in the same command window) boot the real time processor using
the following command:
make run
4. The command window now displays a GDB prompt. Enter c to continue.
5. If a serial cable is connected, the command window now displays a testtool prompt.
This indicates that the real time processor has booted successfully.
6. When the real time processor has booted, load the modules from host window.
7. After this step execute the application on the host processor. The testtool prompt now
appears in this command window, also. Execute the application command from this
stage.
Following installation of the STAPI SDK package, the next step is to configure the
compilation environment for a specific target and then compile the libraries and the STAPI
application. This chapter describes these operations for a host running Linux.
It is not possible to build STAPI SDK for STLinux on a host that is running MS Windows XP.
STAPI SDK for STLinux can only be built on a host running a standard Linux distribution,
such as Red Hat Enterprise Linux, or Fedora.
Note: Information on the installation and operation of Linux on the host PC is beyond the scope of
this manual.
Install script
To see a list of all the available installation options, including the current install profiles, run
the install script as follows:
./install --help
Install the profile that you want by giving it as a parameter to the install script. For example,
the following command installs all the packages for the ST40 architecture and glibc
toolchain.
./install all-sh4-glibc
To install the uclib toolchain in place of glibc, use the following command:
./install all-sh4-uclibc
Note: You must be the root user to install the distribution.
The installer uses stmyum, STMicroelectronics customized version of yum, to handle the
installation and dependency checking of RPM files. See
http://www.stlinux.com/drupal/node/60 for more information about stmyum.
Note: stmyum is configured by the file yum.conf. There is a different version of yum.conf
available to use if you are working inside the STMicroelectronics firewall, which configures
stmyum to use the internal file server. The configuration file can be downloaded from
http://www.stlinux.com/drupal/node/60.
To install a library other than the default, use this stmyum command:
/opt/STM/STLinux-2.3/host/bin/stmyum install <stapi_package>
For example:
/opt/STM/STLinux-2.3/host/bin/stmyum install stlinux23-STAPI-
kernel-sh4-2.6.23.17_stm23_A25C-123
3.2.2 Troubleshooting
This section lists some common errors that may arise when installing or using STLinux:
● When calling stmyum update, the following error is reported:
ImportError: No module named cElementTree
This is due to an incompatibility between Linux on the host and the STLinux
distribution. Update the following RPM packages using stmyum:
stlinux22-host-python-celementtree-1.0.5-1.i386.rpm
stlinux22-host-yum-python2.2-2.6.1-10.i386.rpm
● When using ST40 toolset under a Linux environment, it cannot find a library call
libexpat.so.0
This is caused by sh4gdb looking for libexpat.so.0 in the /usr/lib directory. To
overcome this, create a symbolic link to the libexpat.so library as follows:
ln -s /usr/lib/libexpat.so /usr/lib/libexpat.so.0
Note: 1 The above is an example. The path to the Multicom directory and the name of the patches
file may be different for your installation.
2 For uclibc enabled patches to be applied to Multicom, see <SDKROOT>/bin/patches.
For STLinux, the makefile accepts a number of additional targets. These are listed in
Table 7. The important targets are described in greater detail in the following sections.
Table 7. Targets available with the STAPI SDK makefile for STLinux
Target Description
For example, the configuration file for the kernel for the mb704 board with a STx5197 SoC
has the following path:
<SDK_ROOT>/stapp/platform/mb704/5197/linux/mb704_5197_kernel-2.3.cfg
make builds the kernel using the configuration defined in the selected .cfg file.
To customize the configuration, invoke make with the command make kernel
MENUCONFIG=1. This option displays the configuration menu; additional options for
configuring the kernel can be selected from this menu.
The target purge_kernel purges all the object files created by make kernel and also
cleans up the Multicom directories.
To debug the kernel, enter make debug_kernel. This command loads the kernel on the
target (using the ST Micro Connect referenced by the $TARGET environment variable) and
runs the kernel in the graphical debugger.
Note: The debug_kernel target uses the ddd (Data Display Debugger) interface.
ddd is not provided with STAPI SDK, but can be downloaded for free from
www.gnu.org/software/ddd/
3.8.1 Compiling the STAPI SDK tree for Linux with uclibc
Before compiling the STAPI SDK tree for Linux with uclibc support, the uclibc toolchain for
ST40 must first be installed (as mentioned in Section 3.2 on page 27). When this toolchain
is successfully installed, you will be able to see the path:
opt/STM/STLinux-$LINUX_VERSION/devkit/sh4_uclibc
Compile STAPI SDK as follows:
1. Set an additional environment variable:
CROSS_COMPILE=sh4-linux-uclibc-
2. Set the relevant environment variables PATH, KTARGET and SERVER_DIR to take
account of the uclibc path. (Refer to Table 6 on page 32 for details.)
3. Build STAPI SDK as described in Section 3.8.
4. The uclibc compliant library can be seen in the folder
STAPI_SDK/STAPP/playrec/<uclibc>. This library replaces the default library
delivered with the SDK (STAPI_SDK/STAPP/playrec/*) to make it uclibc
compliant.
Note: The ST Micro Connect telnet port must be reconfigured using the above command every
time that the Micro Connect IP is restarted.
3. It is then possible to connect to the ST Micro Connect with telnet:
telnet <MicroConnect_IP> 5331
4. When the kernel has booted without reporting any problems, it displays a login prompt.
Enter the username root. There is no password.
5. The next step is to load the STAPI library modules. At the shell prompt, type:
source /root/modules/load_modules.sh
As the modules are downloaded to the target using the ethernet port, this operation
could take as much as ten seconds to complete.
If you want to run the STAPI SDK application in a different telnet session, open and log
in to that session, and then set up the environment with the command:
source /root/modules/load_env.sh
Note: The location of the filesystem root on the host PC is determined by the environment variable
KTARGET. See Table 6 on page 32.
6. To run the STAPI application, execute the .out file that was created in Section 3.8:
Compiling the STAPI SDK tree for Linux. For example, for an mb680 board with an
STx710x SoC, this file is:
/root/main_mb680_710x_ST40_LINUX_32BITS.out
When the application is running, it displays the testtool prompt. See Chapter 8 on
page 51 for more information about testtool.
An alternative method is to run STAPI in user space using gdbserver. In place of step 6.
above, invoke gdbserver on the target with the following command:
gdbserver <HostMachineIP>:5555 /root/main_mb411_710x_LINUX.out
On the host machine, enter make debug. This attempts to connect to the gdbserver
running on the platform.
Note: The debug target uses the ddd (Data Display Debugger) interface.
ddd is not provided with STAPI SDK, but can be downloaded for free from
http://www.gnu.org/software/ddd/
Enter PAL for the second parameter to configure the auxiliary output as 50Hz at 720 by 576
resolution.
It is also possible to modify the default parameters for directfb in the resources text file:
/etc/directfbrc.
After initializing the frame buffer, it is possible to run directfb applications, including:
df_andi
df_dok
df_knuckles
df_neo
Specify the frame buffer to use (that is, frame buffer /dev/fb1) with:
df_dok --dfb:fbdev=/dev/fb1
Run an Xserver on the target with the command:
Xfbdev
This chapter provides instructions and advice on how to compile a version of the STAPI
application that can be booted directly from Flash memory and how to burn the ROM image
generated to Flash memory.
All compilation activities are carried out from within the stapp/ directory. The STAPI SDK
makefile is located in this directory, so all make operations can be initiated from this
directory by typing gmake followed by the relevant target.
Note: 1 In this chapter, the example commands are given for hosts running MS Windows for a target
running OS21. When compiling on a Linux host for a target running OS21 or STLinux,
replace gmake with make.
2 For a target running ST Linux, either the STBlower (as described in this section) or the U-
Boot utility can be used to boot the Linux kernel. For the details on how to boot from Flash
using U-Boot, see Chapter 5: How to boot from Flash memory (U-Boot) on page 42.
If pokelist.h does not exist (which is the default condition), gmake attempts to establish
a connection to the board in order to extract the poke table from the ST TargetPack. It uses
the poke table to generate the pokelist.h header file.
Note: Connection to the board is achieved using the romgen tool supplied with the ST Micro
Connection package, revision 1.3.1 and later.
For ST40 and ST200 platforms, the executable has the name:
flash_$(DVD_PLATFORM)_$(DVD_BACKEND)_[29|32]BITS.bin
where:
<PLATFORM> the name of the platform, for example: MB680 or HDK7111
<BACKEND> the name of the SoC, for example: 7105 or 7111
<OS> the operating system, either OS21 or LINUX
<DERIVED_OBJS> the address mode, either 29BITS or 32BITS
For example:
flash_mb680_7105_OS21_32BITS.bin
Please, type:
1 - Program the flash using a binary file
2 - Compare flash content with a binary file
3 - Erase the content of the flash
4 - Dump the content of the flash to a binary file
5 - Quit
Choice ?> 2
romtool: Compare the flash
romtool: -----------------
romtool: Identifier of the flash to be verified (default value is 0, type
'.' for default) >? .
romtool: Name of the file to be loaded and to compare content of the flash
(default value is "flash_hdk7106_7106_ST40_OS21_32BITS.bin", type '.' for
default)
romtool: Address from where to start comparison (default value is
0x00000000, type '.' for default) >? .
Note: 1 The file names given in the menu options are customized according the the selected
platform, using the file naming scheme described in Section 4.2 on page 38.
2 Building STAPI SDK with default parameters generates a .bin file. This means that option
2 in the blower tool menu is the one that is most commonly used.
3 At the romtool prompt, if you want to proceed with the default option, type . (read as dot) on
the prompt as shown in Figure 6.
Choose an option from this menu. When blower has finished, it automatically disconnects
itself from the platform.
Select 7 - Quit to quit the blower tool.
To check that the operation has been successful, reset the board and check that the
application does boot from the Flash memory.
Note: STMicroelectronics recommend that you disconnect the ST Micro Connect from the board
before resetting. For some boards, the STMC may prevent the application from booting.
To use the testtool interface with the application, make sure that you have a terminal linked
using an RS232 to the relevant UART port on the board. See Chapter 8 on page 51 for more
information on the testtool.
For a target running STLinux, booting from Flash requires the U-Boot utility. U-Boot is a
multi-platform, open-source, universal boot loader with extensive support for loading and
managing boot images. Further information about U-Boot can be found at:
http://www.stlinux.com/drupal/u-boot. This web page provides detailed instructions on using
U-Boot and includes the most up-to-date configuration information.
This operation creates two similarly named files. It is important not to get them confused.
● The file u-boot is an ELF file which runs on the target system, but is never written to
Flash. GDB uses this file to download U-Boot.
● The file u-boot.bin is a raw binary file. This is the file that is burned directly to Flash
memory and executed at boot time.
2 If there is any doubt as to the values to be used for the -a (load address) and -e (execute
address) parameters, use the following command to extract the correct value of the execute
address from the vmlinux file:
Sh%> sh4-linux-objdump -f vmlinux | grep '^start address ' | awk '{print $3}'
Use the following command to extract the correct value of the load address:
Sh%> sh4-linux-objdump -h vmlinux | grep .empty_zero_page | awk '{print $4}'
8. Copy vmlinux.ub to the target directory:
/opt/STM/STLinux-2.3/devkit/sh4/target
The standard distribution of the STAPI SDK contains everything that an engineer requires to
generate the STAPI application on a wide range of standard STMicroelectronics platforms.
All the files that are specific to any given platform are located in the “platform” directory,
which has the following path:
<Platform_Root>\<Platform>\<Backend>
where:
<Platform_Root> by default, this is <SDK_ROOT>\stapp\platform, but can be
changed by setting the $(DVD_PLATFORM_ROOT) environment
variable to a different path.
<Platform> the name of the platform, for example: MB680 or HDK7111
<Backend> the name of the SoC, for example: 7105 or 7111
The platform directory for any given platform and backend combination contains the
following files and sub-directories.
● A platform-specific header file, which defines memory mapping, STAPI task priority and
interrupt levels for the platform. The header file has a .h extension.
● A makefile that defines all the platform specific compile options. The makefile has a
.mak extension.
● A configuration file, which is read when booting STAPI SDK using an ST Micro
Connect. This file configures on-chip peripherals such as clocks, memory, EPLDs and
so forth. The configuration file has a.cmd extension.
● A directory called bootrom, which contains all the code necessary to boot the STAPI
application from Flash memory.
● A directory called targetpack, which contains the ST TargetPack definition for the
platform.
● An optional directory called linux, which contains code specific to the STLinux build
of STAPI for the selected platform
The platform directory may also contain other files that are linked to the toolset and
environment used for the platform.
A complex network of dependencies exist between these files and other files in the STAPI
SDK tree. Therefore, if a change is made to any detail or parameter within these files, it may
have multiple impacts on a range of files throughout the tree. Therefore, if a change is made
to a platform-specific file, STMicroelectronics recommend that the entire STAPI SDK tree is
purged and recompiled.
mkdir $STSDKROOT/opensource
cp -Rf ~/stapi_sdk_plugins/OPENSOURCE/* $STSDKROOT/opensource
4. Figure 7 shows the directory hierarchy for STAPI SDK after the changes in the previous
steps have been made.
8 Testtool
The testtool interface provides a command shell that enables the user to enter a test
command and then monitor the output. A complete list of the testtool commands that are
currently implemented is provided in Section 8.2 on page 54. The commands that directly
invoke features in the STAPI application are listed in Section 8.3 on page 70.
The testtool command language is also a fully functional scripting language, containing all
the features needed to create scripts to provide repeatable and verifiable test scenarios. The
features provided include conditional commands (IF, ELSE, and ELIF), loops (FOR and
WHILE), the ability to procedurize blocks of code (DEFINE) and to return values from
procedures (EXIT). The scripting language is described in Section 8.1.
Note: For all OS21 systems, it is mandatory to use the UART interface when using testtool. The
performance of the JTAG interface with testtool is exceptionally poor and can cause an
ST40 or ST200 core to freeze long enough to introduce latency in real time threads. For
OS20 systems, the problem is less damaging, but there are still distinct advantages to using
the UART interface.
When connected using the UART interface, testtool provides a simple command history
feature, similar to the command history of UNIX and Linux command shells. The commands
for accessing the command history and editing command lines are as follows:
Up key Move up in the command history
Down key Move down in the command history
Tab key Auto-completion of commands, macro, or file names (files only if file
system mounted)
Ctrl+A Go to beginning of line
Ctrl+K Delete chars to end of line
Insert key Toggle between insert/replace mode
!! Execute previous command
history Display command history
!n Execute history command number n
Testtool configuration
The command CONFIG_TESTTOOL enables testtool users to configure basic testtool
parameters to suit specific environments and requirements. For more details on how to use
this command, see CONFIG_TESTTOOL on page 56.
The following parameters can be configured using CONFIG_TESTTOOL.
● The number of characters that testtool needs to match in variable names to consider
those names to be identical. (The default is 2.)
● By default, testtool commands do not return a result. A CONFIG_TESTTOOL parameter
causes testtool commands to return an error value in case of failure.
Comparison operators
The IF, ELIF and WHILE commands recognize the following comparison operators.
> greater than
< less than
== equal to
!= not equal to
>= greater or equal
<= less or equal
Any comparison that evaluates to zero equates to a logical FALSE; any other value equates
to a logical TRUE. Comparisons cannot be nested or combined with logical operators (in
other words, there are no AND or OR operators). However, IF and ELIF commands
themselves can be nested.
Note: Comparisons between floating point values are performed only on the integer part of the
value; therefore 5.3 == 5.5 evaluates to TRUE.
Variables
Variables can be created within scripts in order to store data items. A variable is created
when it is first named in the script.
The scope of a variable only extends to the block of code within which it was created.
Therefore, variables created within a macro are always local to that macro. Use the EXIT
statement to return a value to the calling process.
A variable created manually at the command prompt has global scope, and is available until
the testtool is closed down.
Note: Any testtool variable used for numerical operations has an upper storage limit. If a value is
assigned to a variable that overflows this limit, the value can be truncated.
Comments
Comments can be included in testtool scripts. Comments start with a semi-colon and end
with a new line.
Example: Factorial
The following example shows a simple application of nested macro definition and recursion.
When the variables NUM and RESULT are created within an instance of the macro
RECURSION, their scope is limited to that macro, and do not conflict with the NUM or RESULT
variables in the macro from which it has been called.
DEFINE FACTORIAL VALUE
RESULT = 0
DEFINE RECURSION NUM
IF NUM > 1
RESULT = RECURSION NUM-1
RESULT = RESULT*NUM
PR "NUM " NUM " RESULT " RESULT
END
ELSE
RESULT = NUM
END
END RESULT
RESULT = RECURSION VALUE
END RESULT
This example also uses the abbreviated form PR for PRINT.
For further examples, see the file called macros.ttm in the \stapp directory.
ALLOC
Usage: ALLOC <Size>
Parameters:
<Size> The size in bytes to be allocated.
Description: Use this command to allocate a piece of memory. This function guarantees that the
allocated buffer is contiguous and is in a non-cached memory area.
The <Size> parameter specifies the number of bytes to be allocated. The command
displays the address of the buffer when the allocation succeeds.
Example: Allocate 1024 bytes:
ALLOC +1024
Limits: Software: None.
Hardware: None.
BPEEK
Usage: BPEEK <Address>
Parameters:
<Address> The address to be read.
Description: Use this command to read a byte from a specific address. It displays the content of
that address.
Example: Read a byte in memory:
BPEEK #A4500000
Limits: Software: None.
Hardware: None.
BPOKE
Usage: BPOKE <Address> <Value>
Parameters:
<Address> The address at which to write.
<Value> The byte value to be written.
Description: Use this command to write a byte to a specific address.
Example: Write a byte in memory:
BPOKE #A4500000 #FF
Limits: Software: None.
Hardware: None.
CONFIG_TESTTOOL
COPY
Usage: COPY <SrcAddress> <Size> <DstAddress>
Parameters:
<SrcAddress> The source address of the buffer to be copied.
<Size> The size in bytes of the buffer to be copied to the destination
address.
<DstAddress> The destination address.
Description: Use this command to copy a memory buffer at a new location address. Overlapping
the source and destination regions may produce unexpected results.
Example: Duplicate 16 bytes:
COPY #A4500000 +16 #A4500010
Limits: Software: None.
Hardware: None.
DEFINE
Usage: DEFINE <MacroName> [<Param>]*
Parameters:
<MacroName> The name for the macro.
<Param> The name of a parameter to pass to the macro.
Description: Use the DEFINE command to define a macro. The macro is stored under the name
<MacroName> and, once defined, can be invoked at any time by entering
MacroName at the command prompt. A macro can accept any number of optional
parameters, as defined by one or more <Param> arguments.
Having entered the DEFINE command, testtool displays a double prompt (>>). Enter
the body of the macro against this prompt. The macro can contain any number of
command statements, each entered on a new line.
End the macro definition with either the END or EXIT command. Testtool returns to
the normal prompt.
Macros can be nested to any level, with a DEFINE command indicating the start of
the nested macro and END (or EXIT) indicating the end.
Macros can access any global variables. A nested macro can access global variables
and the variables of the macro (or macros) that contain it. The scope of any symbols
defined within a macro (that is, variable and macro names) is limited to the body of
that macro itself.
Example: The following example defines a macro called MULDIV that multiplies its first two
parameters and divides the result by the third:
> DEFINE MULDIV A B C
>> RES =0
>> RES:=(A*B)/C
>> PRINT "THE RESULT IS" RES
>> EXIT
To run the macro MULDIV, enter the following:
> MULDIV 3 2 1
The macro gives the following result:
THE RESULT IS 6
Limits: Software: None.
Hardware: None.
DELETE
Usage: DELETE <SymbolName>
Parameters:
<SymbolName> The name of the symbol to be deleted.
Description: Use this command to delete a symbol name from the testtool interface. A symbol
may be a variable or a function.
Example: Create a variable called toto and set it to 5:
TOTO = +5
Delete the variable toto:
DEL TOTO
Limits: Software: None.
Hardware: None.
DISPLAY
Usage: DISPLAY <Address> [<Size>]
Parameters:
<Address> The address from where we want to start the display dump.
<Size> This is an optional parameter to specify size in bytes to be
read. It read 256 bytes by default.
Description: Use this command to display the contents of the memory. It displays the content by
using long word read access.
Example: Dump data memory:
DISPLAY #A4500000
Limits: Software: None.
Hardware: None.
DISPLAY_B
Usage: DISPLAY_B <Address> [<Size>]
Parameters:
<Address> This is the address from where we want to start the display
dump.
<Size> This is an optional parameter to specify size in bytes to be
read. It read 256 bytes by default.
Description: Use this command to display the content of the memory. It displays the content byte
per byte.
Example: Dump data memory:
DISPLAY_B #A4500000
Limits: Software: None.
Hardware: None.
DUMPMEM
Usage: DUMPMEM <Filename> <Address> <Size>
Parameters:
<Filename> The file name to be created to dump the memory. The file
location can be local mass storage devices of the platform or
remote mass storage using NFS for Linux or JTAG..
<Address> This is the address from where we want to start the file dump.
<Size> This is the parameter to specify size in bytes to be dumped.
Description: Use this command to dump the contents of a block of memory into a file.
Example: Dump data memory to a file (1024 bytes):
DUMP "C:\memory_dump.bin" #A4500000 +1024
Limits: Software: None.
Hardware: None.
END
Usage: END
Parameters: None.
Description: Use the END command to mark the end of a macro definition.
Limits: Software: None.
Hardware: None.
EXIT
Usage: EXIT <ReturnValue>
Parameters:
<ReturnValue> The value returned by the macro. It can either be a literal value
or the name of a variable used within the macro.
Description: Use the EXIT command to mark the end of a macro definition and return a value.
Example: > DEFINE MULDIV A B C
>> NUM= (A*B)/C
>> EXIT NUM
The value of NUM is assigned to the variable RES when the macro is called with the
following syntax:
> RES = MULDIV 3 2 1
Limits: Software: None.
Hardware: None.
FILL
Usage: FILL <Address> <Size> <Pattern>
Parameters:
<Address> The address from where to start filling with the pattern. This
address must be 32 bits aligned.
<Size> The size in bytes to be fill. The size must be a multiple of
4 bytes.
<Pattern> This is the value of the 32-bit pattern.
Description: Use this command to fill a memory buffer with a 32-bit repeated pattern.
Example: Fill up a buffer with 0xFFFFFFFFF values:
FILL #A4500000 +1024 #FFFFFFFF
Limits: Software: Take care with address alignment and size multiple of 4 bytes.
Hardware: None.
FREE
Usage: FREE <Address>
Parameters:
<Address> The address to be freed.
Description: Use this command to free a block of memory that was allocated using the ALLOC
testtool command.
Example: Allocate 1024 bytes:
ALLOC +1024
Deallocate the buffer:
FREE #A5234C00
Limits: Software: None.
Hardware: None.
GETKEY
Usage: GETKEY
Parameters: None.
Description: Use this command to wait for a key to be pressed.
Example: Get a key and store the result in key_pressed:
key_pressed = getkey
Limits: Software: None.
Hardware: None.
HELP
Usage: HELP
Parameters: None.
Example: Use this command to display a list of all testtool commands together with a short
description for each command.
To list a specific subset of the testtool commands, see the LIST command.
Limits: Software: None.
Hardware: None.
HISTORY
Usage: HISTORY
Parameters: None.
Description: Use this command to display the last 20 previous testtool commands executed. Each
command is given an ID number. You may repeat any of the commands in the list by
entering ! followed by the ID number of the command. For example, !5 repeats
command number five in the history list.
The command history facility resembles the command history for bash. Use !! to
repeat the last command issued.
Limits: Software: None.
Hardware: None.
IOBASE
Usage: IOBASE <DefaultBase>
Parameters:
<DefaultBase> The new default base to be used. It can take the following
values:
– +16 : To switch to hexadecimal.
– +10 : To switch to decimal.
– +8 : To switch to octal.
– +2 : To switch to binary.
Description: Many commands in the testtool interface accept numerical values as parameters.
These numerical parameters may be entered as decimal, hexadecimal, octal or
binary values. Use the IOBASE command to define which base testtool uses for
interpreting numerical values.
The default base is hexadecimal. Consequently, the following command sets the
variable toto to be sixteen in decimal:
; Set toto variable
TOTO = 10
To force testtool to interpret the value 10 as decimal, prefix the number with a plus
sign:
; Set toto variable
TOTO = +10
The variable toto is now initialized as ten.
To set a different base as the default, use the IOBASE command. For example:
; Switch to decimal base by default
IOBASE +10
LIST
Usage: LIST <SymbolName>
Parameters:
<SymbolName> This is the name used to filter specific help for testtool
functions.
Description: This command is like the HELP command, except that it lists just a subset of the
available commands, using the text of the <SymbolName> parameter as a filter. See
the examples below.
Example: Display help for all the play commands:
LIST PLAY
Display help for all the I2C commands:
LIST I2C
Limits: Software: None.
Hardware: None.
LOADMEM
Usage: LOADMEM <Filename> <Address> <Size>
Parameters:
<Filename> This is the file name to be loaded. The file location could be
local mass storage devices of the platform or remote mass
storage using NFS for Linux or JTAG.
<Address> This is the address to where we want to load the file.
<Size> This is the parameter to specify size in bytes to be read.
Description: Use this command to load a file and store it in memory at a specific address.
Example: Load data memory from a file (1024 bytes):
LOAD "C:\memory_dump.bin" #A4500000 +1024
Limits: Software: None.
Hardware: None.
LOG
Usage: LOG <Filename> <InOutFlag>
Parameters:
<Filename> This is the file name to be used to save the logs. The file
location could be local mass storage devices of the platform or
remote mass storage using NFS for Linux or JTAG.
<InOutFlag> This is the flag to be set to 1 in order to save input and output.
Please set it to 0 in order to log only inputs logs commands.
Description: Use this command to log all the testtool inputs and outputs to a file.
Example: Log all the testtool commands:
LOG "/ATA00/logs.txt" 1
Limits: Software: None.
Hardware: None.
PEEK
Usage: PEEK <Address>
Parameters:
<Address> This is address to be read.
Description: Use this command to read a long word (32 bits) of data from a specific address. It
displays the content of the address just read.
Example: Read a 32bits word in memory:
PEEK #A4500000
Limits: Software: None.
Hardware: None.
POKE
Usage: POKE <Address> <Value>
Parameters:
<Address> The address to which to write.
<Value> The long word value to be written to that address.
Description: This command is used to write a long word (32bits) to a specific address.
Example: Write a 32-bit word in memory:
POKE #A4500000 #11223344
Limits: Software: None.
Hardware: None.
PRINT
Usage: PRINT [<Params>]
Parameters:
<Params> This is the list of parameters to print.
Description: Use this command to print values or strings on the user interface.
Example: > TOTO=+10
> PRINT "TOTO=" TOTO
TOTO=10
> MY_NAME="MARC"
> STRING=PRINT "MY NAME IS " MY_NAME
MY NAME IS MARC
> PRINT STRING "OR MARCO"
MY NAME IS MARC OR MARCO
> PRINT (8+2)*(+10)
+100
Limits: Software: None.
Hardware: None.
SAVE
Usage: SAVE <Filename> <ConstFlag>
Parameters:
<Filename> This is the file name to be used to save the testtool state. The
file location could be local mass storage devices of the
platform or remote mass storage using NFS for Linux or JTAG.
<ConstFlag> This is the flag to be set to 1 in order to save constants
definitions as well.
Description: Use this command to save the state of the testtool, in terms of symbols and macro
definitions, into ASCII files. These files are identical to those read by the SOURCE
command and therefore can be used to incrementally develop an enhanced Testtool
environment tailored to the preferences of an individual user. The <ConstantFlag>
parameter allows optional saving of the constant values defined by the
implementation of the testtool.
Example: Save all the testtool state:
SAVE "/ATA00/testtool_state.txt" 1
Limits: Software: None.
Hardware: None.
SEARCH
Usage: SEARCH <StringToFind> <Address> <Size>
Parameters:
<StringToFind> This is the string to find for the search
<Address> This is the address from where we want to start the search
<Size> This is the size in bytes for the range of the search
Description: This command is used to search a string pattern into the memory, starting at address
<Address> and look for onto a range of data specified by <Size> in bytes. When
the pattern has been found, the address of matching is displayed.
Example: Look for “TAG” into the memory
SEARCH "TAG" #A4500000 +4096
Limits: Software: None.
Hardware: None.
SHOW
Usage: SHOW <SymbolName>
Parameters:
<SymbolName> This is the name of the symbol to be displayed.
Description: Use this command to display the content of a symbol or a user defined function.
Example: > SHOW TRUE
0: TRUE: 1 (h1) - INTEGER CONSTANT
> DEFINE AREA SIDE1 SIDE2
> RESULT=SIDE1*SIDE2
> END
> SHOW AREA
DEFINE AREA SIDE1 SIDE2
RESULT=SIDE1*SIDE2
END
Limits: Software: None.
Hardware: None.
SOURCE
Usage: SOURCE <Filename> <EchoFlag>
Parameters:
<Filename> This is the file name to be loaded. The file location could be
local mass storage devices of the platform or remote mass
storage using NFS for Linux or JTAG.
<EchoFlag> This is the flag to be set to 1 in order to have the script file
displayed in the same time into the testtool interface.
By default this flag is 0 (no echo).
Description: Use this command to load testtool script files. The scripts file are text files which
contains commands compatible with the testtool interface. There is an example in the
STAPI SDK tree in the root directory in $STSDKROOT/stapp/macros.ttm. For
information, the macros.ttm file is loaded automatically when running the
STAPI SDK tree. This is true when RUN_FROM_FLASH environment variable is set to
0.
Example: Load the script test.ttm:
SOURCE "/ATA00/test.ttm" 1
Limits: Software: None.
Hardware: None.
SPEEK
Usage: SPEEK <Address>
Parameters:
<Address> This is address to be read.
Description: Use this command to read a word (16 bits) of data from a specific address. It displays
the content of the address just read.
Example: Read a 16-bit word in memory
SPEEK #A4500000
Limits: Software: None.
Hardware: None.
SPOKE
Usage: SPOKE <Address> <Value>
Parameters:
<Address> This is the address to which to write.
<Value> This is the word value to be written
Description: Use this command to write a word (16 bits) of data to a specific address.
Example: Write a 16-bit word to memory:
SPOKE #A4500000 #1122
Limits: Software: None.
Hardware: None.
WAIT
Usage: WAIT <Milliseconds>
Parameters:
<Milliseconds> This is the number of milliseconds to wait.
Description: This command waits a certain value of time specified in milliseconds. The precision of
the wait is not guaranteed as it depends on the toolset, operating system and chipset
used.
Example: Wait for at least 5 seconds:
WAIT +5000
Limits: Software: None.
Hardware: None.
ZAP
Usage: ZAP
Parameters: None.
Description: Use this command to switch the testtool interface to UART or JTAG connection. It
works only if the JTAG connection is on.
Example: ZAP
Limits: Software: OS21 (not Linux).
Hardware: Only available if application run from JTAG.
ATAPI_BENCH
Usage: ATAPI_BENCH <Id> <Mode>
Parameters:
<Id> This is the ATA interface to test, and is an integer starting from
0.
<Mode> 0: Master
1: Slave
Description: Use this command to run basic benchmark read and write tests of the PATA or SATA
interface. It displays the bandwidth results of the tests.
Note: This function does not work if the virtual file system has been started. This is the case
by default in the STAPI SDK tree. Comment out the VFS_Init() call in the
stapp/main/main.c to perform ATAPI bench test.
Example: To run benchmark tests on ATA interface 0:
ATAPI_BENCH 0 0
Limits: Software: OS21, not Linux.
Hardware: Available for all platforms having a PATA or SATA disk drive.
ATAPI_DRIVEINFO
Usage: ATAPI_DRIVEINFO <Id> <Mode>
Parameters:
<Id> This is the ATA interface to test, and is an integer starting from
0.
<Mode> 0: Master
1: Slave
Description: This command displays information on either the Master or Slave disk drive.
Example: ATAPI_DRIVEINFO 0
Limits: Software: OS21, not Linux.
Hardware: Available for all platforms having a PATA or SATA disk drive.
ATAPI_INFO
Usage: ATAPI_INFO
Parameters: None.
Description: This command displays the STATAPI driver version.
Example: ATAPI_INFO
Limits: Software: Available on OS21, not Linux.
Hardware: Available for all platforms having a PATA or SATA disk drive.
AUD_BEEP
Example: AUD_BEEP <Id> <Sampling Frequency> <NbSeconds>
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
<Sampling Audio sampling frequency (32000, 44100, 48000)
Frequency>
<NbSeconds> Number of seconds for which the beep tone is generated
AUD_DISABLE
Usage: AUD_DISABLE <Id> [<Type>]
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
<Type> This parameter is used to mute a specific output of the audio
device. If <Type> is not specified, mute all the outputs;
otherwise use one of the following:
– A_STEREO: mute pcm outputs only.
– A_SPDIF: mute digital output only.
For STx710x/STx520x/STx7200 only:
– A_PCMP0: mute pcm0 output only.
– A_PCMP1: mute pcm1 output only.
Description: Use this command to mute the audio output. To unmute the audio output, use
AUD_ENABLE.
Example: To mute all audio output on device 0:
AUD_DISABLE 0
To mute digital output only of device 1:
AUD_DISABLE 1 A_SPDIF
Limits: Software: None.
Hardware: None.
AUD_ENABLE
Usage: AUD_ENABLE <Id> [<Type>]
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
<Type> This parameter is used to unmute a specific output of the
audio device. If <Type> is not specified, unmute all the
outputs; otherwise use one of the following:
– A_STEREO: mute pcm outputs only.
– A_SPDIF: mute digital output only.
For STx710x/STx520x/STx7200 only:
– A_PCMP0: mute pcm0 output only.
– A_PCMP1: mute pcm1 output only.
Description: Use this command to unmute the audio output. To mute the audio output, use
AUD_DISABLE.
Example: To unmute all audio output on device 0:
AUD_ENABLE 0
To unmute digital output only of device 1:
AUD_ENABLE 1 A_SPDIF
Limits: Software: None.
Hardware: None.
AUD_GETCAPABILITY
Usage: AUD_GETCAPABILITY <Id>
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
Description: Use this command to get capabilities of the audio device <Id>. It displays information
on the capabilities of the decoder.
Example: AUD_GETCAPABILITY 0
Limits: Software: None.
Hardware: None.
AUD_INFO
Usage: AUD_INFO
Parameters: None.
Description: This command displays the STAUD driver version. For the STx710x, STx520x and
STx7200 series of SoCs, it also displays information on the audio firmware.
Example: AUD_INFO
Limits: Software: None.
Hardware: None.
AUD_INJSTART
Usage: AUD_INJSTART <Id> <Filename> <NbLoops> <Content> <Freq> <Type>
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
<Filename> Name of the file to be loaded
<NbLoops> Number of times to play the file.
Enter 0 to loop an infinite number of times.
There is also a specific case when <NbLoops> is a negative
value. See Description below.
<Content> This is the stream content parameter describing the stream
decoder to be used to decode this audio content. It can take
the following values :
[A_AC3, A_DTS, A_MP1, A_MP2, A_CDDA, A_PCM,
A_LPCM, A_MP3, A_MLP, A_AAC]
For STx710x, STx520x and STx7200, other decoders are
available:
[A_WMA, A_WMAPRO, A_DV, A_CDDA_DTS,
A_LCPM_DVDA, A_HE_AAC, A_DDPLUS]
<Freq> This is sampling frequency of the stream in Hertz (44100 or
48000). This parameter is most of the time detected
automatically with some informations which are in the stream.
But this is not the case typically for PCM streams where you
have to specify the sampling frequency.
<Type> This is the stream type. It must be either A_ES or A_PES
Description: Use this command to start playback on an ES or PES audio elementary stream. The
audio stream is loaded from a local or external hard disk drive (using JTAG). If the file
is small in size (or loaded from JTAG), the audio stream is loaded completely in the
memory and the stream is played from memory. If the stream is greater than
1 MBytes, the audio injector plays the stream by reading smaller chunks on the fly.
By default, the audio is muted after the start of the injection. Use the AUD_ENABLE
command to make the audio audible.
AUD_INJSTOP
Usage: AUD_INJSTOP <Id>
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
Description: This command is used to stop the audio device stream injection previously started
using AUD_INJSTART.
Example: AUD_INJSTOP 0
Limits: Software: None.
Hardware: None.
AUD_PAUSE
Usage: AUD_PAUSE <Id>
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
Description: Use this command to pause an audio device. To resume playback, use the
AUD_RESUME command.
Example: AUD_PAUSE 0
Limits: Software: None.
Hardware: None.
AUD_RESUME
Usage: AUD_RESUME <Id>
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
Definition: Use this command to resume an audio device that had earlier been paused using
AUD_PAUSE.
Example: AUD_RESUME 0
Limits: Software: None.
Hardware: None.
AUD_SETDYNAMIC
Usage: AUD_SETDYNAMIC <Id> <Enable> <CutFactor> <BoostFactor>
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
<Enable> This parameter is the flag to be set to 1 or 0 to enable or
disable the dynamic range control.
<CutFactor> This parameter is the cut factor value to be applied, in the
range 0 to 255.
<BoostFactor> This parameter is the boost factor value to be applied, in the
range 0 to 255.
Description: Use this command to set the dynamic range control of the audio driver.
Example: To enable the dynamic range control of device 0 with a cut factor of 128 and a boost
factor of 64:
AUD_SETDYNAMIC 0 1 +128 +64
Limits: Software: None.
Hardware: None.
AUD_SETEFFECT
Usage: AUD_SETEFFECT <Id> <Effect>
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
<Effect> This parameter is the effect to be applied on the audio device.
It can take one of the following values :
– A_EFFECT_SRS3D: Surround 3D effect
– A_EFFECT_SRSTS: Trusurround effect
– A_EFFECT_SRSTB: Trubass effect
– A_EFFECT_SRSF: Focus effect
– A_EFFECT_SRSTSXT: Trusurround XT effect
– A_EFFECT_NONE: No effect
Description: Use this command to set an audio effect. The effects available are listed in the
Parameters section.
Example: To enable the “Surround 3D effect” of audio device 0:
AUD_SETEFFECT 0 A_EFFECT_SRS3D
Limits: Software: None.
Hardware: None.
AUD_SETLATENCY
Usage: AUD_SETLATENCY <Id> <Type> <Latency>
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
<Type> This parameter is used to specify the output type to be
delayed. It can take the following values :
– A_PCMP0: pcm0 output
– A_PCMP1: pcm1 output
– A_SPDIF: SPDIF output
<Latency> This parameter contains the latency value in milliseconds to
be applied to the appropriate audio output.
Description: Use this command to add a delay or latency in milliseconds to a specific audio output
type. It could be used in fact to adjust for example audio delays between S/PDIF and
HDMI or SCART outputs to have the audio in phase on all outputs.
Example: To set a latency value of 50 milliseconds to PCM0 output of audio device 0:
AUD_SETLATENCY 0 A_PCMP0 50
Limits: Software: None.
Hardware: Only available for STx710x, STx520x or STx7200 series SoCs.
AUD_SETOFFSET
Usage: AUD_SETOFFSET <Id> <Offset>
Description: Use this command to add an offset in milliseconds on the synchronize audio
algorithm for the lipsync.
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
<Offset> This parameter is an integer value (negative or positive value)
to be used as an offset for the synchronization. The parameter
is in milliseconds. This means that setting <Offset> to -1000
causes one second of audio to be buffered.
AUD_SETSTEREO
Usage: AUD_SETSTEREO <Id> <Mode>
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
<Mode> This parameter is used to specify the output mode for stereo.
It can take the following values :
– A_STEREO_DL: Dual left mode
– A_STEREO_DR: Dual right mode
– A_STEREO_DM: Dual mono mode
– A_STEREO_SS: Stereo mode
– A_STEREO_2S: Second stereo mode
– A_STEREO_PL: Prologic stereo mode
Description: Use this command to set the stereo output mode. For example we can select left or
right channel or both with this command.
Example: To set stereo mode for audio device 0:
AUD_SETSTEREO 0 A_STEREO_SS
Limits: Software: None.
Hardware: None.
AUD_SETVOLUME
Usage: AUD_SETVOLUME <Id> <Volume>
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
<Volume> This parameter is the volume, expressed as a percentage.
Therefore a parameter of 0 is silence and 100 is the maximum
volume of the device.
Description: Use this command to adjust audio volume level. The change in volume is applied
equally to all outputs.
Note: A future enhancement to this command will allow the volume levels of different
outputs to be adjusted independently.
Example: To set volume to 50%:
AUD_SETVOLUME 0 +50
Limits: Software: None.
Hardware: None.
AUD_SETSPEED
Usage: AUD_SETSPEED <Id> <Speed>
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
<Speed> This parameter is the speed of audio playback
Description: Use this command to change the speed of audio playback. The change is applied
equally to all outputs.
Example: To set the speed as 1.5 times the normal speed:
AUD_SETSPEED 0 +150
Limits: Software: None.
Hardware: None.
AUD_SPDIF
Usage: AUD_SPDIF <Id> <Mode>
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
<Mode> This parameter is the S/PDIF mode to be setup. It can take the
following values :
– A_COMPRESSED: S/PDIF output is in compressed
mode (5.1)
– A_NONCOMPRESSED: S/PDIF output is not
compressed (pcm 2 channels)
– A_OFF: S/PDIF output is off
Description: This command changes the S/PDIF output configuration. Use this command to switch
between compressed or non compressed output or simply to disable the S/PDIF
output altogether.
Note: It is not possible to change S/PDIF mode on the fly for the STx710x, STx520x or
STx7200 series of SoCs. For these SoCs, stop the audio before using the
AUD_SPDIF command.
Example: To set S/PDIF output for audio device 0 to compressed:
AUD_SPDIF 0 A_COMPRESSED
Limits: Software: None.
Hardware: None.
AUD_STATUS
Usage: AUD_STATUS <Id> [<Reset>]
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
<Reset> This parameter is a flag which could be set to 1 to reset the
current statistics and put all fields to 0.
Description: Use this command to display various information relating to the selected audio
device, such as the number of audio frames decoded.
Example: AUD_STATUS 0
Limits: Software: None.
Hardware: None.
AUD_SYNCHRO
Usage: AUD_SYNCHRO <Id> <Synchro>
Parameters:
<Id> This is the identifier of the audio device, which is an integer
starting from 0.
<Synchro> This parameter is a flag which could be set to 1 to enable
synchronization or 0 to disable synchronization.
Description: Use this command to enable or disable the embedded synchronization algorithm
inside the audio device to guarantee lipsync.
Example: To enable synchronization of device 0:
AUD_SYNCHRO 0 1
To disable synchronization of device 0:
AUD_SYNCHRO 0 0
Limits: Software: None.
Hardware: None.
BLAST_INFO
Usage: BLAST_INFO
Parameters: None.
Description: This command displays the STBLAST driver version.
Example: BLAST_INFO
Limits: Software: On Linux, STBLAST is sometimes replaced by LIRC, in which case
STBLAST is not used.
Hardware: None.
BLAST_GETKEY
Usage: BLAST_GETKEY <Id> <TimeOutInMs>
Parameters: None.
Description: Use this command to check basic feature of the STBLAST driver: catching remote
control buttons. This function currently works with only one specific remote control
(the “Futarqe” remote control with some DVR buttons).
Example: BLAST_GETKEY 0 +10
Limits: Software: Tested only with a specific remote control where we know the protocol and
key assignments.
Hardware: Works only with Futarque remote control.
BLAST_POLLKEY
Usage: BLAST_POLLKEY <Id>
Parameters: None.
Description: Use this command to get the remote key pressed and return immediately.
Example: BLAST_POLLKEY 0
Limits: Software: Tested only with a specific remote control where we know the protocol and
key assignments. May not work with other remote controls.
BLIT_CLEAR
Usage: BLIT_CLEAR <Id>
Parameters: <Id> This parameter is the graphic plane identifier [0,1...].
Description: Use this command to clear a graphic plane by using hardware blitter feature. It uses
the fill rectangle function to clear the screen with a transparent color.
Example: BLIT_CLEAR 1
Limits: Software: None.
Hardware: None.
BLIT_COPY
Usage: BLIT_COPY <Source> <Destination>
Parameters:
<Source> The identifier of the graphic plane to copy from.
<Destination> The identifier of the graphic plane to copy to.
Description: Use this command to copy one graphic plane to another graphic plane.
Example: BLIT_COPY 1 2
Limits: Software: None.
Hardware: None.
BLIT_FILL
Usage: BLIT_FILL <Id>
Parameters: <Id> This parameter is the graphic plane identifier [0,1...].
Description: Use this command to fill a graphic plane with random color and positions of
rectangles, using hardware blitter feature.
It displays also the bandwidth of the test in Mpixels/s. The test is displaying 512
rectangles.
Example: BLIT_FILL 1
Limits: Software: None.
Hardware: None.
BLIT_FILL_JOB
Usage: BLIT_FILL_JOB <Id>
Parameters: <Id> This parameter is the graphic plane identifier [0,1...].
Description: Use this command to fill a graphic plane with random color and positions of
rectangles, using blit jobs.
Example: BLIT_FILL_JOB 1
Limits: Software: None.
Hardware: None.
BLIT_INFO
Usage: BLIT_INFO
Parameters: None.
Description: This command displays the STBLIT driver version.
Example: BLIT_INFO
Limits: Software: None.
Hardware: None.
CC_INFO
Usage: CC_INFO
Parameters: None.
Description: This command displays the STCC driver version.
Example: CC_INFO
Limits: Software: None.
Hardware: None.
CC_START
Usage: CC_START <Id> <GfxId>
Parameters:
<Id> This parameter is the playback identifier [0,1...].
<GfxId> Display the Close Captions on this graphics plane.
Description: Start Close Caption.
Example: CC_INFO
Limits: Software: None.
Hardware: None.
CC_STOP
Usage: CC_STOP <Id>
Parameters: <Id> This parameter is the playback identifier [0,1...].
Description: Stop Close Caption.
Example: CC_INFO
Limits: Software: None.
Hardware: None.
CLKRV_CHECKSTC
Usage: CLKRV_CHECK <Id> <TimeinMS>
Parameters:
<Id> This parameter is the clkrv device identifier.
<TimeinMS>
Description: Use this command to check two measures of STC in the interval determined by
TimeinMS.
Example: CLKRV_CHECKSTC 0 +10
Limits: Software: None.
Hardware: None.
CLKRV_DISABLE
Usage: CLKRV_DISABLE <Id>
Parameters: <Id> This parameter is the clkrv device identifier.
Description: This command disables the clock recovery handling of PCRs by setting the
PCRHandlingActive flag in given instance ControlBlock.
Example: CLKRV_DISABLE 1
Limits: Software: None.
Hardware: None.
CLKRV_ENABLE
Usage: CLKRV_ENABLE <Id>
Parameters: <Id> This parameter is the clkrv device identifier.
Description: This command enables the clock recovery handling of PCRs by setting the
PCRHandlingActive flag in given instance ControlBlock.
Example: CLKRV_ENABLE
Limits: Software: None.
Hardware: None.
CLKRV_GET
Usage: CLKRV_GET <Id>
Description: This command displays the current time (STC) of the clock instance <Id>
Example: CLKRV_GET 0
Limits: Software: None.
Hardware: None.
CLKRV_INFO
Usage: CLKRV_INFO
Parameters:
<Id> This parameter is the clkrv device identifier. A device with an
<Id> of 0 always exists in the system. The 0 clkrv device
identifier is the one use to control and to adjust the local
27Mhz frequency of the set-top box. If we compile STSDK
with DVR = 1 flag, the application creates more than one
clock devices to connect one clock device by video instance.
The command may return an error if no pcr is available on the
service that has been played. This command is useful to
check if we receive the pcr information for example.
CLKRV_INVALIDATE
Usage: CLKRV_INVALIDATE <Id>
Parameters:
<Id> This parameter is the clkrv device identifier. This invalidates
the clock recovery counter. Each driver which asks for the
<Id> time is notified with an error.
Description: Use this command to reset a clock recovery counter. In this case, any driver asking
for local time receives an error until a new PCR comes into the system or until the
clkrv instance has been set again.
Example: CLKRV_INVALIDATE 0
Limits: Software: None.
Hardware: None.
CLKRV_SET
Usage: CLKRV_SET <Id> <33Bit> <Base> <Extension>
Parameters:
<Id> This parameter is the clkrv device identifier.
<33bit> 33th MSB bit of the base clocked at 90Khz.
<Base> 32 LSB bits of the base clocked at 90Khz.
<Extension> 9 bits of the extension clocked at 27Mhz.
Description: Use this command to set the clock recovery counter to a specific value. The local
system clock is coded on 42 bits (Base.Extension) : 33 bits counter at 90 Khz and
9 bits of extension at 27 Mhz.
Example: CLKRV_SET 0
Limits: Software: None.
Hardware: None.
CLKRV_SETOFFSET
Usage: CLKRV_SETOFFSET <Id> <Offset>
Parameters:
<Id> This parameter is the clkrv device identifier.
<Offset> Offset in units of 90Khz to be applied to the local clock
recovery.
All drivers synchronized with this clkv device identifier jump to
this offset in time. For example an offset of -90000 forces
drivers to bufferize one second more of data.
Description: Use this command to set an offset on a specific clock recovery. The offset is specified
in units of 90 Khz and is a 32 bits signed value to be able to provide a positive or
negative offset.
Example: To set an offset of 90 Khz (that is, 1 unit) to device 0:
CLKRV_SETOFFSET 0 1
Limits: Software: None.
Hardware: None.
CRYPT_BENCH
Usage: CRYPT_BENCH <Id> <NbPackets> <NbLoops>
Parameters:
<Id> This parameter is the cryptography DMA device identifier, and
is an integer starting from 0.
<NbPackets> Number of dummy TS packets to generate for the benchmark.
<NbLoops> Number of times to perform the test.
Description: Use this command to perform cryptography benchmarks using the cryptography DMA
engine available in the system. Whether or not this command is available depends on
hardware and system capabilities.
For example, the cryptography engine on STx5100/7100 is the TDES DMA and on
STx7109 is the TKDMA, but there is no cryptography DMA on 5105, 5107, 5118 or
5119.
For security reasons, the default cryptographic libraries provided in the STAPI SDK
tree do not permit the encryption or decryption of any content. Nonetheless, running
this test provides an accurate assessment of the cryptography DMA capabilities. The
DMA facilities can be used for features such as HDD read and write with an
ATAPI/EMI interface.
The test performs a cryptographic DMA copy from DDR to DDR using dummy
transport stream packets. The number of the packets is specified by the
<NbPackets> argument. The test is repeated the number of times specified by the
<NbLoops> argument.
Finally, the test displays the bandwidth capability of the cryptographic DMA in Mbits/s
Example: CRYPT_BENCH 0 10 10
Limits: Software: OS21 not Linux.
Hardware: Chipset dependant.
CRYPT_INFO
Usage: CRYPT_INFO
Parameters: None.
Description: This command displays the STCRYPT/STTKDMA driver version.
Example: CRYPT_INFO
Limits: Software: OS21 not Linux.
Hardware: Chipset dependant.
CURSOR_DISABLE
Usage: CURSOR_DISABLE <Id>
Parameters:
<Id> This parameter is the cursor plane to be disabled. For some
systems, it may be possible to have more than one cursor
plane, which is why <Id> can have any value starting from 0.
Description: This command disables the cursor plane <Id>. To enable the cursor, see
CURSOR_ENABLE.
Example: CURSOR_DISABLE 0
Limits: Software: None.
Hardware: Chipset dependant.
CURSOR_ENABLE
Usage: CURSOR_ENABLE <Id>
Parameters:
<Id> This parameter is the cursor plane to be enabled. For some
systems, it may be possible to have more than one cursor
plane, which is why <Id> can have any value starting from 0.
Description: This command enables a cursor plane <Id>. To disable the cursor, see
CURSOR_DISABLE.
Example: CURSOR_ENABLE 0
Limits: Software: None.
Hardware: Chipset dependant.
CURSOR_LOAD
Usage: CURSOR_LOAD <Id> <Filename>
Parameters:
<Id> This parameter is the cursor plane affected.
<Filename> This is the name of the file containing the cursor bitmap. The
cursor bitmap is in the .gam ST standard format. Use the tool
“ST File format” to convert .bmp into .gam files. The tool is
available on the stapi_sdk_plugins Subversion server or can
be provided on request.
Description: Use this command to load a new cursor bitmap in memory for cursor <Id>.
Example: CURSOR_LOAD 0 "/ATA00/my_arrow.gam"
Limits: Software: None.
Hardware: Chipset dependant.
CURSOR_SETPOS
Usage: CURSOR_SETPOS <Id> <X> <Y>
Parameters:
<Id> This parameter is the cursor plane to be enabled.
<X> This is the X position to be set. The range of the X value is
dependant on screen resolution.
<Y> This is the Y position to be set. The range of the Y value is
dependant on screen resolution.
Description: Use this command to move a cursor plane <Id> on the screen.
Example: CURSOR_SETPOS 0 +300 +250
Limits: Software: None.
Hardware: Chipset dependant.
DEMUX_CONNECT
Usage: DEMUX_CONNECT <TsInput> <PhysicalPTI> <LogicalPTI>
[<ParallelFlag>] [<InvBitClockFlag>]
Parameters:
<TsInput> This parameter is the transport stream input to be connected.
It can take the following values:
– TSIN0: Transport stream input 0.
– TSIN1: Transport stream input 1.
– TSIN2: Transport stream input 2.
– TSIN3: Transport stream input 3.
– TSIN4: Transport stream input 4.
– SWTS0: Software transport stream input 0.
– SWTS1: Software transport stream input 1.
– SWTS2: Software transport stream input 2.
Some values may not be available, depending on the
hardware capabilities.
<PhysicalPTI> This parameter is the physical PTI name to be used. It can
take the following values :
– PTI0: Physical PTI hardware block 0.
– PTI1: Physical PTI hardware block 1.
<LogicalPTI> This parameter is the logical PTI device instance identifier. It is
an integer value from 0 to N, where N is the number maximum
of instances of physical PTI available on the system.
<ParallelFlag> FALSE: The TS input is serial
TRUE: The TS input is a parallel transport stream.
<InvBitClock> FALSE: The bit clock is not inverted.
TRUE: The bit clock is inverted to latch data on the opposite
edge.
Description: Use this command to create and to change transport stream inputs connection to
each PTI demultiplexer instance.
It connects a physical transport stream input to a physical PTI hardware block. Each
PTI hardware block can have more than one logical PTI instance, so the logical PTI
identifier must also be specified.
<ParallelFlag> and <InvBitClockFlag> are optional parameters. If there are
not provided, the command tries to find the correct TS signals setting by checking if a
demodulator is connected to the specified<TsInput>. If it is successful, it sets the
appropriate parallel or serial and bit clock polarity settings to be compatible with the
demodulator.
If a demodulator is not found, the command forces an internal default setting.
STMicroelectronics recommend specifying <ParallelFlag> and
<InvBitClockFlag> settings.
DEMUX_DUPLICATE
Usage: DEMUX_DUPLICATE <TsInput>
Parameters:
<TsInput> This parameter is the transport stream input to be connected.
It can take the following values :
– TSIN0 : Transport stream input 0.
– TSIN1 : Transport stream input 1.
Description: Use this command to duplicate TSIN0 or TSIN1 inputs to TSIN2 by using an internal
connection inside the transport stream merger.
Note: This function is available only for chipsets that have the duplicate feature.
Limits: Software: None.
Hardware: Chipset dependant.
DEMUX_INFO
Usage: DEMUX_INFO
Parameters: None.
Description: This command displays the version numbers of the drivers used for DEMUX input and
management (such as STPTI and STMERGE).
Example: DEMUX_INFO
Limits: Software: None.
Hardware: None.
DEMUX_MUX
Usage: DEMUX_MUX
Parameters: None.
Description: This command displays the current status of all the transport stream inputs of the
demultiplexer. It provides information if a stream is detected as a TS input and if there
are packets in error.
Example: DEMUX_MUX
Limits: Software: None.
Hardware: Chipset dependant.
DEMUX_PESSTART
Usage: DEMUX_PESSTART <Id> <Filename> <LogicalPTI> <Pid>
Parameters:
<Id> This parameter is used to identify the packetized elementary
stream (PES) collector instance. This ID is in the range of
[0...3].
<Filename> Filename of the file to generate to collect PES content.
<LogicalPTI> This parameter is used to specify the logical instance identifier
of the PTI to be used to filter the pes.
<Pid> Pid to filter [0...0x1FFFF].
Description: Use this command to filter PES content from a specified PID and to store that content
in a file. The <Pid> value is filtered from the logical PTI instance identifier provided by
the <LogicalPTI> parameter.
This command is available only if there is a hard disk drive connected to the system.
It is possible to filter up to four pes files in parallel.
Example: DEMUX_PESSTART 0 "/USBHDISK00/video.pes" 0 #65
Limits: Software: None.
Hardware: Available for all platforms with a mass storage device.
DEMUX_PESSTOP
Usage: DEMUX_PESSTOP <Id>
Parameters:
<Id> This parameter is used to identify the pes collector instance to
stop. <Id> can be in the range of [0...3].
Description: This command stops filtering a PES into a file. See DEMUX_PESSTART.
Example: DEMUX_PESSTOP 0
Limits: Software: None.
Hardware: Available for all platforms having a mass storage device.
DEMUX_SETKEY
Usage: DEMUX_SETKEY <Id> <KeyId> <Pid> <OddNotEven> <Key>[8]
Parameters:
<Id> This parameter is used to identify the logical instance of the
PTI on which we want to setup a DVB key.
<KeyId> This parameter is the key identifier. This id could be in the
range of [0...3].
<Pid> Pid to associate the key [0...0x1FFFF].
<OddNotEven> 0: indicates this is the even key.
1: indicates this is the odd key.
<Key>[8] Key value with 8 bytes long.
Description: Use this command to set a DVB key for the specified pid and logical PTI instance. The
key is provided as eight bytes values.
Example: DEMUX_SETKEY 0 0 #65 0 #11 #22 #33 #66 #33 #22 #11 #66
Limits: Software: None.
Hardware: None.
DEMUX_STATUS
Usage: DEMUX_STATUS <Id> [<Reset>]
Parameters:
<Id> This parameter is the PTI logical device id to be used [0,1...].
<Reset> This parameter is a flag which when set to 1 resets the current
statistics and put all fields to 0.
Description: This command checks the status of the demux device by displaying some statistics
informations, such as the number of cc errors.
Example: To display the demux status of device 0 and reset the statistics:
DEMUX_STATUS 0 1
Limits: Software: None.
Hardware: None.
DENC_COLORBAR
Usage: DENC_COLORBAR <Id> <Enable>
Parameters:
<Id> This parameter is the DENC device id to be used [0,1...].
<Reset> This parameter is a flag which could be set to 1 to enable the
colorbar or 0 to disable the colorbar pattern.
Description: Use this command to enable or disable the color bar pattern on video analog DENC
outputs.
Example: DENC_COLORBAR 0
Limits: Software: None.
Hardware: None.
DENC_GETCAPABILITY
Usage: DENC_GETCAPABILITY <Id>
Parameters: <Id> This parameter is the DENC device id to be used [0,1...]
Description: This command displays details of DENC capabilities.
Example: DENC_GETCAPABILITY 0
Limits: Software: None.
Hardware: None.
DENC_GETMODE
Usage: DENC_GETMODE <Id>
Parameters: <Id> This parameter is the DENC device id to be used [0,1...]
Description: This command displays STDENC driver capabilities such as device type, chroma
delays and so forth.
Example: DENC_GETMODE 0
Limits: Software: None.
Hardware: None.
DENC_INFO
Usage: DENC_INFO
Parameters: None.
Description: This command displays the STDENC driver version.
Example: DENC_INFO
Limits: Software: None.
Hardware: None.
DENC_SETMODE
Usage: DENC_SETMODE <Id> <Mode>
Parameters:
<Id> This parameter is the DENC device ID to be used [0,1...].
<Mode> This parameter is the mode to be applied to the DENC output
It can take the following values:
– PAL: Switch to PAL standard.
– SECAM: Switch to SECAM standard.
– NTSC: Switch to NTSC standard.
DMA_INFO
Usage: DMA_INFO
Parameters: None.
Description: This command displays the DMA engine driver version (STFDMA).
Example: DMA_INFO
Limits: Software: None.
Hardware: None.
DMA_SWTS
Usage: DMA_SWTS <PtiId> <NbPackets> <NbLoops>
Parameters:
<Id> This parameter is the PTI logical device identifier [0,1...].
<NbPackets> Number of dummy TS packets to generate for the test.
<NbLoops> Number of times to perform the test.
Description: Use this command to perform a software transport stream injection test by using the
DMA engine available in the system. Whether or not this command is available
depends upon hardware and system capabilities.
The test performs an injection of dummy transport packets into the <PtiId> logical
instance which is supposed to be connected to a SWTS transport stream. If this is not
the case, the command returns an error.
<NbPackets> are injected to the SWTS and the test checks the result of the
injection to identify if packets have been lost or corrupted. The test is repeated the
number of times specified by <NbLoops> argument.
Finally, the test displays the bandwidth capability of the injection in Mbits/s.
Example: Do a SWTS injection using DMA on PTI2 with 256 Ts packets and loop is 2
DMA_SWTS +2 +256 +16
Limits: Software: None.
Hardware: Chipset dependant.
DMA_TEST
Usage: DMA_TEST <AddressSrc> <AddressDst> <Size>
Parameters:
<AddressSrc> Source buffer address
<AddressDst> Destination buffer address
<Size> Number of bytes to copy
Description: Use this command to perform a basic test of memory copy using DMA.
A source and a destination buffer must be specified. These can be allocated in
advance using the ALLOC command, and then removed afterwards using FREE. The
source buffer can contain any type of data, such as a pattern generated by the FILL
command.
This test copies the data in source to destination and then checks the success of the
operation by comparing the contents of the two buffers. The command also displays
the bandwidth of the transfer, measured in MBits/s.
Example: Allocate 1024 bytes for source:
ALLOC +1024
Fill with 0x11223344 pattern:
FILL <AddressSrc> +1024 #11223344
Allocate 1024 bytes for destination:
ALLOC +1024
Do the DMA copy:
DMA_TEST <AddressSrc> <AddressDst> +1024
Finally, free the buffers:
FREE <AddressSrc>
FREE <AddressDst>
Note: Replace <AddressSrc> and <AddressDst> with the addresses returned by the
ALLOC commands.
Limits: Software: OS21 only (not Linux).
Hardware: Chipset dependant.
FLASH_BLOWER
Usage: FLASH_BLOWER <Filename> [<Parameters>]
Parameters:
<Filename> This is a string which contains the filename reference to the
rom to be loaded. For example, if you set the filename to
“COCOREF_GOLD_7109_OS21”, the blower looks for a file
called “flash_COCOREF_GOLD_7109_OS21.[hex|bin]”.
<Parameters> This is a string which contains optional configuration for the
blower. Currently, only one parameter is recognized:
– PROGRAM_FROM_THE_END means that the blower
burns the image by starting from the end of Flash
memory and decrementing addresses.
Description: Use this command to start the flash burner from the STSDK testtool interface. It is
exactly the same tool when we run the blower from the JTAG interface:
make run_blower.
The advantage of having the blower integrated into the STAPI SDK tree is that it is
possible to flash a new STAPI SDK tree from within the current STAPI SDK tree. This
means that the software can be upgraded without the need of an ST Micro Connect.
Store your new .hex or .bin file to an USB key or HDD typically and then you use
the embedded blower to burn the new image from the USB key.
If there is no mass storage interface in the system, then the only way of upgrading the
software is by using an ST Micro Connect.
Please, type:
1 - Program the flash, from file flash_mb680_7105_OS21.hex
2 - Program the flash, from file flash_mb680_7105_OS21.bin
3 - Compare flash and file flash_mb680_7105_OS21.hex
4 - Compare flash and file flash_mb680_7105_OS21.bin
5 - Erase content of all flash
6 - Dump the content of the flash into flash_mb680_7105_dump.bin
7 - Quit
Choice?1
romtool : ---------------------------------------
romtool : Identifier of the flash to be programmed (default value is 0)
>?0
romtool: Name of the file to load to program the flash (default value is
"flash_mb796_5206_ST40_OS21_32BITS.bin") ?>.
romtool: Address from where to start programming (default value is
0x00000000) >?.
romtool: Size to program (default value is 0 bytes, 0=>program all the
file size) >? .
FLASH_INFO
Usage: FLASH_INFO
Parameters: None.
Description: This command displays the STFLASH driver version.
Example: FLASH_INFO
Limits: Software: OS21 only (not LINUX).
Hardware: None.
FS_BENCH
Usage: FS_BENCH <Filename>
Parameters:
<Filename> This parameter is the filename of the file to create for the test.
The file is deleted at the end of the test.
Description: Use this command to run some basic benchmark read and write tests on the file
system. The test creates a file (with the path specified by the <Filename> argument)
and performs a series of reads and writes using different sizes of memory chunks.
The test reports the bandwidth capabilities of each transfer.
To benchmark a different file system, change the <Filename> argument so that the
file is created on the file system under investigation.
Example: Linux: Perform a benchmark test of a NFS file system:
FS_BENCH "/mnt/mydisk/file.bin"
OS21: Perform a benchmark test of a SATA disk and VFS file system with
OSPlus/OS21
FS_BENCH "/ATA00/file.bin"
Limits: Software: Requires OSPlus on OS2x systems.
Hardware: Available for all platforms with a mass storage device.
FS_COPY
Usage: FS_COPY <FilenameSrc> <FilenameDst>
Parameters:
<FilenameSrc> This parameter is the filename of the source file.
<FilenameDst> This parameter is the filename of the destination file.
Description: This command copies a source file to a destination file. On OS21, either the source
file or destination file may be files on your host machine, in which case the data is
read or written through the JTAG interface.
Example: Linux: Copy a file between different mounted file systems:
FS_COPY "/mnt/myfile.trp" "/root/myfile.trp"
OS2x: Copy from SATA to USB key
FS_COPY "/ATA00/file.bin" "/USBRDISK01/file.bin"
OS2x: Copy from host machine to the local HDD of the box
FS_COPY "C:\pictures\myimage.gam" "/ATA00/myimage.gam"
Limits: Software: Need OSPlus for OS2x systems.
Hardware: Available for all platforms with a mass storage device.
FS_DEL
Usage: FS_DEL <Filename>
Parameters:
<Filename> This parameter is the filename of the file to be deleted.
Description: Use this command to delete a file. For OS21, it is not possible to use this command to
remove a file from the host machine (through JTAG).
Example: Linux: Delete a file from a mounted file system:
FS_DEL "/mnt/myfile.trp" "/root/myfile.trp"
OS2x: Delete a file from USB HDD disk drive
FS_DEL "/USBHDISK00/file.bin" "/USBRDISK01/file.bin"
Limits: Software: Requires OSPlus for OS2x systems.
Hardware: Available for all platforms with a mass storage device.
FS_DIR
Usage: FS_DIR <Pathname>
Parameters:
<Pathname> This parameter is the pathname of the directory to be listed.
Description: Use this command to list the contents of a directory. For OS21, it is not possible to list
a directory from the host machine (through JTAG).
Example: Linux: List the directory on a mounted file system:
FS_DIR "/mnt/mydir"
OS2x: List the directory from a USB key:
FS_DIR "/USBRDISK00/images"
Limits: Software: Requires OSPlus for OS2x systems.
Hardware: Available for all platforms with a mass storage device.
FS_FDISK
Usage: FS_DISK <DiskName>
Parameters:
<DiskName> This parameter is the disk name of the mass storage device.
Description: Use this command to perform disk formatting and/or partitions creation of the disk
device name. When a new, unformatted hard disk drive is connected to the system,
use this command to format and partition that drive.
Note: This command is only available for OS2x/OSPlus systems because Linux has its own
commands to perform these operations (such as mkfs.ext2). Consult the Linux
documentation for more information.
The <DiskName> parameter is the name of the device identified by the OSPlus
libraries. For example, this may be:
– /usb/hdisk0 for a USB Hdd drive
– /usb/rdisk0 for a USB key
– /ATA0” for a PATA or SATA HDD drive.
The command displays an interactive menu. Choose a specific action from the
following:
[1] Display list of partitions
[2] Create a partition
[3] Delete a partition
[4] Remove all partitions
[5] Check file system
[6] Destroy MBR
[7] Quit
Options [1] through [4] are for managing partitions on the disk. A single mass storage
device may contain one or more partitions, each with a unique name. A new partition
is created with the name volumeX, where X is an integer starting from 0.
Use option [5] to repair the disk if it has suffered damage from an unexpected power
loss or if the application was terminated without properly unmounting all the devices.
Option [6] is a specific feature to erase the first LBA 0 (512 bytes). This is needed to
address the specific case where a mass storage device cannot be detected by the
OSPlus volume manager. If this happens, use this option to clean the first LBA and
then re-create the partitions.
Use option [7] to quit the menu. After quitting, FS_FDISK mounts all the volumes of
the file system denoted by <DiskName> with “rw” access. For example, if you have
created two partitions (/volume0 and /volume1) on the device /usb/hdisk0
device. When the file system is mounted, two mount names are available.
The mount name for a partition is constructed from the device name according to the
following rules:
1.Remove all slashes from device name and convert to upper case. Thus,
/usb/hdisk0 becomes USBHDISK0.
2. Prefix the name with a slash. USBHDISK0 becomes /USBHDISK0
3. Append the partition number to the end of the name. For example: /USBHDISK00
Consequently, the mount name for the first partition of device /usb/hdisk0 is
/USBHDISK00.
Use the mount name as the first element of pathnames when manipulating the
contents of the given partition with all the other FS_* testtool commands. For
example:
FS_MKDIR "/USBRDISK00/new_directory"
Example: FS_DISK /usb/hdisk0
Limits: Software: OS21 only (not Linux).
Hardware: Available for all platforms with a mass storage device.
FS_INFO
Usage: FS_INFO
Parameters: None.
Description: This command displays details of all the mount points.
Example: FS_INFO
Limits: Software: OS21 with OSPlus (not Linux).
Hardware: Available for all platforms with a mass storage device.
FS_LIST
Usage: FS_LIST
Parameters: None
Description: Use this command to list all the peripheral devices detected by OSPlus. The list may
include ethernet devices, mass storage devices, volumes and so forth.
Example: FS_LIST
Limits: Software: OS21 with OSPlus (not Linux).
Hardware: Available for all platforms with a mass storage device.
FS_MKDIR
Usage: FS_MKDIR <Pathname>
Parameters:
<Pathname> This parameter is the pathname of the directory to create.
Description: Use this command is used to create a directory. For OS21, please note that it is not
possible to create a directory on the host machine (through JTAG).
Example: Linux: Create a directory on a mounted file system:
FS_MKDIR "/mnt/new_directory"
OS2x: Create a directory on the USB key
FS_MKDIR "/USBRDISK00/mydirectory"
Limits: Software: Needs OSPlus for OS2x systems.
Hardware: Available for all platforms with a mass storage device.
FS_MOUNT
Usage: FS_MOUNT <DiskName> <VolumeName> [<Mode>]
Parameters:
<DiskName> This parameter is the device name to be mounted.
<VolumeName> This parameter is the volume name to be mounted
(OS2x/OSPlus) or the mount point name for Linux.
<Mode> This parameter is a string [“r”|”rw”] to define access to the
mass storage.
Description: Use this command to mount a mass storage to a specific mount point name.
Depending upon the operating system in use (that is, OS2x/OSPlus or Linux), the
three parameters have different meanings:
OS2x/OSPlus
When using OS2x/OSPlus, the <DiskName> parameter is the name of the device
identified by OSPlus (in other words, the device listed by FS_LIST). It accepts some
common values like "/usb/hdisk0" or "/usb/rdisk0" or "/ATA0".
The <VolumeName> parameter is a string which determinates the volume to be
mounted on a specific device. It could be "/volumeX" where X is an integer starting
from 0.
Finally, the optional <Mode> parameter is a string equal to “r” or “rw” that specifies
the access control of the disk or volume to be mounted.
The mount name for a partition is constructed from the device name according to the
following rules:
1.Remove all slashes from device name and convert to upper case. Thus,
/usb/hdisk0 becomes USBHDISK0.
2. Prefix the name with a slash. USBHDISK0 becomes /USBHDISK0
3. Append the partition number to the end of the name. For example: /USBHDISK00
Consequently, the mount name for the first partition of device /usb/hdisk0 is
/USBHDISK00.
Use the mount name as the first element of pathnames when manipulating the
contents of the given partition with all the other FS_* testtool commands. For
example:
FS_MKDIR "/USBRDISK00/new_directory"
The <Mode> parameter is significant. A mode of “rw” allows both reading and writing
to mass storage. However, if write access is not required, STMicroelectronics
recommend that you use “r” mode, in order to improve security and to avoid a disk
crash caused by a power failure or the application failing in an unexpected way.
However, it is possible to repair the disk with the FS_FDISK command if needed.
Linux
Using Linux, the FS_MOUNT command is just a wrapper to the mount common
system command. It avoids the need for a separate shell to mount or umount devices.
Instead, both operations can be carried out directly from STAPI SDK.
The <DiskName> parameter is the name of the device identified by the kernel. For
example, if mass storage devices are connected, the /dev directory contains items
similar to the following:
/dev/sdaX
/dev/sdbX
/dev/sdcX
where X is a number starting from 0.
As volumes are directly managed by the kernel, the <VolumeName> parameter is
simply the mount point name you want.
The <Mode> parameter is not used at all.
FS_MOUNT "/dev/sdb1" "/mnt"
mounts the /dev/sdb1 device to directory /mnt.
As explained above, the FS_MOUNT command is just a wrapper to the mount Linux
command. This means that mount command line arguments can be passed as part
of the <DiskName> parameter. For example, to mount a disk formatted in FATxx ,
use the following:
FS_MOUNT "-t vfat /dev/sdb1" "/mnt"
Example: Linux: Mount a USB HDD driver (formatted on PC) to /mnt :
FS_MOUNT "-t vfat /dev/sdb1" "/mnt"
OS2x: Mount a USB key with “r” access only.
FS_MOUNT "/usb/rdisk0" "/volume0" "r"
Limits: Software: OS21 with OSPlus (not Linux).
Hardware: Available for all platforms with a mass storage device.
FS_RENAME
Usage: FS_RENAME <OldName> <NewName>
Parameters:
<OldName> This parameter is the current name of the file to be renamed.
<NewName> This parameter is the new name of the file.
Description: Use this command to rename a file. For OS21, it is not possible to create a directory
on the host machine (through JTAG).
Note: This command works only for files and not directories.
Example: Linux: Rename a file:
FS_RENAME "/mnt/image.jpg" "/mnt/image1.jpg"
OS2x: Rename a file on ATA interface
FS_RENAME "/ATA00/stream.ts" "/ATA00/stream.trp"
Limits: Software: OS21 with OSPlus (not Linux).
Hardware: Available for all platforms with a mass storage device.
FS_RMDIR
Usage: FS_RMDIR <Pathname>
Parameters:
<Pathname> This parameter is the pathname of the directory to delete.
Description: Use this command to remove a directory. For OS21, it is not possible to delete a
directory on the host machine (through JTAG).
Example: Linux: Delete a directory on a mounted file system
FS_RMDIR "/mnt/mydirectory"
OS2x: Delete a directory on the USB key
FS_RMDIR "/USBRDISK00/mydirectory"
Limits: Software: Requires OSPlus for OS2x systems.
Hardware: Available for all platforms with a mass storage device.
FS_UMOUNT
Usage: FS_UMOUNT <MountName>
Parameters:
<MountName> This parameter is the mount point name of the mass storage
to unmount.
Description: Use this command to perform a "umount" in order to unmount a mass storage device.
Example: Linux: Unmount /mnt:
FS_UMOUNT "/mnt"
OS2x: Unmount USB key
FS_UMOUNT "/USBRDISK00"
Limits: Software: OS21 with OSPlus (not Linux).
Hardware: Available for all platforms with a mass storage device.
FSK_CHANGE_CHANNEL
Usage: FSK_CHANGE_CHANNEL <DeviceID> <FEDeviceID> <FreqMhz> <Polarity>
<Band>
Parameters:
<DeviceID> The identifier of the tuner device, an integer started from 0.
<FEDeviceID> The identifier of the FSK device.
<FreqMhz> The frequency in MHz.
<Polarity> FSK_POL_V: Vertical polarity.
FSK_POL_H: Horizontal polarity.
<Band> Either 0 or 1.
FSK_INFO
Usage: FSK_INFO
Parameters: None.
Description: This command displays revision number of the STFSK driver.
Example: FSK_INFO
Limits: Software: No Linux support. FSK not supported with stfrontend.
Hardware: Hardware change required on the board to support FSK filtering.
FSK_TUNER_REGISTER
Usage: FSK_TUNER_REGISTER <DeviceID> <FEDeviceID>
Parameters:
<DeviceID> The identifier of the tuner device, an integer started from 0.
<FEDeviceID> The identifier of the FSK device.
Description: Use this command to register the tuner with FSK device.
Example: FSK_TUNER_REGISTER 0 0
Limits: Software: No Linux support. FSK not supported with stfrontend.
Hardware: Hardware change required on the board to support FSK filtering.
FSK_TUNER_STATUS
Usage: FSK_TUNER_STATUS <DeviceID> <FEDeviceID>
Parameters:
<DeviceID> The identifier of the tuner device, an integer started from 0.
<FEDeviceID> The identifier of the FSK device.
Description: This command displays the status of the specified FSK-registered tuner.
Example: FSK_TUNER_STATUS 0 1
Limits: Software: No Linux support. FSK not supported with stfrontend.
Hardware: Hardware change required on the board to support FSK filtering.
FSK_TUNER_UNREGISTER
Usage: FSK_TUNER_UNREGISTER <DeviceID>
Parameters: <DeviceID> The identifier of the tuner device, an integer started from 0.
Description: Use this command to unregister the specified tuner.
Example: FSK_TUNER_UNREGISTER 0
Limits: Software: No Linux support. FSK not supported with stfrontend.
Hardware: Hardware change required on the board to support FSK filtering.
GFX_ALPHA
Usage: GFX_ALPHA <Id> <Alpha0> <Alpha1>
Parameters:
<Id> This is the identifier for the graphic plane.
<Alpha0> This parameter is the global alpha 0 value (8 bits).
<Alpha1> This parameter is the global alpha 1 value (8 bits).
Description: Use this command to change global alpha 0 and 1 to a specific graphic plane
specified by the <Id> parameter. This command is mainly used when the graphic
plane is in ARGB1555 format. There is one bit of alpha: when the bit is 0, <Alpha0>
is applied, and when the bit is 1, <Alpha1> is applied for the transparency.
For other color formats, <Alpha0> is equal to <Alpha1>.
Example: Set Alpha0 to 0x70 and Alpha1 to 0x10:
GFX_ALPHA 0 #70 #10
Limits: Software: None.
Hardware: None.
GFX_BITMAP
Usage: GFX_BITMAP <Id> <Filename> [<SrcScaleMode> <DstScaleMode>]
[<S_Xin> <S_Yin> <S_Width> <S_Height>] [<D_Xin> <D_Yin>
<D_Width> <D_Height>]
Parameters:
<Id> This is the identifier for the graphic plane.
<Filename> The filename of the bitmap to be loaded.
<SrcScaleMode> This parameter is optional and can take the following values :
– GFX_SDEFAULT: Take the full bitmap and display
it.
– GFX_SAUTO: Take the full bitmap and display it.
– GFX_SMANUAL: Specify a specific window area of
the bitmap to be displayed. The window area is set
by the optional parameters <S_Xin>, <S_Yin>,
<S_Width> and <S_Height>.
<DstScaleMode> This parameter is optional and can take the following values :
– GFX_SDEFAULT: Put the bitmap in the middle of
screen.
– GFX_SAUTO: Take the full bitmap and display it.
– GFX_SMANUAL: Specify a specific window area of
the bitmap to be displayed. The window area is set
by the optional parameters <D_Xin>, <D_Yin>,
<D_Width> and <D_Height>.
Description: Use this command to display the bitmap in the file <Filename> in the graphic plane
<Id>. For OS2x systems, it is possible to name a file located on the host to be loaded
using JTAG, such as C:\files\mypicture.gam. On Linux or OS2x/OSPlus
systems, specify bitmaps files that are located on a locally mounted mass storage
device.
The only bitmap format currently supported is the .gam format, which is a specific ST
file format. Use the gfx tool on a PC to convert .bmp files to .gam files. The gfx tool
can be provided by an ST FAE.
The input bitmap can have a color format that is different from the graphic plane in
which you want to display it. In this case, the accelerated embedded blitter performs
the color format conversion. If the input format is the same, and if no resize is
requested, the CPU copies the bitmap.
The graphics plane must be enabled in order to see the bitmap. See the
GFX_ENABLE command for more details.
Example: Display a complete picture and center if on the layer:
GFX_BITMAP 0 "/mnt/crow_argb_1555.gam"
Zoom a specific part of the picture and center if on the layer.
GFX_BITMAP 0 "/mnt/crow_argb_1555.gam" GFX_SMANUAL GFX_SDEFAULT
+100 +100 +300 +300
GFX_DISABLE
Usage: GFX_DISABLE <Id>
Parameters:
<Id> This is the identifier for the graphic plane.
GFX_ENABLE
Usage: GFX_ENABLE <Id>
Parameters:
<Id> This is the identifier for the graphic plane.
GFX_INFO
Usage: GFX_INFO
Parameters: None.
Description: This command displays the STLAYER/STBLIT driver version.
Limits: Software: None.
Hardware: None.
GFX_SETANTIFLICKER
Usage: GFX_SETANTIFLICKER <Id> <State>
Parameters:
<Id> This is the identifier for the graphic plane.
<State> 0: Disable antiflicker
1: Enable antiflicker
GFX_SETWINDOW
Usage: GFX_SETWINDOW <Id> <In_X> <In_Y> <In_Width> <In_Height> <Out_X>
<Out_Y> <Out_Width> <Out_Height>
Parameters:
<Id> This is the identifier for the graphic plane.
<In_*> These parameters define the window area of the source to be
resized in the graphic plane.
<Out_*> These parameters define the window area of the destination.
Description: Use this command to resize a part of a graphic plane <Id>.
Example: GFX_SETWINDOW 0 +100 +100 +300 +300 0 0 +720 +576
Limits: Software: None.
Hardware: None.
GUI_COM
Usage: GUI_COM
Parameters: None.
Description: Use this command to control the GUI interface through testtool.
Example: GUI_COM
Limits: Software: None.
Hardware: None.
GUI_INFO
Usage: GUI_INFO
Parameters: None.
Description: This command displays the GUI driver version.
Example: GUI_INFO
Limits: Software: None.
Hardware: None.
GUI_RESTORE
Usage: GUI_RESTORE
Parameters: None.
Description: This command reads a channel list from a local file.
Example: GUI_RESTORE
Limits: Software: None.
Hardware: None.
GUI_SAVE
Usage: GUI_SAVE
Parameters: None.
Description: This command saves a channel list to a local file.
Example: GUI_SAVE
Limits: Software: None.
Hardware: None.
GUI_SORT
Usage: GUI_SORT
Parameters: None.
Description: This command sorts the channel list.
Example: GUI_SORT
Limits: Software: None.
Hardware: None.
HDMI_DISABLE
Usage: HDMI_DISABLE <Id>
Parameters:
<Id> This parameter is the HDMI device to be disabled. After this
call, video or graphic planes should disappear on the HDMI
screen connected to the box.
HDMI_ENABLE
Usage: HDMI_ENABLE <Id>
Parameters:
<Id> This parameter is the HDMI device to be enabled. After this
call, video or graphic planes should be displayed on the HDMI
screen connected to the box.
HDMI_INFO
Usage: HDMI_INFO
Parameters: None.
Description: This command displays the STHDMI driver version.
Example: HDMI_INFO
Limits: Software: None.
Hardware: Available only when chipset has a HDMI interface.
HDMI_SETAVI
Usage: HDMI_SETAVI <Id> <AviTag> <AviValue> [<AviTag> <AviValue>]...
Parameters:
<Id> This is the HDMI device identifier.
<AviTag> This parameter is a tag that identifies the AVI info frame to be
set. It can take the following values:
– HDMI_AS: Change the aspect ratio.
– HDMI_AAS: Change the active aspect ratio.
– HDMI_PS: Change picture scaling.
– HDMI_OUT: Change output type.
– HDMI_COL: Change colorimetry.
– HDMI_SCI: Change scan information.
– HDMI_END: Special tag to identify end of the
parameters. This tag does not have an associated
<AviValue>.
<AviValue> This parameter is the value associated with the tag specified by
the previous parameter. It can take the following values :
– HDMI_RGB: Set output type to RGB888
(Tag = HDMI_OUT).
– HDMI_YC: Set output type to YCBCR444
(Tag = HDMI_OUT).
– HDMI_169: Set aspect ratio to 16/9
(Tag = HDMI_AS/AAS).
– HDMI_43: Set aspect ratio to 4/3
(Tag = HDMI_AS/AAS).
– HDMI_2211: Set aspect ratio to 221/1
(Tag = HDMI_AS/AAS).
– HDMI_SQUARE: Set aspect ratio to square
(Tag = HDMI_AS/AAS).
– HDMI_ITUR601: Set colorimetry to 601
(Tag = HDMI_COL).
– HDMI_ITUR709: Set colorimetry to 709
(Tag = HDMI_COL).
– HDMI_SCANNODATA: Set no scan
(Tag = HDMI_PS/SCI)
– HDMI_OVERSCANNED: Set over scan
(Tag = HDMI_PS/SCI)
– HDMI_UNDERSCANNED: Set under scan
(Tag = HDMI_PS/SCI)
Description: Use this command to send AVI info frames to the HDMI receiver (screen <Id>). Many
AVI info frames exist, which is why the command accepts one tag parameter to
identify which info frame to update and a value to be set to the associated info frame.
Example: HDMI_SETAVI 0 HDMI_OUT HDMI_RGB HDMI_END
Limits: Software: None.
Hardware: Available only when chipset has a HDMI interface.
HDMI_SETKEY
Usage: HDMI_SETKEY <Id> <IV_0> <IV_1> <KSV_0> <KSV_1>
Parameters:
<Id> This is the HDMI device identifier.
<IV_0> This parameter is the initial vector LSB 32 bits.
<IV_1> This parameter is the initial vector MSB 32 bits.
<KSV_0> This parameter is the key selection vector LSB 32 bits.
<KSV_1> This parameter is the key selection vector MSB 32 bits.
Description: Use this command to specify key vectors for the High-bandwidth Digital Content
Protection (HDCP) authentication. This command does not permit the full key to be
specified.
You will need to modify the code to perform this operation. See
stapp/hdmi/hdmi.c and HDMI_DeviceKeys[] array.
This command is available only if the STAPI SDK tree has been compiled with HDCP
support. (This option is enabled through the .mak file of the platform when activating
STVOUT_HDCP_PROTECTION). This is possible only if you have a tree with the
appropriate HDCP support inside the STAPI drivers, and for that you require an
HDCP licence. By default, STAPI SDK is not provided with HDCP support, so this
testtool command is not available by default.
Example: HDMI_SETKEY 0 #11223344 #00556677 #00000001 #23456789
Limits: Software: Available only with HDCP licence and appropriate STAPI drivers.
Hardware: Available only when chipset has a HDMI/HDCP interface.
HDMI_STATUS
Usage: HDMI_STATUS <Id>
Parameters:
<Id> This is the HDMI device identifier.
Description: Use this command to get information about the HDMI device <Id>. It displays the
name of the HDMI receiver and some of these capabilities (like DVI or HDMI
capable.)
Example: HDMI_STATUS 0
Limits: Software: None.
Hardware: Available only when chipset has a HDMI interface.
I2C_DETECT
Usage: I2C_DETECT <Mode>
Parameters:
<Mode> This parameter is the mode to be used for write I2C access.
– 0 : Normal write and read access.
– 1 : Write with no stop bit access.
Description: Use this command to detect if anything is connected on the I2C bus defined on the
platform. The test carries out read and write accesses to all I2C addresses from 0x00
to 0xFF. and displays the I2C addresses that reply properly to read or write access.
This command is useful to check if demodulators are properly connected on the
board (for example, not in a reset state).
Example: I2C_DETECT 0
Limits: Software: None.
Hardware: Depending on the I2C topology of the board, this command may cause a
lock-up if, for example, the I2C bus tested is in tristate or if a I2C peripheral does not
like dummy read or write. If this occurs on a platform, repeat the test after changing
the <Mode> parameter.
I2C_INFO
Usage: I2C_INFO
Parameters: None.
Description: This command displays the STI2C driver version.
Example: I2C_INFO
Limits: Software: None.
Hardware: None.
I2C_READ
Usage: I2C_READ <Device> <Address> <NbBytes>
Parameters:
<Device> The I2C bus device identifier, an integer starting from 0.
<Address> The peripheral I2C address from which to read.
<NbBytes> The number of bytes to be read.
Description: Use this command to read <NbBytes> bytes on a specific I2C peripheral on the bus.
The command displays the bytes read.
Example: I2C_READ 0 #38 2
Limits: Software: None.
Hardware: None.
I2C_READEXT
Usage: I2C_READEXT <Device> <Address> <SubAddress>
Parameters:
<Device> The I2C bus device identifier, an integer starting from 0.
<Address> The peripheral I2C address from which to read.
<SubAddress> This is the specific register address to read.
Description: Use this command to read only one byte on a specific I2C peripheral on the bus using
the read extended mode. The command first performs a write access (without stop
bit) to transfer the sub address to the peripheral, then performs a read access to get
the content of the sub address. The command displays the byte read.
Example: I2C_READEXT 0 #38 1
Limits: Software: None.
Hardware: None.
I2C_WRITE
Usage: I2C_WRITE <Device> <Address> <Byte0> [<ByteN>]
Parameters:
<Device> The I2C bus device identifier, an integer starting from 0.
<Address> The peripheral I2C address to which to write.
<Byte0> First byte to write to the peripheral
<ByteN> Remaining bytes to be written to the peripheral. N must be
less than or equal to 63.
Description: Use this command to write N bytes on a specific I2C peripheral on the bus.
Example: I2C_WRITE 0 #38 #11 #22 #33 #44....
Limits: Software: None.
Hardware: None.
IP_CONFIG
Usage: IP_CONFIG <Id> [<Address>] [<Mask>] [<Gateway>]
Description: Use this command to get or set the IP configuration of the ethernet interface <Id>. If
invoked with <Id> as the only parameter, the command displays the current
configuration.
Parameters:
<Id> The ethernet device identifier, which is an integer starting from
0.
<Address> This is a string which contains the IP address to be set. If the
parameter DHCP is passed as the address, it automatically
request the IP from the server.
<Mask> This is a string which contains the mask/subnet to be set.
<Gateway> This is a string which contains the IP address of the gateway.
IP_FTP_START
Usage: IP_FTP_START <Id>
Parameters:
<Id> The ethernet device identifier, which is an integer starting from
0.
IP_FTP_STOP
Usage: IP_FTP_STOP <Id>
Parameters:
<Id> The ethernet device identifier, which is an integer starting from
0.
IP_INFO
Usage: IP_INFO
Parameters: None.
Description: This command displays the revision numbers of the TCP/IP driver and its associated
modules.
Example: IP_INFO
Limits:
IP_PING
Usage: IP_PING <Id> <Address>
Parameters:
<Id> The ethernet device identifier, which is an integer starting from
0.
<Address> The IP address to ping.
IP_STATUS
Usage: IP_STATUS <Id> <Reset>
Parameters:
<Id> The ethernet device identifier, which is an integer starting from
0.
<Reset> 0: Do not reset the statistics
1: Reset the statistics.
IP_STREAMS
Usage: IP_STREAMS <Id> <Name> <Params> <Mode>
Description: Use this command to either get or set the IP streams configuration.
Parameters:
<Id> The ethernet device identifier, which is an integer starting from
0.
<Name> The name of the IP stream, and is one of the following: IP0,
IP1, IP2 or IP3.
<Params> The stream parameters to set
<Mode> This is either "r" or "w" (for "read" or "write" respectively).
Example:
Limits:
KEYSCN_INFO
Usage: KEYSCN_INFO
Parameters: None.
Description: This command displays the STKEYSCN driver version.
Example: KEYSCN_INFO
Limits: Software: None.
Hardware: Available only when chipset has a keyscan interface.
KEYSCN_GETKEY
Usage: KEYSCN_GETKEY <Id> <NumberKeysToRead> <TimeOutInMs>
Description: Use this command to get keys from a keyboard connected to the platform. It displays
the keystrokes detected.
Note: The parameter <NumberKeysToRead> must be twice the number of the actual
physical keystrokes to be captured, as each keystroke is registered once when it is
pressed and once again when it is released.
Parameters:
<Id> The identifier of the keyscan interface.
<NumberKeysToRead> Total number of keystrokes to read (see Note above)
<TimeOutInMs> Timeout in milliseconds
Example: To capture two keystrokes from keyboard interface 0:
KEYSCN_GETKEY 0 +4 +10000
Limits: Software: None.
Hardware: Available only when chipset has a keyscan interface.
KEYSCN_GETPARAMS
Usage: KEYSCN_GETPARAMS <Id>
Description: Use this command to get the current parameters of the keyscan interface. It displays
all the useful parameters (such as debounce time).
Parameters:
<Id> The identifier of the keyscan interface.
Example: KEYSCN_GETPARAMS 0
Limits: Software: None.
Hardware: Available only when chipset has a keyscan interface.
KEYSCN_SETDEBOUNCETIME
Usage: KEYSCN_SETDEBOUNCETIME <Id> <DebounceTimeInMs>
Parameters:
<Id> The identifier of the keyscan interface.
<DebounceTimeInMs> This parameter is the debounce time in milliseconds
Description: Use this command to set the debounce time of the keyscan interface. The debounce
time is the time to refresh the keyboard status. It is set in milliseconds.
Example: KEYSCN_SETDEBOUNCETIME 0 +3
Limits: Software: None.
Hardware: Available only when chipset has a KEYSCAN interface.
PIO_ATA_RESET
Usage: PIO_ATA_RESET <OnOff>
Parameters:
<OnOff> The state of PIO to be set:
0: 0V
1: +3.3V
Description: Use this command to set or clear a PIO to reset the hard disk drive. Set the <OnOff>
parameter to 1 to configure the PIO to high voltage at the output (typically +3.3V).
This is done by the STAPI SDK software when initializing the PATA/SATA hard disk
drives (that is, with the ATAPI_Init() function call).
Example: PIO_ATA_RESET 0
; Wait 100ms
WAIT +100
PIO_ATA_RESET 1
Limits: Software: None.
Hardware: Platform dependant.
PIO_CLEAR
Usage: PIO_CLEAR <PIONumber> <BitNumber>
Parameters:
<PIONumber> This is the PIO block number to be used to clear a specific bit.
This parameter is an integer in the range of 0 to N, where N is
determined by the chipset used. For example, on the STi7109,
N = 7.
<BitNumber> This is the specific bit to clear [0,7].
Description: Use this command to clear the PIO specified by the <PIONumber> and
<BitNumber> parameters. "Clear" means set to 0, or 0V.
Example: Set the PIO3.7 on the board to 0V:
PIO_CLEAR 3 7
Limits: Software: None.
Hardware: Platform dependant.
PIO_DAC_RESET
Usage: PIO_DAC_RESET <OnOff>
Parameters:
<OnOff> The state of PIO to be set:
0: 0V
1: +3.3V
Description: Use this command to set or clear a PIO to reset the DACs that are connected to the
chipset. In this sense, “DAC” is generic in that it could be video or audio DAC. This
command is dependant on the platform used, and in most cases, there is no DAC to
be reset. The <OnOff> parameter has to be set to 1 to configure the PIO to high
voltage at the output (typically +3.3V).
Example: PIO_DAC_RESET 1
; Wait 100ms
WAIT +100
PIO_DAC_RESET 0
; Wait 100ms
WAIT +100
PIO_DAC_RESET 1
Limits: Software: None.
Hardware: Platform dependant.
PIO_FE_RESET
Usage: PIO_FE_RESET <OnOff>
Parameters:
<OnOff> The state of PIO to be set:
0: 0V
1: +3.3V
Description: Use this command to set or clear a PIO to reset the demodulator and tuners on the
platform. This must be done before sending I2C commands to the demodulators
when trying to set the frequency to lock to a specific channel. Set the <OnOff>
parameter to 1 to configure the PIO to high voltage at the output (typically +3.3V).
This is done by the STAPI SDK software when initializing the tuner parts (that is, a call
to TUNER_Init() ).
Example: PIO_FE_RESET 1
; Wait 100ms
WAIT +100
PIO_FE_RESET 0
; Wait 100ms
WAIT +100
PIO_FE_RESET 1
Limits: Software: None.
Hardware: Platform dependant.
PIO_GET
Usage: PIO_GET <PIONumber> <BitNumber>
Parameters:
<PIONumber> Get the state of a given bit within this PIO block. This can be a
value from 0 to N, where N is the maximum number of PIO
blocks on the SoC.
<BitNumber> Get the state of this bit. This is an integer in the range of 0 to
7.
Description: Use this command to get the state of the PIO specified by the <PIONumber> and
<BitNumber> parameters. If the PIO is at 0V on the output, the command returns 0.
Note: This command works only for PIOs that are not used as outputs or alternate
functions. The PIO to be read has to be a free PIO and configured as an input.
Example: Return state of the push-button connected to PIO4.1:
PIO_GET 4 1
Limits: Software: None.
Hardware: Platform dependant.
PIO_INFO
Usage: PIO_INFO
Parameters: None.
Description: This command displays the STPIO driver version.
Example: PIO_INFO
Limits: Software: None.
Hardware: None.
PIO_LED
Usage: PIO_LED <LEDNumber> <OnOff>
Parameters:
<LEDNumber> This is the LED identifier parameter starting from 0 to N.
<OnOff> 0: Power off the LED
1: Power on the LED
Description: Use this command to power on or off any of the LEDs on the platform.
Example: To illuminate LED number 2:
PIO_LED 2 1
Limits: Software: None.
Hardware: Platform dependant.
PIO_MODEM_RESET
Usage: PIO_MODEM_RESET <OnOff>
Parameters:
<OnOff> The state of PIO to be set:
0: 0V
1: +3.3V
Description: Use this command to set or clear a PIO to reset the modem available on the platform.
The <OnOff> parameter has to be set to 1 to configure the PIO to high voltage at the
output (typically +3.3V).
Example: PIO_MODEM_RESET 1
; Wait 100ms
WAIT +100
PIO_MODEM_RESET 0
; Wait 100ms
WAIT +100
PIO_MODEM_RESET 1
Limits: Software: None.
Hardware: Platform dependant.
PIO_SET
Usage: PIO_SET <PIONumber> <BitNumber>
Parameters:
<PIONumber> Set the state of a given bit within this PIO block. This can be a
value from 0 to N, where N is the maximum number of PIO
blocks on the SoC.
<BitNumber> Set the state of this bit of the given PIO. This is an integer in
the range of 0 to 7.
Description: Use this command to set the PIO specified by <PIONumber> and <BitNumber>
parameters. In this context, "set" means to configure the PIO to high voltage (typically
3.3V).
Example: Set PIO2.4 on the board:
PIO_SET 2 4
Limits: Software: None.
Hardware: Platform dependant.
PIO_USB_RESET
Usage: PIO_USB_RESET <OnOff>
Parameters:
<OnOff> This is the state of PIO to be set:
0: 0V
1: +3.3V
Description: Use this command to set or clear a PIO to reset the USB interface. Set the <OnOff>
parameter to 1 to configure the PIO to high voltage at the output (typically +3.3V).
Note: The reset is performed by the STAPI SDK software when initializing the USB interface
(that is, a USB_Init() call).
Example: PIO_USB_RESET 0
Wait 100ms before reset:
WAIT +100
PIO_USB_RESET 1
Limits: Software: None.
Hardware: Platform dependant.
PIP_CLOSE
Usage: PIP_CLOSE <Id>
Parameters: <Id> The identifier of a PiP viewport.
Description: Close a picture-in-picture viewport.
Example: PIP_CLOSE 0
Limits:
PIP_DISABLE
Usage: PIP_DISABLE <Id>
Parameters: <Id> The identifier of a PiP viewport.
Description: Use this command to disable a picture-in-picture viewport.
Example: PIP_DISABLE 0
Limits:
PIP_ENABLE
Usage: PIP_ENABLE <Id>
Parameters: <Id> The identifier of a PiP viewport.
Description: Use this command to enable a picture-in-picture viewport.
Example: PIP_ENABLE 0
Limits:
PIP_OPEN
Usage: PIP_OPEN <Id> <VideoId> <GfxId>
Parameters:
<Id> The identifier of a PiP viewport.
<VideoId> The identifier of the video device to display the PiP viewport.
<GfxId> The identifier of the graphics layer on which to display the PiP
viewport.
PIP_PAUSE
Usage: PIP_PAUSE <Id>
Parameters: <Id> The identifier of a PiP viewport.
Description: Use this command to pause a picture-in-picture viewport.
Example: PIP_PAUSE 0
Limits:
PIP_RESUME
Usage: PIP_RESUME <Id>
Parameters: <Id> The identifier of a PiP viewport.
Description: Use this command to resume a picture-in-picture viewport that is currently paused.
Example: PIP_RESUME 0
Limits:
PIP_SETWINDOW
Usage: PIP_SETWINDOW <Id> <Xpos> <Ypos> <Width> <Height>
Description: Use this command to move a picture-in-picture viewport to the given position and size
it to the given dimensions.
Parameters:
<Id> The identifier of a PiP viewport.
<Xpos> The X co-ordinate of the ?? corner of the PiP viewport.
<Ypos> The Y co-ordinate of the ?? corner of the PiP viewport.
<Width> The new width of the PiP viewport, in pixels?
<Height> The new height of the PiP viewport, in pixels?
PLAY_AUDIO_SETOUTPUT
Usage: PLAY_AUDIO_SETOUTPUT <Id> <Enable>
Parameters:
<Id> The playback identifier, 0 or 1.
<Enable> 0: Disable audio playback.
1: Enable audio playback.
PLAY_CHANGEPIDS
Usage: PLAY_CHANGEPIDS <Id> [<PidList>]
Parameters:
<Id> The playback identifier, 0 or 1.
<PidList> The type of playback, which is one of the following: P_MP1V,
P_MP2V, P_MP4V, P_H264, P_MPEG4P2, P_VC1, P_MP1A,
P_MP2A, P_MP4A, P_AC3, P_AAC, P_HEAAC, P_WMA,
P_DDPLUS, P_DTS, P_TTXT, P_SUBT, P_PCR, P_PID, P_AVS
or P_END.
PLAY_INFO
Usage: PLAY_INFO
Parameters: None
Description: This command provides information about the playback driver.
Example: PLAY_INFO
Limits:
PLAY_PAUSE
Usage: PLAY_PAUSE <Id>
Parameters: <Id> The playback identifer, 0 or 1.
Description: Use this command to pause playback
Example: PLAY_PAUSE 0
Limits:
PLAY_PAUSERECORD
Usage: PLAY_PAUSERECORD <PlayId> <RecordId> <Filename> <Size>
Parameters:
<PlayId> The playback identifier, 0 or 1.
<RecordId> The record identifier, 0 or 1.
<Filename> The name of the file in which the recording is to be stored.
<Size> The size in minutes.
PLAY_PROGRAM
Usage: PLAY_PROGRAM <Id> <Filename> <ProgramId> [<Layer> ]
Parameters:
<Id> The playback identifier, 0 or 1.
<Filename> The name of the file to play.
<ProgramId> The program identifier.
<Layer> One of P_MAIN, P_AUX or P_REMOTE.
Description: Use this command to playback the contents of the file <Filename>.
Example: PLAY_PROGRAM 0 "stream.trp" 0x0001 P_MAIN
Limits:
PLAY_PROGRAM_A3
Usage: PLAY_PROGRAM_A3 <Id> <Filename> <ProgramId> [<Layer> ]
Parameters:
<Id> The playback identifier, 0 or 1.
<Filename> The name of the file to play.
<ProgramId> The program identifier.
<Layer> One of P_MAIN, P_AUX or P_REMOTE.
Description: Use this command to playback an A3 service from the contents of the file
<Filename>.
Example: PLAY_PROGRAM 0 "stream.trp" 0x0001 P_MAIN
Limits:
PLAY_PROGRAM_DTV
Usage: PLAY_PROGRAM_DTV <Id> <Filename> <ProgramId> [<Layer> ]
Parameters:
<Id> The playback identifier, 0 or 1.
<Filename> The name of the file to play.
<ProgramId> The program identifier.
<Layer> One of P_MAIN, P_AUX or P_REMOTE.
Description: Use this command to playback a DTV service from the contents of the file
<Filename>.
Example: PLAY_PROGRAM 0 "stream.trp" 0x0001 P_MAIN
Limits:
PLAY_RESUME
Usage: PLAY_RESUME <Id>
Parameters: <Id> The playback identifer, 0 or 1.
Description: Use this command to resume playback that is currently paused.
Example: PLAY_RESUME 0
Limits:
PLAY_SEEK
Usage: PLAY_SEEK <Id> <SeekInMs> <SeekMode>
Parameters:
<Id> The playback identifier, 0 or 1.
<SeekInMs> Seek time, in milliseconds.
<SeekMode> Seek mode, one of P_SEEK_SET, P_SEEK_CUR or
P_SEEK_END
PLAY_SPEED
Usage: PLAY_SPEED <Id> <Speed>
Parameters:
<Id> The playback identifier, 0 or 1.
<Speed> The speed of playback, which must be a signed value
(prefixed by + or -).
PLAY_START
Usage: PLAY_START <Id> <Filename> [<PidList>] [<Layer>]
Parameters:
<Id> The playback identifier, 0 or 1.
<Filename> The name of the file to play.
<ProgramId> The program identifier.
<Layer> One of P_MAIN, P_AUX or P_REMOTE.
Description: Use this command to start video and audio decoding.
Example: PLAY_START 0 "stream.trp" 0x0001 P_MAIN
Limits:
PLAY_STATUS
Usage: PLAY_STATUS <Id>
Parameters: <Id> The playback identifer, 0 or 1.
Description: This command displays the status of the selected playback.
Example: PLAY_STATUS 0
Limits:
PLAY_STEP
Usage: PLAY_STEP <Id>
Parameters: <Id> The playback identifer, 0 or 1.
Description: Use this command to step through the playback.
Example: PLAY_STEP 0
Limits:
PLAY_STOP
Usage: PLAY_STOP <Id> <Freeze>
Parameters:
<Id> The playback identifier, 0 or 1.
<Freeze> 0: Blank the screen.
1: Keep last picture.
Description: Use this command to stop playback. The <Freeze> flag determines whether the last
picture should remain (“freeze frame”) or not.
Example: PLAY_STOP 0 1
Limits:
PLAY_VIDEO_SETOUTPUT
Usage: PLAY_VIDEO_SETOUTPUT <Id> <Enable>
Parameters:
<Id> The playback identifier, 0 or 1.
<Enable> 0: Disable video playback.
1: Enable video playback.
Description: Use this command to enable or disable video playback.
Example: PLAY_VIDEO_SETOUTPUT 0 1
Limits:
PLAY_WAIT_END
Usage: PLAY_WAIT_END <Id> <TimeOut>
Parameters:
<Id> The playback identifier, 0 or 1.
<TimeOut> The timeout to apply, in seconds.
Description: Use this command to wait until the end of playback or until the timeout expires,
whichever is the sooner.
Example: PLAY_WAIT_END 0 5
Limits:
POWER_INFO
Usage: POWER_INFO
Description: This command displays the STPOWER driver version.
Parameters: None.
Example: POWER_INFO
Limits: Software: None.
Hardware: None.
POWER_GETPROFILE
Usage: POWER_GETPROFILE <Id> <ProfileId>
Parameters:
<Id> This parameter sets the power profile ID to use.
<ProfileId> Defines which profile data to display. If no argument is passed
it provides the present system state; that is, the profile that is
the currently set profile.
Description: This command displays the status of the power profile indicated by <Id>.
Example: POWER_GETPROFILE 0 1
Limits: Software: None.
Hardware: None.
POWER_SETMODE
Usage: POWER_SETMODE <Id> <ProfileId> <CPUState> <WakeupCondition>
<WakeupParam>
Parameters:
<Id> This parameter sets the power profile ID to use.
<ProfileId> Defines the power mode for this profile:
0: Normal Mode
1 to 5: Active StandBy Mode
<CPUState> Defines the CPU state, which is either:
PM_CPU_SLEEP, PM_CPU_STANDBY
<WakeupCondition> One of the following:
PM_WAKEUP_NONE, PM_WAKEUP_HDMI,
PM_WAKEUP_TIMER, PM_WAKEUP_FRONTPANEL,
PM_WAKEUP_ETHERNET, PM_WAKEUP_IR
<WakeupParam> Defines a parameter to apply to the wake up condition, For
IR, HDMI Id, Blast ID and so forth, this could be the time to
wait before waking.
Description: This command selects the power mode of the system or of a specified device.
Example: POWER_SETMODE 0 1 PM_CPU_SLEEP PM_WAKEUP_TIMER 2
POWER_SETPROFILE
Usage: POWER_SETPROFILE <Id> <ProfileId> <DeviceName> <State>
Parameters:
<Id> This parameter sets the power profile ID to use.
<ProfileId> Defines the power mode for this profile.
<DeviceName> Defines the device name to append or change state
<State> Defines the device state to be changed for the device name.
Description: This command sets a specific power state for the given device when the given power
profile is selected.
Example: POWER_SETPROFILE 0 2 "I2C0" PM_NORMAL
Limits: Software: None.
Hardware: None.
POD_CONNECT
Usage: POD_CONNECT <Id> <PODMode>
Parameters:
<Id> The POD identifier.
<PODMode>
POD_LOOPBACK_SIMPLE
Usage: POD_LOOPBACK_SIMPLE <Id>
Parameters: <Id> The POD identifier.
Description: POD simple loopback.
Example: POD_LOOPBACK_SIMPLE
Limits:
POD_LOOPBACK_ADVANCE
Usage: POD_LOOPBACK_ADVANCE <Id>
Parameters: <Id> The POD identifier.
Description: POD multi size packet loopback.
Example: POD_LOOPBACK_ADVANCE
Limits:
POD_MCARD_CP_TEST
Usage: POD_MCARD_CP_TEST <Id>
Parameters: <Id> The POD identifier.
Description: POD simple loopback.
Example: POD_MCARD_CP_TEST
Limits:
PWM_INFO
Usage: PWM_INFO
Parameters: <Id> The PWM identifier, which is an integer starting from 0.
Description: This command displays the revision number of the PWM driver.
Example: PWM_INFO
Limits:
PWM_GET
Usage: PWM_SET <Id> <Value>
Parameters:
<Id> The PWM identifier, which is an integer starting from 0.
<Value> Set the specified PWM to this value. <Value> must be an
integer.
Description: Use this command to set a PWM value.
Example: PWM_SET 10 0x1000
Limits:
PWM_SET
Usage: PWM_GET <Id>
Parameters: <Id> The PWM identifier, which is an integer starting from 0.
Description: Use this command to get a PWM value.
Example: PWM_GET 10
Limits:
REC_INSERT_PMT
Usage: REC_INSERT_PMT <Id>
Parameters: <Id> The recording identifier, in the range 0 to 7.
Description: Use this command to insert a PMT into the recording.
Example: REC_INSERT_PMT 1
Limits:
REC_PAUSE
Usage: REC_PAUSE <Id>
Parameters: <Id> The recording identifier, in the range 0 to 7.
Description: Use this command to pause recording.
Example: REC_PAUSE 0
Limits:
REC_PROGRAM
Usage: REC_PROGRAM <Id> <StreamName> <Filename> <Size> <ProgramId>
Parameters:
<Id> The recording identifier, in the range 0 to 7.
<StreamName> Record the input coming from this stream.
<Filename> Store the recording in a file with this filename.
<Size> The size of the circular file used for the recording. This is
defined in minutes.
<ProgramId> The PID of the program to be recorded, in the range 0x0001
to 0xFFFF.
Description: Use this command to start recording from the stream identified by <StreamName>.
Example: REC_PROGRAM 0
Limits:
REC_RESUME
Usage: REC_RESUME <Id>
Parameters: <Id> The recording identifier, in the range 0 to 7.
Description: Use this command to resume a recording that is currently paused.
Example: REC_RESUME 0
Limits:
REC_START
Usage: REC_START <Id> <StreamName> <Filename> <Size> [<Type> <Pid>]
Parameters:
<Id> The recording identifier, in the range 0 to 7.
<StreamName> Record the input coming from this stream.
<Filename> Store the recording in a file with this filename.
<Size> The size of the circular file used for the recording. This is
defined in minutes.
<Type> The format of the recording, which is one of the following:
P_MP1V, P_MP2V, P_MP4V, P_H264, P_MPEG4P2, P_VC1,
P_MP1A, P_MP2A, P_MP4A, P_AC3, P_AAC, P_HEAAC, P_WMA,
P_DDPLUS, P_DTS, P_TTXT, P_SUBT, P_PCR, P_PID, P_AVS
or P_END.
<Pid> The PID of the program to be recorded, in the range 0x0001
to 0xFFFF.
REC_STATUS
Usage: REC_STATUS <Id>
Parameters: <Id> The recording identifier, in the range 0 to 7.
Description: This command displays the current status of the recording.
Example: REC_STATUS 0
Limits:
REC_STOP
Usage: REC_STOP <Id>
Parameters: <Id> The recording identifier, in the range 0 to 7.
Description: Use this command to stop a recording in progress.
Example: REC_STOP 0
Limits:
RACK_OFF
Usage: RACK_OFF
Parameters: None.
Description: Use this command to disable the rack debug plane.
Example: RACK_OFF
Limits:
RACK_ON
Usage: RACK_ON <PlaneId> <VtgId>
Parameters:
<PlaneId> This is the graphic plane index to enable.
<VtgId>
SCART_INFO
Usage: SCART_INFO
Parameters: None.
Description: This command displays the revision number of the SCART driver.
Example: SCART_INFO
Limits:
SCART_RATIO
Usage: SCART_RATIO <Id> <AspectRatio>
Parameters:
<Id> This is the SCART identifier.
<AspectRatio> Set the aspect ratio. This is either TV_4_3 (for a ratio of 4:3) or
TV_16_9 (for a ratio of 16:9).
Description: Use this command to change the SCART aspect ratio. The choice is between 4:3 and
16:9.
Example: SCART_RATIO 0 TV_16_9
Limits:
SCART_SET
Usage: SCART_SET <Id> <Format>
Parameters:
<Id> This is the SCART identifier.
<Format> The output format. This is one of RGB, CVBS or YPRPB.
Description: Use this command to set the format of the SCART output. The choice is between
RGB, CVBS, or YPrPb.
Example: SCART_SET 0 RGB
Limits:
SMART_INFO
Usage: SMART_INFO
Parameters: None.
Description: This command displays the revision number of the Smartcard driver.
Example: SMART_INFO
Limits:
SMART_GETPARAMS
Usage: SMART_GETPARAMS <Id>
Parameters: <Id> The smartcard identifier, an integer starting from 0.
Description: This command displays the current parameters of the specified smartcard.
Example: SMART_GETPARAMS 0
Limits:
SMART_READ
Usage: SMART_READ <Id> <LengthToRead> <TimeOut>
Parameters:
<Id> The smartcard identifier, an integer starting from 0.
<LengthToRead> The number of bytes to read. The maximum is 512.
<TimeOut> The time out to apply, in milliseconds.
Description: Use this command to read the response from a smartcard after sending a command.
Example: SMART_READ 0 50 1000
Limits:
SMART_RESET
Usage: SMART_RESET <Id>
Parameters: <Id> The smartcard identifier, an integer starting from 0.
Description: Reset the specified smartcard.
Example: SMART_RESET 0
Limits:
SMART_TRANSFER
Usage: SMART_TRANSFER <Id> <LengthToWrite> <Cmd0,Cmd1,...,CmdN>
<TimeOut>
Parameters:
<Id> The smartcard identifier, an integer starting from 0.
<LengthToWrite> The number of bytes to read. The minimum is 5 and the
maximum is 512.
<Cmd0,Cmd1,...,CmdN> A sequence of smartcard commands, delimited by
commas.
<TimeOut> The time out to apply, in milliseconds.
Description: Use this command to perform a transfer protocol on the smartcard.
Example:
Limits:
SMART_WRITE
Usage: SMART_WRITE <Id> <LengthToWrite> <Cmd0,Cmd1,...,CmdN> <TimeOut>
Parameters:
<Id> The smartcard identifier, an integer starting from 0.
<LengthToWrite> The number of bytes to read. The minimum is 5 and the
maximum is 512.
<Cmd0,Cmd1,...,CmdN> A sequence of smartcard commands, delimited by
commas.
<TimeOut> The time out to apply, in milliseconds.
Description: Use this command to perform a write operation to the specified smartcard. If the
commands written to the smartcard return data, this can be read using
SMART_READ.
Example:
Limits:
SPI_INFO
Usage: SPI_INFO
Parameters: None.
Description: This command displays the revision number of the SPI driver.
Example: SPI_INFO
Limits:
SPI_READ
Usage: SPI_READ <Device> <Address> <NbBytes>
Parameters:
<Device> The SPI bus device identifier, which is an integer starting from
0.
<Address> The peripheral SPI address from which to read bytes.
<NbBytes> The number of bytes to read.
Description: Use this command to read a number of bytes on a specific SPI peripheral on the bus.
The command displays the bytes just read.
Example: I2C_SPI 0 #38 2
Limits: Software: None.
Hardware: SPI peripheral required.
SPI_WRITE
Usage: SPI_WRITE <Device> <Address> <Byte0> [<ByteN>]
Description: Use this command to write bytes to a specific SPI peripheral on the bus.
Parameters:
<Device> The SPI bus device identifier, which is an integer starting from
0.
<Address> The peripheral SPI address to which to write bytes.
<Byte0> The first byte to write.
[<ByteN>] The remaining bytes to write to the peripheral, where N is less
than or equal to 63.
SUBT_INFO
Usage: SUBT_INFO
Parameters: None.
Description: This command displays the revision number of the subtitle driver.
Example: SUBT_INFO
Limits:
SUBT_ENABLE
Usage: SUBT_ENABLE <Id>
Parameters: <Id> This is the identifier of the subtitle display, which is either 0 or 1.
Description: Use this command to enable the display of subtitles.
Example: SUBT_ENABLE 0
Limits:
SUBT_DISABLE
Usage: SUBT_DISABLE <Id>
Parameters: <Id> This is the identifier of the subtitle display, which is either 0 or 1.
Description: Use this command to disable the display of subtitles.
Example: SUBT_DISABLE 0
Limits:
SUBT_START
Usage: SUBT_START <Id> <GfxId> <PID> <CompPageID> <AnciPageID>
Parameters:
<Id> This is the identifier of the subtitle display, which is either 0 or
1.
<GfxId> The identifier of the graphics layer.
<PID> The PID for the program that contains the subtitles.
<CompPageID> The identifier of the composition page.
<AnciPageID> The identifier of the ancillary page.
SUBT_STOP
Usage: SUBT_STOP <Id>
Parameters: <Id> This is the identifier of the subtitle display, which is either 0 or 1.
Description: Use this command to stop the display of subtitles.
Example: SUBT_STOP 0
Limits:
SUBT_SETWINDOW
Usage: SUBT_SETWINDOW <Id> <OutX> <OutY> <OutWidth> <OutHeight>
Parameters:
<Id> This is the identifier of the subtitle display, which is either 0 or
1.
<OutX> The X co-ordinate of the top left corner of the subtitle window.
<OutY> The Y co-ordinate of the top left corner of the subtitle window.
<OutWidth> The width of the window.
<OutHeight> The height of the window.
Description: Use this command to set the position and size of the window used for displaying
subtitles.
Example: SUBT_SETWINDOW 0 150 200 500 50
Limits:
SYS_CLOCK
Usage: SYS_CLOCK
Parameters: None.
Description: This command displays details of the configuration of the clocks.
Example: SYS_CLOCK
Limits:
SYS_ID
Usage: SYS_ID
Parameters: None.
Description: This command displays the version number of the chip cut.
Example: SYS_ID
Limits:
SYS_IRQ
Usage: SYS_IRQ <Scope>
Parameters:
<Scope> 0: Display summary details.
1: Display full details.
Description: This command displays details of the IRQ settings. Use the <Scope> parameter to
display either full or summary details.
Example: SYS_IRQ 1
Limits:
SYS_MEM
Usage: SYS_MEM
Parameters: None.
Description: This command displays details of the memory partitions.
Example: SYS_MEM
Limits:
SYS_PROF_START
Usage: SYS_PROF_START
Parameters: None.
Description: Use this command to start task profiling.
Example: SYS_PROF_START
Limits: Software: OS21/OSPlus only, not Linux.
Hardware:
SYS_PROF_STOP
Usage: SYS_PROF_STOP
Parameters: None.
Description: Use this command to stop task profiling.
Example: SYS_PROF_STOP
Limits: Software: OS21/OSPlus only, not Linux.
Hardware:
SYS_PROF_FLUSH
Usage: SYS_PROF_FLUSH
Parameters: None.
Description: Use this command to flush the profiling data to the host.
Example: SYS_PROF_FLUSH
Limits: Software: OS21/OSPlus only, not Linux.
Hardware:
SYS_REV
Usage: SYS_REV
Parameters: None.
Description: This command displays the revision number of the modules.
Example: SYS_REV
Limits:
SYS_TASK
Usage: SYS_TASK
Parameters: None.
Description: This command displays the task settings.
Example: SYS_TASK
Limits:
SYS_WATCHMEM_START
Usage: SYS_WATCHMEM_START <Address> <Size>
Parameters:
<Address> The memory location to watch.
<Size> The size of the memory region, in bytes.
Description: Use this command to start watching the specified memory region.
Example: SYS_WATCHMEM_START 0x4000 0x0100
Limits: Software: OS21/OSPlus only, not Linux.
Hardware: STx7109 only.
SYS_WATCHMEM_STOP
Usage: SYS_WATCHMEM_STOP
Parameters: None
Description: Use this command to stop memory watching.
Example: SYS_WATCHMEM_STOP
Limits: Software: OS21/OSPlus only, not Linux.
Hardware: STx7109 only.
TABLE_EIT
Usage: TABLE_EIT <Pti/Connection> <FullInfo>
Parameters:
<Pti/Connection> This is the PTI ID or the connection name.
<FullInfo> 0: Display summary information
1: Display full information.
TABLE_FILTER
Usage: TABLE_FILTER <Pti/Connection> <Pid> <TableId>
Parameters:
<Pti/Connection> This is the PTI ID or the connection name.
<Pid> The PID for the program, in the range 0x0000 to 0xFFFF.
<TableId> The ID for the table, in the range 0x0000 to 0xFFFF.
Description: Use this command to filter a full section.
Example: TABLE_FILTER 0 0x0001 0x00FF
Limits:
TABLE_NIT
Usage: TABLE_NIT <Pti/Connection> <FullInfo>
Parameters:
<Pti/Connection> This is the PTI ID or the connection name.
<FullInfo> 0: Display summary information
1: Display full information.
TABLE_PAT
Usage: TABLE_PAT <Pti/Connection>
Parameters:
<Pti/Connection> This is the PTI ID or the connection name.
TABLE_PMT
Usage: TABLE_PMT <Pti/Connection> <FullInfo>
Parameters:
<Pti/Connection> This is the PTI ID or the connection name.
<FullInfo> 0: Display summary information
1: Display full information.
TABLE_SDT
Usage: TABLE_SDT <Pti/Connection> <FullInfo>
Parameters:
<Pti/Connection> This is the PTI ID or the connection name.
<FullInfo> 0: Display summary information
1: Display full information.
TABLE_TDT
Usage: TABLE_TDT <Pti/Connection>
Parameters:
<Pti/Connection> This is the PTI ID or the connection name.
TEXT_CLEAR
Usage: TEXT_CLEAR <Id>
Parameters: None.
Description: This command clears the text object created by TEXT_PRINT and referenced by
<Id>.
Example: TEXT_INFO
Limits:
TEXT_INFO
Usage: TEXT_INFO
Parameters: None.
Description: This command displays the revision number of the TEXT driver.
Example: TEXT_INFO
Limits:
TEXT_PRINT
Usage: TEXT_PRINT <Id> <FontId> <X> <Y> <Color> <String> [<Params>]
Parameters:
<Id> The ID of the text to print.
<FontId> Use the font with this ID number.
<X> The X co-ordinate of the point from which to start printing.
<Y> The Y co-ordinate of the point from which to start printing.
<Color> The color of the text.
<String> The string to print.
[<Params>]
TRACE_HDDCLOSE
Usage: TRACE_HDDCLOSE
Parameters: None.
Description: Use this command to close the trace file previously opened using
TRACE_HDDOPEN.
Example: TRACE_HDDCLOSE
Limits:
TRACE_HDDOPEN
Usage: TRACE_HDDOPEN <FileName>
Parameters: <FileName> The name of the file for storing trace data.
Description: Use this command to open a trace file on the hard disk.
Example: TRACE_HDDOPEN
Limits:
TRACE_OFF
Usage: TRACE_OFF
Parameters: None.
Description: Use this command to turn tracing off.
Example: TRACE_OFF
Limits:
TRACE_ON
Usage: TRACE_ON
Parameters: None.
Description: Use this command to turn tracing on.
Example: TRACE_ON
Limits:
TRACE_TEST
Usage: TRACE_TEST
Parameters: None.
Description: Use this command to perform a simple test for generating trace data.
Example: TRACE_TEST
Limits:
TTX_INFO
Usage: TTX_INFO
Parameters: None.
Description: This command displays the revision number of the TTX driver.
Example: TTX_INFO
Limits:
TTX_START
Usage: TTX_START <PlayID><Pid>
Parameters:
<PlayID> The play ID, which is an integer starting from 0.
<Pid> The PID by which the stream supplies teletext data.
TTX_STOP
Usage: TTX_STOP <PlayID>
Parameters:
<PlayID> This is the play ID starting from 0 to N.
TUNER_INFO
Usage: TUNER_INFO
Parameters: None.
Description: This command displays the version number of the tuner driver.
Example: TUNER_INFO
Limits:
TUNER_LOOP
Usage: TUNER_LOOP <Device> <Enable>
Parameters:
<Device> The identifier of the tuner device.
<Enable> 0: Disable loopthrough
1: Enable loopthrough.
Description: Use this command to enable or disable loopthrough.
Example: TUNER_LOOP 0 1
Limits:
TUNER_SCAN
Usage: TUNER_SCAN <Device> <Start> <End>
Parameters:
<Device> The identifier of the tuner device.
<Start> The start frequency in MHz.
<End> The end frequency in MHz.
TUNER_SENDDISEQCCMD
Usage: TUNER_SENDDISEQCCCMD <Device> <DiseqCVer> <Length> <Command>
Parameters:
<Device> The identifier of the tuner device.
<DiseqCVer> DiSEqC command version number, either DISQ_VER_1_2 or
DISQ_VER_2_0.
<Length> The length of the command, in bytes, in the range 1 to 16.
<Command> The DiSEqC command
TUNER_STATUS
Usage: TUNER_STATUS <Id>
Parameters: <Id> The identifier of the tuner device.
Description: This command displays the status of the specified tuner.
Example: TUNER_STATUS 0
Limits:
TUNER_SWITCH
Usage: TUNER_SWITCH <Device> <Satellite>
Description: Use this command to switch between LNBs.
Parameters:
<Device> The identifier of the tuner device.
<Satellite> The identifier of the satellite.
Example: TUNER_SWITCH
Limits:
TUNER_TUNE
Usage: TUNER_TUNE <Device> <Freq> <SymbolRate> <Modulation> <FEC>
<Polarity> <FECType> <Pilot> <RollOff> <PLSIndex>
Parameters:
<Device> The identifier of the tuner device.
<Freq> The required frequency, in MHz.
<SymbolRate> Satellite or cable.
<Modulation> The modulation, which is one of the following: MOD_QPSK,
MOD_8PSK, MOD_QAM, MOD_4QAM, MOD_16QAM, MOD_32QAM,
MOD_64QAM, MOD_128QAM, MOD_256QAM, MOD_BPSK,
MOD_16APSK, MOD_32APSK or MOD_8VSB.
<FEC> This is one of the following: FEC_A, FEC_B, FEC_C, FEC_ALL,
or FEC_1_2 through to FEC_9_10.
<Polarity> This is the polarity and is one of the following:
– POL_V: Vertical polarity
– POL_H: Horizontal polarity
– POL_A: Both vertical and horizontal polarity
Used for satellite tuners only.
<FECType> One of the following: DVBS1, DVBS2 or DTV.
Used for satellite tuners only.
<Pilot> This is the pilot flag, and is either 0 or 1.
Used for satellite tuners only.
<RollOff> One of the following: 20, 25 or 35
Used for satellite tuners only.
<PLSIndex> This is an integer in the range of 0 to 255.
Used for satellite tuners only.
USB_KEYB
Usage: USB_KEYB
Parameters: None.
Description: Use this command to check the USB keyboard and display errors, if any.
Example: USB_KEYB
Limits:
USB_INFO
Usage: USB_INFO
Parameters: None.
Description: This command displays the USB driver version
Example: USB_INFO
Limits:
USB_MOUSE
Usage: USB_MOUSE
Parameters: None.
Description: Use this command to check the USB mouse and display details of the errors, if any.
Example: USB_MOUSE
Limits:
VID_BITMAP
Usage: VID_BITMAP <Id> <Filename> <Layer>
Parameters:
<Id> The identifier of the video decoder.
<Filename> The .gam file to display.
<Layer> The permitted layers are V_MAIN, V_AUX or V_REMOTE.
VID_CLEAR
Usage: VID_CLEAR <Id>
Parameters:
<Id> The identifier of the video decoder.
VID_DISABLE
Usage: VID_DISABLE <Id> <Layer>
Parameters:
<Id> The identifier of the video decoder.
<Layer> The permitted layers are V_MAIN, V_AUX or V_REMOTE.
Description: Use this command to disable the video plane.
Example: VID_DISABLE 0 V_MAIN
Limits:
VID_ENABLE
Usage: VID_ENABLE <Id> <Layer>
Parameters:
<Id> The identifier of the video decoder.
<Layer> The permitted layers are V_MAIN, V_AUX or V_REMOTE.
VID_ERR
Usage: VID_ERR <Id> <Mode>
Parameters:
<Id> The identifier of the video decoder.
<Mode> The permitted error recovery modes are V_FULL, V_HIGH,
V_PARTIAL or V_NONE
Description: Use this command to set the error recovery mode of the video decoder.
Example: VID_ERR 0 V_FULL
Limits:
VID_GETDISPLAYPARAMS
Usage: VID_GETDISPLAYPARAMS <Id> <Layer>
Parameters:
<Id> The identifier of the video decoder.
<Layer> The permitted layers are V_MAIN, V_AUX or V_REMOTE.
VID_INFO
Usage: VID_INFO
Parameters: None.
Description: This command provides information about the video driver.
Example: VID_INFO
Limits:
VID_INJSTART
Usage: VID_INJSTART <Id> <FileName> <NbLoops> <StreamType> <Layer>
Parameters:
<Id> The identifier of the video decoder.
<FileName> This is the file to play
<NbLoops> Loop the file this number of times.
<StreamType> One of either V_ES or V_PES.
<Layer> The permitted layers are V_MAIN, V_AUX or V_REMOTE.
VID_INJSTOP
Usage: VID_INJSTOP <Id>
Parameters:
<Id> The identifier of the video decoder.
VID_PAUSE
Usage: VID_PAUSE <Id>
Parameters:
<Id> The identifier of the video decoder.
VID_RESUME
Usage: VID_RESUME <Id>
Parameters:
<Id> The identifier of the video decoder.
Description: Use this command to resume the video after it has been paused.
Example: VID_RESUME 0
Limits:
VID_SETFRAMERATE
Usage: VID_SETFRAMERATE <Id> <On/Off>
Parameters:
<Id> The identifier of the video decoder.
<On/Off> 0: Disable frame rate conversion
1: Enable frame rate conversion.
VID_SETFORMAT
Usage: VID_SETFORMAT <Id> <Layer> <Format>
Parameters:
<Id> The identifier of the video decoder.
<Layer> The permitted layers are V_MAIN, V_AUX or V_REMOTE.
<Format> The permitted formats are V_AR_PANSCAN, V_AR_LBOX,
V_AR_COMBI or V_AR_NO.
VID_SETMODE
Usage: VID_SETMODE <Id> <Mode>
Parameters:
<Id> The identifier of the video decoder.
<Mode> The permitted decoding picture modes are V_MODE_ALL,
V_MODE_I, V_MODE_IP or V_MODE_I_FIRST.
VID_SETSPEED
Usage: VID_SETSPEED <Id> <Speed>
Parameters:
<Id> The identifier of the video decoder.
<Speed> This is the speed to set, in the range of -3000 to 3000.
Description: Use this command to change the video speed.
Example: VID_SETSPEED 0 2000
Limits:
VID_SETWINAUTO
Usage: VID_SETWINAUTO <Id> <Layer>
Parameters:
<Id> The identifier of the video decoder.
<Layer> The permitted layers are V_MAIN, V_AUX or V_REMOTE.
VID_SETWINDOW
Usage: VID_SETWINDOW <Id> <InX> <InY> <InWidth> <InHeight> <OutX>
<OutY> <OutWidth> <OutHeight> <Layer>
Parameters:
<Id> The identifier of the video decoder.
<InX> The X co-ordinate of the corner of the input window.
<InY> The Y co-ordinate of the corner of the input window.
<InWidth> The width of the input window, in pixels.
<InHeight> The height of the input window, in pixels.
<OutX> The X co-ordinate of the corner of the output window.
<OutY> The Y co-ordinate of the corner of the output window.
<OutWidth> The width of the output window, in pixels.
<OutHeight> The height of the output window, in pixels.
<Layer> The permitted layers are V_MAIN, V_AUX or V_REMOTE.
VID_STATUS
Usage: VID_STATUS <Id> <Reset>
Parameters:
<Id> The identifier of the video decoder.
<Reset> 0: Do not reset the statistics.
1: Reset the statistics.
Description: Use this command to get the status of the video decoder identified by <Id>.
Example: VID_STATUS 0 1
Limits:
VID_STEP
Usage: VID_STEP <Id>
Parameters:
<Id> The identifier of the video decoder.
Description: Use this command to decode the next picture in the stream.
Example: VID_STEP 0
Limits:
VID_SYNCHRO
Usage: VID_SYNCHRO <Id> <On/Off>
Parameters:
<Id> The identifier of the video decoder.
<On/Off> 0: Disable video synchronization
1: Enable video synchronization.
VIN_CLOSE
Usage: VIN_CLOSE <Id>
Parameters:
<Id> This is the identifier for the video capture, which is an integer
starting from 0.
VIN_DISABLE
Usage: VIN_DISABLE <Id>
Parameters:
<Id> This is the identifier for the video capture, which is an integer
starting from 0.
VIN_ENABLE
Usage: VIN_ENABLE <Id>
Parameters:
<Id> This is the identifier for the video capture, which is an integer
starting from 0.
VIN_INFO
Usage: VIN_INFO
Parameters: None.
Description: This command provides the revision number of the driver.
Example: VIN_INFO
Limits:
VIN_OPEN
Usage: VIN_OPEN <Id> <SrcName> <DstName>
Parameters:
<Id> This is the identifier for the video capture, which is an integer
starting from 0.
<SrcName> The source device, which is one of the following: "MAIN",
"AUX", "REMOTE", "EXT0", "EXT1" or "EXT2".
<DstName> The destination device, which is one of the following: "MAIN",
"AUX", "REMOTE", "GFX0", "GFX1" or "GFX2".
VIN_PAUSE
Usage: VIN_PAUSE <Id>
Parameters:
<Id> This is the identifier for the video capture, which is an integer
starting from 0.
VIN_RESUME
Usage: VIN_RESUME <Id>
Parameters:
<Id> This is the identifier for the video capture, which is an integer
starting from 0.
Description: Use this command to resume video capture that is currently paused.
Example: VIN_RESUME 0
Limits:
VIN_SETWINDOW
Usage: VIN_SETWINDOW <Id> <InX> <InY> <InWidth> <InHeight> <OutX>
<OutY> <OutWidth> <OutHeight>
Parameters:
<Id> This is the identifier for the video capture, which is an integer
starting from 0.
<InX> The X co-ordinate of the corner of the input window.
<InY> The Y co-ordinate of the corner of the input window.
<InWidth> The width of the input window, in pixels.
<InHeight> The height of the input window, in pixels.
<OutX> The X co-ordinate of the corner of the output window.
<OutY> The Y co-ordinate of the corner of the output window.
<OutWidth> The width of the output window, in pixels.
<OutHeight> The height of the output window, in pixels.
Description: Use this command to set the size of a digital video capture.
Example:
Limits:
VMIX_DISABLE
Usage: VMIX_DISABLE <Id>
Parameters:
<Id> The VMIX device identifier, which is an integer starting from 0.
VMIX_ENABLE
Usage: VMIX_ENABLE <Id>
Parameters:
<Id> The VMIX device identifier, which is an integer starting from 0.
VMIX_GETBKCOLOR
Usage: MIX_GETBKCOLOR <Id>
Parameters:
<Id> The VMIX device identifier, which is an integer starting from 0.
Description: Use this command to get the background color specified by a combination of red,
green and blue values.
Example: VMIX_GETBKGROUND 0
Limits: Software: None.
Hardware: None.
VMIX_GETCAPABILITY
Usage: VMIX_GETCAPABILITY <Id>
Parameters:
<Id> The VMIX device identifier, which is an integer starting from 0.
Description: This command displays details of the capabilities of the mixer identified by <Id>.
Example: VMIX_GETCAPABILITY 0
Limits: Software: None.
Hardware: None.
VMIX_GETCONNLAYER
Usage: VMIX_GETCONNLAYER <Id> <Position>
Parameters:
<Id> The VMIX device identifier, which is an integer starting from 0.
<Position>
Description: Use this command to retrieve the layer connected to VMID <Id> at <Position>.
Example: VMIX_GETCONNLAYER 0 1
Limits: Software: None.
Hardware: None.
VMIX_INFO
Usage: VMIX_INFO
Parameters: None.
Description: This command displays the version number of the VMIX driver.
Example: VMIX_INFO
Limits: Software: None.
Hardware: None.
VMIX_SETASPECTRATIO
Usage: VMIX_SETASPECTRATIO <ID> <AspectRatio>
Parameters:
<Id> The VMIX device identifier, which is an integer starting from 0.
<AspectRatio> The aspect ratio of the device, which is one of the following:
M_AR_16TO9, M_AR_4TO3, M_AR_221TO1, M_AR_SQUARE,
or M_AR_14TO9.
Description: Use this command to set the aspect ratio of the VMIX device <Id>.
Example: VMIX_SETASPECTRATIO 0 M_AR_16TO9
Limits: Software: None.
Hardware: None.
VMIX_SETBKCOLOR
Usage: VMIX_SETBKCOLOR <Id> <R> <G> <B>
Parameters:
<Device> This is the VMIX device identifier, which is an integer starting
from 0.
<R> Value for color Red.
<G> Value for color Green.
<B> Value for color Blue.
<Enable> 0: Disable the display of background plane.
1: Enable the display of the background plane.
Description: Use this command to set background color specified by values of red, green and blue.
Example: VMIX_SETBKGROUND 0 +100 0 0
Limits: Software: None.
Hardware: None.
VMIX_SETOFFSET
Usage: VMIX_SETOFFSET <Id> <XPos> <YPos>
Description: Use this command to set an offset for the mixer identified by <Id>.
Parameters:
<Id> This is the VMIX device identifier, which is an integer starting
from 0.
<XPos> Apply this offset to the X axis. This is a value in the range -128
to +127.
<YPos> Apply this offset to the Y axis. This is a value in the range -128
to +127.
Example: VMIX_SETOFFSET
Limits: Software: None.
Hardware: None.
VOUT_DISABLE
Usage: VOUT_DISABLE <Id>
Description: Use this command to disable the video out (VOUT) stage.
Parameters: <Id> This is the identifier for VOUT, which is an integer starting from 0.
Example: VOUT_DISABLE 0
Limits:
VOUT_ENABLE
Usage: VOUT_ENABLE <Id>
Description: Use this command to enable the video out (VOUT) stage.
Parameters: <Id> This is the identifier for VOUT, which is an integer starting from 0.
Example: VOUT_ENABLE 0
Limits:
VOUT_INFO
Usage: VOUT_INFO
Description: This command displays the version of the video out (VOUT) driver.
Parameters: None.
Example: VOUT_INFO
Limits: Software: None.
Hardware: None.
VOUT_GETCAPABILITY
Usage: VOUT_GETCAPABILITY <Id>
Description: Use this command to return details of the video out (VOUT) capabilities.
Parameters: <Id> This is the identifier for VOUT, which is an integer starting from 0.
Example: VOUT_GETCAPABILITY 0
Limits:
VOUT_GETSYNCCALIB
Usage: VOUT_GETSYNCCALIB <Id>
Description: Use this command to get the current analog synchronization calibration value.
Parameters: <Id> This is the identifier for VOUT, which is an integer starting from 0.
Example: VOUT_GETSYNCCALIB 0
Limits:
VOUT_SETBCS
Example: VOUT_SETBCS 64 64 64
Limits:
VOUT_SETSYNCCALIB
VTG_INFO
Usage: VTG_INFO
Parameters: None.
Description: This command displays the version number of the VTG driver.
Example: VTG_INFO
Limits: Software: None.
Hardware: None.
VTG_SETMODE
Usage: VTG_SETMODE <VtgId> <Mode>
Parameters:
<VtgId> 0: Main
1: Auxiliary
2: Remote.
<Mode> This parameter is the timing mode to set. See Table 8 for a full
list of timing modes
Description: Use this command to change the VTG timing mode.
Example: VTG_SETMODE 0 +5
VTG_GETMODE
Usage: VTG_GETMODE <VtgId>
Parameters:
<VtgId> 0: Main
1: Auxiliary
2: Remote.
HEAAC-DTS
1. Define the AUD_TRANSCODE_SPDIF_TO_DTS_SUPPORT flag in
stapp/stapp_audio.h, then compile and run the application.
2. At the testtool prompt, enter the following command to observe the output on a S/PDIF
receiver:
ST_xxxx> AUD_SPDIF 0 a_compressed
3. Finally, start audio decoding with an appropriate AUD_INJSTART command:
ST_xxxx> AUD_INJSTART 0 "thetest.loas" 0 A_HEAAC +48000 A_ES
HEAAC-DD
1. Define the AUD_TRANSCODE_SPDIF_TO_DTS_SUPPORT flag in
stapp/stapp_audio.h and set the ENABLE_DD_TRANSCODING flag in the
environment window. Compile the audio driver and the application, and then run the
application.
2. At the testtool prompt, enter the following command to observe the output at S/PDIF
receiver.
ST_xxxx> AUD_SPDIF 0 A_COMPRESSED
3. Finally, start audio decoding with an appropriate AUD_INJSTART command:
ST_xxxx> AUD_INJSTART 0 "thetest.loas" 0 A_HEAAC +48000 A_ES
For this command it is necessary to specify the type of each of the PIDs to play before
specifying the PID itself. In the above example, this is achieved with the tags P_H264,
P_MP2A and P_PCR.
There are other tags for defining PID types in addition to those given in the above example.
To display usage information, including a list of all the permitted PID type tags, replace any
argument in the command line with a “?”.
To stop playing the live channel, use the command:
ST_xxxx> PLAY_STOP 0
Note: If using VLC media player to playback the stream, it is necessary to broadcast PAT and PMT
PIDs in addition to those specified above. This is so that VLC is able to detect the video and
audio stream PIDs.
Now, when you select profile 0 (normal mode), I2C0 is put in standby mode.
A new device can be appended to the list of devices contained in a power profile with the
following commands:
POWER_SETPROFILE 0 1 "NEW_DEVICE" PM_NORMAL
POWER_SETPROFILE 0 2 "NEW_DEVICE" PM_ACTIVESTANDBY
The default settings of power profiles are designed to work without any changes having to
be made.
Place STAPI and CPU into standby and wake up using default trigger
Tune the feed the following testtool commands:
TUNER_TUNE 1 +11018 +27500 MOD_QPSK FEC_3_4 POL_H
PLAY_PROGRAM 0 "1" 1f4
POWER_SETMODE 0 1 PM_CPU_SLEEP
The wake up is triggered using the default device, that is, the IR remote control.
POWER_SETMODE 0 1 PM_CPU_STANDBY
Place STAPI and CPU into standby and wake up using non-default trigger
To set up a wake up timer with a parameter of 2 seconds, enter the command:
POWER_SETMODE 0 1 PM_CPU_SLEEP PM_WAKEUP_TIMER 2
In this case, the wake up is triggered using either the default wakeup (IR) or by the timer
completion, whichever happens first.
Note: On the STi7111, using the timer to trigger wakeup does not currently work.
The wake up can also be triggered by IR or HDMI, depending on which occurs first.
POWER_SETMODE 0 1 PM_CPU_NORMAL FFFFFFFF PM_WAKEUP_HDMI 0 PM_WAKEUP_TIMER 2
On the STi7111, wake up from sleep mode can be achieved using the front panel key(c).
Wakeup from standby is currently under development.
For HDMI wakeup, please ensure you are using CEC capable TV Set.
c. Details of front panel key use will be published in the next release.
9 Glossary
Revision history
Index
A O
ATA interface . . . . . . . . . . . . . . . . . . . . . . . . . .70 OS21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
B P
Backus-Naur Form . . . . . . . . . . . . . . . . . . . . . . .8 packetized elementary stream . . . . . . . . . . . . 93
blower . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39, 98 playback driver . . . . . . . . . . . . . . . . . . . . . . . 129
blower tool . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
BNF. See Backus-naur Form.
R
bootrom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
romgen tool . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
C
S
command history . . . . . . . . . . . . . . . . . . . . . . .51
console debugger . . . . . . . . . . . . . . . . . . . . . . .24 SCART driver . . . . . . . . . . . . . . . . . . . . . . . . 140
cryptography benchmarks . . . . . . . . . . . . . . . .88 setenv.bat . . . . . . . . . . . . . . . . . . . . . . . . . 14-16
setenv.sh . . . . . . . . . . . . . . . . . . . . . . . . . . 16, 31
Smartcard driver . . . . . . . . . . . . . . . . . . . . . . 141
D Software notation . . . . . . . . . . . . . . . . . . . . . . . 8
DAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123 SPI driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Data Display Debugger . . . . . . . . . . . . . . . 35-36 ST Micro Connect . . . . . . . . . . . . . . . . . . . . 9, 98
denc colorbar . . . . . . . . . . . . . . . . . . . . . . . . .172 ST TargetPack . . . . . . . . . . . . . . . . . . . . . . . . 47
directfb support . . . . . . . . . . . . . . . . . . . . . . . .37 STATAPI driver . . . . . . . . . . . . . . . . . . . . . . . . 71
DirecTV . . . . . . . . . . . . . . . . . . . . . . . . . 177-178 STAUD driver . . . . . . . . . . . . . . . . . . . . . . . . . 74
DiSEqC command . . . . . . . . . . . . . . . . . . . . .154 STBLAST driver . . . . . . . . . . . . . . . . . . . . . . . 81
DVB-SI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175 STBLIT driver . . . . . . . . . . . . . . . . . . . . . . . . . 83
STCC driver . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
STCRYPT/STTKDMA driver . . . . . . . . . . . . . . 88
F
STDENC driver . . . . . . . . . . . . . . . . . . . . . . . . 95
File system . . . . . . . . . . . . . . . . . . . . . . . . . . .102 STFLASH driver . . . . . . . . . . . . . . . . . . . . . . . 99
Flash memory . . . . . . . . . . . . . . . . . . . . . . . . .38 STFSK driver . . . . . . . . . . . . . . . . . . . . . . . . . 107
STHDMI driver . . . . . . . . . . . . . . . . . . . . . . . . 114
G STI2C driver . . . . . . . . . . . . . . . . . . . . . . . . . 117
STKEYSCN driver . . . . . . . . . . . . . . . . . . . . . 121
gmake . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-22 STLAYER/STBLIT driver . . . . . . . . . . . . . . . . 111
STPOWER driver . . . . . . . . . . . . . . . . . . . . . 134
H STWorkbench . . . . . . . . . . . . . . . . . . . . . . 21, 24
subtitle driver . . . . . . . . . . . . . . . . . . . . . . . . . 144
hardware blitter . . . . . . . . . . . . . . . . . . . . . . . .82
subtitles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
I T
IRQ settings . . . . . . . . . . . . . . . . . . . . . . . . . .146
targetpack . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
L TCP/IP driver . . . . . . . . . . . . . . . . . . . . . . . . . 120
Linux . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 27, 47 teletext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
LIRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81 testtool . . . . . . . . . . . . . . . . . . . . . . . 9, 24, 41, 51
low power mode . . . . . . . . . . . . . . . . . . . . . . .179 scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
TEXT driver . . . . . . . . . . . . . . . . . . . . . . . . . . 150
V
video capture . . . . . . . . . . . . . . . . . . . . . . . . .179
video driver . . . . . . . . . . . . . . . . . . . . . . . . . . .158
VMIX driver . . . . . . . . . . . . . . . . . . . . . . . . . .165
VOUT driver . . . . . . . . . . . . . . . . . . . . . . . . . .167
VTG driver . . . . . . . . . . . . . . . . . . . . . . . . . . .169
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the
right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any
time, without notice.
All ST products are sold pursuant to ST’s terms and conditions of sale.
Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no
liability whatsoever relating to the choice, selection or use of the ST products and services described herein.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this
document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products
or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such
third party products or services or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED
WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS
OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT
RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING
APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY,
DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE
GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void
any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any
liability of ST.
Information in this document supersedes and replaces all information previously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.