mbed library sources. Supersedes mbed-src.
Dependents: SPIne CH_Communicatuin_Test CH_Communicatuin_Test2 MCP_SPIne ... more
Fork of mbed-dev-f303 by
Diff: platform/mbed_application.c
- Revision:
- 173:e131a1973e81
- Parent:
- 160:d5399cc887bb
--- a/platform/mbed_application.c Thu Aug 31 17:27:04 2017 +0100 +++ b/platform/mbed_application.c Fri Sep 15 14:59:18 2017 +0100 @@ -44,12 +44,12 @@ 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++) {