Merge pull request #4954 from c1728p9/fix_isr_clear

Fix ISR powerdown in mbed_application.c
pull/4964/merge
Jimmy Brisson 2017-08-29 13:46:25 -05:00 committed by GitHub
commit 2d65f49f61
1 changed files with 3 additions and 3 deletions

View File

@ -44,12 +44,12 @@ void mbed_start_application(uintptr_t address)
static void powerdown_nvic()
{
int isr_count;
int isr_groups_32;
int i;
int j;
isr_count = (SCnSCB->ICTR & SCnSCB_ICTR_INTLINESNUM_Msk) >> SCnSCB_ICTR_INTLINESNUM_Pos;
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++) {
NVIC->ICER[i] = 0xFFFFFFFF;
NVIC->ICPR[i] = 0xFFFFFFFF;
for (j = 0; j < 8; j++) {