2025-06-10 7:40 AM
Hello,
I want to use the TW9992 NTSC/PAL Video Decoder for STM32N6 to transfer an NTSC camera (720x480 resolution) to the MCU via MIPI-CSI and display it on the screen. I have attached the code below.
static void MX_DCMIPP_Init(void)
{
/* USER CODE BEGIN DCMIPP_Init 0 */
/* USER CODE END DCMIPP_Init 0 */
DCMIPP_CSI_PIPE_ConfTypeDef pCSI_PipeConfig = {0};
DCMIPP_CSI_ConfTypeDef pCSI_Config = {0};
DCMIPP_PipeConfTypeDef pPipeConfig = {0};
/* USER CODE BEGIN DCMIPP_Init 1 */
/* USER CODE END DCMIPP_Init 1 */
hdcmipp.Instance = DCMIPP;
if (HAL_DCMIPP_Init(&hdcmipp) != HAL_OK)
{
Error_Handler();
}
/** Pipe 0 Config
*/
pCSI_PipeConfig.DataTypeMode = DCMIPP_DTMODE_DTIDA;
pCSI_PipeConfig.DataTypeIDA = DCMIPP_DT_RGB565;
pCSI_PipeConfig.DataTypeIDB = DCMIPP_DT_RGB565;
if (HAL_DCMIPP_CSI_PIPE_SetConfig(&hdcmipp, DCMIPP_PIPE0, &pCSI_PipeConfig) != HAL_OK)
{
Error_Handler();
}
pCSI_Config.PHYBitrate = DCMIPP_CSI_PHY_BT_1600;
pCSI_Config.DataLaneMapping = DCMIPP_CSI_PHYSICAL_DATA_LANES;
pCSI_Config.NumberOfLanes = DCMIPP_CSI_ONE_DATA_LANE;
if (HAL_DCMIPP_CSI_SetConfig(&hdcmipp, &pCSI_Config) != HAL_OK)
{
Error_Handler();
}
pPipeConfig.FrameRate = DCMIPP_FRAME_RATE_ALL;
pPipeConfig.PixelPipePitch = 1440;
pPipeConfig.PixelPackerFormat = DCMIPP_PIXEL_PACKER_FORMAT_RGB565_1;
if (HAL_DCMIPP_PIPE_SetConfig(&hdcmipp, DCMIPP_PIPE0, &pPipeConfig) != HAL_OK)
{
Error_Handler();
}
HAL_DCMIPP_CSI_SetVCConfig(&hdcmipp, 0U, DCMIPP_CSI_DT_BPP16);
/* USER CODE BEGIN DCMIPP_Init 2 */
/* USER CODE END DCMIPP_Init 2 */
}
if (HAL_DCMIPP_CSI_PIPE_Start(&hdcmipp, DCMIPP_PIPE0, DCMIPP_VIRTUAL_CHANNEL0 ,
AXISRAM4_ADDRESS, DCMIPP_MODE_CONTINUOUS) != HAL_OK)
{
Error_Handler();
}
while(1){
/* Start DMA2D transfer*/
if(HAL_DMA2D_Start_IT(&hdma2d,
(uint32_t)AXISRAM4_ADDRESS, /* camera data */
(uint32_t)BUFFER_ADDRESS, /* LCD frame buffer address */
FRAME_WIDTH,
FRAME_HEIGHT) != HAL_OK)
{
Error_Handler();
}
}
Is the parameter pCSI_Config.PHYBitrate = DCMIPP_CSI_PHY_BT_1600; correct for the camera used in our application?
pPipeConfig.PixelPipePitch = 1440;
HAL_DCMIPP_CSI_SetVCConfig(&hdcmipp, 0U, DCMIPP_CSI_DT_BPP16);
When using 16-bit, does it become 720 or 1440?
Also, Pipe 1 has an ISP, but we don't need to use it (the camera has its own ISP). Therefore, we chose Pipe 0 so what would you recommend about it?
Best regards,
Egemen Aksoy
2025-06-12 5:54 AM
Hello,
Is there any progress?
2025-06-17 12:49 AM
Hello,
Sadly, still there is no any response.
Could you please help for this topic. It is a bit urgent.
Best regards,
Egemen Aksoy