File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -90,21 +90,18 @@ void mbed_start_application(uintptr_t address)
90
90
static void powerdown_nvic ()
91
91
{
92
92
int i ;
93
- #if defined(__CORTEX_M0PLUS )
94
- NVIC -> ICER [0 ] = 0xFFFFFFFF ;
95
- NVIC -> ICPR [0 ] = 0xFFFFFFFF ;
96
- for (i = 0 ; i < 8 ; i ++ ) {
97
- NVIC -> IP [i ] = 0x00000000 ;
98
- }
99
- #else
100
93
int j ;
101
94
int isr_groups_32 ;
95
+
102
96
#if defined(__CORTEX_M23 )
103
97
// M23 doesn't support ICTR and supports up to 240 external interrupts.
104
98
isr_groups_32 = 8 ;
99
+ #elif defined(__CORTEX_M0PLUS )
100
+ isr_groups_32 = 1 ;
105
101
#else
106
102
isr_groups_32 = ((SCnSCB -> ICTR & SCnSCB_ICTR_INTLINESNUM_Msk ) >> SCnSCB_ICTR_INTLINESNUM_Pos ) + 1 ;
107
103
#endif
104
+
108
105
for (i = 0 ; i < isr_groups_32 ; i ++ ) {
109
106
NVIC -> ICER [i ] = 0xFFFFFFFF ;
110
107
NVIC -> ICPR [i ] = 0xFFFFFFFF ;
@@ -116,7 +113,6 @@ static void powerdown_nvic()
116
113
#endif
117
114
}
118
115
}
119
- #endif
120
116
}
121
117
122
118
static void powerdown_scb (uint32_t vtor )
You can’t perform that action at this time.
0 commit comments