diff --git a/os/hal/ports/WB32/WB32F3G71xx/wb32_isr.c b/os/hal/ports/WB32/WB32F3G71xx/wb32_isr.c index cba88e67b5..e9fa6d465f 100644 --- a/os/hal/ports/WB32/WB32F3G71xx/wb32_isr.c +++ b/os/hal/ports/WB32/WB32F3G71xx/wb32_isr.c @@ -63,10 +63,11 @@ OSAL_IRQ_HANDLER(WB32_EXTI0_IRQ_VECTOR) { OSAL_IRQ_PROLOGUE(); pr = EXTI->PR & EXTI_PR_PR0; - EXTI->PR = pr; exti_serve_irq(pr, 0); + EXTI->PR = EXTI_PR_PR0; + OSAL_IRQ_EPILOGUE(); } #endif @@ -83,10 +84,11 @@ OSAL_IRQ_HANDLER(WB32_EXTI1_IRQ_VECTOR) { OSAL_IRQ_PROLOGUE(); pr = EXTI->PR & EXTI_PR_PR1; - EXTI->PR = pr; exti_serve_irq(pr, 1); + EXTI->PR = EXTI_PR_PR1; + OSAL_IRQ_EPILOGUE(); } #endif @@ -103,9 +105,10 @@ OSAL_IRQ_HANDLER(WB32_EXTI2_IRQ_VECTOR) { OSAL_IRQ_PROLOGUE(); pr = EXTI->PR & EXTI_PR_PR2; - EXTI->PR = pr; exti_serve_irq(pr, 2); + + EXTI->PR = EXTI_PR_PR2; OSAL_IRQ_EPILOGUE(); } @@ -123,10 +126,11 @@ OSAL_IRQ_HANDLER(WB32_EXTI3_IRQ_VECTOR) { OSAL_IRQ_PROLOGUE(); pr = EXTI->PR & EXTI_PR_PR3; - EXTI->PR = pr; exti_serve_irq(pr, 3); + EXTI->PR = EXTI_PR_PR3; + OSAL_IRQ_EPILOGUE(); } #endif @@ -143,10 +147,11 @@ OSAL_IRQ_HANDLER(WB32_EXTI4_IRQ_VECTOR) { OSAL_IRQ_PROLOGUE(); pr = EXTI->PR & EXTI_PR_PR4; - EXTI->PR = pr; exti_serve_irq(pr, 4); + EXTI->PR = EXTI_PR_PR4; + OSAL_IRQ_EPILOGUE(); } #endif @@ -164,7 +169,6 @@ OSAL_IRQ_HANDLER(WB32_EXTI9_5_IRQ_VECTOR) { pr = EXTI->PR & (EXTI_PR_PR5 | EXTI_PR_PR6 | EXTI_PR_PR7 | EXTI_PR_PR8 | EXTI_PR_PR9); - EXTI->PR = pr; exti_serve_irq(pr, 5); exti_serve_irq(pr, 6); @@ -172,6 +176,9 @@ OSAL_IRQ_HANDLER(WB32_EXTI9_5_IRQ_VECTOR) { exti_serve_irq(pr, 8); exti_serve_irq(pr, 9); + EXTI->PR = EXTI_PR_PR5 | EXTI_PR_PR6 | EXTI_PR_PR7 | + EXTI_PR_PR8 | EXTI_PR_PR9; + OSAL_IRQ_EPILOGUE(); } #endif @@ -189,7 +196,6 @@ OSAL_IRQ_HANDLER(WB32_EXTI15_10_IRQ_VECTOR) { pr = EXTI->PR & (EXTI_PR_PR10 | EXTI_PR_PR11 | EXTI_PR_PR12 | EXTI_PR_PR13 | EXTI_PR_PR14 | EXTI_PR_PR15); - EXTI->PR = pr; exti_serve_irq(pr, 10); exti_serve_irq(pr, 11); @@ -198,6 +204,9 @@ OSAL_IRQ_HANDLER(WB32_EXTI15_10_IRQ_VECTOR) { exti_serve_irq(pr, 14); exti_serve_irq(pr, 15); + EXTI->PR = EXTI_PR_PR10 | EXTI_PR_PR11 | EXTI_PR_PR12 | + EXTI_PR_PR13 | EXTI_PR_PR14 | EXTI_PR_PR15; + OSAL_IRQ_EPILOGUE(); } #endif diff --git a/os/hal/ports/WB32/WB32FQ95xx/wb32_isr.c b/os/hal/ports/WB32/WB32FQ95xx/wb32_isr.c index 1533e3123e..3b89813c9a 100644 --- a/os/hal/ports/WB32/WB32FQ95xx/wb32_isr.c +++ b/os/hal/ports/WB32/WB32FQ95xx/wb32_isr.c @@ -63,10 +63,11 @@ OSAL_IRQ_HANDLER(WB32_EXTI0_IRQ_VECTOR) { OSAL_IRQ_PROLOGUE(); pr = EXTI->PR & EXTI_PR_PR0; - EXTI->PR = pr; exti_serve_irq(pr, 0); + EXTI->PR = EXTI_PR_PR0; + OSAL_IRQ_EPILOGUE(); } #endif @@ -83,10 +84,11 @@ OSAL_IRQ_HANDLER(WB32_EXTI1_IRQ_VECTOR) { OSAL_IRQ_PROLOGUE(); pr = EXTI->PR & EXTI_PR_PR1; - EXTI->PR = pr; exti_serve_irq(pr, 1); + EXTI->PR = EXTI_PR_PR1; + OSAL_IRQ_EPILOGUE(); } #endif @@ -103,9 +105,10 @@ OSAL_IRQ_HANDLER(WB32_EXTI2_IRQ_VECTOR) { OSAL_IRQ_PROLOGUE(); pr = EXTI->PR & EXTI_PR_PR2; - EXTI->PR = pr; exti_serve_irq(pr, 2); + + EXTI->PR = EXTI_PR_PR2; OSAL_IRQ_EPILOGUE(); } @@ -123,10 +126,11 @@ OSAL_IRQ_HANDLER(WB32_EXTI3_IRQ_VECTOR) { OSAL_IRQ_PROLOGUE(); pr = EXTI->PR & EXTI_PR_PR3; - EXTI->PR = pr; exti_serve_irq(pr, 3); + EXTI->PR = EXTI_PR_PR3; + OSAL_IRQ_EPILOGUE(); } #endif @@ -143,10 +147,11 @@ OSAL_IRQ_HANDLER(WB32_EXTI4_IRQ_VECTOR) { OSAL_IRQ_PROLOGUE(); pr = EXTI->PR & EXTI_PR_PR4; - EXTI->PR = pr; exti_serve_irq(pr, 4); + EXTI->PR = EXTI_PR_PR4; + OSAL_IRQ_EPILOGUE(); } #endif @@ -164,7 +169,6 @@ OSAL_IRQ_HANDLER(WB32_EXTI9_5_IRQ_VECTOR) { pr = EXTI->PR & (EXTI_PR_PR5 | EXTI_PR_PR6 | EXTI_PR_PR7 | EXTI_PR_PR8 | EXTI_PR_PR9); - EXTI->PR = pr; exti_serve_irq(pr, 5); exti_serve_irq(pr, 6); @@ -172,6 +176,9 @@ OSAL_IRQ_HANDLER(WB32_EXTI9_5_IRQ_VECTOR) { exti_serve_irq(pr, 8); exti_serve_irq(pr, 9); + EXTI->PR = EXTI_PR_PR5 | EXTI_PR_PR6 | EXTI_PR_PR7 | + EXTI_PR_PR8 | EXTI_PR_PR9; + OSAL_IRQ_EPILOGUE(); } #endif @@ -189,7 +196,6 @@ OSAL_IRQ_HANDLER(WB32_EXTI15_10_IRQ_VECTOR) { pr = EXTI->PR & (EXTI_PR_PR10 | EXTI_PR_PR11 | EXTI_PR_PR12 | EXTI_PR_PR13 | EXTI_PR_PR14 | EXTI_PR_PR15); - EXTI->PR = pr; exti_serve_irq(pr, 10); exti_serve_irq(pr, 11); @@ -198,6 +204,9 @@ OSAL_IRQ_HANDLER(WB32_EXTI15_10_IRQ_VECTOR) { exti_serve_irq(pr, 14); exti_serve_irq(pr, 15); + EXTI->PR = EXTI_PR_PR10 | EXTI_PR_PR11 | EXTI_PR_PR12 | + EXTI_PR_PR13 | EXTI_PR_PR14 | EXTI_PR_PR15; + OSAL_IRQ_EPILOGUE(); } #endif