Skip to content

Commit 06d222d

Browse files
FRASTMcarlescufi
authored andcommitted
tests: arm: runtime nmi testcase is flushing DCACHE
On mcu with Data Cache, when it is enabled (CONFIG_DCACHE=y), the DCACHE must be flushed after the NMI loop to trig all the irq, else the last one is missing. Signed-off-by: Francois Ramu <[email protected]>
1 parent 7ff8581 commit 06d222d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/arch/arm/arm_runtime_nmi/src/arm_runtime_nmi.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ void test_arm_runtime_nmi(void)
6161
/* Trigger NMI: Should fire immediately */
6262
SCB->ICSR |= SCB_ICSR_NMIPENDSET_Msk;
6363

64+
#ifdef ARM_CACHEL1_ARMV7_H
65+
/* Flush Data Cache now if enabled */
66+
if (IS_ENABLED(CONFIG_DCACHE)) {
67+
SCB_CleanDCache();
68+
}
69+
#endif /* ARM_CACHEL1_ARMV7_H */
6470
zassert_true(nmi_triggered, "Isr not triggered!\n");
6571
}
6672
/**

0 commit comments

Comments
 (0)