STMicroelectronics STAPI-SDK User manual
Publicitate
Publicitate
UM1476
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 lowlevel 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.
December 2011 8214357 Rev 4
This is preliminary information on a product now in development or undergoing evaluation. Details are subject to change without notice.
1/212 www.st.com
Contents
Contents
STAPI-SDK
Configuring the ST Micro Connect 2 for serial data out . . . . . . . . . . . . . 10
Toolsets and other software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Compiling and running STAPI-SDK (OS21) . . . . . . . . . . . . . . . . . . . . . 14
Board configuration for MS Windows machine . . . . . . . . . . . . . . . . . . . . . 14
Board configuration for Linux/UNIX machine . . . . . . . . . . . . . . . . . . . . . . 15
Compiling STAPI-SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Compiling the STAPI libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Compiling and linking the STAPI application . . . . . . . . . . . . . . . . . . . . . . 23
2/212 8214357 Rev 4
STAPI-SDK
Contents
Running the STAPI application on the target . . . . . . . . . . . . . . . . . . . . . . 23
Configure the ST Micro Connect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Debugging the software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Compiling and running STAPI-SDK (STLinux) . . . . . . . . . . . . . . . . . . . 25
Clean current STLinux distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Board configuration for STLinux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Customized configuration for STLinux . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Compiling the STAPI-SDK tree for Linux . . . . . . . . . . . . . . . . . . . . . . . . . 34
Compiling the STAPI-SDK tree for Linux with uclibc . . . . . . . . . . . . . . . 35
Running STAPI-SDK for STLinux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Frame buffer and directfb support on Linux . . . . . . . . . . . . . . . . . . . . . . . 36
How to boot from Flash memory (STBlower) . . . . . . . . . . . . . . . . . . . . 38
Burning the image to the board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Running the blower tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
How to boot from Flash memory (U-Boot) . . . . . . . . . . . . . . . . . . . . . . 42
Compile and configure U-Boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Configure the kernel for “boot from Flash” . . . . . . . . . . . . . . . . . . . . . . . . 43
Build the root file system image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Burn the images onto Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
8214357 Rev 4 3/212
Contents
STAPI-SDK
Create or modify a platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
How to customize STAPI-SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Video and audio firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Multimedia playback support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Common testtool commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
STAPI-SDK testtool commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Hard Disk Driver access commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Audio based commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Remote control commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Blitter engine based commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Close Caption commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Clock recovery based commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Cryptography commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Cursor commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Demux commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Digital Encoder (DENC) commands . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Direct Memory Access (DMA) commands . . . . . . . . . . . . . . . . . . . . . . 103
FLASH commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
File system commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
FSK commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Graphics based commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Graphical User Interface (GUI) control commands . . . . . . . . . . . . . . . 119
High-Definition Multimedia Interface (HDMI) commands . . . . . . . . . . . 121
I2C interface commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Internet Protocol (IP) commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Keyscan based commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
PIO commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Picture in Picture use case commands . . . . . . . . . . . . . . . . . . . . . . . . 136
Power management commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
POD commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
4/212 8214357 Rev 4
STAPI-SDK Contents
Pulse Width Modulated (PWM) signal commands . . . . . . . . . . . . . . . . 147
Recording commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Rack commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
SCART commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Smartcard commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
SPI commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Subtitling commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
System commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Table commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Trace commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Teletext commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Tuner commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
USB commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Video commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Video capture commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Video mixer commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Video out commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Video timing generator (VTG) commands . . . . . . . . . . . . . . . . . . . . . . 185
Displaying the denc colorbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Displaying a graphic plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Decoding a video stream from memory . . . . . . . . . . . . . . . . . . . . . . . . 189
Decoding an audio stream from memory . . . . . . . . . . . . . . . . . . . . . . . 189
Transcoding support in STAPI-SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Tuning the demodulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Getting the classical DVB-SI information . . . . . . . . . . . . . . . . . . . . . . . 191
Decoding a live channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Decoding a transport stream file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Decoding and recording a live IP unicast/multicast stream . . . . . . . . . 192
Broadcasting a live or file transport stream over IP (unicast only) . . . . 193
Decoding a DirecTV stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Decoding an A3 stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Decoding teletext data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Decoding subtitle data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Using the HD/SD capture features . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Using low power mode operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
8214357 Rev 4 5/212
Contents STAPI-SDK
2D Grafix use case using Directfb . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
3D Grafix use case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Appendix A STAPI-SDK for dual CPU SoCs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Compiling STAPI-SDK for dual CPUs (STi7108 SoC). . . . . . . . . . . . . . . 199
Compiling for the real time (RT) processor . . . . . . . . . . . . . . . . . . . . . . 199
Compiling for the host processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Running the software for dual CPUs (STi7108 SoC) . . . . . . . . . . . . . . . 199
Single boot command mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Individual boot sequence for host and real time processors. . . . . . . . . 200
6/212 8214357 Rev 4
STAPI-SDK
Preface
Preface
Comments on this manual should be made by contacting your local STMicroelectronics sales office or distributor.
Document identification and control
Each book carries a unique identifier of the form: nnnnnnn Rev x where nnnnnnn is the document number, and x is the revision.
Whenever making comments on this document, quote the complete identification nnnnnnn Rev x .
License information
<To be supplied>
Conventions used in this guide
General notation
●
●
●
●
●
The notation in this document uses the following conventions: sample code , keyboard input and file names variables , code variables equations and math
and code comments
screens, windows, dialog boxes and tool names instructions
Hardware notation
The following conventions are used for hardware notation:
●
●
REGISTER NAMES and FIELD NAMES
PIN NAMES and SIGNAL NAMES
8214357 Rev 4 7/212
8/212
Preface STAPI-SDK
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, vspacename .
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 RPM
TM
and Fedora
TM
are trademarks of Red Hat
Software, Inc.
8214357 Rev 4
STAPI-SDK
1 Introduction
Introduction
The purpose of this manual is to provide comprehensive instructions on how to install, compile and run the STAPI-SDK libraries and application. It also contains instructions on how to use the testtool diagnostic tool.
The hardware required for a STAPI-SDK development environment is as follows:
●
●
●
● a host PC (for compiling STAPI-SDK) a development board (for testing and debugging the compiled STAPI-SDK application) an ST Micro Connect 2
(a)
(which provides the physical interface between the host PC and the development board) a USB cable or Ethernet cable (to connect the ST Micro Connect 2 to the host PC directly or through a network)
(b)
● an LVDS target board connection cable (to connect the development board to the ST
Micro Connect 2)
Figure 1
gives an overview of the development environment.
Figure 1.
STAPI-SDK development environment
Toolset running on
Red Hat Linux
Enterprise or MS
Windows
Serial connection between
ST Micro Connect 2 and target
Target System
Host-target interconnect
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.
b.
Supplied with the ST Micro Connect 2.
8214357 Rev 4 9/212
Introduction STAPI-SDK
Both the development board and the ST Micro Connect 2 can be supplied by
STMicroelectronics. For further information, contact your local STMicroelectronics sales office.
1.1.2
Note:
To receive the debug output on a serial port (UART interface), connect the target board’s
serial output to the ST Micro Connect 2’s serial connector. Please refer to
Table 1
for SoC based mapping to different serial ports available on the target platforms.
Table 1.
Target board
Ports to be used for serial output
Port number
MB680 (7105) COM0 (Lower connector)
SDK7105_7105 (7105)
MB411 (7109)
MB618 (7111)
MB704 (5197)
HDK7108_7108
COM0 (Only one connector)
UART0 (Lower connector)
UART0 (CN2 connector, closest to Smartcard)
UART1 (Upper connector)
COM1 (next to SMART CARD slot, for HOST)
COM0 (next to STMC2 connection, for RT)
Configuring the ST Micro Connect 2 for serial data out
To configure the ST Micro Connect 2 to receive the serial data output from the target board:
1.
For Windows, check that the PATH variable includes the correct STMC bin path. (For example: C:\STM\STMCR1.6.0\bin .)
2. At command prompt, enter the following command: stmcconfig --ip <microconnect-ip> --serial-relay
The command returns a response similar to the following:
Starting serial relay : ip: <microconnect-ip> port: 5331
3. Run Telnet to receive serial output from the target board. Use the following command
syntax to specify the port number from the response at step
2
number is 5331.
telnet <microconnect-ip> 5331
Occasionally the Telnet command may result in an error message “connection refused”. In this case, repeat the commands from step
2
.
1.2
Note:
Toolsets and other software
To compile the STAPI-SDK for a given core, make sure that the appropriate toolset for that core is installed on the host PC. For example, the ST40 Micro Toolset is required to compile
STAPI for an ST40 core running OS21, and the ST200 Micro Toolset is required to compile
STAPI for an ST200 core. See the documentation provided by the toolset for information on installing and using the toolset.
The instructions in this user manual assume that a suitable toolset (or toolsets, in the case of multicore SoCs) has been installed on the host PC and is running correctly. To obtain the
10/212 8214357 Rev 4
STAPI-SDK Introduction latest version of any STMicroelectronics toolset, please contact your local
STMicroelectronics FAE.
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/ docs/ stapp/ stdebug/
The directory contains the configuration file (setenv.bat or setenv.sh
) and various other tools.
This directory contains the user documentation for STAPI-SDK, including this user manual.
This directory contains all the initialization and set up files for the STAPI drivers. The built STAPI executables are also located here. It also contains the makefile for compiling the STAPI-SDK tree.
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.
8214357 Rev 4 11/212
Introduction
Figure 2.
Schematic representation of the STAPI-SDK testtool stdebug/ stapp/ (STAPI application) apilib/ (low-level drivers)
STAPI-SDK
1.4 Apilib
Note:
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.
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
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.
12/212 8214357 Rev 4
STAPI-SDK Introduction
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
Chapter 3: Compiling and running STAPI-SDK (STLinux) on page 25
This section will be provided in a later version of this user manual.
8214357 Rev 4 13/212
Compiling and running STAPI-SDK (OS21)
2 Compiling and running STAPI-SDK (OS21)
STAPI-SDK
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 provides instructions for compiling STAPI-SDK for an SoC running the OS21 real time operating system.
STAPI-SDK can be compiled on a machine running either MS Windows or Linux (such as
Red Hat Enterprise Linux, or Fedora).
Section 2.1
gives the initial configuration instructions
for MS Windows and
Section 2.2
gives the initial configuration instructions of Linux. The
remaining sections are common to both operating systems.
2.1 Board configuration for MS Windows machine
Before compilation, the STAPI-SDK environment must first be configured for a specific target platform. The STAPI-SDK installation includes a batch file for windows machine that performs the required configuration. The batch file for MS Windows is called
< SDK_ROOT >\bin\setenv.bat
.
Several of the environment variables in setenv.bat reference the paths of specific directories on the host. Although the version of setenv.bat included in the STAPI-SDK distribution contains default values for the standard STAPI-SDK and toolset installation, it may be necessary to modify some of the environment variables to suit your particular installation. In particular, the variable STSDKROOT must be set to < SDK_ROOT > , the root directory of the STAPI-SDK installation. Before running the batch file, check that the SET
Figure 3
do correspond with the filepaths of the various toolsets and other resources that are installed on the host system, and modify them if required.
Figure 3.
Extract from setenv.bat
SET STSDKROOT=C:\STAPI_SDK
SET STPPROOT=C:\STM\STMCR1.6.0
SET ST40ROOT=C:\STM\ST40R5.1.0
SET ST200ROOT=C:\STM\ST200R7.1.0
SET OSPLUSROOT=C:\STM\OSPLUSR3.2.4
SET WORKBENCHROOT=C:\STM\STWORKBENCHR6.0.0
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 >
14/212 8214357 Rev 4
STAPI-SDK
Note:
Compiling and running STAPI-SDK (OS21) 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
The batch file 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.
The arguments passed to setenv.bat
are case sensitive. Enter the arguments with exactly the same capitalization as in the list generated by the setenv.bat
script.
If a platform and SoC are specified, but setenv.bat
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.
2.2 Board configuration for Linux/UNIX machine
Before compilation, the STAPI-SDK environment must first be configured for a specific target platform. The STAPI-SDK installation includes a shell script file for UNIX or Linux machine that performs the required configuration. The shell script for UNIX or Linux machine is called < SDK_ROOT >\bin\setenv.sh
Several of the environment variables in setenv.sh reference the paths of specific directories on the host. Before running the batch file, edit the export commands listed in
Figure 4
so that they correspond with the filepaths of the various toolsets and other
resources that are installed on the host system.
Figure 4.
Extract from setenv.sh
export STSDKROOT=/opt/STM/STAPI_SDK export STPPROOT=/opt/STM/STMCR1.6.0
export ST40ROOT=/opt/STM/ST40R5.1.0
export ST200ROOT=/opt/STM/ST200R7.1.0
export OSPLUSROOT=/opt/STM/OSPlusR3.2.4
export WORKBENCHROOT=/opt/STM/STWORKBENCHR6.0.0
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:
8214357 Rev 4 15/212
Compiling and running STAPI-SDK (OS21)
Note:
STAPI-SDK 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.
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.
The configuration file setenv.bat (or its equivalent in Linux and UNIX, setenv.sh) sets a number of environment variables. It is possible to create a customized environment by editing the values of these environment variables. This may be necessary, for example, when using STAPI-SDK for a platform not listed in the default configuration file.
Table 2
gives a list of the environment variables in setenv.bat and setenv.sh that are
common to all operating systems (OS21 and ST Linux) and which may be edited in order to customize the configuration.
Table 2.
Environment variables in setenv.bat and setenv.sh
Variable
Reference values
(Refer to setenv.bat for complete list)
STSDK
STSDKROOT
STB5197ROOT
DVD_MAKE
DVD_ROOT
DVD_EXPORTS
DVD_INCLUDE
Comments
1
C:\STM\STAPI_SDK
%STSDKROOT%/apilib
%STB5197ROOT%/make
%STB5197ROOT%/src
Always set this variable to 1 when compiling the complete STAPI-SDK tree.
To get an apilib library without any dependencies with
< SDK_ROOT > /stapp/ or <SDK_ROOT>/stdebug/, set this flag to 0.
This variable defines the path to the < SDK_ROOT > directory.
This variable defines the path to the
< SDK_ROOT > /apilib directory.
This variable defines the path to the
< SDK_ROOT > /apilib/make directory.
This variable defines the path to the
< SDK_ROOT > /apilib/src directory.
%STB5197ROOT%/lib
%STB5197ROOT%/include
This variable defines the path to the
< SDK_ROOT > /apilib/lib directory.
This variable defines the path to the
< SDK_ROOT > /apilib/include directory.
16/212 8214357 Rev 4
STAPI-SDK Compiling and running STAPI-SDK (OS21)
Table 2.
Environment variables in setenv.bat and setenv.sh (continued)
Variable
Reference values
(Refer to setenv.bat for complete list)
Comments
DVD_CONFIG
DVD_TRANSPORT
DVD_PLATFORM
DVD_BACKEND
%STB5197ROOT%/config stpti4 stpti5
HDK7111
7105
DVD_BACKEND_SOCNAME 5189
DVD_FRONTEND_TUNER NIM_900_6100
DVD_SERVICE
DVD_DISPLAY_SD
DVD_DISPLAY_HD
MODULES
MODULEROOT
GUI
DVB
D_PAL
NONE
0
$STSDKROOT/modules
0
This variable defines the path to the
< SDK_ROOT > /apilib/config directory.
This variable defines the hardware transport interface.
This is always set to either stpti4. or stpti5
This variable defines the name of the hardware platform.
Refer to <SDK_ROOT>/bin/setenv.bat for the complete list of the possible values
This variable defines the name of the backend chipset used. Permitted values include: 7100, 7109,7105,
7111 , 7141,5197 or 5289. This list will be extended as more backend SoCs are supported (see the release notes for the most up to date list).
This variable defines the name of the SOC. This is used when we have different SOC sharing the configuration
This variable gives the name of the front-end hardwares used on the platform.
Permitted values include: STEM_299, NIM_299_6000,
NIM_288_6000 , NIM_288_6110, NIM_899_6100,
NIM_399 , NIM_900_6100,
NIM_900_6110,NIM_903_6100,NIM_903_6110,
NIM_360 , NIM_361, NIM_362,NIM_370,
NIM_370_DTT7600,NIM_371,NIM_372,NIM_373,N
IM_297,NIM_297_MT2060, NIM_297E,NIM_297 ,
NIM_TS , or CUSTOM. This list will be extended as more front-end tuners are supported (see the Release Notes for the most up to date list).
Define a comma delimited list of tuners if there is more than one tuner on the board.
Select NIM_TS for injecting the stream from packet injector.
This variable defines the broadcast service used.
Permitted values are DVB, DTV, A3, or NDS
This variable is set to either D_PAL or D_NTSC to set the
SD output format of the decoder.
Set this variable to the appropriate format needed for HD output. Permitted values are: NONE, D_1080I50HZ,
D_720P50HZ , D_576P50HZ, D_1080I60HZ,
D_720P60HZ , or D_480P60HZ.
To work in SD only mode, set this variable to NONE.
Set this variable to 1 to use the modules/ services.
This variable defines the path to the optional modules/ services. This only has an effect if MODULES=1 is set.
Set this variable to 1 to run the STAPI-SDK tree with the
STGUI application.
8214357 Rev 4 17/212
Compiling and running STAPI-SDK (OS21) STAPI-SDK
Table 2.
Environment variables in setenv.bat and setenv.sh (continued)
Variable
Reference values
(Refer to setenv.bat for complete list)
Comments
DVR
OSPLUS
USB
TCPIP
DEBUG
RUN_FROM_FLASH
TARGET
ARCHITECTURE
DVD_PLATFORM_ROOT
1
1
0
0
1
0
10.199.44.83
ST40
Set this variable to 1 to enable DVR functionalities.
Note that you must recompile the whole tree (including
< SDK_ROOT > /apilib/ ) after changing the value of this flag.
Set this variable to 1 if you have the OSPlus stack installed for the OS20 or OS21 operating systems.
Note that OSPlus is mandatory if DVR is set to 1.
Set this variable to 1 to enable the USB interface.
For OS20 or OS21, OSPLUS must be set to 1 and the usblink libraries provided by OSPlus must be installed.
These libraries are not free of charge for OS20/OS21.
Set this variable to 1 to enable TCPIP support.
For OS20 or OS21, OSPLUS must be set to 1 and the nexgen libraries provided by OSPlus must be installed.
These libraries are not free of charge.
Set this variable to 1 to compile STSDK in debug mode.This Flag can also be used to activate and deactivate the OS optimization level. If DEBUG=1, the build will be performed with -O0 optimization level, however if DEBUG=0, the Optimization level will be set to -O2.
Set this variable to 1 when compiling the ROM image.
This variable contains the name of the ST Micro
Connect target to be used. Otherwise enter the IP address of the STMC, or the name by which the STMC is registered.
If the STMC1 is connected using USB, set this variable to usb. (Not supported in case of STMC2)
This variable defines the architecture of the backend chipset. It can be ST40 or ST200.
Use this variable to define a different (that is, nonstandard) directory for platform definitions. When
DVD_PLATFORM_ROOT is not defined, the path to the platform directory is always
< SDK_ROOT > /stapp/platform/ by default.
18/212 8214357 Rev 4
STAPI-SDK Compiling and running STAPI-SDK (OS21)
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.
Table 3.
Other environment variables
Variable
Reference values
(Refer to setenv.bat for complete list)
Comments
STSDK_EXTERNAL_MAIN
DVD_START_SCRIPT
_EXTENDED
OS_MODE
DVD_USEMALI
DVD_CPU
0
Set this variable to 1 to link the SDK application with an external main symbol. In this case, the SDK can be used as a reference of driver initializations and an external application
(such as HDI, for example).
This variable is not set by default in the standard SDK tree release.
Use this variable to add a script to be loaded when running the application on the target. The “filename” provided in this variable is then loaded dynamically when uploading the code to the ST Micro Connect. You can customize your debug script commands.
This variable is not set by default in the standard SDK tree release.
Note: this works for the ST40 toolset only.
This variable applies to the ST40 toolset and OS21 only.
The value of this variable is the name of a file that has been generated by compiling the OS21 libraries. The file is located in:
%ST40ROOT%/sh-superh-elf/src/os21/lib/st40/
When linking the SDK application for the ST40 toolset and
OS21, the makefile checks this directory for a file with the given name. If it does not exist, the makefile links the application with the default libraries provided in the toolset release. If the path exists, the makefile links the application with the libraries identified by the file name.
A typical use for this variable is to define either
OS_MODE=encoded or OS_MODE=non_encoded to select
OS21 libraries with interrupts in encoded or non encoded mode respectively.
This variable is not set by default in the standard STAPI-SDK tree release.
Set this flag to 1 to use the 3D functionality provided by Mali.
This variable applies to STi7108 OS21 configuration.
– DVD_CPU=HOST makes STi7108 OS21 boot as Single
CPU configuration
– DVD_CPU=RT makes STi7108 OS21 boot in Dual CPU mode
8214357 Rev 4 19/212
Compiling and running STAPI-SDK (OS21) STAPI-SDK
Table 3.
Other environment variables (continued)
Variable
Reference values
(Refer to setenv.bat for complete list)
USE_TARGETPACK
DVD_ADDRESSMODE
DVD_GFX2D
DVD_GFX3D
1
32
0
0
Comments
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 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 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.
Set this variable to 1 build 2D graphics module in SDK.
This variable is not set by default in the standard SDK tree release.
Set this variable to 1 build 3D graphics module in SDK.
This variable is not set by default in the standard SDK tree release.
Compiling the STAPI-SDK tree is a two stage operation.The first stage is to compile the
STAPI libraries, and the second stage is to compile the application itself and link it with the
STAPI libraries. The reason for the two stage compilation is because compiling the STAPI drivers can be very time consuming.
For MS Windows, the STAPI distribution includes a copy of gmake.exe. The configuration script setenv.bat automatically adds this executable to the PATH. Use this version of
make in preference to any other make program that may already be installed on the host.
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.
20/212 8214357 Rev 4
STAPI-SDK Compiling and running STAPI-SDK (OS21)
A list of the available targets are given in
Table 4
Table 4.
Targets available with the STAPI-SDK makefile
Target Description help all stdebug purge_all
Display help text.
Compile stdebug -stapp and link it with the apilib library.
all OS21_TRACE=1 OS21_TRACE_API=1
Build with support for OS21 Trace and OS21 API
Trace. (ST40 platforms only.) all OS21_PROFILER=1 apilib
Build with support for OS21 profiler. (ST40 platforms only.)
Compile apilib library only.
apilib MODULE=< stapp module>
Compile the specified module in the apilib directory. The release notes provide a full list of module names for the current release of STAPI-SDK.
Compile contents of stapp directory only.
Compile contents of stdebug directory only.
Clean the stapp and stdebug directories for the currently specified platform.
purge purge_apilib purge_apilib MODULE=< purge_stdebug run debug debug CONSOLE=1 debug STWORKBENCH=1 debug_flash rom rom ZIP=1 blower run_blower module>
Clean stapp directory only.
Clean apilib directory only.
Clean specified module in the apilib directory.
Clean the stdebug directory only.
Run the application without debug.
Debug the application with the standard debugger.
Debug the application with the console debugger.
(ST40 architecture only)
Debug the application with STWorkbench. (ST40 architecture and if STWorkbench installed only.)
Start debug from Flash.
Generate ROM image of the application. This target is also used for generating an RT binary for STi7108
OS21 configuration in Dual CPU mode
Generate ROM zip image of the application.
Compile the Flash blower application.
Run the Flash blower application.
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.
8214357 Rev 4 21/212
Compiling and running STAPI-SDK (OS21) STAPI-SDK
The following commands are available if the $(MODULES) variable is set to 1. (The default is
0.)
Table 5.
Modules services commands
Command modules purge_modules
Description
Compile only MODULES directory
Clean only MODULES directory
2.5 Compiling the STAPI libraries
The gmake command for compiling the STAPI libraries is: gmake apilib
This command builds all the modules in the < SDK_ROOT >/apilib/ directory and installs the resulting object files so that they can be linked to the STAPI application.
To clean the apilib/ directory by removing all the intermediary files generated by an earlier build, enter the command: gmake purge_apilib
To compile a single STAPI driver, use the MODULE command line argument. For example, to compile just the stvid driver, enter the command: gmake apilib MODULE=stvid
To clean the files for a specific STAPI driver only, use the MODULE argument to the purge_apilib command. For example, to clean the stvid driver directory, enter the command: gmake purge_apilib MODULE=stvid
●
●
●
●
During the operation to build the STAPI libraries, make constructs a name for the directory in which object files and the libraries are placed which includes some or all of the following elements: target platform name (for example, mb618 or mb680) backend SoC name (for example, 7111 or 7105) operating system (OS21 or Linux) address mode (29 or 32)
For example, the library directory for the MB680 platform with 7105 backend has the path:
< SDK_ROOT >\apilib\lib\mb680_7105_ST40_OS21_32BITS
This means that if an application is generated on the same machine for different platforms, the libraries and binary files for each platform are kept separate from one another.
Recompiling any item for one platform has no effect on the software already compiled for a different platform. Also, the purge operation only removes files relating to the platform currently selected, and leaves all the files relating to other platforms untouched.
22/212 8214357 Rev 4
STAPI-SDK
2.6
Compiling and running STAPI-SDK (OS21)
Compiling and linking the STAPI application
When the apilib libraries have been compiled, the next step is to compile the STAPI application itself.
The source files for STAPI are located in the < SDK_ROOT >\stapp\ directory. The gmake command for compiling the application and linking it with the pre-compiled libraries is: gmake all
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.
2.7
2.7.1
Note:
Note:
Running the STAPI application on the target
When the STAPI-SDK libraries have been compiled, the resulting executable can be run on the target. The executable file is first transferred to the target using an ST Micro Connect.
Configure the ST Micro Connect
STAPI-SDK supports both the ST Micro Connect 1 (STMC1) and the ST Micro Connect 2
(STMC2). The SoC determines which ST Micro Connect is selected as the default: generally, the default for older SoCs (such as STi7109) is the STMC1 and the default for newer SoCs (such as the STi7111) is the STMC2.
If the environment variable USE_TARGETPACK is set to 1, then the system is forced to use the STMC2, irrespective of the default. This is because only the STMC2 supports ST
Targetpacks.
Use the environment variable $TARGET to identify the ST Micro Connect to the system. If you are using an STMC1 through a USB connection, then set $TARGET as follows: set TARGET=usb
The gmake tool is case-sensitive, so make sure that you enter usb as written, in lower case.
For the STMC2, set $TARGET to the IP address of the ST Micro Connect, or to a name that can be translated into an IP address. For example: set TARGET=192.168.1.101
or: set TARGET=mystmc
8214357 Rev 4 23/212
Compiling and running STAPI-SDK (OS21) STAPI-SDK
Having configured the ST Micro Connect, the next step is to run the STAPI application on the target. This is done by executing the following gmake command: gmake run
The ST Micro Connect loads the software onto the target and runs it. The makefile configures the connection.
Note: 1
When the application is running, it displays the testtool prompt. See
Chapter 8 on page 50
for information on how to use testtool.
2 If the Windows Data Execution Protection system (DEP) has been switched on for gdb, this may prevent gdb running executable code when gmake run is invoked. To prevent this, ensure that the Windows Data Execution Protection system is switched off for gdb. This is done in Control Panel > System > Advanced > Performance > Data Execution
Prevention.
2.7.3
Note:
Debugging the software
To run the application using the debug interface, enter the following command: gmake debug
To run the application using the console debugger interface, enter the following command: gmake debug CONSOLE=1
To run the application using STWorkbench, enter the following command: gmake debug STWORKBENCH=1
This command launches STWorkbench with the appropriate command line parameters to create a new STWorkbench project containing the STAPI executables. The application stops at a breakpoint on the first line of the main() function.
The CONSOLE and STWORKBENCH options are only available for ST40 based platforms. The
STWORKBENCH option is only available if STWorkbench is installed.
24/212 8214357 Rev 4
STAPI-SDK
3
Compiling and running STAPI-SDK (STLinux)
Compiling and running STAPI-SDK (STLinux)
Note:
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 machine running Linux compiling STAPI-SDK for an SoC running STLinux.
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.
Information on the installation and operation of Linux on the host PC is beyond the scope of this manual.
3.1 Clean current STLinux distribution
When installing STAPI-SDK on a board that already has STLinux installed,
STMicroelectronics recommend that you first clean the entire installation to ensure that there is no extra software installed that may interfere with the operation of the STAPI-SDK.
SDK supports both STLinux 2.3 and STLinux 2.4. In the instructions given throughout this chapter, substitute x for either 3 or 4, as appropriate to the version of STLinux that you are using.
For STLinux 2.
x , the command for removing any currently installed rpm packages is: rpm -qa | grep stlinux2 x
Within a bash shell, enter the following for STLinux 2.
x : rpm -e --nodeps ‘rpm -qa | grep stlinux2 x ‘ rm -rf /opt/STM/STLinux-2.
x
Under certain circumstances, the removal of some packages may fail due to script failures.
To prevent this happening, add the option --noscripts to the rpm command.
The following command line provides a more “verbose” output of the process to remove packages: rpm -qa | grep stlinux2x | xargs -i -t rpm -e --nodeps --noscripts {}
3.2.1
For generic instructions on downloading and installing STLinux, see the STLinux web page,
www.stlinux.com
. A summary is given below in
Section 3.2.1: Installation of STLinux
Section 3.2.2 on page 28
and the following sections cover various points to be considered if
you are installing STLinux specifically for STAPI-SDK.
Installation of STLinux
The installation package for STLinux 2.
x is located at
ftp://ftp.stlinux.com/pub/stlinux/2.x/
.
There is a README file at this location that gives current information concerning this release of STLinux2.
x . This file also gives a link to the release notes.
8214357 Rev 4 25/212
Compiling and running STAPI-SDK (STLinux)
Note:
Note:
STAPI-SDK
There are two different methods for completing the installation: either download the ISO image from the URL given above and then run the install script, or just download the install script ftp://ftp.stlinux.com/pub/stlinux/2.x/install to a Linux host and complete the installation over the network.
You can download the files you require either through a web browser or using an FTP client.
Install from ISO image
There is an ISO image for each version of STLinux for ST40 cores
(STLinux-2.3-sh4-
03-11-07.iso
and STLinux-2.4-sh4-20100401.iso
). Download the ISO image specific to the version of STLinux you wish to use from
ftp://ftp.stlinux.com/pub/stlinux/2.x/iso
and save it to an appropriate local directory.
The ISO image contains all the files you need to complete the STLinux installation. You can either:
● burn this image to a CD-ROM (all standard CD-ROM tools are able to do this) and then complete the installation by running the install script from the resulting CD
● install STLinux directly from the ISO image using a loopback device with the following commands:
– for STLinux version 2.3: host# mkdir -p /mnt/cdrom host# mount -o loop,ro -t iso9660 -r STLinux-2.3-sh4-03-11-07.iso /mnt/cdrom
– for STLinux version 2.4: host# mkdir -p /mnt/cdrom host# mount -o loop,ro -t iso9660 -r STLinux-2.4.sh4-20100401.iso /mnt/cdrom
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
You must be the root user to install the distribution. If you are behind a proxy, update the environment variables HTTP_PROXY and FTP_PROXY accordingly.
The installer uses stmyum, STMicroelectronics customized version of yum, to handle the installation and dependency checking of RPM files. See
http://www.stlinux.com/install/distribution/STMYUM
for more information about stmyum.
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/install/distribution/STMYUM
.
26/212 8214357 Rev 4
STAPI-SDK
Note:
Compiling and running STAPI-SDK (STLinux)
Verify the installation
Verify that the installation was successful by inspecting the name of the Linux kernel.
ls /opt/STM/STLinux-2.x/devkit/sources/kernel -l
●
●
For STLinux version 2.3, the default name of the linux-sh4 kernel is linux-sh4-
2.6.23.1_stm23_0102
For STLinux version 2.4, the default name of the linux-sh4 kernel is linux-sh4-
2.6.32.10_stm24_0201
The installation creates a root file system for the target, which includes device files and setuid programs.
Installing additional libraries
The instructions given above install a generic version of STLinux. The next step is to replace certain packages with STAPI-SDK-specific versions. The installation process is performed using stmyum.
1.
Edit the stmyum configuration file, yum.conf, to indicate that you want stmyum to install the STAPI-SDK specific packages. Do this by adding the following lines to
/opt/STM/STLinux-2.
x /host/etc/yum.conf
:
[STLinux_Distribution_STAPI] name=STLinux Distribution 2.
x STAPI baseurl=http://www.stlinux.com/pub/stlinux/2.
x /stapi/RPMS gpgkey=http://www.stlinux.com/pub/stlinux/2.
x /STLinux/gpg_key gpgcheck=0 versions of the packages:
/opt/STM/STLinux-2.
x /host/bin/stmyum -y update
This operation ensures that you have the very latest version of STLinux and STAPI-SDK installed.
It may be necessary to install a package called stlinux23-sh4-stmfb-headers to ensure that
STAPI-SDK compiles correctly. This is also done using stmyum:
/opt/STM/STLinux-2.
x /host/bin/stmyum install "stlinux23-sh4-stmfb-headers"
The site
http://www.stlinux.com/pub/stlinux/2.x/stapi/RPMS
contains all the versions of
STAPI-SDK that are currently available. If you wish to download an older release of STAPI-
SDK you can do so from this site. It is also possible to list the available versions using
stmyum.
1.
Add the option showdupesfromrepos=1 to the [main] section of
/opt/STM/STLinux-2.
x /host/etc/yum.conf
.
2. To list the available packages, run the stmyum command:
/opt/STM/STLinux-2.
x /host/bin/stmyum list stlinux2 x -STAPI-kernel*
To install a library other than the default, use this stmyum command:
/opt/STM/STLinux-2.
x /host/bin/stmyum install < stapi_package >
8214357 Rev 4 27/212
Compiling and running STAPI-SDK (STLinux) STAPI-SDK
For example:
● for STLinux version 2.3, the command is:
/opt/STM/STLinux-2.3/host/bin/stmyum install linux-sh4-
2.6.23.17_stm23_0123_A27A
● for STLinux version 2.4, the command is:
/opt/STM/STLinux-2.4/host/bin/stmyum install stlinux24-STAPIkernel-sh4-2.6.32.42_stm24_V4.0-208
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:
For an STLinux system, the first step is to compile a kernel to run on the target. STAPI-SDK is compatible with STLinux 2.
x . Although it is necessary to apply patches to the kernel before compilation. The names of the required patches and where they can be found are given in the release notes.
Some of the patches are mandatory and others are optional. Certain board-specific patches must only be installed for the boards for which they are designed, and installing them for other boards may cause problems. After untarring the patch file, consult the file
README.TXT
for information about which of the supplied patches must be installed and which must not.
The following examples apply all the patches with the extension *.patch. For STLinux version 2.3, the commands are similar to the following: cd /opt/STM/STLinux-2.3/devkit/sources/kernel/linux-sh4 tar xzf < SDKROOT >/bin/patches/linux/linux-sh4-2.6.23.17_stm23_A27_patches.tgz
for i in linux-sh4-2.6.23.17_stm23_A27_patches.tgz/*.patch; do patch -p0 -b < "$i"; done
For STLinux version 2.4, the commands are similar to the following: cd /opt/STM/STLinux-2.4/devkit/sources/kernel/linux-sh4 tar xzf < SDKROOT >/bin/patches/linux/linux-sh4-2.6.32.42_stm24_stapi_v4_0_patches.tgz
for i in linux-sh4-2.6.32.42_stm24_stapi_v4_0_patches/*.patch; do patch -p0 -b <
"$i"; done
28/212 8214357 Rev 4
STAPI-SDK Compiling and running STAPI-SDK (STLinux)
●
●
●
The exact commands to execute for any given case depend upon: the directory structure of the installation the release of STAPI-SDK the identity of the particular patches that are required
In both cases, < SDKROOT > is the installation directory of STAPI-SDK.
The Multicom package is required for STLinux. Multicom 3 is installed as follows: cd /opt/STM tar -zxf < SDKROOT >/bin/patches/linux/stm-multicom.323-3.2.x-noarch-patch-2.tgz
Multicom 4 is installed as follows: cd /opt/STM tar -zxf < SDKROOT >/bin/patches/linux/stm-multicom.405-4.0.5-noarch.tar.gz
In both cases, < SDKROOT > is the installation directory of STAPI-SDK.
Having completed the installation, then, if there are patches to install, the next step is to apply them, as in the following example: cd /opt/STM/MULTICOM/R3.2.3
tar xzf < STSDKROOT >/bin/patches/linux/multicom-3.2.3_patches.tgz
for i in multicom-3.2.3_patches/*.patch; do patch -p0 -b < "$i"; done
Multicom 4 does not require any patches to be applied.
Note: 1 The above instructions are examples only. The path to the Multicom directory and the name of the patches file may be different for your installation. See the release notes for details.
2 For uclibc enabled patches to be applied to Multicom, see <SDKROOT>/bin/patches.
3 There is no separate Multicom variant required for uclibc for Multicom 4.x.x.
4 The version of Multicom available with each release varies between releases. Full details can be found in the release notes of any particular STAPI-SDK release.
3.5 Board configuration for STLinux
Before compilation, the STAPI-SDK environment must first be configured for a specific target platform. The STAPI-SDK installation includes a batch file (for MS Windows) and a shell script file (for Linux) that performs the required configuration. The shell script for Linux is called setenv.sh and is located in the directory < SDKROOT >/bin .
●
●
●
●
●
●
There are certain environment variables in setenv.sh that must be modified to correspond with your installation. These variables are:
● LINUX_TARGETIP (Target IP address)
LINUX_SERVERIP
LINUX_GWIP
LINUX_NAME
(Server IP address)
(Network gateway IP address)
LINUX_NETMASK (Network subnet mask)
(The name of the host)
LINUX_SERVERDIR (The path of the root of the target’s file system)
LINUX_PARAMETERS (The kernel parameters for the host)
8214357 Rev 4 29/212
Compiling and running STAPI-SDK (STLinux)
Note:
3.5.1
STAPI-SDK
Also, it is important to check that the definition of the variable KDIR (the path to kernel source code) is correct, as the default value:
/opt/STM/STLinux-$LINUX_VERSION/devkit/sources/kernel/linux-sh4 may not be correct for all installations.
More details of the environment variables in setenv.sh are given in
Table 2: Environment variables in setenv.bat and setenv.sh on page 16
Additional Linux-specific environment variables in setenv.sh on page 31
To configure the STAPI-SDK environment for a specific platform, ensure that
< SDKROOT >/bin is on the path, then run the configuration file as follows: source setenv.sh < platform >_< SoC >_<LINUX> 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 MB411 board with an STb7109 SoC, enter the following: source setenv.sh MB411_7109_LINUX
The batch file responds with the following message:
MB411_7109_LINUX Configuration selected!
Run setenv without any arguments to display a list of all the platform and SoC combinations that it currently supports.
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.
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.
Customized configuration for STLinux
It is possible to create a customized environment by editing the values of these environment variables. This may be necessary, for example, when using STAPI-SDK for a platform not listed in the default configuration file.
Table 2: Environment variables in setenv.bat and setenv.sh on page 16
environment variables in setenv.sh that are common to all operating systems (OS21 and
ST Linux) and which may be edited in order to customize the configuration.
The Linux only version of the configuration file, setenv.sh, contains some additional environment variables that are only applicable when running ST Linux on the target. These
Table 6
.
30/212 8214357 Rev 4
STAPI-SDK Compiling and running STAPI-SDK (STLinux)
Table 6.
Additional Linux-specific environment variables in setenv.sh
Variable Default Value Comments
DVD_OS
MULTICOM_SOURCE
PATH
LINUX
Use this variable to indicate that the SDK is to be compiled for Linux.
The variable DVD_OS is not initialized for non-Linux configurations (such as OS21) because the makfiles for these operating systems already define the OS value used by default.
/opt/STM/MULTICOM/R4.
0.5
Use this variable to define the root path of the Multicom source code. If this variable is not set, STSDK attempts to use the pre-compiled Multicom in the apilib/multicom directory.
/opt/STM/STLinux-
2.x/devkit/sh4/bin:$P
ATH
Use this variable to add the the Linux cross compiler in the path (sh4-linux-*). Here the cross compiler is installed in /opt/STM/STLinux-2.x/devkit/*.
For uclibc support, set this variable to the default
uclibc path: opt/STM/STLinux-2.x/devkit/sh4_uclibc/*
KDIR
UBOOTDIR
KTARGET
LINUX_VERSION
LINUX_UNIFIED_STAPI
LINUX_TARGETIP
LINUX_SERVERIP
/opt/STM/STLinux-
2.x/devkit/sources/ke rnel/linux-sh4
Use this variable to define the root path of kernel source code.
/opt/STM/STLinux-
2.x/devkit/sources/uboot/u-boot-sh4
Use this variable to point to the U-boot source directory
/opt/STM/STLinux-
2.x/devkit/sh4/target
/root
Use this variable to define the path where all the STAPI kernel objects and scripts are to be installed during the
SDK compilation process.
For uclibc support, set this variable to:
/opt/STM/STLinux-
2.x/devkit/sh4_uclibc/target/root
1
192.168.1.50
192.168.1.51
Use this variable to define the version of the STLinux distribution.The value given to this variable is used to construct path names needed to compile or run the
Linux distribution.
Set this variable to 1 to generate a compact unified module of all the STAPI drivers. This variable is set to 1 by default by the command line make apilib.
Note that this flag is mandatory for all platforms with a system memory less than or equal to 64MBytes.
This variable contains the IP address to be given to the platform.
This variable contains the IP address of the NFS server used by the platform. In most the cases, this is the IP address of the Linux Host machine.
LINUX_GWIP
LINUX_NETMASK
192.168.1.254
255.255.0.0
This variable contains the IP address of the network gateway used by the platform.
This variable contains the network subnet mask used by the platform.
8214357 Rev 4 31/212
Compiling and running STAPI-SDK (STLinux) STAPI-SDK
Table 6.
Additional Linux-specific environment variables in setenv.sh (continued)
Variable Default Value Comments
LINUX_NAME
LINUX_AUTOCONF
LINUX_SERVERDIR
LINUX_KERNEL
LINUX_PARAMETERS stsdk off
This variable contains the initial host name of the platform.
Set this variable to on to determine the IP address automatically, using the DHCP server.
/opt/STM/STLinux-
2.x/devkit/sh4/target
This variable contains the root of target’s file system, that is the / directory of the platform.
For uclibc support, set this variable to:
/opt/STM/STLinux-
2.x/devkit/sh4_uclibc/target
$KDIR/vmlinux
See
.
This variable contains the name of the kernel image to be loaded by the ST Micro Connect.
Use this variable to define a text string that contains the kernel parameters to be applied when starting the kernel image. The string can be multi-line, as shown in
.
The parameters are platform dependant (like ttyAS0 which could be ttyAS0/ttyAS1/ttyAS2 depending on the UART output used to display kernel console traces).
Note:
Figure 5.
Example of LINUX_PARAMETERS environment variable
LINUX_PARAMETERS = "console=ttyAS0,115200 \ root=/dev/nfs \ nwhwconf=device:eth0,hwaddr:00:FA:E0:FA:E0:00 \ nfsroot=$LINUX_SERVERIP:$LINUX_SERVERDIR,rsize=4096,wsize=8192,tcp \ ip=$LINUX_TARGETIP::$LINUX_GWIP:$LINUX_NETMASK:$LINUX_NAME::$LINUX_AUTOCONF \ bigphysarea=2000"
In some cases, the values of the modified environment variables may not be exported. In order to avoid this problem, run the modified version of setenv.sh in a new shell.
32/212 8214357 Rev 4
STAPI-SDK Compiling and running STAPI-SDK (STLinux)
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 make followed by the relevant target.
Table 4: Targets available with the STAPI-SDK makefile on page 20
that are available in all operating systems (both STLinux and OS21 with OSPlus).
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 kernel kernel MENUCONFIG=1 multicom purge_kernel purge_multicom run_kernel run_kernel DETACH=1 debug_kernel unify_stapi purge_unify_stapi install
Compile the Linux kernel without the configuration menu. The kernel is compiled with the default configuration.
Compile the Linux kernel with the configuration menu.
The kernel is compiled with the configuration options selected from the menu.
Compile the Multicom Linux modules.
Clean the Linux kernel and the Multicom directories.
Clean only the Multicom directory.
Load the Linux kernel on the target (using the ST
Micro Connect) and run the kernel without debug.
Run the Linux kernel without debug and disconnect from target.
Load the Linux kernel on the target (using the ST
Micro Connect) and run the kernel with debug.
The command can also be used to perform the debug from the console with the following parameters : debug_kernel CONSOLE=1
Process STAPI drivers to generate a unique module
(1)
.
Clean only unique module files generated
(1)
.
Copy apilib modules and main.out to the relevant installation directories.
1.
These options are only available if Linux Unifired STAPI is installed.
8214357 Rev 4 33/212
Compiling and running STAPI-SDK (STLinux)
3.7
Note:
Note:
STAPI-SDK
Building the kernel
To build a new kernel for the target system, use the command make kernel.
The make kernel command must be executed as the root user.
This operation builds the STLinux kernel using a kernel configuration file. The kernel configuration files are located in the stapp/platform directory. make constructs the path of the appropriate configuration file using the values of the DVD_PLATFORM and
DVD_BACKEND environment variables, according to the following template:
$(DVD_PLATFORM)/$(DVD_BACKEND)/linux/$(DVD_PLATFORM)_$(DVD_BACKEND)_kernel-2.
x .cfg
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.
x .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.
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
Note:
Compiling the STAPI-SDK tree for Linux
The process of compiling the STAPI-SDK tree on Linux is a three step process:
1.
Compile Multicom with the command make multicom . This generates library files in the form of *.ko files. These are loaded at run time before the STAPI libraries.
the libraries with the command make apilib. This generates the library files in the form of *.ko files, which are loaded dynamically when the kernel is running.
3. Compile the STAPI application with the command make all. This operation generates the *.out file, and also performs the make install step, copying all the relevant modules to the final target directory (as specified by the $KTARGET environment variable.
Both the make apilib command and the make all command must be executed as the root user.
34/212 8214357 Rev 4
STAPI-SDK
3.8.1
Compiling and running STAPI-SDK (STLinux)
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 25
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 31
3. Build STAPI-SDK as described in
Section 3.8
STAPI_SDK/STAPP/playrec/< uclibc > . This library replaces the default library delivered with the SDK (STAPI_SDK/STAPP/playrec/*) to make it uclibc compliant.
3.9
Note:
Note:
Running STAPI-SDK for STLinux
The following example assumes that the host PC is the host of the the STLinux root filesystem. Make sure that the filesystem of the host PC is visible to the target board on the network before attempting to run STAPI-SDK on the target. The path to the root of the visible directories on the host is defined by the environment variable $LINUX_SERVERDIR; this path must correspond with the host directory exported by NFS (that is, the path returned by the showmount -e command).
1.
Load the kernel onto the target and run it. This is initiated with the command make run_kernel . The variable $TARGET provides the IP address of the ST Micro Connect to use.
2. Open a console on the target board. This can be done by connecting to the ST Micro
Connect’s telnet port. The first step is to configure telnet on the ST Micro Connect using stmconfig:
/opt/STM/STMCR1.6.0/bin/stmcconfig --ip <MicroConnect_IP> --serial-relay 0
115200 8 none 1 0 Starting serial relay : ip: <MicroConnect_IP> port: 5331
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.
8214357 Rev 4 35/212
Compiling and running STAPI-SDK (STLinux)
Note:
Note:
STAPI-SDK
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
The location of the filesystem root on the host PC is determined by the environment variable
KTARGET
Table 6 on page 31
.
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:
Testtool on page 50
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.
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/
3.10 Frame buffer and directfb support on Linux
The STAPI-SDK release for Linux includes a driver called stgfb that supports frame buffer and directfb support. This driver is compiled and installed by default by the STAPI_SDK standard compilation process. The frame buffer and directfb are not started by default when booting the application, however; this is because stgfb uses internal resources of the STAPI drivers that must first be initialized by the STAPI-SDK tree.
1.
Open two telnet sessions to the target.
2.
In one, run the STAPI-SDK application, as described in
Section 3.9 on page 35
.
3. In the other, enter the following commands: source /root/modules/load_env.sh
source /root/modules/load_fb.sh [PAL,HD,FULLHD] [PAL]
The load_fb.sh script can accept zero or two parameters. With no parameters, the script initializes one frame buffer on /dev/fb0 with a resolution of 720 by 576. (If required, edit the script to set new defaults.)
With two parameters, the script configures two frame buffers in parallel: one for main highdefinition output and the other for auxiliary standard definition output. The first parameter takes any of the following options:
PAL 720 x 576i at 50Hz
HD
FULLHD
1280 x 720 at 50Hz
1920 x 1080i at 50Hz
Enter PAL for the second parameter to configure the auxiliary output as 50Hz at 720 by 576 resolution.
36/212 8214357 Rev 4
STAPI-SDK Compiling and running STAPI-SDK (STLinux)
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
8214357 Rev 4 37/212
How to boot from Flash memory (STBlower)
4 How to boot from Flash memory (STBlower)
STAPI-SDK
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
4.1
4.2
Create the Apilib libraries
Compiling the STAPI-SDK tree is a two stage operation.The first stage is to compile the
STAPI libraries, and the second stage is to compile the application itself and link it with the
STAPI libraries. The reason for the two stage compilation is because compiling the STAPI drivers can be very time consuming.
The first step, therefore, is to compile the STAPI libraries. For MS Windows, this is done with the following command: gmake apilib all
For more information about compiling apilib for OS21, see
Chapter 2: Compiling and running STAPI-SDK (OS21) on page 14
.
For more information about compiling apilib for STLinux, see
Chapter 3: Compiling and running STAPI-SDK (STLinux) on page 25
Create a ROM image
The next step is to create a STAPI application that can be run from Flash memory. Before building the application, set the environment variable RUN_FROM_FLASH to 1.
In MS Windows, this is done as follows:
SET RUN_FROM_FLASH=1
The Make target for generating an image for Flash ROM memory is rom. The MS Windows command for generating a ROM image is therefore: gmake rom
The header file pokelist.h contains the poke list table for a specific platform. gmake builds an executable using pokelist.h, if a file with that name exists in the following directory:
< SDK_ROOT >\stapp\platform\< Platform >\< Backend >\bootrom
38/212 8214357 Rev 4
STAPI-SDK
Note:
How to boot from Flash memory (STBlower)
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.
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 >
BACKEND >
OS > the name of the platform, for example: MB680 or HDK7111 the name of the SoC, for example: 7105 or 7111 the operating system, either OS21 or LINUX
< DERIVED_OBJS > the address mode, either 29BITS or 32BITS
For example: flash_mb680_7105_OS21_32BITS.bin
Compressed ROM image
If compiling for ST40 SoCs running OS21, it is possible to create a zipped ROM image. The zip file is then decompressed on the fly when the board boots. This is done with the following Make command.
gmake rom ZIP=1
4.3
4.3.1
Burning the image to the board
The STAPI-SDK provides a tool called blower to burn the ROM image to the Flash memory.
The blower tool runs on the platform and so must be compiled specifically for that platform.
Creating the blower tool
The tool only needs to be compiled once for each platform. The Make command for building the blower tool is: gmake blower
For ST40 and ST200 platforms, this creates an executable called: blower_$(DVD_PLATFORM)_$(DVD_BACKEND)_[29|32]BITS.out
where $(DVD_PLATFORM) is the name of the platform and $(DVD_BACKEND) is the name of the chip, for example : blower_mb680_7105_OS21_32BITS.out
8214357 Rev 4 39/212
How to boot from Flash memory (STBlower) STAPI-SDK
4.3.2 Running the blower tool
When it has been compiled, use the blower tool to burn the ROM image to the Flash memory on the platform.
For ST40 platforms, there is a customized GDB command file that initializes the ST Micro
Connect connection for a specified platform. The path to this file is: stapp/platform/$(DVD_PLATFORM)/$(DVD_BACKEND)/$(DVD_PLATFORM)_$(DVD
_BACKEND)_blower_script.cmd
where:
$(DVD_PLATFORM)
$(DVD_BACKEND)
the name of the platform, for example: MB680 or HDK7111
the name of the SoC, for example: 7105 or 7111
To run the blower, use the following Make command: gmake run_blower
All the functions of the blower tool can be accessed from a menu. See
Figure 6
.
Figure 6.
Blower tool menu
================================================
STAPI_SDK - Flash programmer
(c) 2010 - ST MicroElectronics
================================================
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
40/212 8214357 Rev 4
STAPI-SDK
Note:
How to boot from Flash memory (STBlower)
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.
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 50
information on the testtool.
8214357 Rev 4 41/212
How to boot from Flash memory (U-Boot)
5 How to boot from Flash memory (U-Boot)
STAPI-SDK
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.
5.1 Compile and configure U-Boot
The following instructions configure U-Boot for the memory map of the STi7111. For other
SoCs, it may be necessary to adjust some of the configuration details.
1.
Check if the U-Boot source is available using a local path (for example:
/opt/STM/STLinux-2.4/devkit/sources ). If not, download the U-Boot source code RPM from ST Linux site:
ftp://ftp.stlinux.com/pub/stlinux/2.3/updates/RPMS/host
2. If U-Boot source is downloaded from RPM, extract the sources to the path below: opt/STM/STLinux-2.4/devkit/sources/u-boot/
3. If patches are required, apply them to the source code now.
4. It is possible that there may be updates for new cut versions of silicon. To check if there are, go to the U-Boot directory:
/opt/STM/STLinux-2.4/devkit/sources/u-boot/
5. Open the file ~/include/configs/mb618.h and edit the CFG_BOOTMAPSZ parameter as follows:
CFG_BOOTMAPSZ 0x8000000
6. In the same file, make sure CFG_SDRAM_BASE is set correctly:
– for 32-bit mode (SE = 1), set it to 0x80000000
– for 29-bit mode (SE = 0), set it to 0x8C000000
7. Configure the corresponding platform (for example, MB618) in the STAPI-SDK file bin/setenv.sh
Section 2.2: Board configuration for Linux/UNIX machine on page 15
8. In the same file, set the UBOOTDIR path to
/opt/STM/STLinux-2.4/devkit/sources/u-boot .
stapp> make purge_uboot
10. Run make uboot to compile the U-Boot source code: stapp> make uboot
If the compilation is sucessful, make generates u-boot_mb618_7111.bin and u-boot_mb618_7111 files.
11. Copy the generated files (u-boot_mb618_7111.bin and u-boot_mb618_7111) to the target directory.
/opt/STM/STLinux-2.4/devkit/sh4/target
42/212 8214357 Rev 4
STAPI-SDK
Note:
How to boot from Flash memory (U-Boot)
This operation creates two similarly named files. It is important not to get them confused.
● The file u-boot_mb618_7111 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_mb618_7111.bin is a raw binary file. This is the file that is burned directly to Flash memory and executed at boot time.
5.2 Configure the kernel for “boot from Flash”
1.
Go to the kernel directory and edit the .config file to correspond with the memory map.
Sh$> make ARCH=sh CROSS_COMPILE=sh4-linux- menuconfig
3. Using the menu, select the following features:
– Device drivers > Block devices > RAM disk support
– General Setup > Initial RAM filesystem and RAM disk (initramfs/initrd) support
– File systems > Second extended fs support
4. Recompile the kernel, as follows:
Sh$> make clean
Sh$> make ARCH=sh CROSS_COMPILE=sh4-linux- vmlinux
This creates the vmlinux file.
Note: It is also possible to compile the kernel from the /stapp directory using the SDK tree. See
Section 3.7: Building the kernel on page 34
5. Next, compress and make an image of the kernel.
Sh$> sh4-linux-objcopy -O binary vmlinux vmlinux.bin
Sh$> gzip vmlinux.bin
6. Set the PATH variable for using the mkimage tool.
Sh$> export PATH=/opt/STM/STLinux-2.3/host/bin:$PATH
Sh$> mkimage -A sh -O linux -T kernel -C gzip -a 0x80800000
-e 0x80801000 -n "Linux 2.6" -d vmlinux.bin.gz vmlinux.ub
This creates the image vmlinux.ub.
Note: 1 For 32-bit mode, 0x80800000 is the load address and the entry point for the kernel is
0x80801000 . These addresses are different for different kernels. These addresses can be found in the System.map
file available in the kernel directory. The mkimage tool is available in /opt/STM/STLinux-2.3/host/bin directory. Before executing the command make sure that the path to this directory is set.
For 29-bit mode, the load address is 0x8c801000 and the entry point is 0x8c802000 .
8214357 Rev 4 43/212
How to boot from Flash memory (U-Boot) STAPI-SDK
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}'
7. Copy to the target directory:
/opt/STM/STLinux-2.3/devkit/sh4/target
5.3 Build the root file system image
The file /opt/STM/STLinux-2.3/host/share/linuxshmkimg/ramfs.txt contains a list of all the files that are to be included in the root file system image. This includes all the
*.ko
files and any other files that the application requires.
1.
Edit the file ramfs.txt to make sure that all the required files are included.
2. Open the file rcSBB located in the following directory:
/opt/STM/STLinux-2.3/devkit/sh4/target/etc/init.d/
Add the commands required for running the application to this file.
to and give the command for making the ramdisk image. (The command must be entered in a single line.)
Sh$> linuxshmkimg --ramdisk=16384
--rootPath=/opt/STM/STLinux-2.3/devkit/sh4/target
--script=/opt/STM/STLinux2.3/host/share/linuxshmkimg/ramfs
.txt /tmp/ramdisk.img
Note: 1 The above command assumes that 16384 (blocks), one block being 1 Kb in size, is greater than actual (physical) size of ramfs (ram file system). If the file system is more than
16384 Kb in size, change this value so that it is appropriate for the file system.
2 The above command may fail with a “No such file or directory” error message if the ramfs.txt
file is not up to date. If this occurs, delete the following lines from ramfs.txt:
-rw-r--r- 1 0 0 97 Nov 3 03:03 gateways
-rw-r--r- 1 0 0 323172 Nov 3 00:15 libgcc_s-4.2.1.so.1
lrwxrwxrwx 1 0 0 19 Dec 19 12:10 libgcc_s.so.1 -> libgcc_s-4.2.1.so.1
Caution: Do not use the current version of insmod (part of BusyBox) as this tool has a problem when inserting Multicom modules. This BusyBox bug is due to be fixed in BusyBox release
1.8.2-22.
Note:
Sh$> mkimage -C none -A sh -O linux -T ramdisk -a 0x81000000
-n "ST40 Linux ramdisk" -d /tmp/ramdisk.img ramdisk.ub
The address 0x81000000 is normally 8 Mb beyond the kernel load address. For 29-bit mode, use 0x8D000000 instead.
5. Copy to the target directory:
/opt/STM/STLinux-2.3/devkit/sh4/target
All three elements that are required to boot from Flash have now been created. The final step is to burn these images to Flash.
44/212 8214357 Rev 4
STAPI-SDK
5.4
Note:
Note:
Note:
How to boot from Flash memory (U-Boot)
Burn the images onto Flash
There are a range of different methods available for downloading the images to Flash memory. This section, however, only covers the most popular method: nfs.
Although it is possible to burn an image straight into Flash, it is generally safer to load the image into the target’s RAM first and burn it into Flash from there. The following procedure uses this second approach.
1.
In the same environment where the U-Boot source code was compiled (see
Section 5.1: Compile and configure U-Boot on page 42
), execute make run_uboot stapp> make run_uboot
2. When U-boot has loaded, the HyperTerminal window shows the command prompt:
MB618>
3. At this prompt, set the appropriate environment variables, as follows:
MB618> set ipaddr < board_ip_addr >
MB618> set netmask < your_net_mask >
MB618> set serverip < your_server_ip >
MB618> set gatewayip < your_gateway_ip >
MB618> set ethaddr < your mac_addr >
4. Load into the RAM of the target board using nfs, as follows:
MB618> nfs $load_addr
$serverip:/opt/STM/STLinux-2.3/devkit/sh4/target/u-boot.bin
The file u-boot.bin
must be is a directory exported by the NFS server and accessible to the target board.
5. Unprotect and erase sectors 0 to 4 of bank 1 in Flash:
MB618> prot off 1:0-4
MB618> era 1:0-4
6. Load from RAM to Flash and protect the sectors in Flash:
MB618> cp.b $load_addr 0xa0000000 $filesize
MB618> prot on 1:0-4
The variable $filesize is set automatically when the file is loaded into RAM. This value must be less than the size of unprotected and erased sectors.
7. Load the kernel binary into sectors 6 to 23 of bank 1 of Flash:
MB618> nfs $load_addr
$serverip:/opt/STM/STLinux-2.3/devkit/sh4/target/vmlinux.ub
MB618> prot off 1:6-23
MB618> era 1:6-23
MB618> cp.b $load_addr 0xa0060000 $filesize
MB618> iminfo 0xa0060000
MB618> prot on 1:6-23
Make sure that the size of the unprotected zone of Flash is greater than the size of the object to be copied to Flash. If in doubt, change the range of the prot off and prot on commands to add an extra 128 KByte block.
8. Load the Ramdisk image into sectors 27 to 63 of bank 1 of Flash:
MB618> nfs $load_addr
$serverip:/opt/STM/STLinux-2.3/devkit/sh4/target/ramdisk.ub
MB618> prot off 1:27-63
MB618> era 1:27-63
8214357 Rev 4 45/212
How to boot from Flash memory (U-Boot) STAPI-SDK
MB618> cp.b $load_addr 0xa0300000 $filesize
MB618> iminfo 0xa0300000
MB618> prot on 1:27-63 the and the bootcmd variable of the U-Boot environment:
MB618> set bootargs console=ttyAS0,115200 root=/dev/ram0 ramdisk_size=16384 mem=128M bigphysarea=2000
MB618> set bootcmd bootm a0060000 a0300000
10. Save the environment variables:
MB618> saveenv
11. Disconnect the ST Micro Connect and reset the board. The board boots and runs the application from Flash.
46/212 8214357 Rev 4
STAPI-SDK
6 Create or modify a platform
Create or modify a platform
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 >
Backend > the name of the platform, for example: MB680 or HDK7111 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.
8214357 Rev 4 47/212
Create or modify a platform
6.1
STAPI-SDK
Creating a new platform
To compile STAPI for a new (that is, currently unsupported) platform, follow the instructions given below.
1.
The first step is to create a name for the new platform, based on the
< Platform >_< Backend > convention used for the existing platforms. This name is used within the source code to identify sections of code to be conditionally compiled for the new platform.
2. Identify which of the currently supported platforms comes closest to the new platform in terms of core, SoC, memory and other features.
3. Search the source code in the stapp, stdebug and apilib directories for any section of conditionally compiled code that relates specifically to the platform identified at step
2.
4. Modify the code to ensure that these sections of code are also compiled for the new
platform, using the name devised at step
1.
5. Make a copy of the entire platform directory for the platform identified at step
2.
, and then modify the file names to correspond with the name of the new platform.
6. Update the files in this directory so that they are correctly defined for the new platform.
7. Update the environment variables so that they specifically reference the new platform, using the name devised at step
1.
Following this, try compiling the modified code and monitor the results. Depending on how similar the new platform is to the original, supported platform, it may be possible to continue using the STAPI-SDK without any further modifications. If the software fails to compile, or if it does not perform as expected, then further modifications to the files in the platform directory may be required.
48/212 8214357 Rev 4
STAPI-SDK
7 How to customize STAPI-SDK
7.1
Note:
Note:
How to customize STAPI-SDK
Video and audio firmware
For SoCs that have embedded audio or video processors or accelerators, STAPI-SDK provides video and audio firmware for playing audio and video files in a number of common formats. However, the provided firmware can only support a subset of the different formats available, so it may be necessary to acquire additional firmware and integrate it within the
STAPI-SDK tree.
To obtain firmware for specific audio and video formats, contact your ST FAE.
The firmware is typically supplied as a *.bin file which is loaded by STAPI at boot time.
STAPI looks for the firmware files in the following directories:
● for audio codecs: stapp\mbx\audio
● for video codecs: stapp\mbx\video
Install the firmware by copying the .bin files into the relevant directory and renaming them to correspond with the appropriate naming convention.
When LX_FIRMWARE_FROM_JTAG is set to 1, the firmware files on the host are loaded onto the platform using the JTAG interface. This means that the codecs cannot be loaded if the application boots from Flash.
7.2 Multimedia playback support
To activate the media player feature in the SDK, first ask your ST FAE for the stapi_sdk_plugins package and then complete the following steps:
1.
Starting with the official, default SDK, remove the directory
$STSDKROOT/stapp/playrec as follows: rm -rf $STSDKROOT/stapp/playrec the package, copy the playrec directory into stapp/playrec : cp -Rf ~/stapi_sdk_plugins/PLAYREC/STAPI_SDK-REL_XX/playrec $STSDKROOT/stapp
3. From , copy the OPENSOURCE directory into stapp/playrec: mkdir $STSDKROOT/opensource cp -Rf ~/stapi_sdk_plugins/OPENSOURCE/* $STSDKROOT/opensource
4. Finally, build the complete SDK in the usual manner: gmake apilib gmake all
8214357 Rev 4 49/212
Testtool
8 Testtool
Note:
STAPI-SDK
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 53
invoke features in the STAPI application are listed in
Section 8.3 on page 69
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
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
Tab key
Move down in the command history
Auto-completion of commands, macro, or file names (files only if file system mounted)
Ctrl+A
Ctrl+K
Insert key
!!
history
Go to beginning of line
Delete chars to end of line
Toggle between insert/replace mode
Execute previous command
Display command history
!
n Execute history command number n
Short form commands
It is not always necessary to type out the full name of a command; the testtool interface recognizes short forms of most commands. The requirement is that enough letters must be provided in order to make the command unambiguous; for example, PR is acceptable for
PRINT as there are no other commands that begin with the letters “PR”.
50/212 8214357 Rev 4
STAPI-SDK
8.1
Note:
Testtool
Testtool scripting language
The testtool scripting language provides the ability to define repeatable and verifiable test
scenarios. Scripts (in the form of text files) are loaded into testtool using the
SOURCE
command. The current state of testtool (including symbols and macro definitions) can be
SAVE
command and then reloaded later using SOURCE.
A testtool script contains a sequence of testtool commands. A script can contain statements to allow for conditional execution (the IF, ELIF and ELSE commands that will be familiar to anyone who has used any high-level programming language) and looping (using
WHILE and FOR commands, which are also used the same way as in other scripting or programming languages). Each block of statements within a branch of a conditional statement or within a loop is terminated with an
END
statement.
The syntax of the scripting language will be familiar to anyone who has experience with any scripting or programming language.
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 55
.
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.
By default, the testtool reports all errors it finds when running a macro. A
CONFIG_TESTTOOL parameter can cause testtool to ignore errors and continue executing the macro.
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.
Comparisons between floating point values are performed only on the integer part of the value; therefore 5.3 == 5.5 evaluates to TRUE.
8214357 Rev 4 51/212
Testtool
Note:
STAPI-SDK
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.
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: Debug macro
In the following examples, indentation has been used to help readability, but it is not mandatory.
; Debug macro prints the VALUE of variable NAME
; DEBUGFLAG is a variable defined at a level above this macro
DEFINE DEBUG NAME VALUE
IF DEBUGFLAG > 1
PRINT "Value of " NAME " is " VALUE
END
END
Example: FOR loop
The FOR statement accepts four parameters: the name of the counter variable, the initial value of this variable, the final value of this variable, and the increment to be applied on each iteration of the loop. The increment is optional, and if not stated, defaults to 1.
; loop ten times, using I as a counter
FOR I 1 10
A = A * A
END
52/212 8214357 Rev 4
STAPI-SDK Testtool
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.
8.2
ALLOC
Usage:
Parameters:
Common testtool commands
This section describes the commands that are specific to testtool itself, and are not related in any way to the hardware blocks of the SoC.
ALLOC < Size >
Description:
Example:
Limits:
< Size > The size in bytes to be allocated.
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.
Allocate 1024 bytes:
ALLOC +1024
Software: None.
Hardware: None.
8214357 Rev 4 53/212
Testtool
BPEEK
Usage:
Parameters:
Description:
Example:
Limits:
STAPI-SDK
BPEEK < Address >
< Address > The address to be read.
Use this command to read a byte from a specific address. It displays the content of that address.
Read a byte in memory:
BPEEK #A4500000
Software: None.
Hardware: None.
BPOKE
Usage:
Parameters:
Description:
Example:
Limits:
BPOKE < Address > < Value >
<
<
Address >
Value >
The address at which to write.
The byte value to be written.
Use this command to write a byte to a specific address.
Write a byte in memory:
BPOKE #A4500000 #FF
Software: None.
Hardware: None.
54/212 8214357 Rev 4
STAPI-SDK Testtool
CONFIG_TESTTOOL
Usage: CONFIG_TESTTOOL < chars_to_match > < return_result >
< ignore_error_in_macro >
Parameters:
Description:
Example:
Limits:
< chars_to_match > By default, testtool considers a minimum of two characters as an exact match for a variable. This means that testtool considers BITMAP_1 and BITMAP to be the same. This limit can be modified by this parameter by defining the number of characters to match, or by passing a value of -1 to enforce an exact match.
< return_result > By default, testtool commands do not return a return value. To facilitate use cases such as ERR=PLAY_PROG, set this parameter to TRUE. To revert to the default condition, Set this parameter to FALSE.
< ignore_error_in
_macro >
By default, testool reports all errors that occurs in macros. If this parameter is set to TRUE, testtool ignores any errors it encounters and continues execution of the macro.
Use this command to configure basic testtool parameters.
To configure the exact match of variables, enable commands to return errors and to ignore errors in macros, enter the following command:
CONFIG_TESTTOOL -1 1 1
Software: None.
Hardware: None.
COPY
Usage:
Parameters:
COPY < SrcAddress > < Size > < DstAddress >
Description:
Example:
Limits:
<
<
<
SrcAddress >
Size >
DstAddress >
The source address of the buffer to be copied.
The size in bytes of the buffer to be copied to the destination address.
The destination address.
Use this command to copy a memory buffer at a new location address. Overlapping the source and destination regions may produce unexpected results.
Duplicate 16 bytes:
COPY #A4500000 +16 #A4500010
Software: None.
Hardware: None.
8214357 Rev 4 55/212
Testtool
DEFINE
Usage:
Parameters:
Description:
Example:
Limits:
STAPI-SDK
DEFINE < MacroName > [< Param >]*
<
<
MacroName >
Param >
The name for the macro.
The name of a parameter to pass to the macro.
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.
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
Software: None.
Hardware: None.
56/212 8214357 Rev 4
STAPI-SDK
DELETE
Usage:
Parameters:
Description:
Example:
Limits:
Testtool
DELETE < SymbolName >
< SymbolName > The name of the symbol to be deleted.
Use this command to delete a symbol name from the testtool interface. A symbol may be a variable or a function.
Create a variable called toto and set it to 5:
TOTO = +5
Delete the variable toto:
DEL TOTO
Software: None.
Hardware: None.
DISPLAY
Usage:
Parameters:
Description:
Example:
Limits:
DISPLAY < Address > [< Size >]
<
<
Address >
Size >
The address from where we want to start the display dump.
This is an optional parameter to specify size in bytes to be read. It read 256 bytes by default.
Use this command to display the contents of the memory. It displays the content by using long word read access.
Dump data memory:
DISPLAY #A4500000
Software: None.
Hardware: None.
8214357 Rev 4 57/212
Testtool
DISPLAY_B
Usage:
Parameters:
Description:
Example:
Limits:
STAPI-SDK
DISPLAY_B < Address > [< Size >]
<
<
Address >
Size >
This is the address from where we want to start the display dump.
This is an optional parameter to specify size in bytes to be read. It read 256 bytes by default.
Use this command to display the content of the memory. It displays the content byte per byte.
Dump data memory:
DISPLAY_B #A4500000
Software: None.
Hardware: None.
DUMPMEM
Usage:
Parameters:
Description:
Example:
Limits:
DUMPMEM < Filename > < Address > < Size >
<
<
<
Filename >
Address >
Size >
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..
This is the address from where we want to start the file dump.
This is the parameter to specify size in bytes to be dumped.
Use this command to dump the contents of a block of memory into a file.
Dump data memory to a file (1024 bytes):
DUMP "C:\memory_dump.bin" #A4500000 +1024
Software: None.
Hardware: None.
END
Usage:
Parameters:
Description:
Limits:
END
None.
Use the END command to mark the end of a macro definition.
Software: None.
Hardware: None.
58/212 8214357 Rev 4
STAPI-SDK
EXIT
Usage:
Parameters:
Description:
Example:
Limits:
Testtool
EXIT < ReturnValue >
< ReturnValue > The value returned by the macro. It can either be a literal value or the name of a variable used within the macro.
Use the EXIT command to mark the end of a macro definition and return a value.
> 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
Software: None.
Hardware: None.
FILL
Usage:
Parameters:
Description:
Example:
Limits:
FILL < Address > < Size > < Pattern >
<
<
<
Address >
Size >
Pattern >
The address from where to start filling with the pattern. This address must be 32 bits aligned.
The size in bytes to be fill. The size must be a multiple of
4 bytes.
This is the value of the 32-bit pattern.
Use this command to fill a memory buffer with a 32-bit repeated pattern.
Fill up a buffer with 0xFFFFFFFFF values:
FILL #A4500000 +1024 #FFFFFFFF
Software: Take care with address alignment and size multiple of 4 bytes.
Hardware: None.
8214357 Rev 4 59/212
Testtool
FREE
Usage:
Parameters:
Description:
Example:
Limits:
STAPI-SDK
FREE < Address >
< Address > The address to be freed.
Use this command to free a block of memory that was allocated using the ALLOC
testtool command.
Allocate 1024 bytes:
ALLOC +1024
Deallocate the buffer:
FREE #A5234C00
Software: None.
Hardware: None.
GETKEY
Usage:
Parameters:
Description:
Example:
Limits:
GETKEY
None.
Use this command to wait for a key to be pressed.
Get a key and store the result in key_pressed: key_pressed = getkey
Software: None.
Hardware: None.
HELP
Usage:
Parameters:
Example:
Limits:
HELP
None.
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.
Software: None.
Hardware: None.
60/212 8214357 Rev 4
STAPI-SDK
HISTORY
Usage:
Parameters:
Description:
Limits:
Testtool
HISTORY
None.
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.
Software: None.
Hardware: None.
IOBASE
Usage:
Parameters:
Description:
IOBASE < DefaultBase >
< DefaultBase > The new default base to be used. It can take the following values:
– +16
– +10
: To switch to hexadecimal.
: To switch to decimal.
– +8
– +2
: To switch to octal.
: To switch to binary.
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
8214357 Rev 4 61/212
Testtool
Example:
Limits:
STAPI-SDK
Set base to hexadecimal:
IOBASE +16
Set toto variable to 0x20 or 32 in decimal:
TOTO = 20 or
TOTO = +32
Set toto variable to -0x20 or -32 in decimal:
TOTO = -20 or
TOTO = -+32
The unusual combination -+ to indicate a negative value of a decimal is perfectly normal in this context.
Software: None.
Hardware: None.
LIST
Usage:
Parameters:
Description:
Example:
Limits:
LIST < SymbolName >
< SymbolName > This is the name used to filter specific help for testtool functions.
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.
Display help for all the play commands:
LIST PLAY
Display help for all the I
2
C commands:
LIST I2C
Software: None.
Hardware: None.
62/212 8214357 Rev 4
STAPI-SDK
LOADMEM
Usage:
Parameters:
Description:
Example:
Limits:
Testtool
LOADMEM < Filename > < Address > < Size >
<
<
<
Filename >
Address >
Size >
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.
This is the address to where we want to load the file.
This is the parameter to specify size in bytes to be read.
Use this command to load a file and store it in memory at a specific address.
Load data memory from a file (1024 bytes):
LOAD "C:\memory_dump.bin" #A4500000 +1024
Software: None.
Hardware: None.
LOG
Usage:
Parameters:
Description:
Example:
Limits:
LOG < Filename > < InOutFlag >
<
<
Filename >
InOutFlag >
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.
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.
Use this command to log all the testtool inputs and outputs to a file.
Log all the testtool commands:
LOG "/ATA00/logs.txt" 1
Software: None.
Hardware: None.
PEEK
Usage:
Parameters:
Description:
Example:
Limits:
PEEK < Address >
< Address > This is address to be read.
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.
Read a 32bits word in memory:
PEEK #A4500000
Software: None.
Hardware: None.
8214357 Rev 4 63/212
Testtool
POKE
Usage:
Parameters:
Description:
Example:
Limits:
POKE < Address > < Value >
<
<
Address >
Value >
The address to which to write.
The long word value to be written to that address.
This command is used to write a long word (32bits) to a specific address.
Write a 32-bit word in memory:
POKE #A4500000 #11223344
Software: None.
Hardware: None.
Usage:
Parameters:
Description:
Example:
Limits:
PRINT [< Params >]
< Params > This is the list of parameters to print.
Use this command to print values or strings on the user interface.
> 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
Software: None.
Hardware: None.
STAPI-SDK
64/212 8214357 Rev 4
STAPI-SDK
SAVE
Usage:
Parameters:
Description:
Example:
Limits:
Testtool
SAVE < Filename > < ConstFlag >
<
<
Filename >
ConstFlag >
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.
This is the flag to be set to 1 in order to save constants definitions as well.
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.
Save all the testtool state:
SAVE "/ATA00/testtool_state.txt" 1
Software: None.
Hardware: None.
SEARCH
Usage:
Parameters:
Description:
Example:
Limits:
SEARCH < StringToFind > < Address > < Size >
< StringToFind > This is the string to find for the search
<
<
Address >
Size >
This is the address from where we want to start the search
This is the size in bytes for the range of the search
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.
Look for “TAG” into the memory
SEARCH "TAG" #A4500000 +4096
Software: None.
Hardware: None.
8214357 Rev 4 65/212
Testtool
SHOW
Usage:
Parameters:
Description:
Example:
Limits:
STAPI-SDK
SHOW < SymbolName >
< SymbolName > This is the name of the symbol to be displayed.
Use this command to display the content of a symbol or a user defined function.
> 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
Software: None.
Hardware: None.
SOURCE
Usage:
Parameters:
Description:
Example:
Limits:
SOURCE < Filename > < EchoFlag >
<
<
Filename >
EchoFlag >
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.
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).
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.
Load the script test.ttm:
SOURCE "/ATA00/test.ttm" 1
Software: None.
Hardware: None.
66/212 8214357 Rev 4
STAPI-SDK
SPEEK
Usage:
Parameters:
Description:
Example:
Limits:
Testtool
SPEEK < Address >
< Address > This is address to be read.
Use this command to read a word (16 bits) of data from a specific address. It displays the content of the address just read.
Read a 16-bit word in memory
SPEEK #A4500000
Software: None.
Hardware: None.
SPOKE
Usage:
Parameters:
Description:
Example:
Limits:
SPOKE < Address > < Value >
<
<
Address >
Value >
This is the address to which to write.
This is the word value to be written
Use this command to write a word (16 bits) of data to a specific address.
Write a 16-bit word to memory:
SPOKE #A4500000 #1122
Software: None.
Hardware: None.
WAIT
Usage:
Parameters:
Description:
Example:
Limits:
WAIT < Milliseconds >
< Milliseconds > This is the number of milliseconds to wait.
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.
Wait for at least 5 seconds:
WAIT +5000
Software: None.
Hardware: None.
8214357 Rev 4 67/212
Testtool
ZAP
Usage:
Parameters:
Description:
Example:
Limits:
STAPI-SDK
ZAP
None.
Use this command to switch the testtool interface to UART or JTAG connection. It works only if the JTAG connection is on.
ZAP
Software: OS21 (not Linux).
Hardware: Only available if application run from JTAG.
68/212 8214357 Rev 4
STAPI-SDK Testtool
This section provides a list of the currently implemented STAPI-SDK testtool commands.
Many of the commands accept additional parameters, as shown in the Usage paragraph.
Some parameters are mandatory and others are optional.
Hard Disk Driver access commands 8.3.1
ATAPI_BENCH
Usage:
Parameters:
ATAPI_BENCH < Id > < Mode >
<
<
Id >
Mode >
This is the ATA interface to test, and is an integer starting from
0.
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:
Limits:
To run benchmark tests on ATA interface 0:
ATAPI_BENCH 0 0
Software: OS21, not Linux.
Hardware: Available for all platforms having a PATA or SATA disk drive.
ATAPI_DRIVEINFO
Usage:
Parameters:
ATAPI_DRIVEINFO < Id > < Mode >
Description:
Example:
Limits:
<
<
Id >
Mode >
This is the ATA interface to test, and is an integer starting from
0.
0: Master
1: Slave
This command displays information on either the Master or Slave disk drive.
ATAPI_DRIVEINFO 0
Software: OS21, not Linux.
Hardware: Available for all platforms having a PATA or SATA disk drive.
8214357 Rev 4 69/212
Testtool STAPI-SDK
ATAPI_INFO
Usage:
Parameters:
Description:
Example:
Limits:
ATAPI_INFO
None.
This command displays the STATAPI driver version.
ATAPI_INFO
Software: Available on OS21, not Linux.
Hardware: Available for all platforms having a PATA or SATA disk drive.
8.3.2
AUD_BEEP
Example:
Parameters:
Audio based commands
AUD_BEEP < Id > < Sampling Frequency > < NbSeconds >
Description:
Example:
Limits:
< Id > This is the identifier of the audio device, which is an integer starting from 0.
Audio sampling frequency (32000, 44100, 48000) < Sampling
Frequency >
< NbSeconds > Number of seconds for which the beep tone is generated
Sounds a beep.
AUD_BEEP 0 +32000 +5
Software: None.
Hardware: None.
70/212 8214357 Rev 4
STAPI-SDK Testtool
AUD_DISABLE
Usage:
Parameters:
AUD_DISABLE < Id > [< Type >]
Description:
Example:
Limits:
<
<
Id >
Type >
This is the identifier of the audio device, which is an integer starting from 0.
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.
Use this command to mute the audio output. To unmute the audio output, use
AUD_ENABLE
To mute all audio output on device 0:
AUD_DISABLE 0
To mute digital output only of device 1:
AUD_DISABLE 1 A_SPDIF
Software: None.
Hardware: None.
8214357 Rev 4 71/212
Testtool STAPI-SDK
AUD_ENABLE
Usage:
Parameters:
AUD_ENABLE < Id > [< Type >]
Description:
Example:
Limits:
<Id>
< Type >
This is the identifier of the audio device, which is an integer starting from 0.
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.
Use this command to unmute the audio output. To mute the audio output, use
AUD_DISABLE
To unmute all audio output on device 0:
AUD_ENABLE 0
To unmute digital output only of device 1:
AUD_ENABLE 1 A_SPDIF
Software: None.
Hardware: None.
AUD_GETCAPABILITY
Usage:
Parameters:
AUD_GETCAPABILITY < Id >
Description:
Example:
Limits:
< Id > This is the identifier of the audio device, which is an integer starting from 0.
Use this command to get capabilities of the audio device < Id > . It displays information on the capabilities of the decoder.
AUD_GETCAPABILITY 0
Software: None.
Hardware: None.
72/212 8214357 Rev 4
STAPI-SDK Testtool
AUD_INFO
Usage:
Parameters:
Description:
Example:
Limits:
AUD_INFO
None.
This command displays the STAUD driver version. For the STx710x, STx520x and
STx7200 series of SoCs, it also displays information on the audio firmware.
AUD_INFO
Software: None.
Hardware: None.
AUD_INJSTART
Usage: AUD_INJSTART < Id > < InputId > < Filename > < NbLoops > < Content >
< Freq > < Type >
Parameters:
< Id >
< InputId >
< Filename >
< NbLoops >
< Content >
< Freq >
< Type >
This is the identifier of the audio device, which is an integer starting from 0.
This is the identifier of the device where the audio injection is to be performed, where InputID equals:
– “0”: use CD0 (PARSER 0)
– “1”: use CD0 (PARSER 1)
– “2”: use CD0 (PARSER 2)
– “3”: use CD0 (PARSER 3)
Name of the file to be loaded
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.
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]
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.
This is the stream type. It must be either A_ES or A_PES
8214357 Rev 4 73/212
Testtool STAPI-SDK
Description:
Example:
Limits:
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.
To stop playback, use the
AUD_INJSTOP
When < NbLoops > < 0 , the injector swaps the order of each 16-bit word before passing it to the audio player. The main use of this feature is for when the stream is big endian, such as a PCM stream. In this particular case, if < NbLoops > < 0 , the audio injector loops -< NbLoops >-1 number of times. Therefore, if
< NbLoops > == -1 , -< NbLoops >-1 is equal to 0, and the player plays the stream an infinite number of times by swapping words.
To start audio injection at parser 0 or CD0
AUD_INJSTART 0 0 "cast2.ec3" 0 a_ddplus +48000 a_es 0
Software: None.
Hardware: None.
AUD_INJSTOP
Usage:
Parameters:
AUD_INJSTOP < Id > < InputId >
Description:
Example:
Limits:
<
<
Id >
InputId >
This is the identifier of the audio device, which is an integer starting from 0.
This is the identifier of the device where the audio injection is being performed, where InputID equals:
– “0”: use CD0 (PARSER 0)
– “1”: use CD0 (PARSER 1)
– “2”: use CD0 (PARSER 2)
– “3”: use CD0 (PARSER 3)
This command is used to stop the audio device stream injection previously started
AUD_INJSTART
AUD_INJSTOP 0 0
Software: None.
Hardware: None.
74/212 8214357 Rev 4
STAPI-SDK Testtool
AUD_PAUSE
Usage:
Parameters:
AUD_PAUSE < Id >
Description:
Example:
Limits:
< Id > This is the identifier of the audio device, which is an integer starting from 0.
Use this command to pause an audio device. To resume playback, use the
AUD_RESUME
AUD_PAUSE 0
Software: None.
Hardware: None.
AUD_RESUME
Usage:
Parameters:
AUD_RESUME < Id >
Definition:
Example:
Limits:
< Id > This is the identifier of the audio device, which is an integer starting from 0.
Use this command to resume an audio device that had earlier been paused using
AUD_PAUSE
AUD_RESUME 0
Software: None.
Hardware: None.
AUD_SETDYNAMIC
Usage:
Parameters:
AUD_SETDYNAMIC <Id> <Enable> <CutFactor> <BoostFactor>
Description:
Example:
Limits:
<
<
<
<
Id >
Enable >
CutFactor >
BoostFactor >
This is the identifier of the audio device, which is an integer starting from 0.
This parameter is the flag to be set to 1 or 0 to enable or disable the dynamic range control.
This parameter is the cut factor value to be applied, in the range 0 to 255.
This parameter is the boost factor value to be applied, in the range 0 to 255.
Use this command to set the dynamic range control of the audio driver.
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
Software: None.
Hardware: None.
8214357 Rev 4 75/212
Testtool STAPI-SDK
AUD_SETEFFECT
Usage:
Parameters:
AUD_SETEFFECT < Id > < Effect >
Description:
Example:
Limits:
<
<
Id >
Effect >
This is the identifier of the audio device, which is an integer starting from 0.
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
Use this command to set an audio effect. The effects available are listed in the
Parameters section.
To enable the “Surround 3D effect” of audio device 0:
AUD_SETEFFECT 0 A_EFFECT_SRS3D
Software: None.
Hardware: None.
AUD_SETLATENCY
Usage:
Parameters:
AUD_SETLATENCY < Id > < Type > < Latency >
Description:
Example:
Limits:
<
<
<
Id >
Type >
Latency >
This is the identifier of the audio device, which is an integer starting from 0.
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
This parameter contains the latency value in milliseconds to be applied to the appropriate audio output.
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.
To set a latency value of 50 milliseconds to PCM0 output of audio device 0:
AUD_SETLATENCY 0 A_PCMP0 50
Software: None.
Hardware: Only available for STx710x, STx520x or STx7200 series SoCs.
76/212 8214357 Rev 4
STAPI-SDK Testtool
AUD_SETOFFSET
Usage:
Description:
AUD_SETOFFSET < Id > < Offset >
Use this command to add an offset in milliseconds on the synchronize audio algorithm for the lipsync.
Parameters:
Example:
Limits:
<
<
Id >
Offset >
This is the identifier of the audio device, which is an integer starting from 0.
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.
To add a positive offset of 50 milliseconds on device 0:
AUD_SETOFFSET 0 +50
Software: None.
Hardware: None.
AUD_SETSTEREO
Usage:
Parameters:
AUD_SETSTEREO < Id > < Mode >
Description:
Example:
Limits:
<
<
Id >
Mode >
This is the identifier of the audio device, which is an integer starting from 0.
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
Use this command to set the stereo output mode. For example we can select left or right channel or both with this command.
To set stereo mode for audio device 0:
AUD_SETSTEREO 0 A_STEREO_SS
Software: None.
Hardware: None.
8214357 Rev 4 77/212
Testtool STAPI-SDK
AUD_SETVOLUME
Usage:
Parameters:
AUD_SETVOLUME < Id > < Volume >
<
<
Id>
Volume >
This is the identifier of the audio device, which is an integer starting from 0.
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:
Example:
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.
To set volume to 50%:
Limits:
AUD_SETVOLUME 0 +50
Software: None.
Hardware: None.
AUD_SETSPEED
Usage:
Parameters:
AUD_SETSPEED < Id > < Speed >
Description:
Example:
Limits:
<
<
Id>
Speed >
This is the identifier of the audio device, which is an integer starting from 0.
This parameter is the speed of audio playback
Use this command to change the speed of audio playback. The change is applied equally to all outputs.
To set the speed as 1.5 times the normal speed:
AUD_SETSPEED 0 +150
Software: None.
Hardware: None.
78/212 8214357 Rev 4
STAPI-SDK Testtool
AUD_SETHDMIOUTPUT
Usage:
Parameters:
AUD_SETHDMIOUTPUT < Id > < Output >
Description:
Example:
Limits:
< Id >
< Output >
This is the identifier of the audio device, which is an integer starting from 0.
This parameter is used to set the HDMI output mode. The suopported modes are:
A_PCMP0 , A_PCMP1, A_SPDIF0 or A_HDMI0
Use this command to configure the HDMI output
To set the HDMI output for device 0 to A_HDMI0:
AUD_SETHDMIOUTPUT 0 A_HDMI0
Software: None.
Hardware: None.
AUD_SETDDPOP
Usage:
Parameters:
AUD_SETDDPOP < Id > < DDPOPsetting > < Decoder Object >
Description:
Example:
Limits:
< Id > This is the identifier of the audio device, which is an integer starting from 0.
< DDPOPsetting > This provides the PCM setting for DD+/DTS mode, which is an integer starting from 0.
< Decoder Object > This is the required audio object. Supported values are
A_DEC0 , A_DEC1, A_DEC2 and so forth.
Use this command to configure the audio output mode
To set the audio output mode to A_DEC0:
AUD_DDPOP 0 0 A_DEC0
Software: None.
Hardware: None.
8214357 Rev 4 79/212
Testtool STAPI-SDK
AUD_SETSAMPLING
Usage:
Parameters:
AUD_SETSAMPLING < Id > < Postproc > < Frequency >
Description:
Example:
Limits:
< Id >
< Postproc >
< Frequency >
This is the identifier of the audio device, which is an integer starting from 0.
This provides the post processing mode. supported modes are A_PP0, A_PP1 or A_PP2
This provides the sampling frequency. Possible options are in the following range: 0, 8000, .., 44100, 48000, .., 192000.
Use a frequency of 0 to disable audio sampling.
Use this command to configure the audio output mode
Set the post processing mode to A_PP0 and the sampling frequency to 44100.
AUD_SETSAMPLING 0 A_PP0 44100
Software: None.
Hardware: None.
AUD_SETBTSC
Usage:
Parameters:
AUD_SETBTSC < Id > < Mode >
Description:
Example:
Limits:
< Id >
< Mode >
This is the identifier of the audio device, which is an integer starting from 0.
The BTSC mode.
1: Enable
0: Disable
Use this command to configure the audio output mode
Enable BTSC for audio device 0:
AUD_SETBTSC 0 1
Software: None.
Hardware: None
80/212 8214357 Rev 4
STAPI-SDK Testtool
AUD_SETCOMPRESSION
Usage:
Parameters:
AUD_SETCOMPRESSION < Id > < Compressionmode > < decoderobject >
Description:
Example:
Limits:
< Id > This is the identifier of the audio device, which is an integer starting from 0.
< Compressionmode > This provides the compression mode. For example:
A_COMPRESSION_ANALOG , ..., A_COMPRESSION_RFMODE
< decoderobject > This provides the sampling frequency. Possible options are:
A_DEC0 , A_DEC0 or A_DEC2.
Use this command to configure the audio output mode
To set compression to A_COMPRESSION_ANALOG with a sampling frquency of
A_DEC0 .
AUD_SETCOMPRESSION 0 A_COMPRESSION_ANALOG A_DEC0
Software: None.
Hardware: None.
AUD_SETPCMMODE
Usage:
Parameters:
AUD_SETPCMMODE < Id > < PcmOutPut > <Mode>
Description:
Example:
Limits:
< Id >
< PcmOutPut >
< Mode >
This is the identifier of the audio device, which is an integer starting from 0.
This provides the PCM mode. Supported options are A_PCM0 or A_PCM1.
This provides the digital mode. Supported modes are
A_COMPRESSED or A_NONCOMPRESSED
Use this command to set the PCM mode
To set a PCM mode of A_PCM0 with a digital mode of A_COMPRESSED:
AUD_SETPCMMODE 0 A_PCM0 A_COMPRESSED
Software: None.
Hardware: None.
8214357 Rev 4 81/212
Testtool STAPI-SDK
AUD_SPDIF
Usage:
Parameters:
AUD_SPDIF <Id> <Mode>
<
<
Id >
Mode >
This is the identifier of the audio device, which is an integer starting from 0.
This parameter is the S/PDIF mode to be setup. It can take the following values :
– A_COMPRESSED_ENC : 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:
Limits:
To get the encoded data on SPDIF. We need to set SPDIF in compressed enc mode:
AUD_SPDIF 0 A_COMPRESSED_ENC
Software: None.
Hardware: None.
AUD_STATUS
Usage:
Parameters:
AUD_STATUS < Id > [< Reset >]
Description:
Example:
Limits:
<
<
Id >
Reset >
This is the identifier of the audio device, which is an integer starting from 0.
This parameter is a flag which could be set to 1 to reset the current statistics and put all fields to 0.
Use this command to display various information relating to the selected audio device, such as the number of audio frames decoded.
AUD_STATUS 0
Software: None.
Hardware: None.
82/212 8214357 Rev 4
STAPI-SDK Testtool
AUD_SYNCHRO
Usage:
Parameters:
AUD_SYNCHRO < Id > < Synchro >
Description:
Example:
Limits:
<
<
Id >
Synchro >
This is the identifier of the audio device, which is an integer starting from 0.
This parameter is a flag which could be set to 1 to enable synchronization or 0 to disable synchronization.
Use this command to enable or disable the embedded synchronization algorithm inside the audio device to guarantee lipsync.
To enable synchronization of device 0:
AUD_SYNCHRO 0 1
To disable synchronization of device 0:
AUD_SYNCHRO 0 0
Software: None.
Hardware: None.
AUD_SETIVCPARAMS
Usage:
Parameters:
AUD_SETIVCPARAMS < ID > < PP Object > < mode > < Value >
Description:
Example:
Limits:
<
<
<
<
Id >
PP Object >
Mode >
Value >
This is the identifier of the audio device, which is an integer starting from 0.
Apply the coding mode for the PP object named in this parameter.
Controls the activation of Loudness normalization
Normalization factor of IVC
Use this command to set the intelligent volume control (IVC) parameters for loudness normalization.
To enable the volume control of device 0:
AUD_SETIVCPARAMS 0 A_PP0 A_FLATRESPONSE 6
Software: None.
Hardware: None.
8214357 Rev 4 83/212
Testtool STAPI-SDK
AUD_SETOMNI2PARAMS
Usage: AUD_SETOMNI2PARAMS < ID > < PP Object > < Enable Omni >
< Enable Center > < Enable Input >
Parameters:
Description:
Example:
Limits:
<
<
<
Id >
PP Object >
Enable Omni >
This is the identifier of the audio device, which is an integer starting from 0.
Apply the coding mode for the PP object named in this parameter.
Set to 1 to activate the Omni2 effects, 0 to deactivate them.
< Enable Center > Set to 1 to activate the center mode (default is 0).
< Enable Input > Set to 1 to activate the input mode (default is 0).
Use this command to activate the Omni2 surround effect, which immerses the listener in three dimensional sound.
To activate this effect:
AUD_SETOMNI2PARAMS 0 A_PP0 1 0 0
Software: None.
Hardware: None.
84/212 8214357 Rev 4
STAPI-SDK Testtool
AUD_SETHDMICODINGMODE
Usage:
Parameters:
AUD_SETHDMICODINGMODE < ID > < Flag > < PP Object > <C oding mode >
Description:
Example:
Limits:
<
<
<
<
Id >
Flag >
PP Object >
Coding mode >
This is the identifier of the audio device, which is an integer starting from 0.
To enable/disable the user mode speaker allocation.
– 0 : user can set the desired coding mode using the above test tool command.
– 1 : Disable the user mode speaker allocation. For this case the application decides the required coding mode according to stream being played and A/V receiver capability.
Apply the coding mode for the PP object named in this parameter.
– Use PP0 to PCM0 to deliver multichannel audio through HDMI.
– Use PP1 to PCM1 to deliver down mix audio
Apply the coding mode for the PP object named in this parameter.
Use this command to configure user mode speaker allocation
To apply down mix audio at PP0 to output STEREO:
AUD_SETHDMICODINGMODE 0 0 A_PP0 0
Software: None.
Hardware: None.
8214357 Rev 4 85/212
Testtool STAPI-SDK
AUD_CONFIGCHAIN
Usage: AUD_CONFIGCHAIN < Id > < Profile > < Driver Chain > < Control Common
Module flag > < Transcoding params >
Parameters:
Description:
Example:
Limits:
<
<
Id >
Profile >
This is the identifier of the audio device, which is an integer starting from 0.
0 : Normal (MS10 / Dual Decode / Single Decode / Audio description)
1 : MS11 Profile selection
< Driver Chain > To select the desired audio chain number
< Control Common
Module flag >
1 : The starting and stopping of all the common audio objects is handled from stapp.
< Transcoding params >
0 : The starting and stopping of all the common audio objects is handled from DVR.
This is set to 0 (that is, backward compatible) by default.
< StreamContent > : [OPTIONAL] Stream content for transcoding.
Currently, transcoding is supported for DTS and AC3 stream only.
< Sampling Frequency > : [OPTIONAL] Sampling frequency for transcoding
Use this command to configure the audio driver chain at run time
Pre-Condition : All driver objects must be in a stop state.
To configure the single decode audio chain:
AUD_CONFIGCHAIN 0 0 1 0
Software: None.
Hardware: None.
86/212 8214357 Rev 4
STAPI-SDK Testtool
AUD_SETDOLBYVOLUME
Usage:
Parameters:
AUD_SETDOLBYVOLUME < ID > < Audio Object > < Flag > < Leveler >
Description:
Example:
Limits:
< Id > This is the identifier of the audio device, which is an integer starting from 0.
< Audio object > Apply the coding mode for this audio object.
<
<
Flag >
Leveler >
To enable or disable the Dolby effect.
– 0 : Disable
– 1 : Enable
The volume leveler value. The value must be in the range 0 to
10.
Use this command to apply the Dolby volume settings.
To activate this effect:
AUD_SETDOLBYVOLUME 0 A_PP0 1 4
Software: None.
Hardware: None.
AUD_SETMDRC
Usage:
Parameters:
AUD_SETMDRC < ID > < Audio Object > < MDRC effects >
Description:
Example:
Limits:
< Id > This is the identifier of the audio device, which is an integer starting from 0.
< Audio object > Apply the coding mode for this audio object.
< MDRC Effects > Set the appropriate MDRC effect:
– 0 : NightMode
– 1 : NormalBass
– 2 : POP
– 3 : Softrock
– 4 : StrongBass
Use this command to set IVC compressor parameters.
To activate this effect:
AUD_SETMDRC 0 A_PP0 0
Software: None.
Hardware: None.
8214357 Rev 4 87/212
Testtool STAPI-SDK
8.3.3 Remote control commands
BLAST_INFO
Usage:
Parameters:
Description:
Example:
Limits:
BLAST_INFO
None.
This command displays the STBLAST driver version.
BLAST_INFO
Software: On Linux, STBLAST is sometimes replaced by LIRC, in which case
STBLAST is not used.
Hardware: None.
BLAST_GETKEY
Usage:
Parameters:
BLAST_GETKEY < Id > < TimeOutInMs >
Description:
Example:
Limits:
<
<
Id >
TimeOutInMs >
The identifier of the device.
The time out in milliseconds.
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).
BLAST_GETKEY 0 +10
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:
Parameters:
Description:
Example:
Limits:
BLAST_POLLKEY < Id >
The identifier of the device.
Use this command to get the remote key pressed and return immediately.
BLAST_POLLKEY 0
Software: Tested only with a specific remote control where we know the protocol and key assignments. May not work with other remote controls.
88/212 8214357 Rev 4
STAPI-SDK Testtool
8.3.4 Blitter engine based commands
BLIT_CLEAR
Usage:
Parameters:
BLIT_CLEAR < Id > < Plane >
Description:
Example:
Limits:
<
<
Id >
Plane >
The Blitter identifier (either 0 or 1).
The graphic plane identifier, which is an integer starting from
0.
Use this command to clear a graphic plane using the hardware blitter feature. It uses the fill rectangle function to clear the screen with a transparent color.
BLIT_CLEAR 0 1
Software: None.
Hardware: None.
BLIT_COPY
Usage:
Parameters:
BLIT_COPY < Id > < Source > < Destination >
Description:
Example:
Limits:
<
<
<
Id >
Source >
Destination >
The Blitter identifier (either 0 or 1).
The identifier of the graphic plane to copy from.
The identifier of the graphic plane to copy to.
Use this command to copy one graphic plane to another graphic plane.
BLIT_COPY 0 1 2
Software: None.
Hardware: None.
8214357 Rev 4 89/212
Testtool STAPI-SDK
BLIT_FILL
Usage:
Parameters:
BLIT_FILL < Id > < Plane >
Description:
Example:
Limits:
<
<
Id >
Plane >
The Blitter identifier (either 0 or 1).
The graphic plane identifier, which is an integer starting from
0.
Use this command to fill a graphic plane with random color and positions of rectangles, using hardware blitter feature.
It also displays the bandwidth of the test in Mpixels/s. The test displays 512 rectangles.
BLIT_FILL 0 1
Software: None.
Hardware: None.
BLIT_FILL_JOB
Usage: BLIT_FILL_JOB < Id > < Plane > < NbLoops > < Width > < Height > [< Id1 >
< Plane1 > < NbLopps1 > < Width1 > < Height1 >]
Parameters:
Description:
Example:
Limits:
<
<
Id >
Plane >
<NbLoops>
<Width>
<Height>
The Blitter identifier (either 0 or 1).
The graphic plane identifier, which is an integer starting from
0.
The number of Blit fill operations to perform. A typical value is
2048.
The width of the rectangles to draw, in pixels. (A typical value is 100.)
The height of the rectangles to draw, in pixels. (A typical value is 50.)
Use this command to fill a graphic plane with random color and positions of rectangles, using blit jobs.
BLIT_FILL_JOB 0 1 +2048 +100 +50
Software: None.
Hardware: None.
90/212 8214357 Rev 4
STAPI-SDK
BLIT_INFO
Usage:
Parameters:
Description:
Example:
Limits:
BLIT_INFO
None.
This command displays the STBLIT driver version.
BLIT_INFO
Software: None.
Hardware: None.
CC_INFO
Usage:
Parameters:
Description:
Example:
Limits:
CC_INFO
None.
This command displays the STCC driver version.
CC_INFO
Software: None.
Hardware: None.
CC_START
Usage:
Parameters:
Description:
Example:
Limits:
CC_START < Id > < GfxId >
< Id >
< GfxId >
Start Close Caption.
CC_INFO
Software: None.
Hardware: None.
This parameter is the playback identifier [0,1...].
Display the Close Captions on this graphics plane.
CC_STOP
Usage:
Parameters:
Description:
Example:
Limits:
CC_STOP < Id >
< Id > This parameter is the playback identifier [0,1...].
Stop Close Caption.
CC_INFO
Software: None.
Hardware: None.
Testtool
8214357 Rev 4 91/212
Testtool STAPI-SDK
8.3.6 Clock recovery based commands
CLKRV_CHECKSTC
Usage:
Parameters:
CLKRV_CHECK < Id > < TimeinMS >
Description:
Example:
Limits:
< Id >
< TimeinMS >
This parameter is the clkrv device identifier.
Use this command to check two measures of STC in the interval determined by
TimeinMS .
CLKRV_CHECKSTC 0 +10
Software: None.
Hardware: None.
CLKRV_DISABLE
Usage:
Parameters:
Description:
Example:
Limits:
CLKRV_DISABLE < Id >
< Id > This parameter is the clkrv device identifier.
This command disables the clock recovery handling of PCRs by setting the
PCRHandlingActive flag in given instance ControlBlock.
CLKRV_DISABLE 1
Software: None.
Hardware: None.
CLKRV_ENABLE
Usage:
Parameters:
Description:
Example:
Limits:
CLKRV_ENABLE < Id >
< Id > This parameter is the clkrv device identifier.
This command enables the clock recovery handling of PCRs by setting the
PCRHandlingActive flag in given instance ControlBlock.
CLKRV_ENABLE
Software: None.
Hardware: None.
CLKRV_GET
Usage:
Description:
Example:
Limits:
CLKRV_GET < Id >
This command displays the current time (STC) of the clock instance < Id >
CLKRV_GET 0
Software: None.
Hardware: None.
92/212 8214357 Rev 4
STAPI-SDK Testtool
CLKRV_INFO
Usage:
Parameters:
CLKRV_INFO
Description:
Parameters:
Example:
Limits:
< 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.
This command displays the STCLKRV driver version.
None.
CLKRV_INFO
Software: None.
Hardware: None.
CLKRV_INVALIDATE
Usage:
Parameters:
CLKRV_INVALIDATE < Id >
Description:
Example:
Limits:
< 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.
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.
CLKRV_INVALIDATE 0
Software: None.
Hardware: None.
8214357 Rev 4 93/212
Testtool STAPI-SDK
CLKRV_SET
Usage:
Parameters:
CLKRV_SET < Id > < 33Bit > < Base > < Extension >
Description:
Example:
Limits:
<
<
Id >
33bit >
< Base >
< Extension >
This parameter is the clkrv device identifier.
33th MSB bit of the base clocked at 90Khz.
32 LSB bits of the base clocked at 90Khz.
9 bits of the extension clocked at 27Mhz.
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.
CLKRV_SET 0
Software: None.
Hardware: None.
CLKRV_SETOFFSET
Usage:
Parameters:
CLKRV_SETOFFSET < Id > < Offset >
Description:
Example:
Limits:
<
<
Id >
Offset >
This parameter is the clkrv device identifier.
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.
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.
To set an offset of 90 Khz (that is, 1 unit) to device 0:
CLKRV_SETOFFSET 0 1
Software: None.
Hardware: None.
94/212 8214357 Rev 4
STAPI-SDK Testtool
CRYPT_BENCH
Usage:
Parameters:
CRYPT_BENCH < Id > < NbPackets > < NbLoops >
Description:
Example:
Limits:
<
<
<
Id >
NbPackets >
NbLoops >
This parameter is the cryptography DMA device identifier, and is an integer starting from 0.
Number of dummy TS packets to generate for the benchmark.
Number of times to perform the test.
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
CRYPT_BENCH 0 10 10
Software: OS21 not Linux.
Hardware: Chipset dependant.
CRYPT_INFO
Usage:
Parameters:
Description:
Example:
Limits:
CRYPT_INFO
None.
This command displays the STCRYPT/STTKDMA driver version.
CRYPT_INFO
Software: OS21 not Linux.
Hardware: Chipset dependant.
8214357 Rev 4 95/212
Testtool STAPI-SDK
CURSOR_DISABLE
Usage:
Parameters:
CURSOR_DISABLE < Id >
Description:
Example:
Limits:
< 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.
This command disables the cursor plane < Id > . To enable the cursor, see
CURSOR_ENABLE
CURSOR_DISABLE 0
Software: None.
Hardware: Chipset dependant.
CURSOR_ENABLE
Usage:
Parameters:
CURSOR_ENABLE < Id >
Description:
Example:
Limits:
< 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.
This command enables a cursor plane < Id > . To disable the cursor, see
CURSOR_DISABLE
CURSOR_ENABLE 0
Software: None.
Hardware: Chipset dependant.
CURSOR_LOAD
Usage:
Parameters:
CURSOR_LOAD < Id > < Filename >
Description:
Example:
Limits:
<
<
Id >
Filename >
This parameter is the cursor plane affected.
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.
Use this command to load a new cursor bitmap in memory for cursor < Id > .
CURSOR_LOAD 0 "/ATA00/my_arrow.gam"
Software: None.
Hardware: Chipset dependant.
96/212 8214357 Rev 4
STAPI-SDK Testtool
CURSOR_SETPOS
Usage:
Parameters:
CURSOR_SETPOS < Id > < X > < Y >
Description:
Example:
Limits:
<
<
<
Id >
X >
Y >
This parameter is the cursor plane to be enabled.
This is the X position to be set. The range of the X value is dependant on screen resolution.
This is the Y position to be set. The range of the Y value is dependant on screen resolution.
Use this command to move a cursor plane < Id > on the screen.
CURSOR_SETPOS 0 +300 +250
Software: None.
Hardware: Chipset dependant.
8214357 Rev 4 97/212
Testtool STAPI-SDK
DEMUX_CONNECT
Usage: DEMUX_CONNECT < TsInput > < PhysicalPTI > < LogicalPTI >
[< ParallelFlag >] [< InvBitClockFlag >]
Parameters:
Description:
<
<
<
TsInput >
PhysicalPTI >
LogicalPTI >
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.
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.
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.
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.
98/212 8214357 Rev 4
STAPI-SDK Testtool
Example:
Limits:
Connect TSIN0 to physical PTI0 instance 2 :
DEMUX_CONNECT TSIN0 PTI0 2
Connect TSIN2 to physical PTI1 instance 0 with parallel ts stream and bit clock inverted :
DEMUX_CONNECT TSIN2 PTI1 0 TRUE FALSE
Software: None.
Hardware: Chipset dependant.
DEMUX_DUPLICATE
Usage:
Parameters:
DEMUX_DUPLICATE < TsInput >
< 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:
Parameters:
Description:
Example:
Limits:
DEMUX_INFO
None.
This command displays the version numbers of the drivers used for DEMUX input and management (such as STPTI and STMERGE).
DEMUX_INFO
Software: None.
Hardware: None.
DEMUX_MUX
Usage:
Parameters:
Description:
Example:
Limits:
DEMUX_MUX
None.
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.
DEMUX_MUX
Software: None.
Hardware: Chipset dependant.
8214357 Rev 4 99/212
Testtool STAPI-SDK
DEMUX_PESSTART
Usage:
Parameters:
DEMUX_PESSTART < Id > < Filename > < LogicalPTI > < Pid >
Description:
Example:
Limits:
<
<
<
<
Id >
Filename >
LogicalPTI >
Pid >
This parameter is used to identify the packetized elementary stream (PES) collector instance. This ID is in the range of
[0...3].
Filename of the file to generate to collect PES content.
This parameter is used to specify the logical instance identifier of the PTI to be used to filter the pes.
Pid to filter [0...0x1FFFF].
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.
DEMUX_PESSTART 0 "/USBHDISK00/video.pes" 0 #65
Software: None.
Hardware: Available for all platforms with a mass storage device.
DEMUX_PESSTOP
Usage:
Parameters:
DEMUX_PESSTOP < Id >
Description:
Example:
Limits:
< Id > This parameter is used to identify the pes collector instance to stop. < Id > can be in the range of [0...3].
This command stops filtering a PES into a file. See
DEMUX_PESSTART
.
DEMUX_PESSTOP 0
Software: None.
Hardware: Available for all platforms having a mass storage device.
100/212 8214357 Rev 4
STAPI-SDK Testtool
DEMUX_SETKEY
Usage:
Parameters:
DEMUX_SETKEY < Id > < KeyId > < Pid > < OddNotEven > < Key >[8]
Description:
Example:
Limits:
<
<
<
<
<
Id >
KeyId >
Pid >
OddNotEven >
Key >[8]
This parameter is used to identify the logical instance of the
PTI on which we want to setup a DVB key.
This parameter is the key identifier. This id could be in the range of [0...3].
Pid to associate the key [0...0x1FFFF].
0: indicates this is the even key.
1: indicates this is the odd key.
Key value with 8 bytes long.
Use this command to set a DVB key for the specified pid and logical PTI instance. The key is provided as eight bytes values.
DEMUX_SETKEY 0 0 #65 0 #11 #22 #33 #66 #33 #22 #11 #66
Software: None.
Hardware: None.
DEMUX_STATUS
Usage:
Parameters:
DEMUX_STATUS < Id > [< Reset >]
Description:
Example:
Limits:
<
<
Id >
Reset >
This parameter is the PTI logical device id to be used [0,1...].
This parameter is a flag which when set to 1 resets the current statistics and put all fields to 0.
This command checks the status of the demux device by displaying some statistics informations, such as the number of cc errors.
To display the demux status of device 0 and reset the statistics:
DEMUX_STATUS 0 1
Software: None.
Hardware: None.
8214357 Rev 4 101/212
Testtool STAPI-SDK
DENC_COLORBAR
Usage:
Parameters:
DENC_COLORBAR < Id > < Enable >
Description:
Example:
Limits:
<
<
Id >
Reset >
This parameter is the DENC device id to be used [0,1...].
This parameter is a flag which could be set to 1 to enable the colorbar or 0 to disable the colorbar pattern.
Use this command to enable or disable the color bar pattern on video analog DENC outputs.
DENC_COLORBAR 0
Software: None.
Hardware: None.
DENC_GETCAPABILITY
Usage:
Parameters:
Description:
Example:
Limits:
DENC_GETCAPABILITY <Id>
< Id > This parameter is the DENC device id to be used [0,1...]
This command displays details of DENC capabilities.
DENC_GETCAPABILITY 0
Software: None.
Hardware: None.
DENC_GETMODE
Usage:
Parameters:
Description:
Example:
Limits:
DENC_GETMODE < Id >
< Id > This parameter is the DENC device id to be used [0,1...]
This command displays STDENC driver capabilities such as device type, chroma delays and so forth.
DENC_GETMODE 0
Software: None.
Hardware: None.
DENC_INFO
Usage:
Parameters:
Description:
Example:
Limits:
DENC_INFO
None.
This command displays the STDENC driver version.
DENC_INFO
Software: None.
Hardware: None.
102/212 8214357 Rev 4
STAPI-SDK Testtool
DENC_SETMODE
Usage:
Parameters:
DENC_SETMODE < Id > < Mode >
Description:
Example:
Limits:
<
<
Id >
Mode >
This parameter is the DENC device ID to be used [0,1...].
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.
Use this command to change the DENC output mode.
To switch device 0 to PAL standard:
DENC_SETMODE 0 PAL
Software: None.
Hardware: None.
8.3.11 Direct Memory Access (DMA) commands
DMA_INFO
Usage:
Parameters:
Description:
Example:
Limits:
DMA_INFO
None.
This command displays the DMA engine driver version (STFDMA).
DMA_INFO
Software: None.
Hardware: None.
DMA_SWTS
Usage:
Parameters:
DMA_SWTS < PtiId > < NbPackets > < NbLoops >
Description:
<
<
<
Id >
NbPackets >
NbLoops >
This parameter is the PTI logical device identifier [0,1...].
Number of dummy TS packets to generate for the test.
Number of times to perform the test.
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.
8214357 Rev 4 103/212
Testtool STAPI-SDK
Example:
Limits:
< 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.
Do a SWTS injection using DMA on PTI2 with 256 Ts packets and loop is 2
DMA_SWTS +2 +256 +16
Software: None.
Hardware: Chipset dependant.
DMA_TEST
Usage:
Parameters:
DMA_TEST < AddressSrc > < AddressDst > < Size >
<
<
<
AddressSrc >
AddressDst >
Size >
Source buffer address
Destination buffer address
Number of bytes to copy
Description:
Example:
Limits:
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.
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.
Software: OS21 only (not Linux).
Hardware: Chipset dependant.
104/212 8214357 Rev 4
STAPI-SDK Testtool
FLASH_BLOWER
Usage:
Parameters:
FLASH_BLOWER < Filename > [< Parameters >]
Description:
<
<
Filename >
Parameters >
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]”.
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.
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.
8214357 Rev 4 105/212
Testtool STAPI-SDK
Example:
Limits:
Figure 7
.
Figure 7.
Example output of FLASH_BLOWER command
================================================
STAPI_SDK - Flash programmer
(c) 2009 - ST MicroElectronics
================================================
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) >? .
Software: None
Hardware: None.
FLASH_INFO
Usage:
Parameters:
Description:
Example:
Limits:
FLASH_INFO
None.
This command displays the STFLASH driver version.
FLASH_INFO
Software: OS21 only (not LINUX).
Hardware: None.
106/212 8214357 Rev 4
STAPI-SDK Testtool
FS_BENCH
Usage:
Parameters:
Description:
Example:
Limits:
FS_BENCH < Filename >
< Filename > This parameter is the filename of the file to create for the test.
The file is deleted at the end of the test.
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.
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"
Software: Requires OSPlus on OS2x systems.
Hardware: Available for all platforms with a mass storage device.
FS_COPY
Usage:
Parameters:
Description:
Example:
Limits:
FS_COPY < FilenameSrc > < FilenameDst >
<
<
FilenameSrc >
FilenameDst >
This parameter is the filename of the source file.
This parameter is the filename of the destination file.
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.
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"
Software: Need OSPlus for OS2x systems.
Hardware: Available for all platforms with a mass storage device.
8214357 Rev 4 107/212
Testtool
FS_DEL
Usage:
Parameters:
Description:
Example:
Limits:
STAPI-SDK
FS_DEL < Filename >
< Filename > This parameter is the filename of the file to be deleted.
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).
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"
Software: Requires OSPlus for OS2x systems.
Hardware: Available for all platforms with a mass storage device.
FS_DIR
Usage:
Parameters:
Description:
Example:
Limits:
FS_DIR < Pathname >
< Pathname > This parameter is the pathname of the directory to be listed.
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).
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"
Software: Requires OSPlus for OS2x systems.
Hardware: Available for all platforms with a mass storage device.
108/212 8214357 Rev 4
STAPI-SDK Testtool
FS_FDISK
Usage:
Parameters:
FS_DISK < DiskName >
< 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 volume X , 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.
8214357 Rev 4 109/212
Testtool
Example:
Limits:
STAPI-SDK
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"
FS_DISK /usb/hdisk0
Software: OS21 only (not Linux).
Hardware: Available for all platforms with a mass storage device.
FS_INFO
Usage:
Parameters:
Description:
Example:
Limits:
FS_INFO
None.
This command displays details of all the mount points.
FS_INFO
Software: OS21 with OSPlus (not Linux).
Hardware: Available for all platforms with a mass storage device.
FS_LIST
Usage:
Parameters:
Description:
Example:
Limits:
FS_LIST
None
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.
FS_LIST
Software: OS21 with OSPlus (not Linux).
Hardware: Available for all platforms with a mass storage device.
110/212 8214357 Rev 4
STAPI-SDK
FS_MKDIR
Usage:
Parameters:
Description:
Example:
Limits:
Testtool
FS_MKDIR < Pathname >
< Pathname > This parameter is the pathname of the directory to create.
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).
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"
Software: Needs OSPlus for OS2x systems.
Hardware: Available for all platforms with a mass storage device.
FS_MOUNT
Usage:
Parameters:
Description:
FS_MOUNT < DiskName > < VolumeName > [< Mode >]
<
<
<
DiskName >
VolumeName >
Mode >
This parameter is the device name to be mounted.
This parameter is the volume name to be mounted
(OS2x/OSPlus) or the mount point name for Linux.
This parameter is a string [“r”|”rw”] to define access to the mass storage.
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 "/volume X " 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
8214357 Rev 4 111/212
Testtool
Example:
Limits:
STAPI-SDK
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/sda X
/dev/sdb X
/dev/sdc X 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"
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"
Software: OS21 with OSPlus (not Linux).
Hardware: Available for all platforms with a mass storage device.
112/212 8214357 Rev 4
STAPI-SDK Testtool
FS_RENAME
Usage:
Parameters:
FS_RENAME < OldName > < NewName >
<
<
OldName >
NewName >
This parameter is the current name of the file to be renamed.
This parameter is the new name of the file.
Description:
Example:
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.
Linux: Rename a file:
Limits:
FS_RENAME "/mnt/image.jpg" "/mnt/image1.jpg"
OS2x: Rename a file on ATA interface
FS_RENAME "/ATA00/stream.ts" "/ATA00/stream.trp"
Software: OS21 with OSPlus (not Linux).
Hardware: Available for all platforms with a mass storage device.
FS_RMDIR
Usage:
Parameters:
FS_RMDIR < Pathname >
Description:
Example:
Limits:
< Pathname > This parameter is the pathname of the directory to delete.
Use this command to remove a directory. For OS21, it is not possible to delete a directory on the host machine (through JTAG).
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"
Software: Requires OSPlus for OS2x systems.
Hardware: Available for all platforms with a mass storage device.
8214357 Rev 4 113/212
Testtool STAPI-SDK
FS_UMOUNT
Usage:
Parameters:
FS_UMOUNT < MountName >
Description:
Example:
Limits:
< MountName > This parameter is the mount point name of the mass storage to unmount.
Use this command to perform a "umount" in order to unmount a mass storage device.
Linux: Unmount /mnt:
FS_UMOUNT "/mnt"
OS2x: Unmount USB key
FS_UMOUNT "/USBRDISK00"
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:
Description:
Example:
Limits:
<
<
<
<
<
DeviceID >
FEDeviceID >
FreqMhz >
Polarity >
Band >
The identifier of the tuner device, an integer started from 0.
The identifier of the FSK device.
The frequency in MHz.
FSK_POL_V : Vertical polarity.
FSK_POL_H : Horizontal polarity.
Either 0 or 1.
Use this command to change channel.
FSK_CHANGE_CHANNEL
Software: No Linux support. FSK not supported with stfrontend.
Hardware: Hardware change required on the board to support FSK filtering.
FSK_INFO
Usage:
Parameters:
Description:
Example:
Limits:
FSK_INFO
None.
This command displays revision number of the STFSK driver.
FSK_INFO
Software: No Linux support. FSK not supported with stfrontend.
Hardware: Hardware change required on the board to support FSK filtering.
114/212 8214357 Rev 4
STAPI-SDK Testtool
FSK_TUNER_REGISTER
Usage:
Parameters:
FSK_TUNER_REGISTER < DeviceID > < FEDeviceID >
Description:
Example:
Limits:
<
<
DeviceID >
FEDeviceID >
The identifier of the tuner device, an integer started from 0.
The identifier of the FSK device.
Use this command to register the tuner with FSK device.
FSK_TUNER_REGISTER 0 0
Software: No Linux support. FSK not supported with stfrontend.
Hardware: Hardware change required on the board to support FSK filtering.
FSK_TUNER_STATUS
Usage:
Parameters:
FSK_TUNER_STATUS < DeviceID > < FEDeviceID >
Description:
Example:
Limits:
<
<
DeviceID >
FEDeviceID >
The identifier of the tuner device, an integer started from 0.
The identifier of the FSK device.
This command displays the status of the specified FSK-registered tuner.
FSK_TUNER_STATUS 0 1
Software: No Linux support. FSK not supported with stfrontend.
Hardware: Hardware change required on the board to support FSK filtering.
FSK_TUNER_UNREGISTER
Usage:
Parameters:
Description:
Example:
Limits:
FSK_TUNER_UNREGISTER < DeviceID >
< DeviceID > The identifier of the tuner device, an integer started from 0.
Use this command to unregister the specified tuner.
FSK_TUNER_UNREGISTER 0
Software: No Linux support. FSK not supported with stfrontend.
Hardware: Hardware change required on the board to support FSK filtering.
8214357 Rev 4 115/212
Testtool STAPI-SDK
GFX_ALPHA
Usage:
Parameters:
GFX_ALPHA < Id > < Alpha0 > < Alpha1 >
Description:
Example:
Limits:
<
<
<
Id >
Alpha0 >
Alpha1 >
This is the identifier for the graphic plane.
This parameter is the global alpha 0 value (8 bits).
This parameter is the global alpha 1 value (8 bits).
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 > .
Set Alpha0 to 0x70 and Alpha1 to 0x10:
GFX_ALPHA 0 #70 #10
Software: None.
Hardware: None.
116/212 8214357 Rev 4
STAPI-SDK Testtool
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:
Description:
Example:
<
<
Id >
Filename >
This is the identifier for the graphic plane.
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 > .
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.
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
8214357 Rev 4 117/212
Testtool
Limits: Software: None.
Hardware: None.
GFX_DISABLE
Usage:
Parameters:
GFX_DISABLE < Id >
Description:
Example:
Limits:
< Id > This is the identifier for the graphic plane.
Use this command to disable a graphic plane < Id > .
GFX_DISABLE 0
Software: None.
Hardware: None.
GFX_ENABLE
Usage:
Parameters:
GFX_ENABLE < Id >
Description:
Example:
Limits:
< Id > This is the identifier for the graphic plane.
Use this command to enable a graphic plane < Id > .
GFX_ENABLE 0
Software: None.
Hardware: None.
GFX_INFO
Usage:
Parameters:
Description:
Limits:
GFX_INFO
None.
This command displays the STLAYER/STBLIT driver version.
Software: None.
Hardware: None.
STAPI-SDK
118/212 8214357 Rev 4
STAPI-SDK Testtool
GFX_SETANTIFLICKER
Usage:
Parameters:
GFX_SETANTIFLICKER < Id > < State >
Description:
Example:
Limits:
<
<
Id >
State >
This is the identifier for the graphic plane.
0: Disable antiflicker
1: Enable antiflicker
Use this command to enable or disable antiflicker.
GFX_SETANTIFLICKER 0 1
Software: None.
Hardware: None.
GFX_SETWINDOW
Usage: GFX_SETWINDOW < Id > < In_X > < In_Y > < In_Width > < In_Height > < Out_X >
< Out_Y > < Out_Width > < Out_Height >
Parameters:
Description:
Example:
Limits:
<
<
<
Id >
In_* >
Out_* >
This is the identifier for the graphic plane.
These parameters define the window area of the source to be resized in the graphic plane.
These parameters define the window area of the destination.
Use this command to resize a part of a graphic plane < Id > .
GFX_SETWINDOW 0 +100 +100 +300 +300 0 0 +720 +576
Software: None.
Hardware: None.
8.3.16 Graphical User Interface (GUI) control commands
GUI_COM
Usage:
Parameters:
Description:
Example:
Limits:
GUI_COM
None.
Use this command to control the GUI interface through testtool.
GUI_COM
Software: None.
Hardware: None.
8214357 Rev 4 119/212
Testtool
GUI_INFO
Usage:
Parameters:
Description:
Example:
Limits:
GUI_SAVE
Usage:
Parameters:
Description:
Example:
Limits:
GUI_INFO
None.
This command displays the GUI driver version.
GUI_INFO
Software: None.
Hardware: None.
GUI_RESTORE
Usage:
Parameters:
Description:
Example:
Limits:
GUI_RESTORE
None.
This command reads a channel list from a local file.
GUI_RESTORE
Software: None.
Hardware: None.
GUI_SAVE
None.
This command saves a channel list to a local file.
GUI_SAVE
Software: None.
Hardware: None.
GUI_SORT
Usage:
Parameters:
Description:
Example:
Limits:
GUI_SORT
None.
This command sorts the channel list.
GUI_SORT
Software: None.
Hardware: None.
120/212 8214357 Rev 4
STAPI-SDK
STAPI-SDK Testtool
HDMI_DISABLE
Usage:
Parameters:
HDMI_DISABLE < Id >
Description:
Example:
Limits:
< 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.
Use this command to disable the HDMI output < Id > .
HDMI_DISABLE 0
Software: None.
Hardware: Available only when the chipset has a HDMI interface.
HDMI_ENABLE
Usage:
Parameters:
HDMI_ENABLE < Id >
Description:
Example:
Limits:
< 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.
Use this command to enable the HDMI output < Id > .
HDMI_ENABLE 0
Software: None.
Hardware: Available only when the chipset has a HDMI interface.
HDMI_INFO
Usage:
Parameters:
Description:
Example:
Limits:
HDMI_INFO
None.
This command displays the STHDMI driver version.
HDMI_INFO
Software: None.
Hardware: Available only when chipset has a HDMI interface.
8214357 Rev 4 121/212
Testtool STAPI-SDK
HDMI_SETAVI
Usage:
Parameters:
HDMI_SETAVI < Id > < AviTag > < AviValue > [< AviTag > < AviValue >]...
< Id >
< AviTag >
< AviValue >
This is the HDMI device identifier.
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 > .
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)
122/212 8214357 Rev 4
STAPI-SDK Testtool
Description:
Example:
Limits:
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.
HDMI_SETAVI 0 HDMI_OUT HDMI_RGB HDMI_END
Software: None.
Hardware: Available only when chipset has a HDMI interface.
HDMI_SETKEY
Usage:
Parameters:
HDMI_SETKEY < Id > < IV_0 > < IV_1 > < KSV_0 > < KSV_1 >
Description:
Example:
Limits:
<
<
Id >
IV_0 >
< IV_1 >
< KSV_0 >
< KSV_1 >
This is the HDMI device identifier.
This parameter is the initial vector LSB 32 bits.
This parameter is the initial vector MSB 32 bits.
This parameter is the key selection vector LSB 32 bits.
This parameter is the key selection vector MSB 32 bits.
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.
HDMI_SETKEY 0 #11223344 #00556677 #00000001 #23456789
Software: Available only with HDCP licence and appropriate STAPI drivers.
Hardware: Available only when chipset has a HDMI/HDCP interface.
HDMI_STATUS
Usage:
Parameters:
HDMI_STATUS < Id >
Description:
Example:
Limits:
< Id > This is the HDMI device identifier.
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.)
HDMI_STATUS 0
Software: None.
Hardware: Available only when chipset has a HDMI interface.
8214357 Rev 4 123/212
Testtool STAPI-SDK
HDMI_CEC_SEND
Usage:
Arguments:
HDMI_CEC_SEND < Id > < OpCode > < NbRetries > < DstId > < SrcId >
<
<
<
<
<
Id >
OpCode >
NbRetries >
DstId >
SrcId >
HDMI ID, which is an integer starting from 0.
Expected CEC opcode. See CEC specification to get opcode
ID list
Expected number of times to retry, where < NbRetries > is between 1 and 5 inclusive.
Expected destination address, in the range of 0 to 15.
Expected source address, in the range of 0 to 15.
Use this command to send particular CEC command Description:
Example:
Limits: Software: None.
Hardware: Available only when chipset has a HDMI interface.
HDMI_CEC_LIST
Usage:
Parameters:
HDMI_CEC_LIST < Id >
Description:
Example:
Limits:
< Id > This is the CEC device identifier.
Use this command to get information about the list of detected CEC device.
HDMI_CEC_LIST 0
Software: None.
Hardware: Available only when chipset has a HDMI interface.
HDMI_CEC_VOL_STANDBY
Usage:
Arguments:
HDMI_CEC_VOL_STANDBY <Id> <IsBroadcast>
Description:
Example:
Limits:
<
<
Id >
IsBroadcast >
HDMI ID, which is an integer starting from 0.
0: Disable
1: Enable.
Send StandBy Command
HDMI_CEC_VOL_STANDBY 0 1
Software: None.
Hardware: Available only when chipset has a HDMI interface.
124/212 8214357 Rev 4
STAPI-SDK
HDMI_CEC_VOL_UP
Usage:
Arguments:
HDMI_CEC_VOL_UP <Id> <DstId> <SrcId>
Description:
Example:
Limits:
<
<
<
Id >
DstId >
SrcId >
HDMI ID, which is an integer starting from 0.
Expected destination address, in the range of 0 to 15.
Expected source address, in the range of 0 to 15.
Use this command to send a particular CEC command
HDMI_CEC_VOL_UP 0 0 0
Software: None.
Hardware: Available only when chipset has a HDMI interface.
HDMI_CEC_VOL_DOWN
Usage:
Arguments:
HDMI_CEC_VOL_DOWN <Id> <DstId> <SrcId>
Description:
Example:
Limits:
<
<
<
Id >
DstId >
SrcId >
HDMI ID, which is an integer starting from 0.
Expected destination address, in the range of 0 to 15.
Expected source address, in the range of 0 to 15.
Use this command to send a particular CEC command
HDMI_CEC_VOL_DOWN 0 0 0
Software: None.
Hardware: Available only when chipset has a HDMI interface.
Testtool
8214357 Rev 4 125/212
Testtool STAPI-SDK
8.3.18 I
2
C interface commands
I2C_DETECT
Usage:
Parameters:
I2C_DETECT < Mode >
Description:
Example:
Limits:
< Mode > This parameter is the mode to be used for write I
2
C access.
– 0 : Normal write and read access.
– 1 : Write with no stop bit access.
Use this command to detect if anything is connected on the I
2
C bus defined on the platform. The test carries out read and write accesses to all I
2
C addresses from 0x00 to 0xFF. and displays the I
2
C 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).
I2C_DETECT 0
Software: None.
Hardware: Depending on the I
2
C topology of the board, this command may cause a lock-up if, for example, the I
2
C bus tested is in tristate or if a I
2
C 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:
Parameters:
Description:
Example:
Limits:
I2C_INFO
None.
This command displays the STI2C driver version.
I2C_INFO
Software: None.
Hardware: None.
I2C_READ
Usage:
Parameters:
I2C_READ < Device > < Address > < NbBytes >
Description:
Example:
Limits:
<
<
Device >
Address >
The I
2
C bus device identifier, an integer starting from 0.
The peripheral I
2
C address from which to read.
< NbBytes > The number of bytes to be read.
Use this command to read < NbBytes > bytes on a specific I
2
C peripheral on the bus.
The command displays the bytes read.
I2C_READ 0 #38 2
Software: None.
Hardware: None.
126/212 8214357 Rev 4
STAPI-SDK Testtool
I2C_READEXT
Usage:
Parameters:
I2C_READEXT < Device > < Address > < SubAddress >
Description:
Example:
Limits:
<
<
Device >
Address >
The I
2
C bus device identifier, an integer starting from 0.
The peripheral I
2
C address from which to read.
< SubAddress > This is the specific register address to read.
Use this command to read only one byte on a specific I
2
C 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.
I2C_READEXT 0 #38 1
Software: None.
Hardware: None.
I2C_WRITE
Usage:
Parameters:
I2C_WRITE < Device > < Address > < Byte0 > [< ByteN >]
Description:
Example:
Limits:
<
<
<
Device >
Address >
Byte0 >
The I
2
C bus device identifier, an integer starting from 0.
The peripheral I
2
C address to which to write.
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.
Use this command to write N bytes on a specific I
2
C peripheral on the bus.
I2C_WRITE 0 #38 #11 #22 #33 #44....
Software: None.
Hardware: None.
8214357 Rev 4 127/212
Testtool STAPI-SDK
8.3.19 Internet Protocol (IP) commands
IP_CONFIG
Usage:
Description:
IP_CONFIG < Id > [< Address >] [< Mask >] [< Gateway >]
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:
Example:
Limits:
<
<
<
<
Id >
Address >
Mask >
Gateway >
The ethernet device identifier, which is an integer starting from
0.
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.
This is a string which contains the mask/subnet to be set.
This is a string which contains the IP address of the gateway.
Get current IP configuration:
IP_CONFIG 0
Ip Address
Netmask
Gateway
MAC Address
Set a new IP configuration:
: 192.168.1.50
: 255.255.255.0
: 192.168.1.254
: 00:FA:E0:00:FA:E0
IP_CONFIG 0 "164.129.62.12" "255.255.254.0" "164.129.62.1"
Ip Address : 164.129.62.12
Netmask
Gateway
MAC Address
: 255.255.254.0
: 164.129.62.1
: 00:FA:E0:00:FA:E0
Software: (OS21 with OSPlus) not Linux.
Hardware: The platform needs to have an ethernet interface.
IP_FTP_START
Usage:
Parameters:
IP_FTP_START < Id >
Description:
Example:
Limits:
< Id > The ethernet device identifier, which is an integer starting from
0.
Use this command to start the FTP server.
IP_FTP_START 0
128/212 8214357 Rev 4
STAPI-SDK Testtool
IP_FTP_STOP
Usage:
Parameters:
IP_FTP_STOP < Id >
Description:
Example:
Limits:
< Id > The ethernet device identifier, which is an integer starting from
0.
Use this command to stop the FTP server.
IP_FTP_STOP 0
IP_INFO
Usage:
Parameters:
Description:
IP_INFO
None.
This command displays the revision numbers of the TCP/IP driver and its associated modules.
IP_INFO Example:
Limits:
IP_PING
Usage:
Parameters:
IP_PING < Id > < Address >
Description:
Example:
Limits:
<
<
Id >
Address >
The ethernet device identifier, which is an integer starting from
0.
The IP address to ping.
Use this command to ping an IP address.
IP_PING 0 "167.126.1.45"
IP_STATUS
Usage:
Parameters:
IP_STATUS < Id > < Reset >
Description:
Example:
Limits:
<
<
Id >
Reset >
The ethernet device identifier, which is an integer starting from
0.
0: Do not reset the statistics
1: Reset the statistics.
This command displays statistics relating to the TCP/IP driver.
IP_STATUS 0 0
8214357 Rev 4 129/212
Testtool STAPI-SDK
IP_STREAMS
Usage:
Description:
Parameters:
IP_STREAMS < Id > < Name > < Params > < Mode >
Use this command to either get or set the IP streams configuration.
< Id >
< Name >
< Params >
< Mode >
The ethernet device identifier, which is an integer starting from
0.
The name of the IP stream, and is one of the following: IP0,
IP1 , IP2 or IP3.
The stream parameters to set
This is either "r" or "w" (for "read" or "write" respectively).
Example:
Limits:
8.3.20 Keyscan based commands
KEYSCN_INFO
Usage:
Parameters:
Description:
Example:
Limits:
KEYSCN_INFO
None.
This command displays the STKEYSCN driver version.
KEYSCN_INFO
Software: None.
Hardware: Available only when chipset has a keyscan interface.
KEYSCN_GETKEY
Usage:
Description:
KEYSCN_GETKEY < Id > < NumberKeysToRead > < TimeOutInMs >
Use this command to get keys from a keyboard connected to the platform. It displays the keystrokes detected.
Parameters:
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.
< Id >
< TimeOutInMs >
The identifier of the keyscan interface.
< NumberKeysToRead > Total number of keystrokes to read (see Note above)
Timeout in milliseconds
Example:
Limits:
To capture two keystrokes from keyboard interface 0:
KEYSCN_GETKEY 0 +4 +10000
Software: None.
Hardware: Available only when chipset has a keyscan interface.
130/212 8214357 Rev 4
STAPI-SDK Testtool
KEYSCN_GETPARAMS
Usage:
Description:
KEYSCN_GETPARAMS < Id >
Use this command to get the current parameters of the keyscan interface. It displays all the useful parameters (such as debounce time).
Parameters:
Example:
Limits:
< Id > The identifier of the keyscan interface.
KEYSCN_GETPARAMS 0
Software: None.
Hardware: Available only when chipset has a keyscan interface.
KEYSCN_SETDEBOUNCETIME
Usage:
Parameters:
KEYSCN_SETDEBOUNCETIME < Id > < DebounceTimeInMs >
Description:
Example:
Limits:
< Id > The identifier of the keyscan interface.
< DebounceTimeInMs > This parameter is the debounce time in milliseconds
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.
KEYSCN_SETDEBOUNCETIME 0 +3
Software: None.
Hardware: Available only when chipset has a KEYSCAN interface.
PIO_ATA_RESET
Usage:
Parameters:
PIO_ATA_RESET < OnOff >
Description:
Example:
Limits:
< OnOff > The state of PIO to be set:
0: 0V
1: +3.3V
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).
PIO_ATA_RESET 0
; Wait 100ms
WAIT +100
PIO_ATA_RESET 1
Software: None.
Hardware: Platform dependant.
8214357 Rev 4 131/212
Testtool STAPI-SDK
PIO_CLEAR
Usage:
Parameters:
PIO_CLEAR < PIONumber > < BitNumber >
Description:
Example:
Limits:
<
<
PIONumber >
BitNumber >
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 .
This is the specific bit to clear [0,7].
Use this command to clear the PIO specified by the < PIONumber > and
< BitNumber > parameters. "Clear" means set to 0, or 0V.
Set the PIO3.7 on the board to 0V:
PIO_CLEAR 3 7
Software: None.
Hardware: Platform dependant.
PIO_DAC_RESET
Usage:
Parameters:
PIO_DAC_RESET < OnOff >
Description:
Example:
Limits:
< OnOff > The state of PIO to be set:
0: 0V
1: +3.3V
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).
PIO_DAC_RESET 1
; Wait 100ms
WAIT +100
PIO_DAC_RESET 0
; Wait 100ms
WAIT +100
PIO_DAC_RESET 1
Software: None.
Hardware: Platform dependant.
132/212 8214357 Rev 4
STAPI-SDK Testtool
PIO_FE_RESET
Usage:
Parameters:
PIO_FE_RESET < OnOff >
Description:
Example:
Limits:
< OnOff > The state of PIO to be set:
0: 0V
1: +3.3V
Use this command to set or clear a PIO to reset the demodulator and tuners on the platform. This must be done before sending I
2
C 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() ).
PIO_FE_RESET 1
; Wait 100ms
WAIT +100
PIO_FE_RESET 0
; Wait 100ms
WAIT +100
PIO_FE_RESET 1
Software: None.
Hardware: Platform dependant.
PIO_GET
Usage:
Parameters:
PIO_GET < PIONumber > < BitNumber >
<
<
PIONumber >
BitNumber >
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.
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:
Limits:
Return state of the push-button connected to PIO4.1:
PIO_GET 4 1
Software: None.
Hardware: Platform dependant.
8214357 Rev 4 133/212
Testtool STAPI-SDK
PIO_INFO
Usage:
Parameters:
Description:
Example:
Limits:
PIO_INFO
None.
This command displays the STPIO driver version.
PIO_INFO
Software: None.
Hardware: None.
PIO_LED
Usage:
Parameters:
PIO_LED < LEDNumber > < OnOff >
Description:
Example:
Limits:
<
<
LEDNumber >
OnOff >
This is the LED identifier parameter starting from 0 to N.
0: Power off the LED
1: Power on the LED
Use this command to power on or off any of the LEDs on the platform.
To illuminate LED number 2:
PIO_LED 2 1
Software: None.
Hardware: Platform dependant.
PIO_MODEM_RESET
Usage:
Parameters:
PIO_MODEM_RESET < OnOff >
Description:
Example:
Limits:
< OnOff > The state of PIO to be set:
0: 0V
1: +3.3V
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).
PIO_MODEM_RESET 1
; Wait 100ms
WAIT +100
PIO_MODEM_RESET 0
; Wait 100ms
WAIT +100
PIO_MODEM_RESET 1
Software: None.
Hardware: Platform dependant.
134/212 8214357 Rev 4
STAPI-SDK Testtool
PIO_SET
Usage:
Parameters:
PIO_SET <PIONumber> <BitNumber>
Description:
Example:
Limits:
<
<
PIONumber >
BitNumber >
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.
Set the state of this bit of the given PIO. This is an integer in the range of 0 to 7.
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).
Set PIO2.4 on the board:
PIO_SET 2 4
Software: None.
Hardware: Platform dependant.
PIO_USB_RESET
Usage:
Parameters:
PIO_USB_RESET < OnOff >
< 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:
Limits:
PIO_USB_RESET 0
Wait 100ms before reset:
WAIT +100
PIO_USB_RESET 1
Software: None.
Hardware: Platform dependant.
8214357 Rev 4 135/212
Testtool STAPI-SDK
8.3.22 Picture in Picture use case commands
PIP_CLOSE
Usage:
Parameters:
Description:
Example:
Limits:
PIP_CLOSE < Id >
< Id > The identifier of a PiP viewport.
Close a picture-in-picture viewport.
PIP_CLOSE 0
PIP_DISABLE
Usage:
Parameters:
Description:
Example:
Limits:
PIP_DISABLE < Id >
< Id > The identifier of a PiP viewport.
Use this command to disable a picture-in-picture viewport.
PIP_DISABLE 0
PIP_ENABLE
Usage:
Parameters:
Description:
Example:
Limits:
PIP_OPEN
Usage:
Parameters:
PIP_ENABLE < Id >
< Id > The identifier of a PiP viewport.
Use this command to enable a picture-in-picture viewport.
PIP_ENABLE 0
PIP_OPEN < Id > < VideoId > < GfxId >
Description:
Example:
Limits:
<
<
<
Id >
VideoId >
GfxId >
The identifier of a PiP viewport.
The identifier of the video device to display the PiP viewport.
The identifier of the graphics layer on which to display the PiP viewport.
Use this command to open a picture-in-picture viewport.
PIP_OPEN
136/212 8214357 Rev 4
STAPI-SDK Testtool
PIP_PAUSE
Usage:
Parameters:
Description:
Example:
Limits:
PIP_PAUSE < Id >
< Id > The identifier of a PiP viewport.
Use this command to pause a picture-in-picture viewport.
PIP_PAUSE 0
PIP_RESUME
Usage:
Parameters:
Description:
Example:
Limits:
PIP_RESUME < Id >
< Id > The identifier of a PiP viewport.
Use this command to resume a picture-in-picture viewport that is currently paused.
PIP_RESUME 0
PIP_SETWINDOW
Usage:
Description:
PIP_SETWINDOW < Id > < Xpos > < Ypos > < Width > < Height >
Use this command to move a picture-in-picture viewport to the given position and size it to the given dimensions.
Parameters:
Example:
Limits:
<
<
Id >
Xpos >
< Ypos >
< Width >
< Height >
The identifier of a PiP viewport.
The X co-ordinate of the ?? corner of the PiP viewport.
The Y co-ordinate of the ?? corner of the PiP viewport.
The new width of the PiP viewport, in pixels?
The new height of the PiP viewport, in pixels?
PIP_SETWINDOW 0 150 100 250 200
8214357 Rev 4 137/212
Testtool STAPI-SDK
PLAY_AUDIO_SETOUTPUT
Usage:
Parameters:
PLAY_AUDIO_SETOUTPUT < Id > < Enable >
Description:
Example:
Limits:
<
<
Id >
Enable >
The playback identifier, 0 or 1.
0: Disable audio playback.
1: Enable audio playback.
Use this command to enable or disable audio playback.
PLAY_AUDIO_SETOUTPUT 0 1
PLAY_CHANGEPIDS
Usage:
Parameters:
PLAY_CHANGEPIDS < Id > [< PidList >]
Description:
Example:
Limits:
<
<
Id >
PidList >
The playback identifier, 0 or 1.
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.
Use this command to update the PID list to play.
PLAY_CHANGEPIDS 0 P_MP4V
PLAY_GETAUDIOID
Usage:
Parameters:
PLAY_GETAUDIOID < Id >
Description:
Example:
Limits:
< Id > The playback identifier, 0 or 1.
This command returns the audio identifier used.
PLAY_GETAUDIOID 0
138/212 8214357 Rev 4
STAPI-SDK
PLAY_GETVIDEOID
Usage:
Parameters:
PLAY_GETVIDEOID < Id >
Description:
Example:
Limits:
< Id > The playback identifier, 0 or 1.
This command returns the video identifier used.
PLAY_GETVIDEOID 0
Testtool
PLAY_INFO
Usage:
Parameters:
Description:
Example:
Limits:
PLAY_INFO
None
This command provides information about the playback driver.
PLAY_INFO
PLAY_PAUSE
Usage:
Parameters:
Description:
Example:
Limits:
PLAY_PAUSE < Id >
< Id > The playback identifer, 0 or 1.
Use this command to pause playback
PLAY_PAUSE 0
PLAY_PAUSERECORD
Usage:
Parameters:
PLAY_PAUSERECORD < PlayId > < RecordId > < Filename > < Size >
Description:
Example:
Limits:
<Play
<
Id >
RecordId >
< Filename >
< Size >
The playback identifier, 0 or 1.
The record identifier, 0 or 1.
The name of the file in which the recording is to be stored.
The size in minutes.
Use this command to pause playback and start a record
PLAY_PAUSERECORD 0
8214357 Rev 4 139/212
Testtool STAPI-SDK
PLAY_PROGRAM
Usage:
Parameters:
PLAY_PROGRAM < Id > < Filename > < ProgramId > [< Layer > ]
Description:
Example:
Limits:
<
<
<
<
Id >
Filename >
ProgramId >
Layer >
The playback identifier, 0 or 1.
The name of the file to play.
The program identifier.
One of P_MAIN, P_AUX or P_REMOTE.
Use this command to playback the contents of the file < Filename > .
PLAY_PROGRAM 0 "stream.trp" 0x0001 P_MAIN
PLAY_PROGRAM_A3
Usage:
Parameters:
PLAY_PROGRAM_A3 < Id > < Filename > < ProgramId > [< Layer > ]
Description:
Example:
Limits:
<
<
<
<
Id >
Filename >
ProgramId >
Layer >
The playback identifier, 0 or 1.
The name of the file to play.
The program identifier.
One of P_MAIN, P_AUX or P_REMOTE.
Use this command to playback an A3 service from the contents of the file
< Filename > .
PLAY_PROGRAM 0 "stream.trp" 0x0001 P_MAIN
PLAY_PROGRAM_DTV
Usage:
Parameters:
PLAY_PROGRAM_DTV < Id > < Filename > < ProgramId > [< Layer > ]
Description:
Example:
Limits:
<
<
<
<
Id >
Filename >
ProgramId >
Layer >
The playback identifier, 0 or 1.
The name of the file to play.
The program identifier.
One of P_MAIN, P_AUX or P_REMOTE.
Use this command to playback a DTV service from the contents of the file
< Filename > .
PLAY_PROGRAM 0 "stream.trp" 0x0001 P_MAIN
140/212 8214357 Rev 4
STAPI-SDK Testtool
PLAY_RESUME
Usage:
Parameters:
Description:
Example:
Limits:
PLAY_RESUME < Id >
< Id > The playback identifer, 0 or 1.
Use this command to resume playback that is currently paused.
PLAY_RESUME 0
PLAY_SEEK
Usage:
Parameters:
PLAY_SEEK < Id > < SeekInMs > < SeekMode >
Description:
Example:
Limits:
<
<
<
Id >
SeekInMs >
SeekMode >
The playback identifier, 0 or 1.
Seek time, in milliseconds.
Seek mode, one of P_SEEK_SET, P_SEEK_CUR or
P_SEEK_END
Use this command to perform a seek into a playback file.
PLAY_SEEK 0 500000 P_SEEK_SET
PLAY_SPEED
Usage:
Parameters:
PLAY_SPEED < Id > < Speed >
Description:
Example:
Limits:
<
<
Id >
Speed >
The playback identifier, 0 or 1.
The speed of playback, which must be a signed value
(prefixed by + or -).
Use this command to set the speed of playback.
PLAY_SPEED 0 +100
8214357 Rev 4 141/212
Testtool STAPI-SDK
PLAY_START
Usage:
Parameters:
PLAY_START < Id > < Filename > [< PidList >] [< Layer >]
Description:
Example:
Limits:
<
<
Id >
Filename >
< ProgramId >
< Layer >
The playback identifier, 0 or 1.
The name of the file to play.
The program identifier.
One of P_MAIN, P_AUX or P_REMOTE.
Use this command to start video and audio decoding.
PLAY_START 0 "stream.trp" 0x0001 P_MAIN
PLAY_STATUS
Usage:
Parameters:
Description:
Example:
Limits:
PLAY_STATUS < Id >
< Id > The playback identifer, 0 or 1.
This command displays the status of the selected playback.
PLAY_STATUS 0
PLAY_STEP
Usage:
Parameters:
Description:
Example:
Limits:
PLAY_STEP < Id >
< Id > The playback identifer, 0 or 1.
Use this command to step through the playback.
PLAY_STEP 0
PLAY_STOP
Usage:
Parameters:
PLAY_STOP < Id > < Freeze >
Description:
Example:
Limits:
<
<
Id >
Freeze >
The playback identifier, 0 or 1.
0: Blank the screen.
1: Keep last picture.
Use this command to stop playback. The < Freeze > flag determines whether the last picture should remain (“freeze frame”) or not.
PLAY_STOP 0 1
142/212 8214357 Rev 4
STAPI-SDK Testtool
PLAY_VIDEO_SETOUTPUT
Usage:
Parameters:
PLAY_VIDEO_SETOUTPUT < Id > < Enable >
Description:
Example:
Limits:
<
<
Id >
Enable >
The playback identifier, 0 or 1.
0: Disable video playback.
1: Enable video playback.
Use this command to enable or disable video playback.
PLAY_VIDEO_SETOUTPUT 0 1
PLAY_WAIT_END
Usage:
Parameters:
PLAY_WAIT_END < Id > < TimeOut >
Description:
Example:
Limits:
<
<
Id >
TimeOut >
The playback identifier, 0 or 1.
The timeout to apply, in seconds.
Use this command to wait until the end of playback or until the timeout expires, whichever is the sooner.
PLAY_WAIT_END 0 5
8214357 Rev 4 143/212
Testtool STAPI-SDK
POWER_INFO
Usage:
Description:
Parameters:
Example:
Limits:
POWER_INFO
This command displays the STPOWER driver version.
None.
POWER_INFO
Software: None.
Hardware: None.
POWER_GETPROFILE
Usage:
Parameters:
POWER_GETPROFILE < Id > < ProfileId >
Description:
Example:
Limits:
<
<
Id >
ProfileId >
This parameter sets the power profile ID to use.
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.
This command displays the status of the power profile indicated by < Id > .
POWER_GETPROFILE 0 1
Software: None.
Hardware: None.
144/212 8214357 Rev 4
STAPI-SDK Testtool
POWER_SETMODE
Usage: POWER_SETMODE < Id > < ProfileId > < CPUState > < WakeupCondition >
< WakeupParam >
Parameters:
Description:
Example:
<
<
<
Id >
ProfileId >
CPUState >
This parameter sets the power profile ID to use.
Defines the power mode for this profile:
0: Normal Mode
1 to 5: Active StandBy Mode
Defines the CPU state, which is either:
PM_CPU_SLEEP , PM_CPU_STANDBY
< WakeupCondition > One of the following:
< WakeupParam >
PM_WAKEUP_NONE , PM_WAKEUP_HDMI,
PM_WAKEUP_TIMER , PM_WAKEUP_FRONTPANEL,
PM_WAKEUP_ETHERNET , PM_WAKEUP_IR
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.
This command selects the power mode of the system or of a specified device.
POWER_SETMODE 0 1 PM_CPU_SLEEP PM_WAKEUP_TIMER 2
POWER_SETPROFILE
Usage:
Parameters:
POWER_SETPROFILE < Id > < ProfileId > < DeviceName > < State >
Description:
Example:
Limits:
<
<
Id >
ProfileId >
< DeviceName >
< State >
This parameter sets the power profile ID to use.
Defines the power mode for this profile.
Defines the device name to append or change state
Defines the device state to be changed for the device name.
This command sets a specific power state for the given device when the given power profile is selected.
POWER_SETPROFILE 0 2 "I2C0" PM_NORMAL
Software: None.
Hardware: None.
8214357 Rev 4 145/212
Testtool
POD_CONNECT
Usage:
Parameters:
POD_CONNECT < Id > < PODMode >
Description:
Example:
Limits:
< Id >
< PODMode >
The POD identifier.
This command makes a CCSC configuration for POD.
POD_CONNECT
POD_LOOPBACK_SIMPLE
Usage:
Parameters:
Description:
Example:
Limits:
POD_LOOPBACK_SIMPLE < Id >
< Id > The POD identifier.
POD simple loopback.
POD_LOOPBACK_SIMPLE
POD_LOOPBACK_ADVANCE
Usage:
Parameters:
Description:
Example:
Limits:
POD_LOOPBACK_ADVANCE < Id >
< Id > The POD identifier.
POD multi size packet loopback.
POD_LOOPBACK_ADVANCE
POD_MCARD_CP_TEST
Usage:
Parameters:
Description:
Example:
Limits:
POD_MCARD_CP_TEST < Id >
< Id > The POD identifier.
POD simple loopback.
POD_MCARD_CP_TEST
146/212 8214357 Rev 4
STAPI-SDK
STAPI-SDK Testtool
8.3.26 Pulse Width Modulated (PWM) signal commands
PWM_INFO
Usage:
Parameters:
Description:
Example:
Limits:
PWM_GET
Usage:
Parameters:
PWM_INFO
< Id > The PWM identifier, which is an integer starting from 0.
This command displays the revision number of the PWM driver.
PWM_INFO
PWM_SET < Id > < Value >
Description:
Example:
Limits:
<
<
Id >
Value >
The PWM identifier, which is an integer starting from 0.
Set the specified PWM to this value. < Value > must be an integer.
Use this command to set a PWM value.
PWM_SET 10 0x1000
PWM_SET
Usage:
Parameters:
Description:
Example:
Limits:
PWM_GET < Id >
< Id > The PWM identifier, which is an integer starting from 0.
Use this command to get a PWM value.
PWM_GET 10
8214357 Rev 4 147/212
Testtool STAPI-SDK
REC_CHANGEPIDS
Usage:
Parameters:
REC_CHANGEPIDS < Id > < PidList >
Description:
Example:
Limits:
<
<
Id >
PidList >
Record identifier, which is an integer starting from 0.
Pid List to record is one of the following: P_MP1V, P_MP2V,
P_MP4V , P_H264, P_MPEG4P2, P_VC1, P_MP1A,
P_MP1A_AUX , P_MP1A_AD, P_MP2A, P_MP2A_AUX,
P_MP2A_AD , P_MP4A, P_MP4A_AUX, P_AC3, P_AC3_AUX,
P_AC3_AD , P_AAC, P_AAC_AUX, P_HEAAC, P_HEAAC_AUX,
P_HEAAC_AD , P_WMA, P_WMA_AUX, P_DDPLUS,
P_DDPLUS_AUX , P_DDPLUS_AD,P_DTS, P_DTS_AUX,
P_DTS_AD , P_LPCM, P_LPCM_AUX, P_DDPULSE,
P_DDPULSE_AUX , P_DDPULSE_AD, P_DRA, P_DRA_AUX,
P_DRA_AD , P_AUD_ID, P_TTXT, P_SUBT, P_PCR, P_PID,
P_AVS or P_END
Use this command to update the pidlist to record.
REC_CHANGEPIDS 1 P_MP2V
REC_FILECOPY
Usage: REC_FILECOPY < Filename > < FilenameCopy > < StartTimeInMs >
< StopTimeInMs >
Parameters:
Description:
Example:
Limits:
< Filename > File to copy, which is \"0\", \"1\" or \"stream.trp\"
< FilenameCopy > File to copy to, which is \"0\", \"1\" or \"stream.trp\"
< StartTimeInMs > Start time value in milliseconds, an integer value
< StopTimeInMs > Stop time value in milliseconds, an integer value
Copy and cut a stream file recorded.
REC_FILECOPY \"stream.trp"\ \"stream_copy.trp"\ +10 +100
148/212 8214357 Rev 4
STAPI-SDK Testtool
REC_FILECROP
Usage:
Parameters:
REC_FILECROP < Filename > < StartTimeInMs > < StopTimeInMs >
Description:
Example:
Limits:
< Filename > Name of the file to crop, which is \"0\", \"1\" or \"stream.trp\"
< StartTimeInMs > Start time value in milliseconds, an integer value
< StopTimeInMs > Stop time value in milliseconds, an integer value
Use this command to crop or cut a stream file recorded.
REC_FILECOPY \"stream.trp"\ +10 +100
REC_FILEREMOVE
Usage:
Parameters:
REC_FILEREMOVE < Filename >
Description:
Example:
Limits:
< Filename > Name of the file to remove, which is \"0\", \"1\" or \"stream.trp\"
Use this command to remove a recorded stream file.
REC_FILEREMOVE \"stream.trp"\
REC_FILERENAME
Usage:
Parameters:
REC_FILERENAME < Oldname > < NewName >
Description:
Example:
Limits:
Oldname
NewName
Current file name, which is \"0\", \"1\" or \"stream.trp\"
New file name, which is \"0\", \"1\" or \"stream.trp\"
Use this command to rename a recorded file.
REC_FILERENAME \"stream.trp"\ \"stream_new.trp"\
REC_INSERT_PMT
Usage:
Parameters:
Description:
Example:
Limits:
REC_INSERT_PMT < Id>
< Id > The recording identifier, in the range 0 to 7.
Use this command to insert a PMT into the recording.
REC_INSERT_PMT 1
8214357 Rev 4 149/212
Testtool STAPI-SDK
REC_PAUSE
Usage:
Parameters:
Description:
Example:
Limits:
REC_PAUSE < Id >
< Id > The recording identifier, in the range 0 to 7.
Use this command to pause recording.
REC_PAUSE 0
REC_PROGRAM
Usage:
Parameters:
REC_PROGRAM < Id > < StreamName > < Filename > < Size > < ProgramId >
Description:
Example:
Limits:
<
<
<
<
<
Id >
StreamName >
Filename >
Size >
ProgramId >
The recording identifier, in the range 0 to 7.
Record the input coming from this stream.
Store the recording in a file with this filename.
The size of the circular file used for the recording. This is defined in minutes.
The PID of the program to be recorded, in the range 0x0001 to 0xFFFF.
Use this command to start recording from the stream identified by < StreamName > .
REC_PROGRAM 0
REC_RESUME
Usage:
Parameters:
Description:
Example:
Limits:
REC_RESUME < Id >
< Id > The recording identifier, in the range 0 to 7.
Use this command to resume a recording that is currently paused.
REC_RESUME 0
150/212 8214357 Rev 4
STAPI-SDK Testtool
REC_START
Usage:
Parameters:
REC_START < Id > < StreamName > < Filename > < Size> [< Type > < Pid >]
<
<
<
<
<
<
Id >
StreamName >
Filename >
Size >
Type >
Pid >
The recording identifier, in the range 0 to 7.
Record the input coming from this stream.
Store the recording in a file with this filename.
The size of the circular file used for the recording. This is defined in minutes.
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.
The PID of the program to be recorded, in the range 0x0001 to 0xFFFF.
Use this command to start a recording.
REC_START 0
Description:
Example:
Limits:
REC_STATUS
Usage:
Parameters:
Description:
Example:
Limits:
REC_STATUS < Id >
< Id > The recording identifier, in the range 0 to 7.
This command displays the current status of the recording.
REC_STATUS 0
REC_STOP
Usage:
Parameters:
Description:
Example:
Limits:
REC_STOP < Id >
< Id > The recording identifier, in the range 0 to 7.
Use this command to stop a recording in progress.
REC_STOP 0
8214357 Rev 4 151/212
Testtool STAPI-SDK
REC_SWITCHTOLINEAR
Usage:
Parameters:
Description:
Example:
Limits:
REC_SWITCHTOLINEAR < Id >
< Id > The recording identifier, which is an integer starting from 0.
Switch a record from circular to linear.
REC_SWITCHTOLINEAR 0
RACK_OFF
Usage:
Parameters:
Description:
Example:
Limits:
Rack is not supported for some low memory profile boards.
RACK_OFF
None.
Use this command to disable the rack debug plane.
RACK_OFF
RACK_ON
Usage:
Parameters:
RACK_ON < PlaneId > < VtgId >
Description:
Example:
Limits:
< PlaneId >
< VtgId >
This is the graphic plane index to enable.
Use this command to enable the rack debug plane.
RACK_ON
SCART_INFO
Usage:
Parameters:
Description:
Example:
Limits:
SCART_INFO
None.
This command displays the revision number of the SCART driver.
SCART_INFO
152/212 8214357 Rev 4
STAPI-SDK Testtool
SCART_RATIO
Usage:
Parameters:
SCART_RATIO < Id > < AspectRatio >
Description:
Example:
Limits:
<
<
Id >
AspectRatio >
This is the SCART identifier.
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).
Use this command to change the SCART aspect ratio. The choice is between 4:3 and
16:9.
SCART_RATIO 0 TV_16_9
SCART_SET
Usage:
Parameters:
SCART_SET < Id > < Format >
Description:
Example:
Limits:
<
<
Id >
Format >
This is the SCART identifier.
The output format. This is one of RGB, CVBS or YPRPB.
Use this command to set the format of the SCART output. The choice is between
RGB, CVBS, or YPrPb.
SCART_SET 0 RGB
SMART_INFO
Usage:
Parameters:
Description:
Example:
Limits:
SMART_INFO
None.
This command displays the revision number of the Smartcard driver.
SMART_INFO
SMART_GETPARAMS
Usage:
Parameters:
Description:
Example:
Limits:
SMART_GETPARAMS < Id >
< Id > The smartcard identifier, an integer starting from 0.
This command displays the current parameters of the specified smartcard.
SMART_GETPARAMS 0
8214357 Rev 4 153/212
Testtool STAPI-SDK
SMART_READ
Usage:
Parameters:
SMART_READ < Id > < LengthToRead > < TimeOut >
Description:
Example:
Limits:
<
<
Id >
TimeOut >
The smartcard identifier, an integer starting from 0.
< LengthToRead > The number of bytes to read. The maximum is 512.
The time out to apply, in milliseconds.
Use this command to read the response from a smartcard after sending a command.
SMART_READ 0 50 1000
SMART_RESET
Usage:
Parameters:
Description:
Example:
Limits:
SMART_RESET < Id >
< Id > The smartcard identifier, an integer starting from 0.
Reset the specified smartcard.
SMART_RESET 0
SMART_TRANSFER
Usage: SMART_TRANSFER < Id > < LengthToWrite > <Cmd0,Cmd1,...,CmdN>
< TimeOut >
Parameters:
<
<
Id >
LengthToWrite >
The smartcard identifier, an integer starting from 0.
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.
Use this command to perform a transfer protocol on the smartcard.
Description:
Example:
Limits:
154/212 8214357 Rev 4
STAPI-SDK Testtool
SMART_WRITE
Usage:
Parameters:
SMART_WRITE < Id > < LengthToWrite > <Cmd0,Cmd1,...,CmdN> < TimeOut >
Description:
<
<
Id >
LengthToWrite >
The smartcard identifier, an integer starting from 0.
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.
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:
Parameters:
Description:
Example:
Limits:
SPI_READ
Usage:
Parameters:
SPI_INFO
None.
This command displays the revision number of the SPI driver.
SPI_INFO
Description:
Example:
Limits:
SPI_READ < Device > < Address > < NbBytes >
<
<
<
Device >
Address >
NbBytes >
The SPI bus device identifier, which is an integer starting from
0.
The peripheral SPI address from which to read bytes.
The number of bytes to read.
Use this command to read a number of bytes on a specific SPI peripheral on the bus.
The command displays the bytes just read.
I2C_SPI 0 #38 2
Software: None.
Hardware: SPI peripheral required.
8214357 Rev 4 155/212
Testtool STAPI-SDK
SPI_WRITE
Usage:
Description:
Parameters:
SPI_WRITE < Device > < Address > < Byte0 > [< ByteN >]
Use this command to write bytes to a specific SPI peripheral on the bus.
Example:
Limits:
<
<
<
Device >
Address >
Byte0 >
[< ByteN >]
The SPI bus device identifier, which is an integer starting from
0.
The peripheral SPI address to which to write bytes.
The first byte to write.
The remaining bytes to write to the peripheral, where N is less than or equal to 63.
I2C_WRITE 0 #38 #11 #22 #33 #44
Software: None.
Hardware: SPI peripheral required.
8.3.32 Subtitling commands
SUBT_INFO
Usage:
Parameters:
Description:
Example:
Limits:
SUBT_INFO
None.
This command displays the revision number of the subtitle driver.
SUBT_INFO
SUBT_ENABLE
Usage:
Parameters:
Description:
Example:
Limits:
SUBT_ENABLE < Id >
< Id > This is the identifier of the subtitle display, which is either 0 or 1.
Use this command to enable the display of subtitles.
SUBT_ENABLE 0
SUBT_DISABLE
Usage:
Parameters:
Description:
Example:
Limits:
SUBT_DISABLE < Id >
< Id > This is the identifier of the subtitle display, which is either 0 or 1.
Use this command to disable the display of subtitles.
SUBT_DISABLE 0
156/212 8214357 Rev 4
STAPI-SDK Testtool
SUBT_START
Usage:
Parameters:
SUBT_START < Id > < GfxId > < PID > < CompPageID > < AnciPageID >
Description:
Example:
Limits:
<
<
<
<
<
Id >
GfxId >
PID >
CompPageID >
AnciPageID >
This is the identifier of the subtitle display, which is either 0 or
1.
The identifier of the graphics layer.
The PID for the program that contains the subtitles.
The identifier of the composition page.
The identifier of the ancillary page.
Use this command to start displaying subtitles.
SUBT_START
SUBT_STOP
Usage:
Parameters:
Description:
Example:
Limits:
SUBT_STOP < Id >
< Id > This is the identifier of the subtitle display, which is either 0 or 1.
Use this command to stop the display of subtitles.
SUBT_STOP 0
SUBT_SETWINDOW
Usage:
Parameters:
SUBT_SETWINDOW < Id > < OutX > < OutY > < OutWidth > < OutHeight >
Description:
Example:
Limits:
<
<
<
<
<
Id >
OutX >
OutY >
OutWidth >
OutHeight >
This is the identifier of the subtitle display, which is either 0 or
1.
The X co-ordinate of the top left corner of the subtitle window.
The Y co-ordinate of the top left corner of the subtitle window.
The width of the window.
The height of the window.
Use this command to set the position and size of the window used for displaying subtitles.
SUBT_SETWINDOW 0 150 200 500 50
8214357 Rev 4 157/212
Testtool STAPI-SDK
SYS_CLOCK
Usage:
Parameters:
Description:
Example:
Limits:
SYS_ID
Usage:
Parameters:
Description:
Example:
Limits:
SYS_IRQ
Usage:
Parameters:
SYS_CLOCK
None.
This command displays details of the configuration of the clocks.
SYS_CLOCK
SYS_ID
None.
This command displays the version number of the chip cut.
SYS_ID
SYS_IRQ < Scope >
Description:
< Scope > 0: Display summary details.
1: Display full details.
This command displays details of the IRQ settings. Use the < Scope > parameter to display either full or summary details.
SYS_IRQ 1 Example:
Limits:
SYS_MEM
Usage:
Parameters:
Description:
Example:
Limits:
SYS_MEM
None.
This command displays details of the memory partitions.
SYS_MEM
158/212 8214357 Rev 4
STAPI-SDK
SYS_PROF_START
Usage:
Parameters:
Description:
Example:
Limits:
SYS_PROF_START
None.
Use this command to start task profiling.
SYS_PROF_START
Software: OS21/OSPlus only, not Linux.
Hardware:
SYS_PROF_STOP
Usage:
Parameters:
Description:
Example:
Limits:
SYS_PROF_STOP
None.
Use this command to stop task profiling.
SYS_PROF_STOP
Software: OS21/OSPlus only, not Linux.
Hardware:
SYS_PROF_FLUSH
Usage:
Parameters:
Description:
Example:
Limits:
SYS_PROF_FLUSH
None.
Use this command to flush the profiling data to the host.
SYS_PROF_FLUSH
Software: OS21/OSPlus only, not Linux.
Hardware:
SYS_REV
Usage:
Parameters:
Description:
Example:
Limits:
SYS_REV
None.
This command displays the revision number of the modules.
SYS_REV
Testtool
8214357 Rev 4 159/212
Testtool
SYS_TASK
Usage:
Parameters:
Description:
Example:
Limits:
SYS_TASK
None.
This command displays the task settings.
SYS_TASK
SYS_WATCHMEM_START
Usage:
Parameters:
SYS_WATCHMEM_START < Address > < Size >
Description:
Example:
Limits:
<
<
Address >
Size >
The memory location to watch.
The size of the memory region, in bytes.
Use this command to start watching the specified memory region.
SYS_WATCHMEM_START 0x4000 0x0100
Software: OS21/OSPlus only, not Linux.
Hardware: STx7109 only.
SYS_WATCHMEM_STOP
Usage:
Parameters:
Description:
Example:
Limits:
SYS_WATCHMEM_STOP
None
Use this command to stop memory watching.
SYS_WATCHMEM_STOP
Software: OS21/OSPlus only, not Linux.
Hardware: STx7109 only.
STAPI-SDK
TABLE_EIT
Usage:
Parameters:
Description:
Example:
Limits:
TABLE_EIT < Pti/Connection > < FullInfo >
< Pti/Connection > This is the PTI ID or the connection name.
< FullInfo > 0: Display summary information
1: Display full information.
Use this command to filter an EIT section.
TABLE_EIT 1 1
160/212 8214357 Rev 4
STAPI-SDK Testtool
TABLE_FILTER
Usage:
Parameters:
TABLE_FILTER < Pti/Connection > < Pid > < TableId >
Description:
Example:
Limits:
< Pti/Connection > This is the PTI ID or the connection name.
<
<
Pid >
TableId >
The PID for the program, in the range 0x0000 to 0xFFFF.
The ID for the table, in the range 0x0000 to 0xFFFF.
Use this command to filter a full section.
TABLE_FILTER 0 0x0001 0x00FF
TABLE_NIT
Usage:
Parameters:
TABLE_NIT < Pti/Connection > < FullInfo >
< Pti/Connection > This is the PTI ID or the connection name.
< FullInfo > 0: Display summary information
1: Display full information.
Use this command to filter an NIT section.
TABLE_NIT 1 0
Description:
Example:
Limits:
TABLE_PAT
Usage:
Parameters:
TABLE_PAT < Pti/Connection >
Description:
Example:
Limits:
< Pti/Connection > This is the PTI ID or the connection name.
Use this command to filter an PAT section.
TABLE_PAT 1
TABLE_PMT
Usage:
Parameters:
TABLE_PMT < Pti/Connection > < FullInfo >
Description:
Example:
Limits:
< Pti/Connection > This is the PTI ID or the connection name.
< FullInfo > 0: Display summary information
1: Display full information.
Use this command to filter an PMT section.
TABLE_PMT 0 1
8214357 Rev 4 161/212
Testtool
TABLE_SDT
Usage:
Parameters:
TABLE_SDT < Pti/Connection > < FullInfo >
< Pti/Connection > This is the PTI ID or the connection name.
< FullInfo > 0: Display summary information
1: Display full information.
Use this command to filter an SDT section.
TABLE_SDT 0 0
Description:
Example:
Limits:
TABLE_TDT
Usage:
Parameters:
TABLE_TDT < Pti/Connection >
Description:
Example:
Limits:
< Pti/Connection > This is the PTI ID or the connection name.
Use this command to filter an TDT section.
TABLE_TDT 0
STAPI-SDK
TEXT_CLEAR
Usage:
Parameters:
Description:
Example:
Limits:
TEXT_CLEAR < Id >
None.
This command clears the text object created by TEXT_PRINT and referenced by
< Id > .
TEXT_INFO
TEXT_INFO
Usage:
Parameters:
Description:
Example:
Limits:
TEXT_INFO
None.
This command displays the revision number of the TEXT driver.
TEXT_INFO
162/212 8214357 Rev 4
STAPI-SDK Testtool
TEXT_PRINT
Usage:
Parameters:
TEXT_PRINT < Id > < FontId > < X > < Y > < Color > < String > [< Params >]
Description:
Example:
Limits:
< Id >
< FontId >
< X >
< Y >
< Color >
< String >
[< Params >]
The ID of the text to print.
Use the font with this ID number.
The X co-ordinate of the point from which to start printing.
The Y co-ordinate of the point from which to start printing.
The color of the text.
The string to print.
This command prints the text referenced by < Id > .
TEXT_INFO
TRACE_HDDCLOSE
Usage:
Parameters:
Description:
Example:
Limits:
TRACE_HDDCLOSE
None.
Use this command to close the trace file previously opened using
TRACE_HDDOPEN
TRACE_HDDCLOSE
TRACE_HDDOPEN
Usage:
Parameters:
Description:
Example:
Limits:
TRACE_HDDOPEN < FileName >
< FileName > The name of the file for storing trace data.
Use this command to open a trace file on the hard disk.
TRACE_HDDOPEN
TRACE_OFF
Usage:
Parameters:
Description:
Example:
Limits:
TRACE_OFF
None.
Use this command to turn tracing off.
TRACE_OFF
8214357 Rev 4 163/212
Testtool
TRACE_ON
Usage:
Parameters:
Description:
Example:
Limits:
TRACE_ON
None.
Use this command to turn tracing on.
TRACE_ON
TRACE_TEST
Usage:
Parameters:
Description:
Example:
Limits:
TRACE_TEST
None.
Use this command to perform a simple test for generating trace data.
TRACE_TEST
STAPI-SDK
TTX_INFO
Usage:
Parameters:
Description:
Example:
Limits:
TTX_START
Usage:
Parameters:
TTX_INFO
None.
This command displays the revision number of the TTX driver.
TTX_INFO
TTX_START < PlayID >< Pid >
Description:
Example:
Limits:
<
<
PlayID >
Pid >
The play ID, which is an integer starting from 0.
The PID by which the stream supplies teletext data.
Use this command to start teletext decode and display.
Call either PLAY_PROGRAM or PLAY_START before starting teletext. This requirement is due to retrieving demux connections for teletext. The platform must tap CVBS output in order to display teletext. It does not work on HDMI and COMPONENT outputs.
To start teletext on play 0 at PID 578 (decimal):
TTX_START 0 +578
Software: None.
Hardware: Occasionally the TV needs to be restarted to get teletext display ON.
164/212 8214357 Rev 4
STAPI-SDK
TTX_STOP
Usage:
Parameters:
Description:
Example:
Limits:
TTX_STOP < PlayID >
< PlayID > This is the play ID starting from 0 to N.
Use this command to stop teletext decode and display.
TTX_STOP 0
Software: None.
Hardware: None.
TUNER_INFO
Usage:
Parameters:
Description:
Example:
Limits:
TUNER_INFO
None.
This command displays the version number of the tuner driver.
TUNER_INFO
TUNER_LOOP
Usage:
Parameters:
TUNER_LOOP < Device > < Enable >
Description:
Example:
Limits:
<
<
Device >
Enable >
The identifier of the tuner device.
0: Disable loopthrough
1: Enable loopthrough.
Use this command to enable or disable loopthrough.
TUNER_LOOP 0 1
TUNER_SCAN
Usage:
Parameters:
TUNER_SCAN < Device > < Start > < End >
Description:
Example:
Limits:
<
<
<
Device >
Start >
End >
The identifier of the tuner device.
The start frequency in MHz.
The end frequency in MHz.
Use this command to perform frequency scanning.
TUNER_SCAN 0 10700 12750
8214357 Rev 4
Testtool
165/212
Testtool STAPI-SDK
TUNER_SENDDISEQCCMD
Usage:
Parameters:
TUNER_SENDDISEQCCCMD < Device > < DiseqCVer > < Length > < Command >
Description:
Example:
Limits:
<
<
<
<
Device >
DiseqCVer >
Length >
Command >
The identifier of the tuner device.
DiSEqC command version number, either DISQ_VER_1_2 or
DISQ_VER_2_0 .
The length of the command, in bytes, in the range 1 to 16.
The DiSEqC command
Use this command to send a DiSEqC command.
TUNER_SENDDISEQCCCMD 0
TUNER_STATUS
Usage:
Parameters:
Description:
Example:
Limits:
TUNER_STATUS < Id >
< Id > The identifier of the tuner device.
This command displays the status of the specified tuner.
TUNER_STATUS 0
TUNER_SWITCH
Usage:
Description:
Parameters:
TUNER_SWITCH < Device > < Satellite >
Use this command to switch between LNBs.
Example:
Limits:
< Device >
< Satellite >
TUNER_SWITCH
The identifier of the tuner device.
The identifier of the satellite.
166/212 8214357 Rev 4
STAPI-SDK Testtool
TUNER_TUNE
Usage: TUNER_TUNE < Device > < Freq > < SymbolRate > < Modulation > < FEC >
< Polarity > < FECType > < Pilot > < RollOff > < PLSIndex >
Parameters:
Description:
Example:
Limits:
<
<
<
<
<
<
<
<
<
<
Device >
Freq >
SymbolRate >
Modulation >
FEC >
Polarity >
FECType >
Pilot >
RollOff >
PLSIndex >
The identifier of the tuner device.
The required frequency, in MHz.
Satellite or cable.
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.
This is one of the following: FEC_A, FEC_B, FEC_C, FEC_ALL, or FEC_1_2 through to FEC_9_10.
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.
One of the following: DVBS1, DVBS2 or DTV.
Used for satellite tuners only.
This is the pilot flag, and is either 0 or 1.
Used for satellite tuners only.
One of the following: 20, 25 or 35
Used for satellite tuners only.
This is an integer in the range of 0 to 255.
Used for satellite tuners only.
Use this command to tune the tuner to a given frequency.
TUNER_TUNE 0 11776 6875 MOD_QPSK FEC_ALL POL_V DVBS1 0 20 127
8214357 Rev 4 167/212
Testtool STAPI-SDK
USB_KEYB
Usage:
Parameters:
Description:
Example:
Limits:
USB_INFO
Usage:
Parameters:
Description:
Example:
Limits:
USB_KEYB
None.
Use this command to check the USB keyboard and display errors, if any.
USB_KEYB
USB_INFO
None.
This command displays the USB driver version
USB_INFO
USB_MOUSE
Usage:
Parameters:
Description:
Example:
Limits:
USB_MOUSE
None.
Use this command to check the USB mouse and display details of the errors, if any.
USB_MOUSE
VID_BITMAP
Usage:
Parameters:
VID_BITMAP < Id > < Filename > < Layer >
Description:
Example:
Limits:
<
<
<
Id >
Filename >
Layer >
The identifier of the video decoder.
The .gam file to display.
The permitted layers are V_MAIN, V_AUX or V_REMOTE.
Use this command to display a .gam file in a video plane.
VID_BITMAP 0 "test.gam" V_MAIN
168/212 8214357 Rev 4
STAPI-SDK Testtool
VID_CLEAR
Usage:
Parameters:
VID_CLEAR < Id >
Description:
Example:
Limits:
< Id > The identifier of the video decoder.
Use this command to clear the video plane.
VID_CLEAR 0
VID_DISABLE
Usage:
Parameters:
VID_DISABLE < Id > < Layer >
Description:
Example:
Limits:
<
<
Id >
Layer >
The identifier of the video decoder.
The permitted layers are V_MAIN, V_AUX or V_REMOTE.
Use this command to disable the video plane.
VID_DISABLE 0 V_MAIN
VID_ENABLE
Usage:
Parameters:
VID_ENABLE < Id > < Layer >
Description:
Example:
Limits:
<
<
Id >
Layer >
The identifier of the video decoder.
The permitted layers are V_MAIN, V_AUX or V_REMOTE.
Use this command to enable the video plane.
VID_ENABLE 0 V_MAIN
VID_ERR
Usage:
Parameters:
VID_ERR < Id > < Mode >
Description:
Example:
Limits:
<
<
Id >
Mode >
The identifier of the video decoder.
The permitted error recovery modes are V_FULL, V_HIGH,
V_PARTIAL or V_NONE
Use this command to set the error recovery mode of the video decoder.
VID_ERR 0 V_FULL
8214357 Rev 4 169/212
Testtool STAPI-SDK
VID_GETDISPLAYPARAMS
Usage:
Parameters:
VID_GETDISPLAYPARAMS < Id > < Layer >
Description:
Example:
Limits:
<
<
Id >
Layer >
The identifier of the video decoder.
The permitted layers are V_MAIN, V_AUX or V_REMOTE.
Use this command to get the layer display parameters.
VID_GETDISPLAYPARAMS 0 V_MAIN
VID_INFO
Usage:
Parameters:
Description:
Example:
Limits:
VID_INFO
None.
This command provides information about the video driver.
VID_INFO
VID_INJSTART
Usage:
Parameters:
VID_INJSTART < Id > < FileName > < NbLoops > < StreamType > < Layer >
Description:
Example:
Limits:
<
<
Id >
FileName >
< NbLoops >
< StreamType >
< Layer >
The identifier of the video decoder.
This is the file to play
Loop the file this number of times.
One of either V_ES or V_PES.
The permitted layers are V_MAIN, V_AUX or V_REMOTE.
Use this command to play a video file as a video injection.
VID_INJSTART 0 "/videos/video.mpg" 2 V_ES V_MAIN
VID_INJSTOP
Usage:
Parameters:
VID_INJSTOP < Id >
Description:
Example:
Limits:
< Id > The identifier of the video decoder.
Use this command to stop a video injection.
VID_INJSTOP 0
170/212 8214357 Rev 4
STAPI-SDK Testtool
VID_PAUSE
Usage:
Parameters:
VID_PAUSE < Id >
Description:
Example:
Limits:
< Id > The identifier of the video decoder.
Use this command to pause the video.
VID_PAUSE 0
VID_RESUME
Usage:
Parameters:
VID_RESUME < Id >
Description:
Example:
Limits:
< Id > The identifier of the video decoder.
Use this command to resume the video after it has been paused.
VID_RESUME 0
VID_SETALPHA
Usage:
Parameters:
VID_SETALPHA < Id > < Alpha0 > < Alpha1 > < Layer>
Description:
Example:
Limits:
<
<
<
<
Id >
Alpha0 >
Alpha1 >
Layer >
The identifier of the video decoder. which is an integer starting from 0.
Alpha values for MAIN. Possible values are 0 to 128.
Alpha values for AUX. Possible values are 0 to 128.
Video layers. The expected values are:
V_MAIN , V_AUX or V_REMOTE
Set alpha values A0/A1 for video planes.
VID_SETALPHA 0 55 55 V_MAIN
8214357 Rev 4 171/212
Testtool STAPI-SDK
VID_SETFRAMERATE
Usage:
Parameters:
VID_SETFRAMERATE < Id > < On/Off >
Description:
Example:
Limits:
<
<
Id >
On/Off >
The identifier of the video decoder.
0: Disable frame rate conversion
1: Enable frame rate conversion.
Use this command to enable or disable frame rate conversion.
VID_SETFRAMERATE 0 1
VID_SETFORMAT
Usage:
Parameters:
VID_SETFORMAT < Id > < Layer > < Format >
Description:
Example:
Limits:
<
<
<
Id >
Layer >
Format >
The identifier of the video decoder.
The permitted layers are V_MAIN, V_AUX or V_REMOTE.
The permitted formats are V_AR_PANSCAN, V_AR_LBOX,
V_AR_COMBI or V_AR_NO.
Use this command to change the video aspect ratio.
VID_SETFORMAT 0 V_MAIN V_AR_LBOX
VID_SETFILTER
Usage:
Parameters:
VID_SETFILTER < Id > < Filter > < Layer >
Description:
Example:
Limits:
<
<
<
Id >
Filter >
Layer >
The identifier of the video decoder, which is an integer starting from 0.
The permitted filters are : V_F_LEGACY, V_F_SHARP,
V_F_MEDIUM or V_F_SMOOTH
The permitted formats are V_MAIN, V_AUX or V_REMOTE
Setup the VHSRC filter set.
VID_SETFILTER 0 V_MAIN
172/212 8214357 Rev 4
STAPI-SDK
VID_SETIQI
Usage:
Parameters:
VID_SETIQI < Id > < IQIFeature > < IQIMode > < Layer>
Description:
Example:
Limits:
Testtool
<
<
<
<
Id >
IQIFeature >
IQIMode >
Layer >
The identifier of the video decoder. which is an integer starting from 0.
The permitted filters are : V_IQI_LTI, V_IQI_CTI,
V_IQI_PEAKING , V_IQI_LE or V_IQI_DEMO
The permitted formats are V_IQI_DISABLE, V_IQI_SOFT,
V_IQI_MEDIUM or, V_IQI_STRONG
The permitted values are : V_MAIN, V_AUX or V_REMOTE
Setup the VHSRC filter set.
VID_SETIQI 0 V_IQI_LTI V_IQI_DISABLE V_MAIN
VID_SETMODE
Usage:
Parameters:
VID_SETMODE < Id > < Mode >
Description:
Example:
Limits:
<
<
Id >
Mode >
The identifier of the video decoder.
The permitted decoding picture modes are V_MODE_ALL,
V_MODE_I , V_MODE_IP or V_MODE_I_FIRST.
Use this command to set the decoding picture mode.
VID_SETMODE 0 V_MODE_ALL
VID_SETPOSTPROCESS
Usage:
Parameters:
VID_SETPOSTPROCESS < Id > < Mode > < Strength >
Description:
Example:
Limits:
<
<
<
Id >
Mode >
Strength >
The identifier of the video decoder.
The permitted decoding picture modes are V_PP_DEBLOCK or
V_PP_DERING
The permitted values for this parameter are : V_PP_DISABLE,
V_PP_MIN , V_PP_MED or V_PP_MAX
Use this command to set the decoding picture mode.
VID_SETPOSTPROCESS 0 V_MODE_ALL
8214357 Rev 4 173/212
Testtool STAPI-SDK
VID_SETSPEED
Usage:
Parameters:
VID_SETSPEED < Id > < Speed >
Description:
Example:
Limits:
<
<
Id >
Speed >
The identifier of the video decoder.
This is the speed to set, in the range of -3000 to 3000.
Use this command to change the video speed.
VID_SETSPEED 0 2000
VID_SETWINAUTO
Usage:
Parameters:
VID_SETWINAUTO < Id > < Layer >
Description:
Example:
Limits:
<
<
Id >
Layer >
The identifier of the video decoder.
The permitted layers are V_MAIN, V_AUX or V_REMOTE.
Use this command to set up a window in automatic mode.
VID_SETWINAUTO 0 V_MAIN
VID_SETWINDOW
Usage: VID_SETWINDOW < Id > < InX > < InY > < InWidth > < InHeight > < OutX >
< OutY > < OutWidth > < OutHeight > < Layer >
Parameters:
Description:
Example:
Limits:
<
<
Id >
InX >
< InY >
< InWidth >
< InHeight >
< OutX >
< OutY >
< OutWidth >
< OutHeight >
< Layer >
The identifier of the video decoder.
The X co-ordinate of the corner of the input window.
The Y co-ordinate of the corner of the input window.
The width of the input window, in pixels.
The height of the input window, in pixels.
The X co-ordinate of the corner of the output window.
The Y co-ordinate of the corner of the output window.
The width of the output window, in pixels.
The height of the output window, in pixels.
The permitted layers are V_MAIN, V_AUX or V_REMOTE.
Use this command to set the parameters of a video window.
VID_SETWINDOW 0
174/212 8214357 Rev 4
STAPI-SDK
VID_STATUS
Usage:
Parameters:
VID_STATUS < Id > < Reset >
Description:
Example:
Limits:
<
<
Id >
Reset >
The identifier of the video decoder.
0: Do not reset the statistics.
1: Reset the statistics.
Use this command to get the status of the video decoder identified by < Id > .
VID_STATUS 0 1
VID_STEP
Usage:
Parameters:
VID_STEP <Id>
Description:
Example:
Limits:
< Id > The identifier of the video decoder.
Use this command to decode the next picture in the stream.
VID_STEP 0
VID_SYNCHRO
Usage:
Parameters:
VID_SYNCHRO <Id> <On/Off>
Description:
Example:
Limits:
<
<
Id >
On/Off >
The identifier of the video decoder.
0: Disable video synchronization
1: Enable video synchronization.
Use this command to enable or disable video synchronization.
VID_SYNCHRO 0 1
Testtool
8214357 Rev 4 175/212
Testtool STAPI-SDK
8.3.41 Video capture commands
VIN_CLOSE
Usage:
Parameters:
VIN_CLOSE < Id >
Description:
Example:
Limits:
< Id > This is the identifier for the video capture, which is an integer starting from 0.
Use this command to close a video capture.
VIN_CLOSE 0
VIN_DISABLE
Usage:
Parameters:
VIN_DISABLE < Id >
Description:
Example:
Limits:
< Id > This is the identifier for the video capture, which is an integer starting from 0.
Use this command to disable video capture.
VIN_DISABLE 0
VIN_ENABLE
Usage:
Parameters:
VIN_ENABLE < Id >
Description:
Example:
Limits:
< Id > This is the identifier for the video capture, which is an integer starting from 0.
Use this command to enable video capture.
VIN_ENABLE 0
VIN_INFO
Usage:
Parameters:
Description:
Example:
Limits:
VIN_INFO
None.
This command provides the revision number of the driver.
VIN_INFO
176/212 8214357 Rev 4
STAPI-SDK Testtool
VIN_OPEN
Usage:
Parameters:
VIN_OPEN < Id > < SrcName > < DstName >
<
<
<
Id >
SrcName >
DstName >
This is the identifier for the video capture, which is an integer starting from 0.
The source device, which is one of the following: "MAIN",
"AUX" , "REMOTE", "EXT0", "EXT1" or "EXT2".
The destination device, which is one of the following: "MAIN",
"AUX" , "REMOTE", "GFX0", "GFX1" or "GFX2".
Use this command to open a digital video capture stream.
VIN_OPEN 0
Description:
Example:
Limits:
VIN_PAUSE
Usage:
Parameters:
VIN_PAUSE < Id >
Description:
Example:
Limits:
< Id > This is the identifier for the video capture, which is an integer starting from 0.
Use this command to pause video capture.
VIN_PAUSE 0
VIN_RESUME
Usage:
Parameters:
VIN_RESUME < Id >
Description:
Example:
Limits:
< Id > This is the identifier for the video capture, which is an integer starting from 0.
Use this command to resume video capture that is currently paused.
VIN_RESUME 0
8214357 Rev 4 177/212
Testtool STAPI-SDK
VIN_SETWINDOW
Usage: VIN_SETWINDOW < Id > < InX > < InY > < InWidth > < InHeight > < OutX >
< OutY > < OutWidth > < OutHeight >
Parameters:
<
<
<
<
<
<
<
<
<
Id >
InX >
InY >
InWidth >
InHeight >
OutX >
OutY >
OutWidth >
OutHeight >
This is the identifier for the video capture, which is an integer starting from 0.
The X co-ordinate of the corner of the input window.
The Y co-ordinate of the corner of the input window.
The width of the input window, in pixels.
The height of the input window, in pixels.
The X co-ordinate of the corner of the output window.
The Y co-ordinate of the corner of the output window.
The width of the output window, in pixels.
The height of the output window, in pixels.
Use this command to set the size of a digital video capture.
Description:
Example:
Limits:
8.3.42 Video mixer commands
VMIX_DISABLE
Usage:
Parameters:
VMIX_DISABLE < Id >
Description:
Example:
Limits:
< Id > The VMIX device identifier, which is an integer starting from 0.
Use this command to disable the mixer identified by < Id > .
VMIX_DISABLE 0
Software: None.
Hardware: None.
VMIX_ENABLE
Usage:
Parameters:
VMIX_ENABLE < Id >
Description:
Example:
Limits:
< Id > The VMIX device identifier, which is an integer starting from 0.
Use this command to enable the mixer identified by < Id > .
VMIX_ENABLE 0
Software: None.
Hardware: None.
178/212 8214357 Rev 4
STAPI-SDK Testtool
VMIX_GETBKCOLOR
Usage:
Parameters:
MIX_GETBKCOLOR < Id >
Description:
Example:
Limits:
< Id > The VMIX device identifier, which is an integer starting from 0.
Use this command to get the background color specified by a combination of red, green and blue values.
VMIX_GETBKGROUND 0
Software: None.
Hardware: None.
VMIX_GETCAPABILITY
Usage:
Parameters:
VMIX_GETCAPABILITY < Id >
Description:
Example:
Limits:
< Id > The VMIX device identifier, which is an integer starting from 0.
This command displays details of the capabilities of the mixer identified by < Id >.
VMIX_GETCAPABILITY 0
Software: None.
Hardware: None.
VMIX_GETPLANES
Usage:
Parameters:
VMIX_GETPLANES < Id >
Description:
Example:
Limits:
< Id > The VMIX device identifier, which is an integer starting from 0.
Use this command to display planes connected to the mixer.
VMIX_GETPLANES 0
Software: None.
Hardware: None.
8214357 Rev 4 179/212
Testtool STAPI-SDK
VMIX_GETCONNLAYER
Usage:
Parameters:
VMIX_GETCONNLAYER < Id > < Position >
Description:
Example:
Limits:
< Id >
< Position >
The VMIX device identifier, which is an integer starting from 0.
Use this command to retrieve the layer connected to VMID < Id > at < Position > .
VMIX_GETCONNLAYER 0 1
Software: None.
Hardware: None.
VMIX_INFO
Usage:
Parameters:
Description:
Example:
Limits:
VMIX_INFO
None.
This command displays the version number of the VMIX driver.
VMIX_INFO
Software: None.
Hardware: None.
VMIX_SETASPECTRATIO
Usage:
Parameters:
VMIX_SETASPECTRATIO < ID > < AspectRatio >
Description:
Example:
Limits:
<
<
Id >
AspectRatio >
The VMIX device identifier, which is an integer starting from 0.
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.
Use this command to set the aspect ratio of the VMIX device < Id > .
VMIX_SETASPECTRATIO 0 M_AR_16TO9
Software: None.
Hardware: None.
180/212 8214357 Rev 4
STAPI-SDK Testtool
VMIX_SETBKCOLOR
Usage:
Parameters:
VMIX_SETBKCOLOR < Id > <R> < G > < B >
Description:
Example:
Limits:
<
<
<
<
<
Device >
R >
G >
B >
Enable >
This is the VMIX device identifier, which is an integer starting from 0.
Value for color Red.
Value for color Green.
Value for color Blue.
0: Disable the display of background plane.
1: Enable the display of the background plane.
Use this command to set background color specified by values of red, green and blue.
VMIX_SETBKGROUND 0 +100 0 0
Software: None.
Hardware: None.
VMIX_SETOFFSET
Usage:
Description:
Parameters:
VMIX_SETOFFSET < Id > < XPos > < YPos >
Use this command to set an offset for the mixer identified by < Id >.
< Id >
< XPos >
< YPos >
This is the VMIX device identifier, which is an integer starting from 0.
Apply this offset to the X axis. This is a value in the range -128 to +127.
Apply this offset to the Y axis. This is a value in the range -128 to +127.
Example:
Limits:
VMIX_SETOFFSET
Software: None.
Hardware: None.
8214357 Rev 4 181/212
Testtool STAPI-SDK
VMIX_SETPLANES
Usage:
Description:
Parameters:
VMIX_SETPLANES < Id > < Plane1 > < Plane2 >
Use this command to connect planes in a given order
< Id >
< Plane1 >
< Plane2 >
This is the VMIX device identifier, which is an integer starting from 0.
The permitted values are: M_PLANE_GFX0, M_PLANE_GFX1,
M_PLANE_GFX2 , M_PLANE_GFX3. M_PLANE_VID0,
M_PLANE_VID1 , M_PLANE_VID2, M_PLANE_VID3,
M_PLANE_VIDV0 , M_PLANE_VIDV1, M_PLANE_CUR0 or
M_PLANE_CUR1
The permitted values are: M_PLANE_GFX0, M_PLANE_GFX1,
M_PLANE_GFX2 , M_PLANE_GFX3, M_PLANE_VID0,
M_PLANE_VID1 , M_PLANE_VID2, M_PLANE_VID3,
M_PLANE_VIDV0 , M_PLANE_VIDV1, M_PLANE_CUR0 or
M_PLANE_CUR1
Example:
Limits:
VMIX_SETPLANES 0 M_PLANE_GFX0 M_PLANE_GFX1
Software: None.
Hardware: None.
VMIX_SETMIXERMAINTODENC
Usage:
Description:
VMIX_SETMIXERMAINTODENC < Id >
Use this command to disable or enable the main to DENC data path when VTG MAIN is SD.
Parameters:
Example:
Limits:
< Id > This is the VMIX device identifier, which is an integer starting from 0.
VMIX_SETMIXERMAINTODENC 0
Software: None.
Hardware: None.
182/212 8214357 Rev 4
STAPI-SDK Testtool
VOUT_DISABLE
Usage:
Description:
Parameters:
Example:
Limits:
VOUT_DISABLE < Id >
Use this command to disable the video out (VOUT) stage.
< Id > This is the identifier for VOUT, which is an integer starting from 0.
VOUT_DISABLE 0
VOUT_ENABLE
Usage:
Description:
Parameters:
Example:
Limits:
VOUT_ENABLE < Id >
Use this command to enable the video out (VOUT) stage.
< Id > This is the identifier for VOUT, which is an integer starting from 0.
VOUT_ENABLE 0
VOUT_INFO
Usage:
Description:
Parameters:
Example:
Limits:
VOUT_INFO
This command displays the version of the video out (VOUT) driver.
None.
VOUT_INFO
Software: None.
Hardware: None.
VOUT_GETCAPABILITY
Usage:
Description:
Parameters:
Example:
Limits:
VOUT_GETCAPABILITY < Id >
Use this command to return details of the video out (VOUT) capabilities.
< Id > This is the identifier for VOUT, which is an integer starting from 0.
VOUT_GETCAPABILITY 0
VOUT_GETSYNCCALIB
Usage:
Description:
Parameters:
Example:
Limits:
VOUT_GETSYNCCALIB < Id >
Use this command to get the current analog synchronization calibration value.
< Id > This is the identifier for VOUT, which is an integer starting from 0.
VOUT_GETSYNCCALIB 0
8214357 Rev 4 183/212
Testtool STAPI-SDK
VOUT_SETBCS
Usage:
Description:
VOUT_SETBCS < Id > < Brightness > < Contrast > < Saturation >
Use this command to set the brightness, contrast and saturation values for the video out (VOUT) stage.
Parameters:
Example:
Limits:
<
<
<
<
Id >
Brightness >
Contrast >
Saturation >
This is the identifier for VOUT, which is an integer starting from
0.
This is the brightness level, where 0 is the lowest level and
128 is the highest.
This is the contrast level, where 0 is the lowest level and 128 is the highest.
This is the saturation level, where 0 is the lowest level and 128 is the highest.
VOUT_SETBCS 64 64 64
VOUT_SETSYNCCALIB
Usage:
Description:
Parameters:
VOUT_SETSYNCCALIB < Id > < Scaling Factor > < Offset Value >
Use this command to adjust the analog synchronization calibration
Example:
Limits:
< Id > This is the identifier for VOUT, which is an integer starting from
0.
< Scaling factor > [Y] : For scaling factor Y
[Cb] : For scaling factor Cb
[Cr] : For scaling factor Cr
< Offset Value > [Y] : offset value of Y
[Cb] : Offset value of Cb
[Cr] : Offset value of Cr
VOUT_SETSYNCCALIB 0 <Scaling Factor> <Offset Value>
184/212 8214357 Rev 4
STAPI-SDK Testtool
8.3.44 Video timing generator (VTG) commands
VTG_INFO
Usage:
Parameters:
Description:
Example:
Limits:
VTG_INFO
None.
This command displays the version number of the VTG driver.
VTG_INFO
Software: None.
Hardware: None.
VTG_SETMODE
Usage:
Parameters:
VTG_SETMODE < VtgId > < Mode >
Description:
Example:
< VtgId >
< Mode >
0: Main
1: Auxiliary
2: Remote.
This parameter is the timing mode to set. See
Table 8
list of timing modes
Use this command to change the VTG timing mode.
VTG_SETMODE 0 +5
VTG_GETMODE
Usage:
Parameters:
VTG_GETMODE < VtgId >
Description:
Example:
< VtgId > 0: Main
1: Auxiliary
2: Remote.
Use this command to change the VTG timing mode.
VTG_GETMODE 0
8214357 Rev 4 185/212
Testtool STAPI-SDK
Table 8.
User Code
List of timing modes accepted by VTG_SETMODE command
<Mode> parameter Timing mode
13
14
15
16
9
10
11
12
7
8
5
6
3
4
1
2
17
18
19
20
21
22
23
28
29
30
31
24
25
26
27
32
33
STVTG_TIMING_MODE_480I60000_13514
STVTG_TIMING_MODE_480P60000_27027
STVTG_TIMING_MODE_480P30000_13514
STVTG_TIMING_MODE_480P24000_10811
STVTG_TIMING_MODE_480I59940_13500
STVTG_TIMING_MODE_480P59940_27000
STVTG_TIMING_MODE_480P29970_13500
STVTG_TIMING_MODE_480P23976_10800
STVTG_TIMING_MODE_480I60000_12285
STVTG_TIMING_MODE_480P60000_24570
STVTG_TIMING_MODE_480P30000_12285
STVTG_TIMING_MODE_480P24000_9828
STVTG_TIMING_MODE_480I59940_12273
STVTG_TIMING_MODE_480P59940_24545
STVTG_TIMING_MODE_480P29970_12273
STVTG_TIMING_MODE_480P23976_9818
STVTG_TIMING_MODE_576I50000_13500
STVTG_TIMING_MODE_576I50000_14750
STVTG_TIMING_MODE_1080P60000_148500
STVTG_TIMING_MODE_1080P59940_148352
STVTG_TIMING_MODE_1080P50000_148500
STVTG_TIMING_MODE_1080I60000_74250
STVTG_TIMING_MODE_1080I59940_74176
STVTG_TIMING_MODE_1080I50000_74250
STVTG_TIMING_MODE_1080I50000_74250_1
STVTG_TIMING_MODE_1080P30000_74250
STVTG_TIMING_MODE_1080P29970_74176
STVTG_TIMING_MODE_1080P25000_74250
STVTG_TIMING_MODE_1080P24000_74250
STVTG_TIMING_MODE_1080P23976_74176
STVTG_TIMING_MODE_1035I60000_74250
STVTG_TIMING_MODE_1035I59940_74176
STVTG_TIMING_MODE_720P60000_74250
NTSC 60Hz
ATSC 60P
ATSC 30P
ATSC 24P
NTSC PAL M
ATSC 60P/1.001
ATSC 30P/1.001
ATSC 24P/1.001
NTSC 60Hz square
ATSC 60P square
ATSC 30P square
ATSC 24P square
NTSC square, PAL M square
ATSC 60P/1.001 square
ATSC 30P/1.001 square
ATSC 24P/1.001 square
PAL B,D,G,H,I,N,SECAM
PAL B,D,G,H,I,N,SECAM square
SMPTE 274M #1 P60
SMPTE 274M #2 P60/1.001
SMPTE 274M #3 P50
EIA770.3 #3 I60 (or SMPTE274M #4 I60)
EIA770.3 #4 I60/1.001 (or SMPTE274M #5
I60/1.001)
SMPTE 295M #2 I50
SMPTE 274M I50
SMPTE 274M #7 P30
SMPTE 274M #8 P30/1.001
SMPTE 274M #9 P25
SMPTE 274M #10 P24
SMPTE 274M #11 P24/1.001
SMPTE 240M #1 I60
SMPTE 240M #2 I60/1.001
EIA770.3 #1 P60 = SMPTE 296M #1 P60
186/212 8214357 Rev 4
STAPI-SDK Testtool
47
48
49
50
43
44
45
46
39
40
41
42
35
36
37
38
55
56
57
58
51
52
53
54
Table 8.
User Code
List of timing modes accepted by VTG_SETMODE command (continued)
<Mode> parameter Timing mode
34 STVTG_TIMING_MODE_720P59940_74176
STVTG_TIMING_MODE_720P30000_37125
STVTG_TIMING_MODE_720P29970_37088
STVTG_TIMING_MODE_720P24000_29700
STVTG_TIMING_MODE_720P23976_29670
EIA770.3 #2 P60/1.001 = SMPTE 296M #2
P60/1.001
ATSC 720x1280 30P
ATSC 720x1280 30P/1.001
ATSC 720x1280 24P
ATSC 720x1280 24P/1.001
AS 4933-1 200x 1080i(1250) STVTG_TIMING_MODE_1080I50000_72000
STVTG_TIMING_MODE_720P50000_74250
STVTG_TIMING_MODE_576P50000_27000
STVTG_TIMING_MODE_1152I50000_48000
Australian mode
STVTG_TIMING_MODE_480P60000_25200
STVTG_TIMING_MODE_480P59940_25175
VGA mode
VGA mode
STVTG_TIMING_MODE_768P75000_78750
STVTG_TIMING_MODE_768P60000_65000
VGA mode
VGA mode
VGA mode STVTG_TIMING_MODE_768P85000_94500
STVTG_TIMING_MODE_480P60000_25250 VGA mode
STVTG_TIMING_MODE_480P50000_21042 VGA mode
STVTG_TIMING_MODE_2880_480I59940_13500 2880x480I59.94 - pixel repeat = 4
STVTG_TIMING_MODE_2880_480I60000_13514 2880x480I60 - pixel repeat = 4
STVTG_TIMING_MODE_2880_480P59940_27000 2880x480P59.94 - pixel repeat = 4
STVTG_TIMING_MODE_2880_480P60000_27027 2880x480P60 - pixel repeat = 4
STVTG_TIMING_MODE_2880_240P59940_13500 2880x240P59.94 - pixel repeat = 4
STVTG_TIMING_MODE_2880_240P60000_13514 2880x240P60 - pixel repeat = 4
STVTG_TIMING_MODE_2880_576I50000_13500 2880x576I50 - pixel repeat = 4
STVTG_TIMING_MODE_2880_288P50000_13500 2880x288P50 - pixel repeat = 4
STVTG_TIMING_MODE_2880_576P50000_27000 2880x576P50 - pixel repeat = 4
8214357 Rev 4 187/212
Testtool STAPI-SDK
8.4.1
Note:
8.4.2
This section describes many of the most common testtool commands that an application developer is likely to need when testing the software and the board upon which it is running.
Displaying the denc colorbar
To enable the colorbar:
ST_xxxx> DENC_COLORBAR 0 1
To disable the colorbar:
ST_xxxx> DENC_COLORBAR 0 0
The colorbar is displayed on the denc output. That means for systems such as STi7100 or
STi7109 using the display HD configuration ( DVD_DISPLAY_HD = 1 ), the colorbar is displayed only on the auxiliary display. For SD systems only (such as STi5100, STi5105,
STi5300 or STi5528), the colorbar is always available on the TV SCART.
Displaying a graphic plane
●
●
Depending upon the SoC in use, it is possible to have either one or two graphics planes. On the STi7100, STi7109, STi7111, STi7200 or STi7710 SoCs, for example, the display HD configuration (with the setting DVD_DISPLAY_HD = 1) has two graphics planes: one in high definition on the main output (either HDMI or YPrPb) and one in standard definition on the auxiliary output (SCART CVBS or RGB). When using the testtool commands, use the ID parameter to select one or other of the two graphic planes:
0: main graphic plane
1: auxiliary graphic plane
Therefore, to enable the main graphic plane, use the command:
ST_xxxx> GFX_ENABLE 0
To disable the main graphic plane:
ST_xxxx> GFX_DISABLE 0
For the auxiliary graphic plane, replace the 0 with a 1.
For SD systems only (such as STi5100, STi5105, STi5300 or STi5528) there is only one graphic plane. This has an ID parameter of 0.
By default, the the graphic planes are not initialized, which means that when a graphic plane is first enabled it may contain random data, causing “garbage” to appear on the screen. This can be overcome by using the BLIT_FILL command. The following example fills graphic plane 0 with a random colored rectangle:
ST_xxxx> BLIT_FILL 0
188/212 8214357 Rev 4
STAPI-SDK Testtool
8.4.3 Decoding a video stream from memory
As the graphic plane always lies in front of the video layer, the first step is to remove the graphic plane with the GFX_DISABLE command. (See
Section 8.4.2
)
Depending upon the board, the SoC and the amount of memory in use, it is possible to have up to two instances of any video decoder. This means that it is possible for an SoC to support two instances of MPEG2 decoder, two instances of H264 decoder and two instances of DivX decoder. Each instance is referenced by its own unique ID number.
The following command to start running a video from an MPEG file works on all systems:
ST_xxxx> VID_INJSTART 0 "files/susie_es.mp1" 0 V_ES
ST_xxxx> VID_ENABLE 0
Use the following command to stop the video:
ST_xxxx> VID_INJSTOP 0
On STi7100 and STi7109, the video instance with the ID of 1 is currently dedicated to H264 decoding, so on these SoCs, it is possible to decode H264 streams from memory using the commands:
ST_xxxx> VID_INJSTART 1 "files/teksoccer_pes.mp4" 0 V_PES
ST_xxxx> VID_ENABLE 1
Note: 1 This method works for both SD and HD streams. You can also play ES or PES streams from the local hard disk drives (SATA, USB or ATAPI). For this usage, first mount some file system partitions (see the testtool commands
FS_FDISK on page 109
FS_MOUNT on page 111
).
2 To play the transport stream, use the testtool command PLAY_START .
8.4.4
Note:
Decoding an audio stream from memory
As with video, it is possible to play audio from memory. The following command works on all the platforms:
ST_xxxx> AUD_INJSTART 0 0 "files/piano_sample.mp1" 0 A_MP1 +44100
A_ES
ST_xxxx> AUD_ENABLE 0
In order to stop the audio, use the command:
ST_xxxx> AUD_INJSTOP 0 0
Depending upon the capabilities of the system in use, it is possible to play MP2, MP3, AC3 and AAC format files. The stream originates on the host hard disk drive, the USB, SATA or
ATAPI local hard disk drive or an USB key.
8214357 Rev 4 189/212
Testtool STAPI-SDK
8.4.6
Currently, STAPI-SDK supports two types of transcoding: HEAAC-DTS and HEAAC-DD.
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_enc
3. Finally, start audio decoding with an appropriate AUD_INJSTART command:
ST_xxxx> AUD_INJSTART 0 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_ENC
3. Finally, start audio decoding with an appropriate AUD_INJSTART command:
ST_xxxx> AUD_INJSTART 0 0 "thetest.loas" 0 A_HEAAC +48000 A_ES
Tuning the demodulator
To receive a broadcast channel, use one of the following commands:
● For terrestrial reception:
ST_xxxx> TUNER_TUNE 0 +474 MOD_64QAM FEC_2_3
● For satellite reception:
ST_xxxx> TUNER_TUNE 0 +11034 +27500 MOD_QPSK FEC_3_4 POL_V
● For cable reception:
ST_xxxx> TUNER_TUNE 0 +706 +6875 MOD_64QAM
You can check the status of the demodulator with the following command:
ST_xxxx> TUNER_STA 0
190/212 8214357 Rev 4
STAPI-SDK
8.4.7
8.4.8
Testtool
Getting the classical DVB-SI information
Testtool is able to provide PAT, PMT, SDT and NIT information. This is achieved with the following set of commands. For example, to display the service description table, use the command:
ST_xxxx> TABLE_SDT 0
Extract a summary of the program map table with the command:
ST_xxxx> TABLE_PMT 0
To extract the full details of the PMT (including the descriptor), use the command:
ST_xxxx> TABLE_PMT 0 1
To extract all the details of the PMT from a .trp file, use the command:
ST_xxxx> TABLE_PMT "/ATA00/stream.trp" 1
Decoding a live channel
There are two methods available to decode a live channel. The simplest is to use the program ID, as in the following testtool command:
ST_xxxx> PLAY_PROG 0 "0" #< programID >
The < programID > parameter can be found in the service description table. For this case, it is not necessary to enter the PIDs. Instead, the software locates the first entry of a video
PID, an audio PID and a PCR PID. When these are found, playback starts automatically.
The second method is by specifying all the PIDs. To do that, use the following testtool command:
ST_xxxx> PLAY_START 0 “0” P_H264 #< pid > P_MP2A #< pid > P_PCR #< pid > P_END
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
8214357 Rev 4 191/212
Testtool STAPI-SDK
8.4.9 Decoding a transport stream file
The first step is to mount the partition where the stream is stored. If this is the ATAPI or SATA interface, use the commands:
ST_xxxx> FS_MOUNT "ATA0" "/volume0" "r"
ST_xxxx> FS_DIR "/ATA00"
The command to play a file stream is similar to the command to play a live stream, except that you replace the string “0” by the name of the file. For example :
ST_xxxx> PLAY_START 0 "/ATA00/astrahd.trp" P_H264 #200 P_END
This command plays the video PID, which in this case is an H264 stream (as shown by the
P_H264 tag).
The following commands play a stream from a USB hard disk drive:
ST_xxxx> FS_MOUNT "/usb/hdisk0" "/volume0" "r"
ST_xxxx> FS_DIR "/USBHDISK00"
ST_xxxx> PLAY_START 0 "/USHBDISK00/astrahd.trp" P_H264 #200 P_END
If the stream is on a USB key, the commands are:
ST_xxxx> FS_MOUNT "/usb/rdisk0" "/volume0" "r"
ST_xxxx> FS_DIR "/USBRDISK00"
ST_xxxx> PLAY_START 0 "/USHRDISK00/astrahd.trp" P_H264 #200 P_END
The USB key version mounts the drive "/usb/rdisk0" instead of "/usb/hdisk0".
8.4.10 Decoding and recording a live IP unicast/multicast stream
1.
The first step is to configure your IP settings. Use the IP_CONFIG command to list the current settings, as follows:
ST_xxxx> IP_CONFIG 0
IP Address : 192.168.1.50
Netmask : 255.255.255.0
Gateway : 192.168.1.254
MAC Address : 00:FA:E0:00:FA:E0
2. You can now change the IP settings with the same command, adding the new settings
(IP Address, Netmask and Gateway in that order) as parameters:
ST_xxxx> IP_CONFIG 0 "164.129.62.12" "255.255.254.0" "164.129.62.1"
IP Address : 164.129.62.12
Netmask : 255.255.254.0
Gateway : 164.129.62.1
MAC Address : 00:FA:E0:00:FA:E0
3. To check that the connection is working correctly, use IP_PING:
ST_xxxx> IP_PING 0 "164.129.62.1"
4. Next, create an IP stream connection. Testtool allows the creation of up to four IP connections in parallel. The following example creates a connection called “IP0”, which collects all video packets on the 1234 port.
ST_xxxx> IP_STREAM 0 "IP0" "udp://224.10.1.1:1234" "r"
The following example creates an “IP0” connection which collects all multicast packets from the 224.10.1.1:5555 server.
192/212 8214357 Rev 4
STAPI-SDK Testtool
ST_xxxx> IP_STREAM 0 "IP0" "udp://224.10.1.1:5555" "r"
Replace “udp” with “rtp” if the server sends RTP packets instead of UDP packets.
The final “r” parameter indicates that this stream connection is a source and not a destination. Replace the “r” with “w” to broadcast the live channel over ethernet.
5. To play back the IP stream, use the command:
ST_xxxx> PLAY_START 0 "IP0" P_H264 #44 P_MP1A #45 P_END
Use the REC_START command to record the stream instead of playing it, as follows:
ST_xxxx> REC_START 0 "IP0" "/ATA00/stream.trp" P_H264 #44 P_MP1A #45 P_END
8.4.11 Broadcasting a live or file transport stream over IP (unicast only)
1.
Configure the IP settings for the broadcast, as described in
Section 8.4.10: Decoding and recording a live IP unicast/multicast stream on page 192
2. Create an IP connection to broadcast your stream:
ST_xxxx> ip_stream 0 "IP0" "udp://164.129.62.25:1234" "w"
3. At this stage, the receiver (164.129.62.25:1234 in this example) needs to be ready to playback the stream. It is possible to use the VLC media player for this.
At this point there are two alternatives, to either broadcast a live stream or a file stream. For both alternatives, use the REC_START command. For a live stream, use a set of parameters such as the following to specify the PIDs:
Note:
ST_xxxx> rec_start 0 “0” IP0” 0 P_MP2V #100 P_MP1A #101 P_PID #0 P_PID #22 P_END
To broadcast a file, use a set of parameters to specify the file:
ST_xxxx> rec_start 0 “/ATA00/stream.trp” IP0” 0 P_PCR #100 P_END
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.
8.4.12 Decoding a DirecTV stream
Basic DirecTV support on top of the standard STAPI-SDK release requires a DirecTV enabled STPTI driver and (for A3 support) the ADV variant of STTUNER drivers. These drivers are not part of the standard release, but are provided to the licensed user on request.
To switch mode from default DVB to DirecTV, set the following environment variables:
Set DVD_SERVICE = DIRECTV
Set DVD_FRONTEND_TUNER = NONE
Set TUNER_VARIANT = ADV
Set the packet size on the packet injector to 130 bytes and then execute the testtool command to play the stream. An example of a suitable command is given below:
PLAY_START 0 "0" P_MP2V #78 P_MP2A #79 P_PCR #78 P_END
The following commands give an example of how to decode the stream from the tuner.
TUNER_TUNE 0 +11250 +20000 MOD_QPSK FEC_6_7 POL_V DVBS1
PLAY_START 0 "1" P_MP2V #78 P_MP2A #79 P_PCR #78 P_END
8214357 Rev 4 193/212
Testtool STAPI-SDK
8.4.13 Decoding an A3 stream
Basic DirecTV support on top of the standard STAPI-SDK release requires a DirecTV enabled STPTI driver and (for A3 support) the ADV variant of STTUNER drivers. These drivers are not part of the standard release, but are provided to the licensed user on request.
Set the environment variables to change the default service mode from DVB to A3.
Note:
Set DVD_SERVICE = A3
Set TUNER_VARIANT = ADV
Compile the STAPI-SDK code, as described in
Chapter 2 on page 14
or (for Linux) in
Chapter 3 on page 25
Play the A3 stream through the packet injector.
Set the packet size on the packet injector to 188 bytes and then execute the testtool command to play the stream. An example of a suitable command is given below:
PLAY_START 0 "0" P_H264 #1010 P_AC3 #1012 P_PCR #1010 P_END
●
●
●
The following commands give an example of how to decode the stream from the tuner. First, configure the modulator as follows: modulation mod: DVB-S2 special setting: On
PL scrambling sequence id: 2 (This is a value between 0 and 255)
To select the stream and play it, execute the following commands from the testtool prompt :
TUNER_TUNE 0 +11250 +20000 MOD_QPSK FEC_2_3 POL_V DVBS2 0 2
PLAY_START 0 "1" P_H264 #1010 P_AC3 #1012 P_PCR #1010 P_END
The PL scrambling sequence ID matches with the PLXIndex of the TUNER_TUNE command
Testtool includes commands for decoding teletext (VBI mode). The following sequence of commands decodes a program on path 0 and then decodes teletext on PID 578 (decimal):
Testtool> PLAY_PROG 0 "0" 1
Testtool> TTX_START 0 +578
To stop teletext:
Testtool> TTX_STOP
Use the following command to decode teletext on path 1:
Testtool> TTX_START 1 +578
Note: 1 Teletext must always be stopped before restarting as only a single instance is supported.
2 Teletext output is captured on CVBS output.
194/212 8214357 Rev 4
STAPI-SDK Testtool
Testtool includes commands for decoding subtitles. The following sequence of commands decodes a program on path 0 and then decodes the subtitles on PID 578 (decimal):
Testtool> PLAY_PROG 0 "0" 1
Testtool> SUBT_START 0 0 +578
Testtool> SUBT_ENABLE 0
Testtool> GFX_ENABLE 0
To stop subtitles:
Testtool> SUBT_STOP
Use the following command to display subtitles on AUX
Testtool> SUBT_START 0 1 +578
Testtool> SUBT_ENABLE 0
Testtool> GFX_ENABLE 1
8.4.16 Using the HD/SD capture features
To perform the High Definition or Standard Definition capture, perform following command sequence :
To open a digital video capture :
Testtool> VIN_OPEN 0 "MAIN" "AUX"
Testtool> VIN_ENABLE 0
Testtool> GFX_ENABLE 0
Testtool> VIN_CLOSE 0
8.4.17 Using low power mode operation
Editing a profile
This powerful feature of the latest power design allows you to customize the power profile state of different components in the system. The advantages of this feature become apparent in cases when a component must be kept active even when the system is on standby; for example, to get the service date, the TUNER0 must remain alive even if the rest of the system enters standby.
This is achievable by editing the various existing power profiles to suit your requirements.
For example, to modify Profile 2 so that I2C0 and TUNER0 do not enter active standby mode when Profile 3 (active standby) is selected, use the following testtool commands:
POWER_SETPROFILE 0 2 "I2C0" PM_NORMAL
POWER_SETPROFILE 0 2 "TUNER0" PM_NORMAL
Now, when you select profile 3, all components enter active standby except for I2C0 and
TUNER0 .
Similarly, you can choose to put a device in standby when the system enters normal mode.
This is done as follows:
POWER_SETPROFILE 0 0 "I2C0" PM_ACTIVESTANDBY
8214357 Rev 4 195/212
Testtool
Note:
STAPI-SDK
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.
Retrieving profile details
To retrieve information on the present state of the system, enter the POWER_GETPROFILE command at the testtool prompt without any additional parameters, as follows:
POWER_GETPROFILE
To retrieve information about other profiles, add the relevant parameters. For example, the following command displays information relating to power profile 2:
POWER_GETPROFILE 0 2
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.
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.
196/212 c.
Details of front panel key use will be published in the next release.
8214357 Rev 4
STAPI-SDK Testtool
8.4.18 2D Grafix use case using Directfb
Note:
●
●
●
●
●
●
●
●
●
●
To test user interaction using the IMPS/2 mouse interface and perform the following graphic operations: draw a line draw a rectangle draw a triangle rotate an image stretch an image flip an image source (src) colorkey destination (dst) colorkey alpha blend alpha blending with colorization
These commands are not part of the standard SDK. A separate plugin is available on request; please contact your STMicroelectronics FAE for more information.
Complete the following steps to run the 2D grafix demo.
At the testtool prompt, type:
Testtool> Gfx2d_open
The command line for the demo application is:
GFX2D_Dfb_Demo < GFX_IDX > < GFX_LAYER_NO > < DODRAW > < DOBLIT > < DOINPUT > where:
< GFX_IDX > The GDP index (currently only 0 is supported).
< GFX_LAYER_NO > The layer number of the GFX plane.
<
<
<
DODRAW >
DOBLIT >
DOINPUT >
Set to 1 to demonstrate drawing capabilities only.
Set to 1 to demonstrate blitting capabilities only.
Set to 1 to demonstrate all features in a user interface using the mouse as the input device.
For example, to test all features using Mouse control, enter:
Testtool> Gfx2d_Dfb_Demo 0 0 0 0 1
In order to run the full benchmarking test application, call GFX2D_Dfb_Run in place of
Gfx2d_Dfb_Demo :
Testtool> GFX2D_Dfb_Run 0 0 +4000 1 0 0 0
This command performs benchmarking for drawing operations for 4 seconds.
8214357 Rev 4 197/212
Testtool STAPI-SDK
8.4.19 3D Grafix use case
Note: These commands are not part of the standard SDK. A separate plugin is available on request; please contact your STMicroelectronics FAE for more information.
In order to use the 3D graphics features, compile STAPI-SDK (to generate the
HDK7108_7108_LINUX libraries) with the environment variable DVD_USEMALI=1 set in
setenv.bat or setenv.sh.
To run the 3D demo, enter the following command at the testtool prompt:
Testtool> mod_probe 0
Next, open a telnet session to the target board and run the demo application: fm_oes_player-1.1.stmfb
198/212 8214357 Rev 4
STAPI-SDK STAPI-SDK for dual CPU SoCs
Appendix A STAPI-SDK for dual CPU SoCs
A.1
A.1.1
A.1.2
Compiling STAPI-SDK for dual CPUs (STi7108 SoC)
To build the SDK components (APILIB, STAPP, STDEBUG and so forth) for dual CPU devices like STi7108, running OS21 on the real time processor and STLinux on the host processor, complete the following tasks in the order given (that is, real time processor first followed by the host processor).
Compiling for the real time (RT) processor
Complete the environment setup, compile and install STAPI-SDK for the real time processor
(running OS21), as described in
Chapter 2: Compiling and running STAPI-SDK (OS21) on page 14
Compiling for the host processor
Complete the environment setup, compile, and install STAPI-SDK on the host processor
(running STLinux), as described in
Chapter 3: Compiling and running STAPI-SDK (STLinux) on page 25
A.2
A.2.1
Running the software for dual CPUs (STi7108 SoC)
There are two ways to execute and boot a device with dual CPUs, “single boot command mode” and “individual boot sequence for host and real time processors”. Both are described in this section.
Single boot command mode
In this mode, both the real time and the host processors are booted from a single command window. This mode also uses a single command for launching the application.
To run the software in this mode, complete the following:
1.
Open a command window and carry out the environment setup for the real time processor.
2. Ensure that the board is connected to the JTAG interface and power is ON.
3. Generate binary code for the real time processor corresponding to the.out file generated in Appendix
A.1.1 on page 199
using the command: gmake rom
4. Execute either of the following commands from the command window (on the host side). This copies the binary file corresponding to the real time processor on to the root file system: gmake all or gmake install
8214357 Rev 4 199/212
STAPI-SDK for dual CPU SoCs
A.2.2
STAPI-SDK
5. For the host processor, perform the environment setup as described in
Chapter 3:
Compiling and running STAPI-SDK (STLinux) on page 25
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.
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.
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
Chapter 3:
Compiling and running STAPI-SDK (STLinux) on page 25
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.
200/212 8214357 Rev 4
STAPI-SDK
Appendix B Glossary
Table 9
gives a list of commonly used abbreviations.
PTI
PTI4
PTS
SI
STAPI
STC
PAT
PCR
PES
PID
PIO
PMT
PSI
PSIP
ECM
EIT
EMM
EPG
ES
HDD
MPEG
NIT
Table 9.
API
ATA
ATSC
CAT
CRC
DTV
DVB
List of abbreviations used in this document
Application programming interface
AT attachment
Advanced Television Systems Committee
Conditional access table
Cyclic redundancy check
Digital television
Digital video broadcasting
Entitlement control message
Event information table
Entitlement management message
Electronic programme guide
Elementary stream
Hard disk drive
Moving Pictures Experts Group
Network information table
Program association table
Program clock reference
Packetized elementary stream
Packet identifier
Programmed input/output for HDD data transfer
Program map table
Program specific information
Program and system information protocol
Programmable transport interface
Programmable transport interface architecture version 4
Presentation Time Stamp
System information (ATSC) or Service information (DVB)
ST Application Programming Interface
System time clock
Glossary
8214357 Rev 4 201/212
Glossary
Table 9.
TC
TS
List of abbreviations used in this document
Transport controller
Transport stream
STAPI-SDK
202/212 8214357 Rev 4
STAPI-SDK
Revision history
Revision history
Table 10.
Document revision history
Date Revision
19-Dec-2011
4
Changes
Minor corrections throughout.
Updated Table 1: Ports to be used for serial output on page 10
.
Updated Section 1.3: Installation on page 11 .
Updated Table 2: Environment variables in setenv.bat and setenv.sh on page 16 .
Updated Table 3: Other environment variables on page 19
.
Updated Table 4: Targets available with the STAPI-SDK makefile on page 21
.
Updated Section 3.1: Clean current STLinux distribution on page 25
.
Updated Section 3.2: Installing STLinux on page 25
.
Updated Section 3.3: Applying the patches on page 28
.
Updated Section 3.5: Board configuration for STLinux on page 29
.
Updated Table 6: Additional Linux-specific environment variables in setenv.sh on page 31
.
Updated Section 3.8: Compiling the STAPI-SDK tree for Linux on page 34 .
Updated Section 5.1: Compile and configure U-Boot on page 42
.
Updated Section 5.4: Burn the images onto Flash on page 45
.
Updated CONFIG_TESTTOOL on page 55 .
Updated AUD_INJSTART on page 73 and
.
Added AUD_SETHDMIOUTPUT on page 79 ,
,
,
,
AUD_SETOMNI2PARAMS on page 84 ,
AUD_SETHDMICODINGMODE on page 85 ,
,
AUD_SETDOLBYVOLUME on page 87 and AUD_SETMDRC on page 87 .
Updated BLAST_GETKEY on page 88
.
,
and
.
Added HDMI_CEC_SEND on page 124
,
HDMI_CEC_LIST on page 124 , HDMI_CEC_VOL_STANDBY on page 124 ,
HDMI_CEC_VOL_UP on page 125 and
.
8214357 Rev 4 203/212
Revision history STAPI-SDK
Table 10.
Document revision history (continued)
Date
24-Oct-2011
11-May-2010
Revision Changes
4 (continued)
Added PLAY_GETAUDIOID on page 138
and
Added REC_CHANGEPIDS on page 148 , REC_FILECOPY on page 148 ,
REC_FILECROP on page 149 , REC_FILEREMOVE on page 149
,
REC_FILERENAME on page 149 and
Added REC_SWITCHTOLINEAR on page 152 .
Added VID_SETALPHA on page 171
,
VID_SETPOSTPROCESS on page 173 .
Added VMIX_GETPLANES on page 179
,
and
VMIX_SETMIXERMAINTODENC on page 182 .
Updated Table 8: List of timing modes accepted by
VTG_SETMODE command on page 186 .
Added Section 8.4.18: 2D Grafix use case using Directfb on page 197 and
Section 8.4.19: 3D Grafix use case on page 198
.
Added Appendix A: STAPI-SDK for dual CPU SoCs on page 199 .
C
Minor corrections throughout.
Minor update to
Section 1.2: Toolsets and other software on page 10
.
Corrected error regarding STWorkbench on-line help in
Section 1.6: Compilation on page 13 .
Minor updates to
Section 2.1: Board configuration for MS
Corrected error regarding USE_TARGETPACK environment
variable in Table 3: Other environment variables on page 19
.
Added Note concerning Windows DEP to Section 2.7.2:
Running the software on page 24
Updated Section 3.1: Clean current STLinux distribution on page 25
.
Update to
Installing additional libraries on page 27
.
Updated Section 3.3: Applying the patches on page 28
.
Updated Section 3.4: Installation of Multicom on page 29
.
Updated Section 3.5: Board configuration for STLinux on page 29
.
Added Section 3.8.1: Compiling the STAPI-SDK tree for Linux with uclibc on page 35 .
Updated Section 3.9: Running STAPI-SDK for STLinux on page 35
.
Added Section 7.2: Multimedia playback support on page 49 .
Added Testtool configuration on page 51
and
.
Added VOUT_GETSYNCCALIB on page 183
and
.
204/212 8214357 Rev 4
STAPI-SDK Revision history
Table 10.
Document revision history (continued)
Date
11-May-2010
12-Jan-2010
14-Oct-2009
07-Sep-2009
20-Aug-2009
Revision Changes
C (continued)
Added Retrieving profile details on page 196
.
Updated Place STAPI and CPU into standby and wake up using non-default trigger on page 196
C.2
C.1
B
Modifications made to Section 3.2.1: Installation of STLinux on page 25
.
Modifications made to Section 8.3.24: Power management commands on page 144 .
Added Section 8.4.17: Using low power mode operation on page 195 .
Minor corrections made throughout.
Modifications made to Section 3.10: Frame buffer and directfb support on Linux on page 36 .
Added new testtool commands:
,
.
Added Section 8.3.24: Power management commands on page 144 to the Testtool commands.
SYS_CACHEFLUSH, SYS_CACHEOF and SYS_CACHEON have been removed from the testtool commands.
Added new section on Testtool examples
A Initial release.
8214357 Rev 4 205/212
Index of Testtool commands
Index of Testtool commands
STAPI-SDK
ALLOC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
ATAPI_BENCH . . . . . . . . . . . . . . . . . . . . . . . . .69
ATAPI_DRIVEINFO . . . . . . . . . . . . . . . . . . . . . 69
ATAPI_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . .70
AUD_BEEP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
AUD_CONFIGCHAIN . . . . . . . . . . . . . . . . . . . .86
AUD_DISABLE . . . . . . . . . . . . . . . . . . . . . . . . .71
AUD_ENABLE . . . . . . . . . . . . . . . . . . . . . . . . .72
AUD_GETCAPABILITY . . . . . . . . . . . . . . . . . . 72
AUD_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . .73
AUD_INJSTART . . . . . . . . . . . . . . . . . . . . . . . .73
AUD_INJSTOP . . . . . . . . . . . . . . . . . . . . . . . . .74
AUD_PAUSE . . . . . . . . . . . . . . . . . . . . . . . . . .75
AUD_RESUME . . . . . . . . . . . . . . . . . . . . . . . . .75
AUD_SETBTSC . . . . . . . . . . . . . . . . . . . . . . . . 80
AUD_SETCOMPRESSION. . . . . . . . . . . . . . . .81
AUD_SETDDPOP . . . . . . . . . . . . . . . . . . . . . . .79
AUD_SETDOLBYVOLUME . . . . . . . . . . . . . . .87
AUD_SETDYNAMIC . . . . . . . . . . . . . . . . . . . . .75
AUD_SETEFFECT . . . . . . . . . . . . . . . . . . . . . .76
AUD_SETHDMICODINGMODE . . . . . . . . . . . . 85
AUD_SETHDMIOUTPUT . . . . . . . . . . . . . . . . .79
AUD_SETIVCPARAMS . . . . . . . . . . . . . . . . . . 83
AUD_SETLATENCY . . . . . . . . . . . . . . . . . . . . .76
AUD_SETMDRC . . . . . . . . . . . . . . . . . . . . . . . .87
AUD_SETOFFSET . . . . . . . . . . . . . . . . . . . . . .77
AUD_SETOMNI2PARAMS . . . . . . . . . . . . . . . .84
AUD_SETPCMMODE . . . . . . . . . . . . . . . . . . . .81
AUD_SETSAMPLING . . . . . . . . . . . . . . . . . . . .80
AUD_SETSPEED . . . . . . . . . . . . . . . . . . . . . . .78
AUD_SETSTEREO . . . . . . . . . . . . . . . . . . . . . .77
AUD_SETVOLUME . . . . . . . . . . . . . . . . . . . . . 78
AUD_SPDIF . . . . . . . . . . . . . . . . . . . . . . . . . . .82
AUD_STATUS . . . . . . . . . . . . . . . . . . . . . . . . .82
AUD_SYNCHRO. . . . . . . . . . . . . . . . . . . . . . . .83
BLAST_GETKEY . . . . . . . . . . . . . . . . . . . . . . .88
BLAST_INFO . . . . . . . . . . . . . . . . . . . . . . . . . .88
BLAST_POLLKEY . . . . . . . . . . . . . . . . . . . . . .88
BLIT_CLEAR. . . . . . . . . . . . . . . . . . . . . . . . . . .89
BLIT_COPY . . . . . . . . . . . . . . . . . . . . . . . . . . .89
BLIT_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90
BLIT_FILL_JOB . . . . . . . . . . . . . . . . . . . . . . . . 90
BLIT_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
BPEEK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54
BPOKE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54
CC_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
CC_START . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
CC_STOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
CLKRV_CHECKSTC . . . . . . . . . . . . . . . . . . . .92
CLKRV_DISABLE . . . . . . . . . . . . . . . . . . . . . . 92
CLKRV_ENABLE . . . . . . . . . . . . . . . . . . . . . . . 92
CLKRV_GET . . . . . . . . . . . . . . . . . . . . . . . . . . 92
CLKRV_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . 93
CLKRV_INVALIDATE. . . . . . . . . . . . . . . . . . . . 93
CLKRV_SET. . . . . . . . . . . . . . . . . . . . . . . . . . . 94
CLKRV_SETOFFSET . . . . . . . . . . . . . . . . . . . 94
CONFIG_TESTTOOL. . . . . . . . . . . . . . . . . . . . 55
COPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
CRYPT_BENCH. . . . . . . . . . . . . . . . . . . . . . . . 95
CRYPT_INFO. . . . . . . . . . . . . . . . . . . . . . . . . . 95
CURSOR_DISABLE. . . . . . . . . . . . . . . . . . . . . 96
CURSOR_ENABLE . . . . . . . . . . . . . . . . . . . . . 96
CURSOR_LOAD . . . . . . . . . . . . . . . . . . . . . . . 96
CURSOR_SETPOS . . . . . . . . . . . . . . . . . . . . . 97
DEFINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
DELETE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
DEMUX_CONNECT. . . . . . . . . . . . . . . . . . . . . 98
DEMUX_DUPLICATE . . . . . . . . . . . . . . . . . . . 99
DEMUX_INFO . . . . . . . . . . . . . . . . . . . . . . . . . 99
DEMUX_MUX. . . . . . . . . . . . . . . . . . . . . . . . . . 99
DEMUX_PESSTART . . . . . . . . . . . . . . . . . . . 100
DEMUX_PESSTOP . . . . . . . . . . . . . . . . . . . . 100
DEMUX_SETKEY . . . . . . . . . . . . . . . . . . . . . 101
DEMUX_STATUS . . . . . . . . . . . . . . . . . . . . . 101
DENC_COLORBAR . . . . . . . . . . . . . . . . . . . . 102
DENC_GETCAPABILITY . . . . . . . . . . . . . . . . 102
DENC_GETMODE . . . . . . . . . . . . . . . . . . . . . 102
DENC_INFO. . . . . . . . . . . . . . . . . . . . . . . . . . 102
DENC_SETMODE . . . . . . . . . . . . . . . . . . . . . 103
DISPLAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
DISPLAY_B . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
DMA_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
DMA_SWTS . . . . . . . . . . . . . . . . . . . . . . . . . . 103
DMA_TEST . . . . . . . . . . . . . . . . . . . . . . . . . . 104
DUMPMEM. . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
END . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
EXIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
FILL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
FLASH_BLOWER . . . . . . . . . . . . . . . . . . . . . 105
FLASH_INFO . . . . . . . . . . . . . . . . . . . . . . . . . 106
FREE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
FS_BENCH . . . . . . . . . . . . . . . . . . . . . . . . . . 107
FS_COPY. . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
FS_DEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
FS_DIR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
FS_FDISK . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
FS_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
FS_LIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
206/212 8214357 Rev 4
STAPI-SDK Index of Testtool commands
FS_MKDIR . . . . . . . . . . . . . . . . . . . . . . . . . . .111
FS_MOUNT . . . . . . . . . . . . . . . . . . . . . . . . . .111
FS_RENAME . . . . . . . . . . . . . . . . . . . . . . . . .113
FS_RMDIR . . . . . . . . . . . . . . . . . . . . . . . . . . .113
FS_UMOUNT . . . . . . . . . . . . . . . . . . . . . . . . .114
FSK_CHANGE_CHANNEL. . . . . . . . . . . . . . .114
FSK_INFO. . . . . . . . . . . . . . . . . . . . . . . . . . . .114
FSK_TUNER_REGISTER . . . . . . . . . . . . . . .115
FSK_TUNER_STATUS. . . . . . . . . . . . . . . . . .115
FSK_TUNER_UNREGISTER . . . . . . . . . . . . .115
GETKEY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60
GFX_ALPHA . . . . . . . . . . . . . . . . . . . . . . . . . .116
GFX_BITMAP . . . . . . . . . . . . . . . . . . . . . . . . .117
GFX_DISABLE . . . . . . . . . . . . . . . . . . . . . . . .118
GFX_ENABLE. . . . . . . . . . . . . . . . . . . . . . . . .118
GFX_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . .118
GFX_SETANTIFLICKER . . . . . . . . . . . . . . . .119
GFX_SETWINDOW . . . . . . . . . . . . . . . . . . . .119
GUI_COM . . . . . . . . . . . . . . . . . . . . . . . . . . . .119
GUI_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . .120
GUI_RESTORE . . . . . . . . . . . . . . . . . . . . . . .120
GUI_SAVE . . . . . . . . . . . . . . . . . . . . . . . . . . .120
GUI_SORT . . . . . . . . . . . . . . . . . . . . . . . . . . .120
HDMI_CEC_LIST . . . . . . . . . . . . . . . . . . . . . .124
HDMI_CEC_SEND . . . . . . . . . . . . . . . . . . . . .124
HDMI_CEC_VOL_DOWN . . . . . . . . . . . . . . . .125
HDMI_CEC_VOL_STANDBY . . . . . . . . . . . . .124
HDMI_CEC_VOL_UP . . . . . . . . . . . . . . . . . . .125
HDMI_DISABLE . . . . . . . . . . . . . . . . . . . . . . .121
HDMI_ENABLE . . . . . . . . . . . . . . . . . . . . . . . .121
HDMI_INFO . . . . . . . . . . . . . . . . . . . . . . . . . .121
HDMI_SETAVI . . . . . . . . . . . . . . . . . . . . . . . .122
HDMI_SETKEY . . . . . . . . . . . . . . . . . . . . . . . .123
HDMI_STATUS . . . . . . . . . . . . . . . . . . . . . . . .123
HELP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60
HISTORY . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61
I2C_DETECT . . . . . . . . . . . . . . . . . . . . . . . . .126
I2C_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . .126
I2C_READ. . . . . . . . . . . . . . . . . . . . . . . . . . . .126
I2C_READEXT . . . . . . . . . . . . . . . . . . . . . . . .127
I2C_WRITE . . . . . . . . . . . . . . . . . . . . . . . . . . .127
IOBASE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
IP_CONFIG . . . . . . . . . . . . . . . . . . . . . . . . . . .128
IP_FTP_START . . . . . . . . . . . . . . . . . . . . . . .128
IP_FTP_STOP . . . . . . . . . . . . . . . . . . . . . . . .129
IP_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129
IP_PING . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129
IP_STATUS. . . . . . . . . . . . . . . . . . . . . . . . . . .129
IP_STREAMS . . . . . . . . . . . . . . . . . . . . . . . . .130
KEYSCN_GETKEY . . . . . . . . . . . . . . . . . . . . .130
KEYSCN_GETPARAMS . . . . . . . . . . . . . . . . .131
KEYSCN_INFO . . . . . . . . . . . . . . . . . . . . . . . .130
KEYSCN_SETDEBOUNCETIME. . . . . . . . . . 131
LIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
LOADMEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
LOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
PEEK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
PIO_ATA_RESET . . . . . . . . . . . . . . . . . . . . . 131
PIO_CLEAR . . . . . . . . . . . . . . . . . . . . . . . . . . 132
PIO_DAC_RESET . . . . . . . . . . . . . . . . . . . . . 132
PIO_FE_RESET. . . . . . . . . . . . . . . . . . . . . . . 133
PIO_GET . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
PIO_INFO. . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
PIO_LED . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
PIO_MODEM_RESET . . . . . . . . . . . . . . . . . . 134
PIO_SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
PIO_USB_RESET . . . . . . . . . . . . . . . . . . . . . 135
PIP_CLOSE . . . . . . . . . . . . . . . . . . . . . . . . . . 136
PIP_DISABLE. . . . . . . . . . . . . . . . . . . . . . . . . 136
PIP_ENABLE . . . . . . . . . . . . . . . . . . . . . . . . . 136
PIP_OPEN . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
PIP_PAUSE . . . . . . . . . . . . . . . . . . . . . . . . . . 137
PIP_RESUME . . . . . . . . . . . . . . . . . . . . . . . . 137
PIP_SETWINDOW . . . . . . . . . . . . . . . . . . . . . 137
PLAY_AUDIO_SETOUTPUT . . . . . . . . . . . . . 138
PLAY_CHANGEPIDS. . . . . . . . . . . . . . . . . . . 138
PLAY_GETAUDIOID . . . . . . . . . . . . . . . . . . . 138
PLAY_GETVIDEOID . . . . . . . . . . . . . . . . . . . 139
PLAY_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . 139
PLAY_PAUSE . . . . . . . . . . . . . . . . . . . . . . . . 139
PLAY_PAUSERECORD. . . . . . . . . . . . . . . . . 139
PLAY_PROGRAM . . . . . . . . . . . . . . . . . . . . . 140
PLAY_PROGRAM_A3 . . . . . . . . . . . . . . . . . . 140
PLAY_PROGRAM_DTV. . . . . . . . . . . . . . . . . 140
PLAY_RESUME . . . . . . . . . . . . . . . . . . . . . . . 141
PLAY_SEEK. . . . . . . . . . . . . . . . . . . . . . . . . . 141
PLAY_SPEED . . . . . . . . . . . . . . . . . . . . . . . . 141
PLAY_START. . . . . . . . . . . . . . . . . . . . . . . . . 142
PLAY_STATUS . . . . . . . . . . . . . . . . . . . . . . . 142
PLAY_STEP . . . . . . . . . . . . . . . . . . . . . . . . . . 142
PLAY_STOP. . . . . . . . . . . . . . . . . . . . . . . . . . 142
PLAY_VIDEO_SETOUTPUT . . . . . . . . . . . . . 143
PLAY_WAIT_END . . . . . . . . . . . . . . . . . . . . . 143
POD_CONNECT . . . . . . . . . . . . . . . . . . . . . . 146
POD_LOOPBACK_ADVANCE. . . . . . . . . . . . 146
POD_LOOPBACK_SIMPLE. . . . . . . . . . . . . . 146
POD_MCARD_CP_TEST . . . . . . . . . . . . . . . 146
POKE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
POWER_GETPROFILE . . . . . . . . . . . . . . . . . 144
POWER_INFO . . . . . . . . . . . . . . . . . . . . . . . . 144
POWER_SETMODE . . . . . . . . . . . . . . . . . . . 145
POWER_SETPROFILE . . . . . . . . . . . . . . . . . 145
PRINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
PWM_GET . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
8214357 Rev 4 207/212
Index of Testtool commands STAPI-SDK
PWM_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . .147
PWM_SET . . . . . . . . . . . . . . . . . . . . . . . . . . .147
RACK_OFF . . . . . . . . . . . . . . . . . . . . . . . . . . .152
RACK_ON . . . . . . . . . . . . . . . . . . . . . . . . . . . .152
REC_CHANGEPIDS . . . . . . . . . . . . . . . . . . . .148
REC_FILECOPY . . . . . . . . . . . . . . . . . . . . . . .148
REC_FILECROP. . . . . . . . . . . . . . . . . . . . . . .149
REC_FILEREMOVE . . . . . . . . . . . . . . . . . . . .149
REC_FILERENAME . . . . . . . . . . . . . . . . . . . .149
REC_INSERT_PMT . . . . . . . . . . . . . . . . . . . .149
REC_PAUSE . . . . . . . . . . . . . . . . . . . . . . . . .150
REC_PROGRAM . . . . . . . . . . . . . . . . . . . . . .150
REC_RESUME . . . . . . . . . . . . . . . . . . . . . . . .150
REC_START . . . . . . . . . . . . . . . . . . . . . . . . . .151
REC_STATUS . . . . . . . . . . . . . . . . . . . . . . . .151
REC_STOP . . . . . . . . . . . . . . . . . . . . . . . . . . .151
REC_SWITCHTOLINEAR. . . . . . . . . . . . . . . .152
SAVE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65
SCART_INFO . . . . . . . . . . . . . . . . . . . . . . . . .152
SCART_RATIO . . . . . . . . . . . . . . . . . . . . . . . .153
SCART_SET . . . . . . . . . . . . . . . . . . . . . . . . . .153
SEARCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65
SHOW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66
SMART_GETPARAMS . . . . . . . . . . . . . . . . . .153
SMART_INFO . . . . . . . . . . . . . . . . . . . . . . . . .153
SMART_READ . . . . . . . . . . . . . . . . . . . . . . . .154
SMART_RESET . . . . . . . . . . . . . . . . . . . . . . .154
SMART_TRANSFER . . . . . . . . . . . . . . . . . . .154
SMART_WRITE . . . . . . . . . . . . . . . . . . . . . . .155
SOURCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66
SPEEK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67
SPI_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . .155
SPI_READ . . . . . . . . . . . . . . . . . . . . . . . . . . .155
SPI_WRITE . . . . . . . . . . . . . . . . . . . . . . . . . . .156
SPOKE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67
SUBT_DISABLE . . . . . . . . . . . . . . . . . . . . . . .156
SUBT_ENABLE . . . . . . . . . . . . . . . . . . . . . . .156
SUBT_INFO . . . . . . . . . . . . . . . . . . . . . . . . . .156
SUBT_SETWINDOW . . . . . . . . . . . . . . . . . . .157
SUBT_START . . . . . . . . . . . . . . . . . . . . . . . . .157
SUBT_STOP . . . . . . . . . . . . . . . . . . . . . . . . . .157
SYS_CLOCK. . . . . . . . . . . . . . . . . . . . . . . . . .158
SYS_ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158
SYS_IRQ. . . . . . . . . . . . . . . . . . . . . . . . . . . . .158
SYS_MEM. . . . . . . . . . . . . . . . . . . . . . . . . . . .158
SYS_PROF_FLUSH . . . . . . . . . . . . . . . . . . . .159
SYS_PROF_START . . . . . . . . . . . . . . . . . . . .159
SYS_PROF_STOP . . . . . . . . . . . . . . . . . . . . .159
SYS_REV . . . . . . . . . . . . . . . . . . . . . . . . . . . .159
SYS_TASK . . . . . . . . . . . . . . . . . . . . . . . . . . .160
SYS_WATCHMEM_START . . . . . . . . . . . . . .160
SYS_WATCHMEM_STOP . . . . . . . . . . . . . . .160
TABLE_EIT. . . . . . . . . . . . . . . . . . . . . . . . . . . 160
TABLE_FILTER . . . . . . . . . . . . . . . . . . . . . . . 161
TABLE_NIT . . . . . . . . . . . . . . . . . . . . . . . . . . 161
TABLE_PAT . . . . . . . . . . . . . . . . . . . . . . . . . . 161
TABLE_PMT. . . . . . . . . . . . . . . . . . . . . . . . . . 161
TABLE_SDT . . . . . . . . . . . . . . . . . . . . . . . . . . 162
TABLE_TDT . . . . . . . . . . . . . . . . . . . . . . . . . . 162
TEXT_CLEAR . . . . . . . . . . . . . . . . . . . . . . . . 162
TEXT_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . 162
TEXT_PRINT . . . . . . . . . . . . . . . . . . . . . . . . . 163
TRACE_HDDCLOSE . . . . . . . . . . . . . . . . . . . 163
TRACE_HDDOPEN . . . . . . . . . . . . . . . . . . . . 163
TRACE_OFF . . . . . . . . . . . . . . . . . . . . . . . . . 163
TRACE_ON . . . . . . . . . . . . . . . . . . . . . . . . . . 164
TRACE_TEST . . . . . . . . . . . . . . . . . . . . . . . . 164
TTX_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
TTX_START . . . . . . . . . . . . . . . . . . . . . . . . . . 164
TTX_STOP . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
TUNER_INFO. . . . . . . . . . . . . . . . . . . . . . . . . 165
TUNER_LOOP . . . . . . . . . . . . . . . . . . . . . . . . 165
TUNER_SCAN . . . . . . . . . . . . . . . . . . . . . . . . 165
TUNER_SENDDISEQCCMD . . . . . . . . . . . . . 166
TUNER_STATUS . . . . . . . . . . . . . . . . . . . . . . 166
TUNER_SWITCH . . . . . . . . . . . . . . . . . . . . . . 166
TUNER_TUNE . . . . . . . . . . . . . . . . . . . . . . . . 167
USB_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
USB_KEYB. . . . . . . . . . . . . . . . . . . . . . . . . . . 168
USB_MOUSE . . . . . . . . . . . . . . . . . . . . . . . . . 168
VID_BITMAP . . . . . . . . . . . . . . . . . . . . . . . . . 168
VID_CLEAR . . . . . . . . . . . . . . . . . . . . . . . . . . 169
VID_DISABLE . . . . . . . . . . . . . . . . . . . . . . . . 169
VID_ENABLE . . . . . . . . . . . . . . . . . . . . . . . . . 169
VID_ERR . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
VID_GETDISPLAYPARAMS . . . . . . . . . . . . . 170
VID_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
VID_INJSTART . . . . . . . . . . . . . . . . . . . . . . . 170
VID_INJSTOP . . . . . . . . . . . . . . . . . . . . . . . . 170
VID_PAUSE . . . . . . . . . . . . . . . . . . . . . . . . . . 171
VID_RESUME . . . . . . . . . . . . . . . . . . . . . . . . 171
VID_SETALPHA. . . . . . . . . . . . . . . . . . . . . . . 171
VID_SETFILTER . . . . . . . . . . . . . . . . . . . . . . 172
VID_SETFORMAT . . . . . . . . . . . . . . . . . . . . . 172
VID_SETFRAMERATE . . . . . . . . . . . . . . . . . 172
VID_SETIQI . . . . . . . . . . . . . . . . . . . . . . . . . . 173
VID_SETMODE . . . . . . . . . . . . . . . . . . . . . . . 173
VID_SETPOSTPROCESS . . . . . . . . . . . . . . . 173
VID_SETSPEED . . . . . . . . . . . . . . . . . . . . . . 174
VID_SETWINAUTO . . . . . . . . . . . . . . . . . . . . 174
VID_SETWINDOW. . . . . . . . . . . . . . . . . . . . . 174
VID_STATUS . . . . . . . . . . . . . . . . . . . . . . . . . 175
VID_STEP . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
VID_SYNCHRO . . . . . . . . . . . . . . . . . . . . . . . 175
208/212 8214357 Rev 4
STAPI-SDK
VIN_CLOSE . . . . . . . . . . . . . . . . . . . . . . . . . .176
VIN_DISABLE . . . . . . . . . . . . . . . . . . . . . . . . .176
VIN_ENABLE . . . . . . . . . . . . . . . . . . . . . . . . .176
VIN_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . .176
VIN_OPEN . . . . . . . . . . . . . . . . . . . . . . . . . . .177
VIN_PAUSE . . . . . . . . . . . . . . . . . . . . . . . . . .177
VIN_RESUME . . . . . . . . . . . . . . . . . . . . . . . . .177
VIN_SETWINDOW . . . . . . . . . . . . . . . . . . . . .178
VMIX_DISABLE . . . . . . . . . . . . . . . . . . . . . . .178
VMIX_ENABLE . . . . . . . . . . . . . . . . . . . . . . . .178
VMIX_GETBKCOLOR . . . . . . . . . . . . . . . . . .179
VMIX_GETCAPABILITY . . . . . . . . . . . . . . . . .179
VMIX_GETCONNLAYER . . . . . . . . . . . . . . . .180
VMIX_GETPLANES . . . . . . . . . . . . . . . . . . . .179
VMIX_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . .180
VMIX_SETASPECTRATIO . . . . . . . . . . . . . . .180
VMIX_SETBKCOLOR . . . . . . . . . . . . . . . . . . .181
VMIX_SETMIXERMAINTODENC . . . . . . . . . .182
VMIX_SETOFFSET . . . . . . . . . . . . . . . . . . . .181
VMIX_SETPLANES . . . . . . . . . . . . . . . . . . . .182
VOUT_DISABLE . . . . . . . . . . . . . . . . . . . . . . .183
VOUT_ENABLE . . . . . . . . . . . . . . . . . . . . . . .183
VOUT_GETCAPABILITY . . . . . . . . . . . . . . . .183
VOUT_GETSYNCCALIB . . . . . . . . . . . . . . . .183
VOUT_INFO . . . . . . . . . . . . . . . . . . . . . . . . . .183
VOUT_SETBCS . . . . . . . . . . . . . . . . . . . . . . .184
VOUT_SETSYNCCALIB . . . . . . . . . . . . . . . . .184
VTG_GETMODE. . . . . . . . . . . . . . . . . . . . . . .185
VTG_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . .185
VTG_SETMODE . . . . . . . . . . . . . . . . . . . . . . .185
WAIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67
ZAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68
Index of Testtool commands
8214357 Rev 4 209/212
Index
Index
STAPI-SDK
A
ATA interface
. . . . . . . . . . . . . . . . . . . . . . . . . .69
B
Backus-Naur Form
. . . . . . . . . . . . . . . . . . . . . . .8
blower
. . . . . . . . . . . . . . . . . . . . . . . . . . . .39
blower tool
. . . . . . . . . . . . . . . . . . . . . . . . . . . .39
bootrom
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
C command history
. . . . . . . . . . . . . . . . . . . . . . .50
console debugger
. . . . . . . . . . . . . . . . . . . . . . .24
cryptography benchmarks
. . . . . . . . . . . . . . . .95
D
DAC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132
Data Display Debugger
. . . . . . . . . . . . . . .34
,
denc colorbar
. . . . . . . . . . . . . . . . . . . . . . . . .188
directfb support
. . . . . . . . . . . . . . . . . . . . . . . . 36
DirecTV
. . . . . . . . . . . . . . . . . . . . . . . . . 193 -
DiSEqC command
. . . . . . . . . . . . . . . . . . . . .166
DVB-SI
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191
F
File system
. . . . . . . . . . . . . . . . . . . . . . . . . . .109
Flash memory
. . . . . . . . . . . . . . . . . . . . . . . . .38
G gmake
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
-
H hardware blitter
. . . . . . . . . . . . . . . . . . . . . . . . 89
I
IRQ settings
. . . . . . . . . . . . . . . . . . . . . . . . . .158
L
Linux
. . . . . . . . . . . . . . . . . . . . . . . . . . 13 ,
,
LIRC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88
low power mode
. . . . . . . . . . . . . . . 195 ,
O
OS21
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
P packetized elementary stream
playback driver
. . . . . . . . . . . . . . . . . . . . . . . 139
R romgen tool
. . . . . . . . . . . . . . . . . . . . . . . . . . . 39
S
SCART driver
. . . . . . . . . . . . . . . . . . . . . . . . 152
setenv.bat
. . . . . . . . . . . . . . . . . . . . . . . . . 14 -
setenv.sh
. . . . . . . . . . . . . . . . . . . . . . . . . . 16 ,
Smartcard driver
. . . . . . . . . . . . . . . . . . . . . . 153
Software notation
. . . . . . . . . . . . . . . . . . . . . . . 8
SPI driver
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
ST Micro Connect
. . . . . . . . . . . . . . . . . . . 9 ,
ST TargetPack
. . . . . . . . . . . . . . . . . . . . . . . . 47
STATAPI driver
. . . . . . . . . . . . . . . . . . . . . . . . 70
STAUD driver
. . . . . . . . . . . . . . . . . . . . . . . . . 73
STBLAST driver
. . . . . . . . . . . . . . . . . . . . . . . 88
STBLIT driver
. . . . . . . . . . . . . . . . . . . . . . . . . 91
STCC driver
. . . . . . . . . . . . . . . . . . . . . . . . . . . 91
STCRYPT/STTKDMA driver
. . . . . . . . . . . . . . 95
STDENC driver
. . . . . . . . . . . . . . . . . . . . . . . 102
STFLASH driver
. . . . . . . . . . . . . . . . . . . . . . 106
STFSK driver
. . . . . . . . . . . . . . . . . . . . . . . . . 114
STHDMI driver
. . . . . . . . . . . . . . . . . . . . . . . . 121
STI2C driver
. . . . . . . . . . . . . . . . . . . . . . . . . 126
STKEYSCN driver
. . . . . . . . . . . . . . . . . . . . . 130
STLAYER/STBLIT driver
. . . . . . . . . . . . . . . . 118
STPOWER driver
. . . . . . . . . . . . . . . . . . . . . 144
STWorkbench
. . . . . . . . . . . . . . . . . . . . . . 21 ,
subtitle driver
. . . . . . . . . . . . . . . . . . . . . . . . . 156
subtitles
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
T targetpack
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
TCP/IP
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
TCP/IP driver
. . . . . . . . . . . . . . . . . . . . . . . . . 129
teletext
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
testtool
. . . . . . . . . . . . . . . . . . . . . . . 9
scripts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
TEXT driver
. . . . . . . . . . . . . . . . . . . . . . . . . . 162
210/212 8214357 Rev 4
STAPI-SDK
TTX driver
. . . . . . . . . . . . . . . . . . . . . . . . . . .164
V video capture
. . . . . . . . . . . . . . . . . . . . . . . . .195
video driver
. . . . . . . . . . . . . . . . . . . . . . . . . . .170
VMIX driver
. . . . . . . . . . . . . . . . . . . . . . . . . .180
VOUT driver
. . . . . . . . . . . . . . . . . . . . . . . . . .183
VTG driver
. . . . . . . . . . . . . . . . . . . . . . . . . . .185
Index
8214357 Rev 4 211/212
STAPI-SDK
Please Read Carefully:
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 TWO AUTHORIZED ST REPRESENTATIVES, 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.
ST and the ST logo are trademarks or registered trademarks of ST in various countries.
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.
© 2011 STMicroelectronics - All rights reserved
STMicroelectronics group of companies
Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan -
Malaysia - Malta - Morocco - Philippines - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com
212/212 8214357 Rev 4
Descarcă
Publicitate