different cache behavior between stm32H7 and stm32F7
Hi,
I am facing a strange cache problem. I use the DCMI coupled to the DMA in order to acquire an image into the external SDRAM. As indicated in the application note AN4839, I proceed in this way.
- before to start the DMA transfer I clean the cache (cache_D_Clean();)
- At the end of the transfer (in the DMA interruption indicating the end), I invalidate the cache (cache_D_Invalidate();)
Everything work perfectly on the stm32H7.
On the stm32F7, as soon as the cache invalidation routine is called, the CPU generates a bus error.
On the stm32F7, in the DMA interruption indicating the end of the transfer, I replaced the cache invalidation (cache_D_Invalidate();) by the cache clean followed by the cache invalidation (cache_D_Clean(); cache_D_Invalidate();). Adding a clean (cache_D_Clean();) seems to avoid the bus error but I cannot understand why.
Why the behavior of the H7 and the F7 caches are different on the same code?
Thank you for your feedbacks.
Any idea why ?
