说明: 基于ST5518的DVB-TS流以及DVD等解码产品开发驱动、初始化、解码基本功能等源代码。 (DVB-TS streaming and DVD decoding product development drive, initialize, decoding basic functions such as source code.)
ST Reference Firmware
STi5500 DVB Reference Driver
Release 4.1
26 January 1999
COPYRIGHT (C) ST Microelectronics 1999
###########################################################################
### FEATURES ###
###########################################################################
The following features which has been tested are :
Decoding MPEG-2 / DVB live streams
Decoding MPEG-2 elementary streams (files)
Compatible mode (3 frame buffers)
B on-the-fly mode (2 frame buffers) (with STi5500 version DEC only)
3:2 pull-down mode
Pan&scan (note that STi5500 only supports horizontal pan)
Channel change (for testtool)
Intensive zapping (channel change in loop)
PAT/PMT extraction
Teletext (VBI and STB modes)
UART interface (for debug)
Code on SDRAM only (DRAM not used)
OSD function with usif interface
Tuner management via I2C link
Dynamic Acquisition of PAT and PMT (when tuning frequency)
Boot from Flash Eprom with Code on DRAM
Boot from Flash Eprom with Code on SDRAM only
Tools for flashing the DVB reference software
The following features ought to be done in next release :
Debug of SmartCard driver
The following feature is not supported by this software :
Decode of video streams with Frame and Field images in the same
sequence on B on-the-fly mode (hardware bug with no work-around for the
moment).
IMPORTANT :
===========
If you do not use an Eval0199 (Front-end board) connected to the Eval5500 I2C
interface, do not forget to comment the call to 'tuner_init();' function in
main.c file (line 860) -> otherwise the program hangs when searching the
Eval0199 board..
The tables belowed presents the features which have been tested and
validated on a DVB setup or an elementary stream (audio and video), depending
on the software configuration :
Compilation switches (to be defined in 55refcfg.h file :
#1 : BOOT_ON_SDRAM
#2 : BUILT_FOR_16MBIT
#3 : BUILT_FOR_32MBIT
#4 : B_ON_THE_FLY
#5 : NTSC_STANDARD
#6 : PAL_STANDARD
#7 : ENABLE_AVSYNC
#8 : DECODE_ELEMENTARY_STREAM
(a cross indicates that the corresponding compiler switch has been fitted)
-------------------------------------------------------------------------------
| #1| #2| #3| #4| #5| #6| #7| #8| COMMENT |
-------------------------------------------------------------------------------
| | | X | | | X | | | Code and data on DRAM, 32MBIT of SDRAM, |
| | | | | | | | | compatible mode, decoding DVB live without |
| | | | | | | | | audio/video synchro, with PAL display. |
-------------------------------------------------------------------------------
| | | X | | | X | X | | Code and data on DRAM, 32MBIT of SDRAM, |
| | | | | | | | | compatible mode, decoding DVB live with |
| | | | | | | | | audio/video synchro, and PAL display. |
-------------------------------------------------------------------------------
| | | X | | | X | | X | Code and data on DRAM, 32MBIT of SDRAM, |
| | | | | | | | | compatible mode, decoding elementary streams|
| | | | | | | | | without audio/video synchro, with PAL |
| | | | | | | | | display |
-------------------------------------------------------------------------------
| | | X | X | | X | | | Code and data on DRAM, 32MBIT of SDRAM, |
| | | | | | | | | B on-the-fly mode, decoding DVB live without|
| | | | | | | | | audio/video synchro, with PAL display. |
-------------------------------------------------------------------------------
| | | X | X | | X | X | | Code and data on DRAM, 32MBIT of SDRAM, |
| | | | | | | | | B on-the-fly mode, decoding DVB live with |
| | | | | | | | | audio/video synchro, and PAL display. |
-------------------------------------------------------------------------------
| | X | | X | | X | | | Code and data on DRAM, 16MBIT of SDRAM, |
| | | | | | | | | B on-the-fly mode, decoding DVB live without|
| | | | | | | | | audio/video synchro, with PAL display. |
-------------------------------------------------------------------------------
| | X | | X | | X | X | | Code and data on DRAM, 16MBIT of SDRAM, |
| | | | | | | | | B on-the-fly mode, decoding DVB live with |
| | | | | | | | | audio/video synchro, and PAL display. |
-------------------------------------------------------------------------------
| | | X | X | | X | | X | Code and data on DRAM, 32MBIT of SDRAM, |
| | | | | | | | | B on-the-fly mode, decoding elementary |
| | | | | | | | | streams, without audio/video synchro, with |
| | | | | | | | | PAL display. |
-------------------------------------------------------------------------------
| | X | | X | | X | | X | Code and data on DRAM, 16MBIT of SDRAM, |
| | | | | | | | | B on-the-fly mode, decoding elementary |
| | | | | | | | | streams, without audio/video synchro, with |
| | | | | | | | | PAL display. |
-------------------------------------------------------------------------------
| X | X | | | | X | | | Code and data on SDRAM, 16MBIT of SDRAM, |
| | | | | | | | | compatible mode, decoding DVB live |
| | | | | | | | | without audio/video synchro, and with PAL |
| | | | | | | | | display. |
-------------------------------------------------------------------------------
| X | X | | | | X | X | | Code and data on SDRAM, 16MBIT of SDRAM, |
| | | | | | | | | compatible mode, decoding DVB live |
| | | | | | | | | with audio/video synchro, and PAL display. |
-------------------------------------------------------------------------------
| X | X | | | | X | | X | Code and data on SDRAM, 16MBIT of SDRAM, |
| | | | | | | | | compatible mode, decoding elementary |
| | | | | | | | | streams, without audio/video synchro, with |
| | | | | | | | | PAL display. |
-------------------------------------------------------------------------------
| | X | | | X | | | X | Code and data on DRAM, 16MBIT of SDRAM, |
| | | | | | | | | compatible mode, decoding elementary |
| | | | | | | | | streams with 3:2 pull down, without audio/ |
| | | | | | | | | video synchro, with NTSC display. |
-------------------------------------------------------------------------------
| | X | | X | X | | | X | Code and data on DRAM, 16MBIT of SDRAM, |
| | | | | | | | | B on-the-fly mode, decoding elementary |
| | | | | | | | | streams with 3:2 pull down, without audio/ |
| | | | | | | | | video synchro, with NTSC display. |
-------------------------------------------------------------------------------
By default, The following compiler switches are defined in file
main\55refcfg.h :
- TESTTOOL_PRESENT
- EVAL5500
- CODE_ON_SDRAM
- UARTIO
- STREPORT
- BUILT_FOR_32MBIT
- B_ON_THE_FLY
- PAL_STANDARD
- ENABLE_AVSYNC
By default, The following compiler switches are defined in file
main\st5500.h :
- STI5500_VERSION_D
By default, CONFIG = CODE_ON_SDRAM_32M in file hw.cfg.
###########################################################################
### BRIEF USER GUIDE ###
###########################################################################
Setting up the tree
Unzip the archive, don't forget -d option if using ms-dos line's pkzip.
You should get a tree, see FILES LIST section for its contents.
Configuration
There are 2 types of configuration:
-hardware configuration in file main\st5500.h :
define the version of the STi5500 you are using - you must define
one and only one version (STI5500_VERSION_A, STI5500_VERSION_B,
STI5500_VERSION_C or STI5500_VERSION_D).
-software configuration in file main\55refcfg.h :
define your i/o setup -> UARTIO, UNHOSTED, STREPORT
Code on DRAM or SDRAM -> CODE_ON_SDRAM
PWM initial values -> PWM_CONTROL_LARGER_VALUE_FASTER_CLOCK,
PWM_REBASING
TV standard -> PAL_STANDARD, NTSC_STANDARD
type of audio DACs -> _16BIT_AUDIO_DAC
amount of SDRAM -> BUILT_FOR_16MBIT, BUILT_FOR_32MBIT
B on-the-fly feature or not -> B_ON_THE_FLY
Input from link or files -> DECODE_ELEMENTARY_STREAM
traces setup -> xxx_DEBUG compiler switches
Building the tree
The tree was developped using Microsoft Make v1.4 and v1.5, available
at the following address:
ftp://ftp.microsoft.com/Softlib/MSLFILES/NMAKE15.EXE
GNU make (v3.75 or higher) may also be used though it has been known to
fail at linkage on some PCs. GNU make is available at:
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/mak3761b.zip
If you want to use another make utility, change the MAKE field in top
directory's makefile.
Connecting the board
See archive connect.zip in the same directory.
Programming/Booting the STi5500 DVB Reference Software :
Four batch files are provided for comfort, they are:
- gui.bat : boots and launches the GUI debug interface with
main.lku executable file
- nogui.bat : boots without the GUI with main.lku executable
file (with -v option)
- flash.bat : burns the Flash Eprom with main.bin executable
code
- debug.bat : Debugs the main.bin executable from ROM
+-----------------------------------------------------------------------+
| 5500 ref v4.1 was developped using DCU toolset v1.6.2 |
| st20cc : v2.55 (13-Oct-19***) |
| st20libr : v3.3 (8-Jun-19***) |
| st20run : v1.6.2 (19-Oct-19***) |
+-----------------------------------------------------------------------+
+-----------------------------------------------------------------------+
| ****** IMPORTANT NOTES ****** |
| If you previously used DCU 1.5 or 1.5.1, recompile all the libraries |
| with DCU 1.6.2 (no compatibility) |
| To compile this release with DCU toolset v1.5 or 1.5.1, remove the |
| compiler option "-fdisable-device" in file make.inc |
+-----------------------------------------------------------------------+
###########################################################################
### WHAT'S NEW IN THIS RELEASE ###
### (comparing with Release 4.0) ###
###########################################################################
GENERAL
- Compiler switch UARTIO is defined by default
- Added debug_rom_reset function in hw.cfg file in order to debug
STi5500 DVB Ref ROM version
- Added c2_5500ref_rom function and c2_5500ref function is renamed
c2_5500ref_lku in main.cfg file
- modified ST5500InitPLL function in order to set-up all the clocks
(VCO, SMC, PCM, LINK, SDRAM) in st5500sd.cfg file
- Added commands cflash.x and flash.x to clean and build the Flash Eprom
Burner Tool in file makefile
- Added commands cload.x and libload.x to clean and build the Loader
library (used for ROM exe file) in file makefile
- Added ROMFLAGS, CFG_FILE variable + main.bin file generation in file
makefile
- Added debug.bat batch file to debug from rom (main.bin file) with DCU
toolset 1.6.2.
- Bug fixed in c2MemoryInit function (in file hw.cfg) -> problem
in position of '{'
DEVELOP directory :
- Added CodeExe extern variable in order to know the boot origin (from
JTAG : LKU file or from ROM : BIN file). At bootstrap, the 32-bit
pointed by address 0x8000000 (SRAM_BASE) are set with 0x00554b4c ("LKU"
string) if it is an LKU file (see c2def function in hw.cfg file), or set
with 0x004d4f52 ("ROM" string) if it is a boot from ROM (see
c2_5500ref_rom function in main.cfg file)
MAIN directory:
- Added private macro "print" in main function (file main\main.c)
- kernel_start function is called in init_system function (file
main\main.c)
- InitPll and InitSdramInterface functions are called only if
CODE_ON_SDRAM is not defined, these functions are no more "static" (file
main\main.c)
MPEG directory:
- Two bug fixed concerning the streams "fields only" decoding in
compatible and B on-the-fly mode (file mpeg\vid_intr.c)
- Added some traces to follow the picture actually displayed when a done
VSYNC (TOP or BOT) (file mpeg\vid_intr.c)
- Added "Pipe hangs" workaround from Serge Dulhoste in
vsync_interrupt_routine function (file mpeg\vid_intr.c)
- Added AnchorFrameNumber management in B on-the-fly mode, and Modified
PID interrupt : B-picture are skipped if AnchorFrameNumber is equal
to 1 -> no more artetfacts when starting on open-GOP (file
mpeg\vid_intr.c)
- Bug fixed in mpeg_process_user_data_header and NextStartCode functions
(file mpeg\vid_head.c) some video interrupts were masked by reading
VID_ITS register
- Bug fixed in mpeg_process_picture_ext_header function
(file mpeg\vid_head.c) : the picture extension CPY_RIGHT_EXT_ID,
PICT_SPATIAL_SCAL_EXT_ID, and PICT_TEMPORAL_SCAL_EXT_ID are now parsed
- Added RegisterChannels function (file mpeg\mpg_debg.c) to store the
current channels PIDs (video, audio, and PCR), these registered channels
are used in automatic zapping function
- Added new testtool command