Skip to main content
Associate
April 28, 2025
Solved

STM32N6 DCMIPP problem

  • April 28, 2025
  • 3 replies
  • 1221 views

Hi everyone,

I am trying to setup DCMIPP Pipe0 to read data from 256x192 pixel sensor by 16 data lines.

Seems everything configured and working fine except of transfer data to destination buffer.

DCMIPP frame counter is increasing.

Pipe0 dump counter is 0x18000 (256x192x2).

HAL_DCMIPP_PIPE_Start return HAL_OK.

Pipe0 packer memory address register is qual to Pipe0 memory status address register and correspond to address of buffer in RAM.

I checked that DCMIPP don't write zero values by initing frame buffer with 0xFF and it wasn't changed to zeros.

 

I am sure that sensor is working because of frame counter, dump counter, checking lines with oscilloscope and it is working with other pcb with STM32H7 and DCMI interface.  

Also I validated that debugger read frame buffer correctly by sending it thought uart.

 

Source code is simple, generated by cube init than I2C configuration of sensor(validated) and than reading in loop with delay:

while (1)
{
    HAL_GPIO_TogglePin(LED1_GPIO_Port, LED1_Pin);
 
    for(int itr = 0; itr < FRAME_SIZE; itr++){
        uint8_t data = ((uint16_t*)frame_data)[itr]>>data_move;
        frame_data8[itr] = data;
    }
 
    if(HAL_DCMIPP_PIPE_Start(&hdcmipp, DCMIPP_PIPE0, (uint32_t)&frame_data , DCMIPP_MODE_SNAPSHOT) != HAL_OK)
    {
        errors++;
        //Error_Handler();
    }
    
    HAL_Delay(500);
}
 
I don't have any idea how to debag it. I can't found any information about AXI master or example for STM32N6 with DCMIPP Pipe0 not in CSI mode. If you know what the problem is or can tell me how to figure it out, I would be grateful.

Screenshot 2025-04-29 000858.png

 

Screenshot 2025-04-29 000933.pngScreenshot 2025-04-29 000954.png

Screenshot 2025-04-29 001138.pngScreenshot 2025-04-29 001207.png

  

 

Best answer by MikeF

Solved. It was problem with Resource isolation slave unit. Thanks to this post: https://community.st.com/t5/stm32-mcus-products/stm32n6-hpdma-not-copying-data/td-p/758276

3 replies

MikeFAuthorBest answer
Associate
April 29, 2025

Solved. It was problem with Resource isolation slave unit. Thanks to this post: https://community.st.com/t5/stm32-mcus-products/stm32n6-hpdma-not-copying-data/td-p/758276

Kamurasi-Jordan-Arthur
Associate III
November 5, 2025

Hey there @MikeF , 
Hope all is okay. I have an inquiry to put across on this
Exactly what did you configure?
I have set up this but it seems not to be working for me

// RIMC_MasterConfig_t RIMC_master = {0};

// RIMC_master.MasterCID = RIF_CID_1;

// RIMC_master.SecPriv = RIF_ATTRIBUTE_SEC | RIF_ATTRIBUTE_PRIV;

// /*RIMC configuration*/

// HAL_RIF_RIMC_ConfigMasterAttributes(RIF_MASTER_INDEX_DCMIPP, &RIMC_master);

// /*RISUP configuration*/

// HAL_RIF_RISC_SetSlaveSecureAttributes(RIF_RISC_PERIPH_INDEX_DCMIPP , RIF_ATTRIBUTE_SEC | RIF_ATTRIBUTE_PRIV);

Is there some thing am missing. !!

 

 

Explorer II
March 25, 2026

Thanks so much for posting the solution Mike. This was the same issue I had with my N6 board. Camera was connected and working well with the default example, but when I tried to use the camera in my own example, it just wrote all 0s to the buffers.

RIMC_MasterConfig_t dcmipp_master = {0};
 RIMC_MasterConfig_t eth1_master = {0};

 dcmipp_master.MasterCID = RIF_CID_1;
 /* The linked ST forum fix for the N6 raw-dump/HPDMA symptom configures DCMIPP as
 * secure and privileged on both the master and slave sides. We mirror that
 * here so Pipe0 follows the same isolation model. */
 dcmipp_master.SecPriv = RIF_ATTRIBUTE_SEC | RIF_ATTRIBUTE_PRIV;
 HAL_RIF_RIMC_ConfigMasterAttributes(RIF_MASTER_INDEX_DCMIPP, &dcmipp_master);
 HAL_RIF_RISC_SetSlaveSecureAttributes(RIF_RISC_PERIPH_INDEX_DCMIPP,
 RIF_ATTRIBUTE_SEC | RIF_ATTRIBUTE_PRIV);

 eth1_master.MasterCID = RIF_CID_1;
 eth1_master.SecPriv = RIF_ATTRIBUTE_SEC | RIF_ATTRIBUTE_NPRIV;
 HAL_RIF_RIMC_ConfigMasterAttributes(RIF_MASTER_INDEX_ETH1, &eth1_master);