# HG changeset patch # User Mychaela Falconia # Date 1623608273 0 # Node ID f2e52cab0a7350d3c3a653f86ca66330f73c7206 # Parent 10b3a6876273b0b0b23e7b8f960d7db33d2a86e0 abb_inth.c: check all interrupt causes, not just one The original code used if - else if - else if etc constructs, thus the first detected interrupt was the only one handled. However, Iota ITSTATREG is a clear-on-read register, thus if we only handle the first detected interrupt and skip checking the others, then the other interrupts will be lost, if more than one interrupt happened to occur in one ABB interrupt handling cycle - a form of rare race condition. Change the code to check all interrupts that were read in this cycle. diff -r 10b3a6876273 -r f2e52cab0a73 src/cs/drivers/drv_app/abb/board/abb_inth.c --- a/src/cs/drivers/drv_app/abb/board/abb_inth.c Wed Jun 09 07:26:51 2021 +0000 +++ b/src/cs/drivers/drv_app/abb/board/abb_inth.c Sun Jun 13 18:17:53 2021 +0000 @@ -159,7 +159,7 @@ } } - else if (*read_value & REMOT_IT_STS) + if (*read_value & REMOT_IT_STS) { rvf_send_trace("IQ EXT: Power Off remote request",32, NULL_PARAM, RV_TRACE_LEVEL_DEBUG_LOW, SPI_USE_ID); @@ -167,7 +167,7 @@ Power_OFF_Remote(); } - else if (*read_value & ADCEND_IT_STS) + if (*read_value & ADCEND_IT_STS) { rvf_send_trace("IQ EXT: ADC End",15, NULL_PARAM, RV_TRACE_LEVEL_DEBUG_LOW, SPI_USE_ID); @@ -208,7 +208,7 @@ } #if (defined(RVM_PWR_SWE) || defined(RVM_LCC_SWE) || defined(RVM_FCHG_SWE)) - else if (*read_value & CHARGER_IT_STS) + if (*read_value & CHARGER_IT_STS) { /* Charger plug IN or OUT */ #if ((ANLG_FAM == 1) || (ANLG_FAM == 2))