soc: arm: stm32h7 do not use data cache with DMA

This remove the data cache when the dma is nabled
This is done with the NOCACHE_MEMORY flag

Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2021-08-16 16:12:13 +02:00 committed by Christopher Friedt
commit 6b6aa2714f
2 changed files with 3 additions and 0 deletions

View file

@ -80,10 +80,12 @@ static int stm32h7_init(const struct device *arg)
SCB_EnableICache();
#ifndef CONFIG_NOCACHE_MEMORY
if (!(SCB->CCR & SCB_CCR_DC_Msk)) {
SCB_EnableDCache();
}
#endif /* CONFIG_NOCACHE_MEMORY */
/* Install default handler that simply resets the CPU
* if configured in the kernel, NOP otherwise
*/

View file

@ -0,0 +1 @@
CONFIG_NOCACHE_MEMORY=y