summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamiano Mazzella <damianomazzella@gmail.com>2022-08-23 16:50:24 +0200
committerDamien George <damien@micropython.org>2022-08-25 16:20:51 +1000
commit1fbf0efaebd597207f32a910d635a94ec9f6ef69 (patch)
tree674ab60b950191ec198bd65f6a6f50e4c73f5e14
parent8139cbcf6bfad3f9b14865a5315bc83b5c5ecc7a (diff)
stm32/sdram: Enable MPU for unaligned access on H7 MCUs.
So that SDRAM can be used as the heap on ARDUINO_PORTENTA_H7, for example. Fixes issue #9087.
-rw-r--r--ports/stm32/sdram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/stm32/sdram.c b/ports/stm32/sdram.c
index a94b802ea..fb0e5a868 100644
--- a/ports/stm32/sdram.c
+++ b/ports/stm32/sdram.c
@@ -244,7 +244,7 @@ static void sdram_init_seq(SDRAM_HandleTypeDef
#define REFRESH_COUNT (MICROPY_HW_SDRAM_REFRESH_RATE * 90000 / 8192 - 20)
HAL_SDRAM_ProgramRefreshRate(hsdram, REFRESH_COUNT);
- #if defined(STM32F7)
+ #if defined(STM32F7) || defined(STM32H7)
/* Enable MPU for the SDRAM Memory Region to allow non-aligned
accesses (hard-fault otherwise)
Initially disable all access for the entire SDRAM memory space,