Texas Instruments | TVP5160 Patch Code Download lines (Rev. A) | Application notes | Texas Instruments TVP5160 Patch Code Download lines (Rev. A) Application notes

Texas Instruments TVP5160 Patch Code Download lines (Rev. A) Application notes
Application Report
SLEA097A – June 2010 – Revised December 2010
TVP5160 Patch Code Download Guidelines
.....................................................................................................................................................
1
Overview
This application note explains how to load RAM code into the TVP5160 video decoder. The TVP5160
video decoder by default executes firmware from internal ROM on power up. Special functions or
optimizations are available by utilizing the internal RAM of the TVP5160. The following describes the
processed required to access and load code into the TVP5160 RAM.
2
Understanding the VBUS
It is important to understand that loading RAM code is not a feature provided by the standard I2C register
map. This procedure requires I2C writes to the physical hardware of the TVP5160 CPU. These internal
registers of the TVP5160 video decoder are known as VBUS registers. The figures below show a typical
VBUS register access.
SLEA097A – June 2010 – Revised December 2010
Submit Documentation Feedback
TVP5160 Patch Code Download Guidelines
© 2010, Texas Instruments Incorporated
1
The Process
www.ti.com
The examples above use default the I2C address, 0xB8. The acronyms used in the example are:
ACK – Acknowledge generated by the slave
MACK – Acknowledge generated by the master
NAK – No Acknowledge generated by the master
3
The Process
There are six steps required to properly load RAM code into the TVP5160. There is an additional optional
step that performs a CRC on the RAM code load if desired.
1. Place the CPU into Reset
By writing a 1 to bit 0 of the first byte in the 0xB00060 VBUS address, the internal processor is placed
into a reset state. This is necessary in order to load RAM code. To do this the VBUS address must first
be set. Set VBUS address to 0xB00060 by making the following I2C writes.
0xE8, 0x60
0xE9, 0x00
0xEA, 0xB0
Where:
0xE8, 0xE9, 0xEA indicate the bytes of the address being setup (byte1, etc.)
0x60, 0x00, 0xB0 indicate the bytes of the physical VBUS address
Once these writes have been performed, the current VBUS address is set to 0xB00060. Use the
non-incrementing data register, 0xE0, to set the Reset bit by setting bit 0 to 1.
0xE0, 0x01
2
TVP5160 Patch Code Download Guidelines
SLEA097A – June 2010 – Revised December 2010
Submit Documentation Feedback
© 2010, Texas Instruments Incorporated
The Process
www.ti.com
2. Set the VBUS to the Beginning of Program RAM
Now that the internal processor is in a reset state, the following I2C writes will set the VBUS to the
beginning of Program RAM. This is the location in which the RAM code will be stored during the
loading process. Set the VBUS address to the beginning of Program RAM, 0x400000.
0xE8, 0x00
0xE9, 0x00
0xEA, 0x40
3. Load the RAM Code
With the VBUS now set to the beginning of Program RAM, start loading the provided RAM code *.bin
file using the following writes. Since the firmware code data is loaded at once, the incrementing VBUS
data register, 0xE1 must be used, where:
0xE1, (RAM Code Data)
Using the above technique, all of the bytes of the firmware should be written using a single I2C
transaction. See below for details.
ST B8 E1 D0 D1 ... DN-1 SP
Where:
ST = I2C start condition
B8 = TVP5160 device I2C address for writes (could also be BA depending on the GLCO/I2CA pin at
the end of RESET)
E1 = I2C sub-address of the incrementing VBUS data register
D0 D1 ... DN-1D = Data from the binary firmware file. N is the number of bytes in the firmware file.
SP = I2C stop condition
4. Set the RAM Loaded Bit
For the default ROM code to understand RAM load has been used, the RAM Loaded bit must be used.
This is used by the internal CPU to execute out of RAM instead of ROM. To set the RAM Loaded Bit
set VBUS address to 0xB00060.
0xE8, 0x60
0xE9, 0x00
0xEA, 0xB0
Write 0x03 to the non-incrementing VBUS data register, 0xE0 sets the RAM Loaded Bit and keeps the
CPU RESET bit set.
0xE0, 0x03
SLEA097A – June 2010 – Revised December 2010
Submit Documentation Feedback
TVP5160 Patch Code Download Guidelines
© 2010, Texas Instruments Incorporated
3
The Process
www.ti.com
5. OPTIONAL – Run CRC
As an optional step, it is possible to perform a CRC after downloading RAM code to the TVP5160. This
optional step allows the system to verify whether RAM code was successfully loaded into the
TVP5160.
By default, CRC is disabled. To enable Run CRC, set VBUS address 0xB00063 bit 2 to 1 (0x04). To
set up the address, write the following:
0xE8, 0x63
0xE9, 0x00
0xEA, 0xB0
To write 0x04 to the VBUS data register, write the following:
0xE0, 0x04
Now that Run CRC bit has been enabled, CRC will start once the CPU has been released from reset
as described in the next step, 6. Release the CPU Reset.
NOTE: Once the CPU is taken out of the reset state and CRC is enabled, the processor will execute
the CRC process. This process requires approximately 20ms to complete during which time I2C
transactions will be unavailable.
To view the results of the CRC read bits[1:0] of VBUS address 0xB00063, where:
00 = CRC was not performed
01 = PASS - RAM code loaded successfully
10 = Reserved
11 = FAIL - RAM code not loaded successfully
If the CRC fails, re-start the load RAM process from the beginning.
6. Release the CPU Reset
To restart the CPU and release it from its reset state, a write of 0x02 to the same VBUS address as
above (0xB00060) is necessary.
0xE8, 0x60
0xE9, 0x00
0xEA, 0xB0
0xE0, 0x02
NOTE: If running CRC, this step must be performed first before the result of the CRC is available.
7. The patch code should now be running.
The revision number can be verified by reading the ROM version, RAM version MSB, and RAM
version LSB from I2C registers 0x70, 0x71, and 0x82, respectively.
For example,
Patch Release = v04.04.02
ROM Version = 0x04
RAM Version MSB = 0x04
RAM Version LSB = 0x02
4
TVP5160 Patch Code Download Guidelines
SLEA097A – June 2010 – Revised December 2010
Submit Documentation Feedback
© 2010, Texas Instruments Incorporated
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements,
and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should
obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are
sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard
warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where
mandated by government requirements, testing of all parameters of each product is not necessarily performed.
TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and
applications using TI components. To minimize the risks associated with customer products and applications, customers should provide
adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right,
or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information
published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a
warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual
property of the third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied
by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive
business practice. TI is not responsible or liable for such altered documentation. Information of third parties may be subject to additional
restrictions.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all
express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not
responsible or liable for any such statements.
TI products are not authorized for use in safety-critical applications (such as life support) where a failure of the TI product would reasonably
be expected to cause severe personal injury or death, unless officers of the parties have executed an agreement specifically governing
such use. Buyers represent that they have all necessary expertise in the safety and regulatory ramifications of their applications, and
acknowledge and agree that they are solely responsible for all legal, regulatory and safety-related requirements concerning their products
and any use of TI products in such safety-critical applications, notwithstanding any applications-related information or support that may be
provided by TI. Further, Buyers must fully indemnify TI and its representatives against any damages arising out of the use of TI products in
such safety-critical applications.
TI products are neither designed nor intended for use in military/aerospace applications or environments unless the TI products are
specifically designated by TI as military-grade or "enhanced plastic." Only products designated by TI as military-grade meet military
specifications. Buyers acknowledge and agree that any such use of TI products which TI has not designated as military-grade is solely at
the Buyer's risk, and that they are solely responsible for compliance with all legal and regulatory requirements in connection with such use.
TI products are neither designed nor intended for use in automotive applications or environments unless the specific TI products are
designated by TI as compliant with ISO/TS 16949 requirements. Buyers acknowledge and agree that, if they use any non-designated
products in automotive applications, TI will not be responsible for any failure to meet such requirements.
Following are URLs where you can obtain information on other Texas Instruments products and application solutions:
Products
Applications
Amplifiers
amplifier.ti.com
Audio
www.ti.com/audio
Data Converters
dataconverter.ti.com
Automotive
www.ti.com/automotive
DLP® Products
www.dlp.com
Communications and
Telecom
www.ti.com/communications
DSP
dsp.ti.com
Computers and
Peripherals
www.ti.com/computers
Clocks and Timers
www.ti.com/clocks
Consumer Electronics
www.ti.com/consumer-apps
Interface
interface.ti.com
Energy
www.ti.com/energy
Logic
logic.ti.com
Industrial
www.ti.com/industrial
Power Mgmt
power.ti.com
Medical
www.ti.com/medical
Microcontrollers
microcontroller.ti.com
Security
www.ti.com/security
RFID
www.ti-rfid.com
Space, Avionics &
Defense
www.ti.com/space-avionics-defense
RF/IF and ZigBee® Solutions www.ti.com/lprf
Video and Imaging
www.ti.com/video
Wireless
www.ti.com/wireless-apps
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2010, Texas Instruments Incorporated
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising