DM643x/DM6446 VPSS buffer overflow problem

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

Contents

Objective

On the DM643x and the DM6446 there is a potential risk that the write buffer of the CCDC controller of the Video Processing Subsystem (VPSS) runs into an overflow condition in some cases. The following article describes the contributors to this problem, provides several possible containment actions, and describes a procedure of how the detect and escape from this overflow state.


Root cause description

The fundamental root cause behind this problem is that the SDRAM/DDR2 controller may not be able to fetch the video data from the VPSS in time, when there is a high video data rate and high DDR2 load. This could result in a memory overflow of the write buffer in the CCDC controller, i.e. all data units have been filled and not yet transferred to SDRAM/DDR2 before the next data unit is to be filled. This condition is indicated by the setting of the "CCDC_WBL_O" bit of the "VPSS Peripheral Control Register" (PCR). Once this overflow occurs, the Video Port stops outputting new video data, but continues to generate interrupts. This is a permanent overflow state that can only be cleared by using a certain procedure as described below.

The orange arrows in Figure 1 highlight the data path from the video input to the SDRAM/DDR2 memory:

VPSS Stop Dataflow.jpg

Figure 1: Data path through VPSS


Containment measures

There are several contributors to the occurrence of this problem. Since we know these contributors, we can configure the corresponding modules in our system in such a manner, that the probability of this issue could be reduced. Therefore please consider the following recommendations:


Detecting and escaping from an overflow state

The following procedure could be used to determine that the system is in "overflow state" and to escape from this state:

  1. Write a magic word (e.g. 0x80808080) to the end of the DDR2 buffer before this buffer is handed over to the VPFE driver.
  2. Writeback-invalidate the data from cache to DDR2 memory (e.g. via a BCACHE_wbInv() call).
  3. Pass the buffer to the VPFE driver to let the video port hardware fill the buffer in the normal way.
  4. When the buffer is returned from the VPFE driver, check whether the magic word has been overwritten. In the failure case, the magic word could still found in the buffer after the driver has passed it back to the application. When this happened, the CCDC_WBL_O flag in the PCR register indicates the overflow condition.
  5. To escape from this overflow state a PSC reset needs to be asserted and all VPFE registers need to be re-initialized, by going through the process of calling the various initialization functions of the PSP driver.


References

E2e.jpg For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article DM643x/DM6446 VPSS buffer overflow problem here.
Hyperlink blue.png Links
ARM Microcontroller MCU ARM Processor Digital Media Processor Digital Signal Processing Microcontroller MCU Multi Core Processor
Ultra Low Power DSP 8 bit Microcontroller MCU 16 bit Microcontroller MCU 32 bit Microcontroller MCU

Leave a Comment
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox