mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #4954 from c1728p9/fix_isr_clear
Fix ISR powerdown in mbed_application.cpull/4964/merge
commit
2d65f49f61
|
@ -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++) {
|
||||
|
|
Loading…
Reference in New Issue