2025-09-01 11:43 PM
I want to use N657B0 to drive VD55G0, and the camera side can already enter the Stream state. After I use the function HAL_DCMIPP_CSI_PIPE_Start, I track the variable csi_instance through single-step debugging and find that several bits in its SR1 register are inconsistent with the normal state. And I find the defination about these.The normal state is 1 but I get 0.Could you please tell me what the reason for this might be?
Is the issue caused by a voltage supply problem in the hardware connection, or by inadequate rate matching in the port?
That is my configuration.
2025-09-08 6:57 AM
Hello,
Could you please first correctly reorder the configuration and share if the problem persists?
static void MX_DCMIPP_Init(void)
{
/* USER CODE BEGIN DCMIPP_Init 0 */
/* USER CODE END DCMIPP_Init 0 */
DCMIPP_CSI_PIPE_ConfTypeDef pCSIPipeConf = {0};
DCMIPP_PipeConfTypeDef PipeConfig = {0};
DCMIPP_CSI_ConfTypeDef csiconf = {0};
/* USER CODE BEGIN DCMIPP_Init 1 */
/* USER CODE END DCMIPP_Init 1 */
phdcmipp.Instance = DCMIPP;
if (HAL_DCMIPP_Init(&phdcmipp) != HAL_OK)
{
Error_Handler();
}
/* Configure the CSI */
csiconf.DataLaneMapping = DCMIPP_CSI_PHYSICAL_DATA_LANES;
csiconf.NumberOfLanes = DCMIPP_CSI_TWO_DATA_LANES;
csiconf.PHYBitrate = DCMIPP_CSI_PHY_BT_250;
HAL_DCMIPP_CSI_SetConfig(&phdcmipp, &csiconf);
/* Set Virtual Channel config */
HAL_DCMIPP_CSI_SetVCConfig(&phdcmipp, DCMIPP_VIRTUAL_CHANNEL0, DCMIPP_CSI_DT_BPP8);
/* Pipe 1 Config */
pCSIPipeConf.DataTypeMode = DCMIPP_DTMODE_DTIDA;
pCSIPipeConf.DataTypeIDA = DCMIPP_DT_RGB565;
pCSIPipeConf.DataTypeIDB = DCMIPP_DT_RGB565;
HAL_DCMIPP_CSI_PIPE_SetConfig(&phdcmipp, DCMIPP_PIPE1, &pCSIPipeConf);
PipeConfig.FrameRate = DCMIPP_FRAME_RATE_ALL;
PipeConfig.PixelPackerFormat = DCMIPP_PIXEL_PACKER_FORMAT_RGB565_1;
PipeConfig.PixelPipePitch = FRAME_WIDTH * 2 ; /* Number of bytes per Line */
if (HAL_DCMIPP_PIPE_SetConfig(&phdcmipp, DCMIPP_PIPE1, &PipeConfig) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN DCMIPP_Init 2 */
/* USER CODE END DCMIPP_Init 2 */
}
Best Regards,
2025-09-08 7:39 AM
2025-09-08 8:05 AM
It was just an example. Surely, you can use pipe0. What I meant was the order or call sequence of the functions
2025-09-08 8:07 AM
Sorry, I can't understand what you meaning. Do you mean the position of MX_DCMIPP_Init() in main.c?
2025-09-08 8:20 AM
No I mean the HAL_DCMIPP... Functions calls
2025-09-08 9:16 AM
However, when I ran the code you provided earlier, I still couldn't solve that problem, and I still couldn't receive the image.