cancel
Showing results for 
Search instead for 
Did you mean: 

DCMI affected due to enable the ICache and DCache in stm32h743

saikumar
Associate III

Hello,

I am using the STM32H743ZI2 controller with Cortex-M7 and firmware version 1.11.2 for a project where I am capturing camera data through DCMI and sending it over Ethernet using UDP to software that receives the data and builds a video stream.

However, I am facing an issue related to cache usage:

When I enable SCB_EnableICache() and SCB_EnableDCache(), the DCMI data is not being copied into the another buffer, resulting in the data being sent over Ethernet as zeros (00000000...).  And the DCMI stops immediately capturing data.

example :---

 while(HAL_DCMI_Start_DMA(&hdcmi,DCMI_MODE_CONTINUOUS(uint32_t)&Rx_B(uint32_t)320)!=HAL_OK){}

I Have Started the the dcmi and enter into while

while(1)

{

for(int i=0 ; i<1280 ; i++){

dcmi_temp[i] = Rx_B[i];

}

}

 

When I disable the I and D cache, the DCMI data is successfully copied into the another buffer, and the data is transmitted correctly. However, the Ethernet packet sending speed drops to 30-40 Mbps.(basically speed would be in 80 - 90 Mbps).

Could anyone provide insights on why the cache affects the DCMI data transfer and how to resolve this while maintaining higher Ethernet throughput?

i have uploaded EXAMPLE code in text document . plz  check it and help me on this

Thank you in advance for your help!

1 REPLY 1
KDJEM.1
ST Employee

Hello @saikumar ,

 

I think the cache issue, which you are encountering, is related to memory layout on STM32H7 and internal data cache (D-Cache) of the Cortex-M7 core.  So, when working with DMA for STM32H7 devices, you should pay attention to the memory allocation. For that could you please take a look at this FAQ and precisely at proposal solutions 

When working with DMA for STM32H7 devices, you should pay attention to the memory allocation. For more information please refer to AN4839. This application note describes the level 1 cache behavior and gives an example showing how to ensure data coherency in the STM32F7 Series and STM32H7 Series when using the L1-cache.

Please let me know if the issue is solved or not?

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.