Skip to main content
Associate III
August 22, 2026
Solved

N6 DCMIPP CSI-2 Camera Struggles

  • August 22, 2026
  • 2 replies
  • 27 views

Hi everyone,

I have a N6 Discovery Kit with a camera. Additionally, I have an N6 Nucleo Board. Now I want to use the CubeMX and CubeIDE to capture a frame on the Nucleo with the camera. I copied most of the things from the `DCMIPP_ContinuousMode` example but I still can't get it working...

 

 

If anyone has more experience with the DCMIPP and CSI-2 (which is both new to me) and could help, it'd be greatly appreciated, thanks!

 

Best answer by rphii

Hi, thank you very much. I finally figured out what the issue was. There were three crucial:

  1. Your suggestion regarding the clocks.
  2. Enable AXISRAM3 and AXISRAM4 (BUFFER_ADDRESS is AXISRAM3)
  3. When I was launching the Application code in debug, using the xxx_LRUN.ld, since FSBL gets skipped, the SystemClock_Config also gets skipped (doesn't get generated into the Application)

 

I am not sure if the changes I made in the RIF also played a role... Anyways, if I get to it, I'll update the repository.

2 replies

Associate III
August 22, 2026

Hello rhpii

from my experience your CSI clock is too high, causing the camera pipeline to fail initialization or frame capture.

Based on your example and the code reference you provided, the root cause is indeed likely the CSI clock configuration. The camera sensor (e.g., IMX335) typically expects a CSI clock in the range of 1030 MHz, but your current setup is feeding it 1600 MHz (from PLL4 Div by 1), which is far beyond the sensor's tolerance. Maybe you should Update your clk configuration in HAL_DCMIPP_MspInit function in stm32n6xx_hal_msp.c

 PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_DCMIPP;
PeriphClkInitStruct.DcmippClockSelection = RCC_DCMIPPCLKSOURCE_IC17;
PeriphClkInitStruct.ICSelection[RCC_IC17].ClockSelection = RCC_ICCLKSOURCE_PLL4;
PeriphClkInitStruct.ICSelection[RCC_IC17].ClockDivider = 8;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
{
Error_Handler();
}
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CSI;
PeriphClkInitStruct.ICSelection[RCC_IC18].ClockSelection = RCC_ICCLKSOURCE_PLL4;
PeriphClkInitStruct.ICSelection[RCC_IC18].ClockDivider =80;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
{
Error_Handler();
}

 

i hope this help

rphiiAuthorBest answer
Associate III
August 22, 2026

Hi, thank you very much. I finally figured out what the issue was. There were three crucial:

  1. Your suggestion regarding the clocks.
  2. Enable AXISRAM3 and AXISRAM4 (BUFFER_ADDRESS is AXISRAM3)
  3. When I was launching the Application code in debug, using the xxx_LRUN.ld, since FSBL gets skipped, the SystemClock_Config also gets skipped (doesn't get generated into the Application)

 

I am not sure if the changes I made in the RIF also played a role... Anyways, if I get to it, I'll update the repository.