w
IMPORTANT NOTICE
Dear customer, As from August 2nd 2008, the wireless operations of STMicroelectronics have moved to a new company, ST-NXP Wireless. As a result, the following changes are applicable to the attached document.
Company name - STMicroelectronics NV is replaced with ST-NXP Wireless. Copyright - the copyright notice at the bottom of the last page " STMicroelectronics 200x - All rights reserved", shall now read: " ST-NXP Wireless 200x - All rights reserved". Web site - http://www.st.com is replaced with http://www.stnwireless.com Contact information - the list of sales offices is found at http://www.stnwireless.com under Contacts.
If you have any questions related to the document, please contact our nearest sales office. Thank you for your cooperation and understanding. ST-NXP Wireless
ww.stnwireless.com
PM0026 Programming manual
Register level drivers for STw8009/STw8019 digital encoder
Introduction
This programming manual is a complement to the software drivers for the STw80x9 devices. The manual includes information on all the device available functions to help the software engineers when implementing the STw8009/STw8019 within a system. The functions enumerated hereafter intend to use intuitive names both for the labeling of the functions and the required parameter(s). The related document is the latest edition of STw8009/STw8019 datasheet.
June 2006
Rev 1
1/36
www.st.com
Contents
PM0026
Contents
1 STw8009 within a system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1. 1 1. 2 Control interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Overall philosophy of the driver package . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 3 4 5
Use of the drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Use cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 FUNCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5. 1 General functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.1.10 5.1.11 5.1.12 5.1.13 5.1.14 5.1.15 5.1.16 5.1.17 5.1.18 5.1.19 5.1.20 5.1.21 5.1.22 standard_selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 sync_configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 polarity_hsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 freerun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 ver tical_blanking_inter val_selection . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 chroma_filter_bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 synchro_availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 colour_killer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 pedestal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 interlaced_mode_select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 cyclic_phase_reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 chrominance_burst_control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 set_of_reset_value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 software_phase_reset_buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 automatic_reset_oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 trap_filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 trap_filter_centered_freq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 chroma_to_luma_delay_prog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 incoming_sync_adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 outgoing_sync_adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 video_active_line_duration_control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 enable_variance_in_phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2/36
PM0026 5.1.23 5.1.24 5.1.25 5.1.26 5.1.27 5.1.28 5.1.29 5.1.30 5.1.31 5.1.32 5.1.33 5.1.34 5.1.35
Contents digital_freq_synt_increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 dac1_blanking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 dac2_blanking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 dac_input_output_inver tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 software_reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 skip_inser t_mode_selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 colour_frequency_control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 max_dynamic_magnitude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 bypass_mode_sync_correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 subcarrier_phase_reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 val_422_mux_set_to_1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 blanking_all_video_lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 dac1_dac2_config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.2
Control & power management unit registers . . . . . . . . . . . . . . . . . . . . . . 27
5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 standby_mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 power_management_unit_reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 dac1_power_mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 dac1_input_data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 dac1_black_level_video_pedestal . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.3 5.4
dac2_power_mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 dac2_input_data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.4.1 dac2_black_level_video_pedestal . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
6
List of functions classified by register number . . . . . . . . . . . . . . . . . . 31
6. 1 6. 2 6.3 Register 0 to 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Register 95 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Register 128 to 131 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
7
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3/36
List of tables
PM0026
List of tables
Table 1. Table 2. Table 3. Table 4. Table 5. Table 6. Table 7. Table 8. Table 9. Table 10. Table 11. Table 12. Table 13. Table 14. Table 15. Table 16. Table 17. Table 18. Table 19. Table 20. Table 21. Table 22. Table 23. Table 24. Table 25. Table 26. Table 27. Table 28. Table 29. Table 30. Table 31. Table 32. Table 33. Table 34. Table 35. Table 36. Table 37. Table 38. Table 39. Table 40. Table 41. Table 42. Table 43. Table 44. Table 45. Table 46. Table 47. Table 48. standard_selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 sync_configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 polarity_hsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 freerun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 vertical_blanking_interval_selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 chroma_filter_bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 synchro_availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 colour_killer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 pedestal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 interlaced_mode_select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 cyclic_phase_reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 chrominance_burst_control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 set_of_reset_value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 software_phase_reset_buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 automatic_reset_oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 trap_filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 trap_filter_centered_freq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 chroma_to_luma_delay_prog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 incoming_sync_adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 outgoing_sync_adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 video_active_line_duration_control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 enable_variance_in_phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 digital_freq_synt_increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 dac1_blanking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 dac2_blanking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 dac_input_output_inversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 software_reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 skip_insert_mode_selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 colour_frequency_control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 max_dynamic_magnitude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 bypass_mode_sync_correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 subcarrier_phase_reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 val_422_mux_set_to_1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 blanking_all_video_lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 dac1_dac2_config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 standby_mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 power_management_unit_reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 dac1_power_mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 dac1_input_data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 dac1_black_level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 dac2_power_mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 dac2_input_data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 dac2_black_level_video_pedestal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Register 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Register 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Register 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Register 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Register 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4/36
PM0026 Table 49. Table 50. Table 51. Table 52. Table 53. Table 54. Table 55. Table 56. Table 57. Table 58.
List of tables Register 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Register 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Register 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Register 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Register 95 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Register 128 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Register 129 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Register 130 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Register 131 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5/36
STw8009 within a system
PM0026
1
1.1
STw8009 within a system
Control interface
The STw8009 has an I2C compatible control interface.
1.2
Overall philosophy of the driver package
The delivered drivers and functions are located on the next upper layer compared to the level where the interface drivers such as I2C are located. This means that the drivers / functions included here call lower level modules driving the data transfer on a given interface. STw8009/STw8019 interface is based on an interface between its control registers and a user. The following functions and drivers are based on an I2C connection to the device. Functions related to this elementary data transfer need to be customized according to each application.
6/36
PM0026
Use of the drivers
2
Use of the drivers
These register level drivers permit to configure the registers of the STw8009/STw8019 digital encoder by only calling a function with its corresponding parameters. They are written in C language. To read or write the STw80x9 registers, the I2C format is used by calling 2 functions: char i2c_read_register(char register_to_read); with returned value = the data read parameter : register_to_read = Specify the location where to read (the register number) Example of implementation: char i2c_read_register(char register_to_read) { char data_read; data_read = your_i2c_read_routine(char i2c_device_addr, char register_to_read); return data_read; } void i2c_write_register( char register_to_write, char data_to_write ); with returned value = None parameters : register_to_write = Specify the location where to write (the register number) data_to_write = The data that you want to write Example of implementation: void i2c_write_register(char register_to_write, char data_to_write) { your_i2c_write_routine( char i2c_device_addr, char register_to_write, char data_to_write ); } Therefore, to be able to use these drivers on your platform, you have to rewrite the implementation of these 2 functions in order to communicate with the STw8009/STw8019 via the I2C interface.
7/36
Use cases
PM0026
3
Use cases
You can directly configure the STw8009 for typical use cases, by calling only one function.
To display the internal STw8009 color bar pattern in NTSC mode, call: To display external CCIR data (digital YCbCr 4:2:2 out of processor), call:
stw8009_display_internal_color_bar_pattern_NTSC();
stw8009_display_external_ccir_data();
4
Files
Files required to use the STw8009 drivers:
stw8009_drivers.c stw8009_drivers.h
All the functions for STw8009 drivers are grouped into one file. Files required to use STw8009 use cases:
stw8009_use_cases.c stw8009_use_cases.h
8/36
PM0026
Functions
5
Note:
Functions
In all the functions below, names are case sensitive.
5.1
General functions
The prototypes of the functions are defined in "stw8009_drivers.h"
5.1.1
standard_selection
Table 1.
Prototype Description
standard_selection
void standard_selection(char parameter) To select a standard Parameter : DEFAULT PAL_BDGHI PAL_N NTSC_M PAL_M none standard_selection(PAL_BDGHI)
Arguments
Return Value Example Comments Register
0
9/36
Functions
PM0026
5.1.2
sync_configuration
Table 2.
Prototype Description Parameter : DEFAULT SLAVE_MODE_ODDEV_ONLY SLAVE_MODE_F SLAVE_MODE_ODDEV_HSYNC SLAVE_MODE_VSYNC_ONLY SLAVE_MODE_VSYNC_HSYNC MASTER_MODE AUTOTEST_MODE none sync_configuration(SLAVE_MODE_ODDEV_ONLY)
sync_configuration
void sync_configuration(char parameter)
Arguments
Return Value Example Comments Register
0
5.1.3
polarity_hsync
Table 3.
Prototype Description
polarity_hsync
void polarity_hsync(char parameter) synchro: active edge of HSYNC selection (when input) or polarity of HSYNC (when output) Parameter : DEFAULT FALLING_EDGE RISING_EDGE none polarity_hsync(FALLING_EDGE)
Arguments
Return Value Example Comments Register
0
10/36
PM0026
Functions
5.1.4
freerun
Table 4.
Prototype Description Parameter : DEFAULT OFF ON none freerun(ON) This bit is taken into account in ODDEV-only or VSYNC-only based slave modes and is irrelevant for other synchronization modes. 0
freerun
void freerun(char parameter)
Arguments
Return Value Example Comments Register
5.1.5
vertical_blanking_interval_selection
Table 5.
Prototype Description
vertical_blanking_interval_selection
void vertical_blanking_interval_selection(char parameter) Ver tical Blanking Interval selection for active video lines area Parameter : DEFAULT PARTIAL_BLANKING FULL_BLANKING none vertical_blanking_interval_selection(PARTIAL_BLANKING)
Arguments
Return Value Example Comments Register
1
11/36
Functions
PM0026
5.1.6
chroma_filter_bandwidth
Table 6.
Prototype Description
chroma_filter_bandwidth
void chroma_filter_bandwidth(char parameter) U/V Chroma filter bandwidth selection Parameter : DEFAULT MHZ_1_1 MHZ_1_3 MHZ_1_6 MHZ_1_9 none chroma_filter_bandwidth(MHZ_1_1)
Arguments
Return Value Example Comments Register
1
5.1.7
synchro_availability
Table 7.
Prototype Description
synchro_availability
void synchro_availability(char parameter) availability of sync signals (analog and digital) in case of input synchronization loss with no free-run active (i.e. freerun=0) Parameter : DEFAULT SYNCHRO_OFF SYNCHRO_ON none synchro_availability(SYNCHRO_OFF)
Arguments
Return Value Example Comments Register
1
12/36
PM0026
Functions
5.1.8
colour_killer
Table 8.
Prototype Description Parameter : DEFAULT COLOR_ON COLOR_OFF none colour_killer(COLOR_ON)
colour_killer
void colour_killer(char parameter)
Arguments
Return Value Example Comments Register
1
5.1.9
pedestal
Table 9.
Prototype Description Parameter : DEFAULT IDENTICAL_LEVEL DIFFERENT_LEVEL none pedestal(IDENTICAL_LEVEL) In all cases, gain factor is adjusted to obtain the required levels for chrominance. Depending on the different output configurations chosen by programming bit from dac12_conf, pedestal is automatically selected on it. 1
pedestal
void pedestal(char parameter)
Arguments
Return Value Example
Comments
Register
13/36
Functions
PM0026
5.1.10
interlaced_mode_select
Table 10.
Prototype Description
interlaced_mode_select
void interlaced_mode_select(char parameter) non-interlaced mode select Parameter : DEFAULT INTERLACED NON_INTERLACED none interlaced_mode_select(INTERLACED)
Arguments
Return Value Example Comments Register
2
5.1.11
cyclic_phase_reset
Table 11.
Prototype Description
cyclic_phase_reset
void cyclic_phase_reset(char parameter) cyclic update of DDFS phase Parameter : DEFAULT OFF ON none cyclic_phase_reset(OFF)
Arguments
Return Value Example Comments Register
2
14/36
PM0026
Functions
5.1.12
chrominance_burst_control
Table 12.
Prototype Description Parameter : DEFAULT OFF ON none chrominance_burst_control(ON)
chrominance_burst_control
void chrominance_burst_control(char parameter)
Arguments
Return Value Example Comments Register
2
5.1.13
set_of_reset_value
Table 13.
Prototype Description
set_of_reset_value
void set_of_reset_value(char parameter) selects set of reset values for Direct Digital Frequency Synthesizer accumulator Parameter : DEFAULT HARDWARE_RESET LOADED_RESET none set_of_reset_value(LOADED_RESET)
Arguments
Return Value Example Comments Register
2
15/36
Functions
PM0026
5.1.14
software_phase_reset_buffer
Table 14.
Prototype Description Arguments Return Value Example Comments Register 2
software_phase_reset_buffer
void software_phase_reset_buffer(void) software phase reset of DDFS (Direct Digital Frequency Synthesizer) buffer none none software_phase_reset_buffer( )
5.1.15
automatic_reset_oscillator
Table 15.
Prototype Description
automatic_reset_oscillator
void automatic_reset_oscillator(char parameter) Resetting the oscillator means forcing the value of the phase accumulator to its nominal value to avoid accumulating errors due to the finite number of bits used internally. Parameter : DEFAULT EVERY_LINE EVERY_FIELD_2 EVERY_FIELD_4 EVERY_FIELD_8 none automatic_reset_oscillator(EVERY_FIELD_2) valrst[1:0] is taken into account only if bit `enrst' is set. 2
Arguments
Return Value Example Comments Register
16/36
PM0026
Functions
5.1.16
trap_filter
Table 16.
Prototype Description
trap_filter
void trap_filter(char parameter) enable trap filter Parameter : DEFAULT DISABLED ENABLED none trap_filter(DISABLED)
Arguments
Return Value Example Comments Register
3
5.1.17
trap_filter_centered_freq
Table 17.
Prototype Description
trap_filter_centered_freq
void trap_filter_centered_freq(char parameter) trap filter centered frequency value selection Parameter : DEFAULT MHZ_3_58 MHZ_4_43 none trap_filter_centered_freq(MHZ_3_58) `trap_4.43' is taken into account only if bit `main_entrap' is set. 3
Arguments
Return Value Example Comments Register
17/36
Functions
PM0026
5.1.18
chroma_to_luma_delay_prog
Table 18.
Prototype Description
chroma_to_luma_delay_prog
void chroma_to_luma_delay_prog(char parameter) Enable chroma to luma delay programming on cvbs output. Parameter : DEFAULT DISABLED ENABLED none chroma_to_luma_delay_prog(ENABLED) This delay affects only the cvbs output. The component outputs Y/C remain unaffected. Refer to register 109 to program chroma to luma delay on Y/C output. 3
Arguments
Return Value Example
Comments
Register
5.1.19
incoming_sync_adjustment
Table 19.
Prototype
incoming_sync_adjustment
void incoming_sync_adjustment(char parameter) Adjustment of incoming sync signals. Used to insure correct interpretation of incoming video samples as Y, Cr or Cb when the encoder is slaved to incoming sync signals (inc. `F/H' flags stripped off ITU-R656/D1 data). Parameter : DEFAULT NOMINAL PIX_CLK_1 PIX_CLK_2 PIX_CLK_3 none incoming_sync_adjustment(PIX_CLK_1)
Description
Arguments
Return Value Example Comments Register
4
18/36
PM0026
Functions
5.1.20
outgoing_sync_adjustment
Table 20.
Prototype
outgoing_sync_adjustment
void outgoing_sync_adjustment(char parameter) Adjustment of outgoing sync signals. Used to ensure correct interpretation of incoming video samples as Y, Cr or Cb when the encoder is master and supplies sync signals. Parameter : DEFAULT NOMINAL PIX_CLK_1 PIX_CLK_2 PIX_CLK_3 none outgoing_sync_adjustment(PIX_CLK_1)
Description
Arguments
Return Value Example Comments Register
4
5.1.21
video_active_line_duration_control
Table 21.
Prototype Description
video_active_line_duration_control
void video_active_line_duration_control(char parameter) video active line duration control Parameter : DEFAULT FULL STANDARD none video_active_line_duration_control(FULL)
Arguments
Return Value Example Comments Register
4
19/36
Functions
PM0026
5.1.22
enable_variance_in_phase
Table 22.
Prototype
enable_variance_in_phase
void enable_variance_in_phase(void) Enables variance in phase of the subcarrier, as programmed in register_105, during active video with respect to the phase of the subcarrier during the color burst. Once set, this bit is automatically reset to `0'. none none enable_variance_in_phase( )
Description
Arguments Return Value Example Comments Register
4
5.1.23
digital_freq_synt_increment
Table 23.
Prototype Description
digital_freq_synt_increment
void digital_freq_synt_increment(char parameter) Choice of Digital Frequency Synthesizer increment after soft reset or when ph_rst_mode = `01' Parameter : DEFAULT HARD SOFT none digital_freq_synt_increment(SOFT)
Arguments
Return Value Example Comments Register
5
20/36
PM0026
Functions
5.1.24
dac1_blanking
Table 24.
Prototype Description
dac1_blanking
void dac1_blanking(char parameter) blanking of DAC 1 Parameter : DEFAULT DAC_NORMAL DAC_FORCED none dac1_blanking(DAC_NORMAL)
Arguments
Return Value Example Comments Register
5
5.1.25
dac2_blanking
Table 25.
Prototype Description
dac2_blanking
void dac2_blanking(char parameter) blanking of DAC 2 Parameter : DEFAULT DAC_NORMAL DAC_FORCED none dac2_blanking(DAC_NORMAL)
Arguments
Return Value Example Comments Register
5
21/36
Functions
PM0026
5.1.26
dac_input_output_invertion
Table 26.
Prototype Description
dac_input_output_inversion
void dac_input_output_invertion(char parameter) `Inver ts' DAC codes to compensate for an inverting output stage in the application Parameter : DEFAULT NON_INVERTED INVERTED none dac_input_output_invertion(NON_INVERTED)
Arguments
Return Value Example Comments Register
5
5.1.27
software_reset
Table 27.
Prototype Description Arguments Return Value Example none none software_reset( ) Bit `softreset' is automatically reset after internal reset generation. Software reset is active during 4 PIX_CLK periods. When softreset is activated, all the device is reset as with hardware reset except for the first nine user registers (registers 0 to 8: configurations). Registers 10 up to 14 (increment and phase of oscillator), 25-30, 31-33 and 3942 are never reset (hard/soft). 6
software_reset
void software_reset(void)
Comments
Register
22/36
PM0026
Functions
5.1.28
skip_insert_mode_selection
Table 28.
Prototype Description Parameter : DEFAULT NORMAL_MODE MANUAL_MODE INSERT_MODE SKIP_MODE none skip_insert_mode_selection(NORMAL_MODE)
skip_insert_mode_selection
void skip_insert_mode_selection(char parameter)
Arguments
Return Value Example Comments Register
6
5.1.29
colour_frequency_control
Table 29.
Prototype Description
colour_frequency_control
void colour_frequency_control(char parameter) colour frequency control via CFC line Parameter : DEFAULT CFC_DISABLED AFTER_SERIAL_LOADING NEXT_ACTIVE_EDGE BEFORE_NEXT_COLOR_BURST none colour_frequency_control(CFC_DISABLED)
Arguments
Return Value Example Comments Register
6
23/36
Functions
PM0026
5.1.30
max_dynamic_magnitude
Table 30.
Prototype Description
max_dynamic_magnitude
void max_dynamic_magnitude(char parameter) max dynamic magnitude allowed on YCrCb inputs for encoding. Parameter : DEFAULT DIFFERENT_FOR_YCBCR IDENTICAL_FOR_YCBCR none max_dynamic_magnitude(DIFFERENT_FOR_YCBCR) In any case, EAV and SAV words are replaced by blanking values before being fed to the luminance and Chrominance processing. 6
Arguments
Return Value Example Comments Register
5.1.31
bypass_mode_sync_correction
Table 31.
Prototype
bypass_mode_sync_correction
void bypass_mode_sync_correction(char parameter) tst_dac bypass mode with sync correction. This is a test mode in which data coming from port tst_dac can be output with or without sync correction and given to the dacs. Parameter : DEFAULT NO_SYNC_CORRECTION SYNC_CORRECTION none bypass_mode_sync_correction(NO_SYNC_CORRECTION)
Description
Arguments
Return Value Example Comments Register
7
24/36
PM0026
Functions
5.1.32
subcarrier_phase_reset
Table 32.
Prototype Description
subcarrier_phase_reset
void subcarrier_phase_reset(char parameter) sub-carrier phase reset Parameter : DEFAULT PHASE_RESET_DISABLED PHASE_UPDATED_BEGINNING_NEXT_VIDEO_LINE PHASE_UPDATED_CFC_NEXT_INCREMENT PHASE_RESET_ON_RST_BIT none subcarrier_phase_reset(PHASE_RESET_DISABLED)
Arguments
Return Value Example Comments Register
8
5.1.33
val_422_mux_set_to_1
Table 33.
Prototype Description Arguments Return Value Example Comments Register 8
val_422_mux_set_to_1
void val_422_mux_set_to_1(void) should be used only after each reset. none none val_422_mux_set_to_1
25/36
Functions
PM0026
5.1.34
blanking_all_video_lines
Table 34.
Prototype Description
blanking_all_video_lines
void blanking_all_video_lines(char parameter) blanking of all video lines Parameter : DEFAULT DISABLED ENABLED none blanking_all_video_lines(ENABLED)
Arguments
Return Value Example Comments Register
8
5.1.35
dac1_dac2_config
Table 35.
Prototype Description Parameter : DEFAULT Y_C CVBS none dac1_dac2_config(CVBS)
dac1_dac2_config
void dac1_dac2_config(char parameter)
Arguments
Return Value Example Comments Register
95
26/36
PM0026
Functions
5.2
5.2.1
Control & power management unit registers
standby_mode
Table 36.
Prototype Description
standby_mode
void standby_mode(char parameter) In this mode the analog subsystem is supplied by the 1.2 V and the 2.8 /3.3 V, but the DACs are set in power down mode, via poff[1:2] bits (Reg 130 & 131). Digital to analog data conversion is disabled. Parameter : DEFAULT STANDBY_OFF STANDBY_ON none standby_mode(STANDBY_ON)
Arguments
Return Value Example Comments Register
128
5.2.2
power_management_unit_reset
Table 37.
Prototype Description Arguments Return Value Example Comments Register
power_management_unit_reset
void power_management_unit_reset(void) Control and power management unit reset none none power_management_unit_reset( ) Bit cpmuswrst is automatically reset to its default value after internal reset generation and the I2C data transfer is stopped. This reset is kept available for a CLK cycle. 129
27/36
Functions
PM0026
5.2.3
dac1_power_mode
Table 38.
Prototype Description
dac1_power_mode
void dac1_power_mode(char parameter) DAC1 power off, then turn off DAC1 is in a low power consumption mode Parameter : DEFAULT POWER_ON POWER_OFF none dac1_power_mode(POWER_ON) As Default value is "1", Digital processor must write "0" when going from sleep or standby to active mode. 130
Arguments
Return Value Example Comments Register
5.2.4
dac1_input_data
Table 39.
Prototype Description
dac1_input_data
void dac1_input_data(char parameter) null digital data inputed on DAC1 Parameter : DEFAULT FORCE_TO_0 NORMAL_TRANSMISSION none dac1_input_data(FORCE_TO_0)
Arguments
Return Value Example Comments Register
130
28/36
PM0026
Functions
5.2.5
dac1_black_level_video_pedestal
Table 40.
Prototype Description
dac1_black_level
void dac1_black_level_video_pedestal(char parameter) Black level video pedestal active on DAC1 Parameter : DEFAULT NOT_ACTIVE ACTIVE none dac1_black_level_video_pedestal(ACTIVE)
Arguments
Return Value Example Comments Register
130
5.3
dac2_power_mode
Table 41.
Prototype Description
dac2_power_mode
void dac2_power_mode(char parameter) DAC2 power off, then turn off DAC2 is in a low power consumption mode Parameter : DEFAULT POWER_ON POWER_OFF none dac2_power_mode(POWER_ON) As Default value is "1", Digital processor must write "0" when going from sleep or standby to active mode. 131
Arguments
Return Value Example Comments Register
29/36
Functions
PM0026
5.4
dac2_input_data
Table 42.
Prototype Description
dac2_input_data
void dac2_input_data(char parameter) null digital data inputed on DAC2 Parameter : DEFAULT FORCE_TO_0 NORMAL_TRANSMISSION none dac2_input_data(FORCE_TO_0)
Arguments
Return Value Example Comments Register
131
5.4.1
dac2_black_level_video_pedestal
Table 43.
Prototype Description
dac2_black_level_video_pedestal
void dac2_black_level_video_pedestal(char parameter) Black level video pedestal active on DAC2 Parameter : DEFAULT NOT_ACTIVE ACTIVE none dac2_black_level_video_pedestal(ACTIVE)
Arguments
Return Value Example Comments Register
131
30/36
PM0026
List of functions classified by register number
6
List of functions classified by register number
This section presents which function to use in order to configure a specific bit of a register. The parameters given for each function are only provided as examples. The user can change them according to what they want to achieve. When there are 2 functions to configure the same register bit you have to select only one of them.
6.1
Register 0 to 8
Table 44.
Bits 7-6 5-3 2 1 0 standard_selection(PAL_BDGHI) sync_configuration(SLAVE_MODE_ODDEV_ONLY) polarity_hsync(FALLING_EDGE) polarity_vsync(FALLING_EDGE) freerun(OFF)
Register 0
Function to use
Table 45.
Bits 7 6-5 4 3 2 1-0
Register 1
Function to use ver tical_blanking_interval_selection(PARTIAL_BLANKING) chroma_filter_bandwidth(MHZ_1_6) synchro_availability(SYNCHRO_OFF) colour_killer(COLOR_ON) pedestal(DIFFERENT_LEVEL) --
Table 46.
Bits 7 6 5 4 3 2 1-0
Register 2
Function to use interlaced_mode_select(INTERLACED) cyclic_phase_reset(OFF) chrominance_burst_control(ON) -set_of_reset_value(HARDWARE_RESET) software_phase_reset_buffer() automatic_reset_oscillator(EVERY_LINE)
31/36
List of functions classified by register number Table 47.
Bits 7 6 5 4 3 2-0 trap_filter(DISABLED) trap_filter_centered_freq(MHZ_3_58) -chroma_to_luma_delay_prog(DISABLED) incoming_sync_adjustment(NOMINAL) --
PM0026
Register 3
Function to use
Table 48.
Bits 7-6 5-4 3 2 1-0
Register 4
Function to use incoming_sync_adjustment(NOMINAL) outgoing_sync_adjustment(NOMINAL) video_active_line_duration_control(FULL) enable_variance_in_phase() --
Table 49.
Bits 7 6 5 4-1 0
Register 5
Function to use digital_freq_synt_increment(HARD) dac1_blanking(DAC_NORMAL) dac2_blanking(DAC_NORMAL) -dac_input_output_inver tion(NON_INVERTED)
Table 50.
Bits 7 6-4 3-2 1 0
Register 6
Function to use software_reset() skip_inser t_mode_selection(MANUAL_MODE) colour_frequency_control(CFC_DISABLED) -max_dynamic_magnitude(DIFFERENT_FOR_YCBCR)
Table 51.
Bits 7-3 2 1-0
Register 7
Function to use -bypass_mode_sync_correction(NO_SYNC_CORRECTION) --
32/36
PM0026 Table 52.
Bits 7-6 5 4 3 2-0
List of functions classified by register number Register 8
Function to use subcarrier_phase_reset(PHASE_RESET_DISABLED) -val_422_mux_set_to_1( ) blanking_all_video_lines(DISABLED) --
6.2
Register 95
Table 53.
Bits 7-6 5 4-0 -dac1_dac2_config(Y_C) --
Register 95
Function to use
6.3
Register 128 to 131
Table 54.
Bits 7-1 0 -standby_mode(STANDBY_OFF)
Register 128
Function to use
Table 55.
Bits 7-1 0
Register 129
Function to use -power_management_unit_reset( )
Table 56.
Bits 7-3 2 1 0
Register 130
Function to use -dac1_power_mode(POWER_OFF) dac1_input_data(NORMAL_TRANSMISSION) dac1_black_level_video_pedestal(NOT_ACTIVE)
33/36
List of functions classified by register number Table 57.
Bits 7-3 2 1 0 -dac2_power_mode(POWER_OFF) dac2_input_data(NORMAL_TRANSMISSION) dac2_black_level_video_pedestal(NOT_ACTIVE)
PM0026
Register 131
Function to use
34/36
PM0026
Revision history
7
Revision history
Table 58.
Date 13-Jun-2006
Document revision history
Revision 1 Initial release. Changes
35/36
PM0026
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 AN AUTHORIZE REPRESENTATIVE OF ST, ST PRODUCTS ARE NOT DESIGNED, 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.
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.
2006 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 - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com
36/36
|