cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N657B0 Drive the VD55G0

eureka
Associate II

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

 

6 REPLIES 6
Ch_JE
ST Employee

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,

eureka
Associate II
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

 

Ch_JE
ST Employee

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

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

Ch_JE
ST Employee

No I mean the HAL_DCMIPP... Functions calls

eureka
Associate II

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