summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriabdalkader <i.abdalkader@gmail.com>2024-09-12 09:34:01 +0200
committerDamien George <damien@micropython.org>2025-07-08 16:25:10 +1000
commiteaed2518fab968362d15745c4f1f3d39bd60ad38 (patch)
treed19bd83fd525214151d205ded517cace00cf263c
parenteb3ea9ee13093d81053f5d07b8c96e4fc0e1383d (diff)
stm32/main: Disable D-cache when debugging N6.
See ST Errata ES0620 - Rev 0.2 section 2.1.2. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
-rw-r--r--ports/stm32/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/stm32/main.c b/ports/stm32/main.c
index aea1953fd..137e13281 100644
--- a/ports/stm32/main.c
+++ b/ports/stm32/main.c
@@ -374,7 +374,11 @@ void stm32_main(uint32_t reset_mode) {
#endif
SCB_EnableICache();
+ #if defined(STM32N6) && !defined(NDEBUG)
+ // Don't enable D-cache on N6 when debugging; see ST Errata ES0620 - Rev 0.2 section 2.1.2.
+ #else
SCB_EnableDCache();
+ #endif
#elif defined(STM32H5)