cancel
Showing results for 
Search instead for 
Did you mean: 

can anyone help me to interface TW9990 (video Decoder ) ic with STM32H7xxx Controller

Asing.4
Associate II
 
10 REPLIES 10
Andrew Neil
Evangelist III

What "help", exactly, do you need?

What have you done so far? Where are you stuck?

How To Interface Anything to Anything Else

Perhaps your colleagues, or FAEs at Intersil/Renasas, or contractors/consultants they can refer you too?

Start with a full-form data sheet. Looks to be an "I2C" connection.

What exactly are you looking for it to do in this H7 system?

NTSC/PAL seems like a bit of a cul-de-sac at this point, check the long term availability for the device

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

i am able to communicate TW9990 via I2C , Now i am facing issue to convert data YCbCr to ARGB8888. I am using CubeMX for code generation of DCMI. configuration is below in snap

0693W00000Lvb6xQAB.png0693W00000Lvb6cQAB.png 

I got a reference code from examples what it seems it tacking data in RGB656

**************code is below *******************

void BSP_CAMERA_LineEventCallback(void)

{

 static uint32_t tmp, tmp2, counter;

  

 if(ysize > counter)

 {

  LCD_LL_ConvertLineToARGB8888((uint32_t *)(CAMERA_FRAME_BUFFER + tmp), (uint32_t *)(LCD_FRAME_BUFFER + tmp2));

  tmp = tmp + xsize*sizeof(uint16_t); 

  tmp2 = tmp2 + xsize*sizeof(uint32_t);

  counter++;

 }

 else

 {

  tmp = 0;

  tmp2 = 0;

  counter = 0;

 }  

**********************************************************

please let me know what should i change to convert data YCbCr to ARGB8888? or let me know if other things i have to done?

@Community member​ "i am facing issue to convert data YCbCr to ARGB8888"

That has nothing to do with the STM32 - the conversion would be exactly the same whatever platform you use.

Have you looked at the support available from the chip manufacturer?

0693W00000LvceqQAB.png 

"I got a reference code from examples"

Where, exactly, did you get that? Is it actually applicable to this chip?

EDIT

Have you studied this:

https://www.st.com/resource/en/application_note/an5020-digital-camera-interface-dcmi-on-stm32-mcus-stmicroelectronics.pdf

i am able to communicate TW9990 via I2C , Now i am facing issue to convert data YCbCr to ARGB8888. I am using CubeMX for code generation of DCMI. configuration is below in snap

0693W00000Lvb6xQAB.png0693W00000Lvb6cQAB.png 

I got a reference code from examples what it seems it tacking data in RGB656

**************code is below *******************

void BSP_CAMERA_LineEventCallback(void)

{

 static uint32_t tmp, tmp2, counter;

  

 if(ysize > counter)

 {

  LCD_LL_ConvertLineToARGB8888((uint32_t *)(CAMERA_FRAME_BUFFER + tmp), (uint32_t *)(LCD_FRAME_BUFFER + tmp2));

  tmp = tmp + xsize*sizeof(uint16_t); 

  tmp2 = tmp2 + xsize*sizeof(uint32_t);

  counter++;

 }

 else

 {

  tmp = 0;

  tmp2 = 0;

  counter = 0;

 }  

**********************************************************

please let me know what should i change to convert data YCbCr to ARGB8888? or let me know if other things i have to done?

Asing.4
Associate II

as JPEG Decoder example(stm32h743), it decode the jpeg buffer into YCbCr buffer and DMA2D_copy_Buffer () function convert YCbCr in to RGB.

in my project i tried start DMA of DCMI to get ycbcr output and pass the address of YCbCr buffer address to DMA2D_copy_Buffer () but i am not getting RGB output

if(HAL_DCMI_Start_DMA(&hdcmi, DCMI_MODE_CONTINUOUS,JPEG_OUTPUT_DATA_BUFFER, 0x0f00000)!=HAL_OK)
 
 {
 
 Error_Handler();
 
 }
 
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
void HAL_DCMI_LineEventCallback(DCMI_HandleTypeDef *hdcmi)
 
{
 
 /* Prevent unused argument(s) compilation warning */
 
 UNUSED(hdcmi);
 
 /* NOTE : This function Should not be modified, when the callback is needed,
 
      the HAL_DCMI_LineEventCallback could be implemented in the user file
 
  */
 
 DMA2D_CopyBuffer((uint32_t *)JPEG_OUTPUT_DATA_BUFFER, (uint32_t *)LCD_FRAME_BUFFER, 0 , 0, 648, 488 ,JPEG_422_SUBSAMPLING);
 
 xa=0;
 }

0693W000008xsqBQAQ.png

Pavel A.
Evangelist III

> but i am not getting RGB output

So what are you getting? Where it fails?

as JPEG Decoder example(stm32h743), it decode the jpeg buffer into YCbCr buffer and DMA2D_copy_Buffer () function convert YCbCr in to RGB.

in my project i tried start DMA of DCMI to get ycbcr output and pass the address of YCbCr buffer address to DMA2D_copy_Buffer () but i am not getting RGB output

if(HAL_DCMI_Start_DMA(&hdcmi, DCMI_MODE_CONTINUOUS,JPEG_OUTPUT_DATA_BUFFER, 0x0f00000)!=HAL_OK)
 
 {
 
 Error_Handler();
 
 }
 
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
void HAL_DCMI_LineEventCallback(DCMI_HandleTypeDef *hdcmi)
 
{
 
 /* Prevent unused argument(s) compilation warning */
 
 UNUSED(hdcmi);
 
 /* NOTE : This function Should not be modified, when the callback is needed,
 
      the HAL_DCMI_LineEventCallback could be implemented in the user file
 
  */
 
 DMA2D_CopyBuffer((uint32_t *)JPEG_OUTPUT_DATA_BUFFER, (uint32_t *)LCD_FRAME_BUFFER, 0 , 0, 648, 488 ,JPEG_422_SUBSAMPLING);
 
 xa=0;
 }