DCMI priority versus SDMMC (STM32N6)
Good day folks,
I have the DCMI camera interface on a STM32N6 streaming to the SDCard, and I am noticing that there are cases that the DCMI reports an Overrun when a SD access occurs at the same time that the Hsync interrupt was meant to occur.
Digging into it I believe its due to congestion on the underlying AXI bus, and the IDMA of the SDMMC taking priority over the DCMI DMA. I have set the DCMI and its DMA to the highest possible priority as below.
HAL_NVIC_SetPriority(GPDMA1_Channel12_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(GPDMA1_Channel12_IRQn);
HAL_NVIC_SetPriority(DCMI_PSSI_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(DCMI_PSSI_IRQn);
HAL_NVIC_SetPriority(SDMMC1_IRQn, 5, 5);
HAL_NVIC_EnableIRQ(SDMMC1_IRQn); gpdma_dcmi.Instance = GPDMA1_Channel12;
gpdma_dcmi.Init.Request = GPDMA1_REQUEST_DCMI_PSSI;
gpdma_dcmi.Init.BlkHWRequest = DMA_BREQ_SINGLE_BURST;
gpdma_dcmi.Init.Direction = DMA_PERIPH_TO_MEMORY;
gpdma_dcmi.Init.SrcInc = DMA_SINC_FIXED;
gpdma_dcmi.Init.DestInc = DMA_DINC_INCREMENTED;
gpdma_dcmi.Init.SrcDataWidth = DMA_SRC_DATAWIDTH_WORD;
gpdma_dcmi.Init.DestDataWidth = DMA_DEST_DATAWIDTH_WORD;
gpdma_dcmi.Init.Priority = DMA_HIGH_PRIORITY;
gpdma_dcmi.Init.SrcBurstLength = 1;
gpdma_dcmi.Init.DestBurstLength = 8;
gpdma_dcmi.Init.TransferAllocatedPort = DMA_SRC_ALLOCATED_PORT1 | DMA_DEST_ALLOCATED_PORT0;
gpdma_dcmi.Init.TransferEventMode = DMA_TCEM_BLOCK_TRANSFER;
gpdma_dcmi.Init.Mode = DMA_NORMAL;From what I can see the IDMA priority of the SDMMC cannot be configured, and when it comes to access on the AXI bus it is round robin. I am using the `HAL_SD_WriteBlocks_DMA()` interface.
I have been trying to research which Arm Cortex M55 registers I can configure to adjust the priorities, however I have had no luck yet.

There is a recovery if a frame is dropped to continue streaming, however it would be great not to drop frames due to bus contention.
Any hints would be great! Thank you in advance.
