Skip to main content
Asing.4
Associate II
March 22, 2022
Question

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

  • March 22, 2022
  • 10 replies
  • 3765 views

..

This topic has been closed for replies.

10 replies

Andrew Neil
Super User
March 22, 2022

What "help", exactly, do you need?

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

How To Interface Anything to Anything Else

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Asing.4
Asing.4Author
Associate II
March 24, 2022

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?

Andrew Neil
Super User
March 24, 2022

@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

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Tesla DeLorean
Guru
March 22, 2022

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
Asing.4
Asing.4Author
Associate II
March 26, 2022

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
Asing.4Author
Associate II
May 26, 2022

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;
 }

Andrew Neil
Super User
May 26, 2022

0693W000008xsqBQAQ.png

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Pavel A.
May 26, 2022

> but i am not getting RGB output

So what are you getting? Where it fails?

Asing.4
Asing.4Author
Associate II
May 27, 2022

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;
 }