This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new edd68ae4eb2 arch/arm: use architecture-specific CACR address
edd68ae4eb2 is described below
commit edd68ae4eb2bda35a6182c684425484e8f0563c3
Author: hujun5 <[email protected]>
AuthorDate: Sat Nov 28 20:37:04 2026 +0800
arch/arm: use architecture-specific CACR address
use architecture-specific CACR address
fix https://github.com/apache/nuttx/issues/22507
Signed-off-by: hujun5 <[email protected]>
---
arch/arm/src/arm_m/nvic.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/src/arm_m/nvic.h b/arch/arm/src/arm_m/nvic.h
index 49174c2aa0e..49597e49868 100644
--- a/arch/arm/src/arm_m/nvic.h
+++ b/arch/arm/src/arm_m/nvic.h
@@ -305,9 +305,13 @@
#define NVIC_CID2_OFFSET 0x0ff8 /* Component identification
register bits 23:16 (CID0) */
#define NVIC_CID3_OFFSET 0x0ffc /* Component identification
register bits 23:16 (CID0) */
-/* Cortex-M55 and Cortex-M85 implementation defined registers */
+/* Cache Control Register address differs between Cortex-M architectures */
-#define NVIC_CACR_OFFSET 0x10008 /* L1 Cache Control Register */
+#ifdef CONFIG_ARCH_ARMV8M
+# define NVIC_CACR_OFFSET 0x10008 /* Cortex-M55/M85 L1 CACR */
+#else
+# define NVIC_CACR_OFFSET 0x0f9c /* Cortex-M7 CACR */
+#endif
/* NVIC register addresses **************************************************/