Good afternoon.....
I have code where I initialize P1 interrupts with 0xF8. Code is working as expected. If I power down the unit and re-power however I notice after I place the debugger on the unit (symbols) that the P1 interrupts = 0x80. I have no where in code where I set all interrupts as such. My ISR is very clean...
#pragma vector=PORT1_VECTOR
__interrupt void P1_Sw(void)
{
p1flags = (P1IFG & 0xF8);
switch (__even_in_range(P1IV, 16))
{
case 8: //R - Switch 2
P1IE &= ~BIT3;
break;
case 10: //R - Switch 4
P1IE &= ~BIT4;
break;
case 12: //R - Switch 1
P1IE &= ~BIT5;
break;
case 14: //R - Switch 3
P1IE &= ~BIT6;
break;
case 16: //R - Switch All
P1IE &= ~BIT7;
break;
default:
break;
}
debounce();
}
I have other IRQs on other ports and verified that debounce is working . This is the only place I disable each IRQ and it is supposed to happen ONLY after a button push. Can someone point me in a direction to look with respect to what is happening? I have found that with the debugger connected I can write 0xF8 to the PI1E (just as the configuration does) and I am up and running with code working properly. I also have a reset button on the unit P2.4 and if I hit that I reboot and code works as expected.
Thank you