Skip to content

Commit 39c8ba3

Browse files
FRASTMmbolivar-nordic
authored andcommitted
soc: arm: stm32f7 soc without Dcache
The stm32f7 (like stm32H7) should be able to disable the Dcache when using the DMA. This is to avoid any pb of cache coherency on the DMA buffers. Signed-off-by: Francois Ramu <[email protected]>
1 parent 97d9899 commit 39c8ba3

File tree

1 file changed

+5
-2
lines changed
  • soc/arm/st_stm32/stm32f7

1 file changed

+5
-2
lines changed

soc/arm/st_stm32/stm32f7/soc.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ static int st_stm32f7_init(const struct device *arg)
3737
key = irq_lock();
3838

3939
SCB_EnableICache();
40-
if (!(SCB->CCR & SCB_CCR_DC_Msk)) {
41-
SCB_EnableDCache();
40+
41+
if (IS_ENABLED(CONFIG_DCACHE)) {
42+
if (!(SCB->CCR & SCB_CCR_DC_Msk)) {
43+
SCB_EnableDCache();
44+
}
4245
}
4346

4447
/* Install default handler that simply resets the CPU

0 commit comments

Comments
 (0)