Index: webserver/example/EnergyMeters/Source/EnergyMeters/Meters.c =================================================================== --- webserver/example/EnergyMeters/Source/EnergyMeters/Meters.c (revision 53) +++ webserver/example/EnergyMeters/Source/EnergyMeters/Meters.c (revision 59) @@ -119,5 +119,5 @@ /* bits are 0 here */ /* disable pull-up/down resistors on 2.0, 2.1, 2.3, 2.4 (put binary 10 for all), don't change 2.2! */ - PINMODE4 |= 0x28A; + // dont change anymore : PINMODE4 |= 0x28A; @@ -126,11 +126,11 @@ IO2_INT_EN_R |= (1<<1); /* enable rising edge interrupt for P2:1 */ IO2_INT_EN_F &= ~(1<<1); /* disable falling edge interrupt for P2:1 */ - // P2.2 is not connected! - //IO2_INT_EN_R |= (1<<2); /* enable rising edge interrupt for P2:2 */ - //IO2_INT_EN_F &= ~(1<<2); /* disable falling edge interrupt for P2:2 */ + IO2_INT_EN_R |= (1<<2); /* enable rising edge interrupt for P2:2 */ + IO2_INT_EN_F &= ~(1<<2); /* disable falling edge interrupt for P2:2 */ IO2_INT_EN_R |= (1<<3); /* enable rising edge interrupt for P2:3 */ IO2_INT_EN_F &= ~(1<<3); /* disable falling edge interrupt for P2:3 */ - IO2_INT_EN_R |= (1<<4); /* enable rising edge interrupt for P2:4 */ - IO2_INT_EN_F &= ~(1<<4); /* disable falling edge interrupt for P2:4 */ + // P2.4 is not connected! + //IO2_INT_EN_R |= (1<<4); /* enable rising edge interrupt for P2:4 */ + //IO2_INT_EN_F &= ~(1<<4); /* disable falling edge interrupt for P2:4 */ VICVectAddr17 = (portLONG) vP2_0_ISR_Wrapper; /* EINT-3 interrupt handler */ Index: webserver/example/EnergyMeters/Source/EnergyMeters/Meters_ISRs.c =================================================================== --- webserver/example/EnergyMeters/Source/EnergyMeters/Meters_ISRs.c (revision 52) +++ webserver/example/EnergyMeters/Source/EnergyMeters/Meters_ISRs.c (revision 59) @@ -46,21 +46,20 @@ IO2_INT_CLR |= (1<<1); } - // P0.2 is not connected! - //if ((IO2_INT_STAT_R & (1 << 2)) != 0) /* P0.2 interrupt triggered - connector J4, Pin 2*/ - //{ - // handleMeterTick(METER_INDEX_EL2); - // IO2_INT_CLR |= (1<<2); - //} - if ((IO2_INT_STAT_R & (1 << 3)) != 0) /* P0.3 interrupt triggered - connector J4, Pin 3*/ + if ((IO2_INT_STAT_R & (1 << 2)) != 0) /* P0.3 interrupt triggered - connector J4, Pin 3*/ + { + handleMeterTick(METER_INDEX_EL2); + IO2_INT_CLR |= (1<<2); + } + if ((IO2_INT_STAT_R & (1 << 3)) != 0) /* P0.4 interrupt triggered - connector J4, Pin 4*/ { handleMeterTick(METER_INDEX_AU1); IO2_INT_CLR |= (1<<3); } - if ((IO2_INT_STAT_R & (1 << 4)) != 0) /* P0.4 interrupt triggered - connector J4, Pin 4*/ - { - handleMeterTick(METER_INDEX_AU2); - IO2_INT_CLR |= (1<<4); - } - + // P0.4 is not connected! + //if ((IO2_INT_STAT_R & (1 << 4)) != 0) /* P0.2 interrupt triggered - connector J4, Pin 2*/ + //{ + // handleMeterTick(METER_INDEX_AU2); + // IO2_INT_CLR |= (1<<4); + //} /* Clear the interrupt. */ VICVectAddr = 0;