Skip to main content
Visitor II
September 2, 2025
Question

STM32N657B0 Drive the VD55G0

  • September 2, 2025
  • 5 replies
  • 1753 views

eureka_0-1756794824256.png

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.

eureka_1-1756795314513.png

 

    This topic has been closed for replies.

    5 replies

    ST Employee
    September 8, 2025

    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,

    eurekaAuthor
    Visitor II
    September 8, 2025
    It's still the same error. Is the difference between this code and the one I provided that Pipe0 has been changed to Pipe1? We still can't receive data, and RxActivateHS_lane0 is still 0

    eureka_0-1757342323850.png

     

    ST Employee
    September 8, 2025

    It was just an example. Surely, you can use pipe0. What I meant was the order or call sequence of the functions

    eurekaAuthor
    Visitor II
    September 8, 2025

    Sorry, I can't understand what you meaning. Do you mean the position of MX_DCMIPP_Init() in main.c?

    ST Employee
    September 8, 2025

    No I mean the HAL_DCMIPP... Functions calls

    eurekaAuthor
    Visitor II
    September 8, 2025

    However,  when I ran the code you provided earlier, I still couldn't solve that problem, and I still couldn't receive the image.