We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 82f5ce2 + 29ad5bb commit 2d65f49Copy full SHA for 2d65f49
platform/mbed_application.c
@@ -44,12 +44,12 @@ void mbed_start_application(uintptr_t address)
44
45
static void powerdown_nvic()
46
{
47
- int isr_count;
+ int isr_groups_32;
48
int i;
49
int j;
50
51
- isr_count = (SCnSCB->ICTR & SCnSCB_ICTR_INTLINESNUM_Msk) >> SCnSCB_ICTR_INTLINESNUM_Pos;
52
- for (i = 0; i < isr_count; i++) {
+ isr_groups_32 = ((SCnSCB->ICTR & SCnSCB_ICTR_INTLINESNUM_Msk) >> SCnSCB_ICTR_INTLINESNUM_Pos) + 1;
+ for (i = 0; i < isr_groups_32; i++) {
53
NVIC->ICER[i] = 0xFFFFFFFF;
54
NVIC->ICPR[i] = 0xFFFFFFFF;
55
for (j = 0; j < 8; j++) {
0 commit comments