Tool/software:
P1REN |= BIT2;
P1DIR |= BIT3;
P1OUT |= BIT3;
// Enable interrupt on P1.2
P1IE |= BIT2; // Enable interrupt on P1.2
P1IES |= BIT2; // Interrupt on high-to-low transition (falling edge)
P1IFG &= ~BIT2; // Clear any pending interrupt flags for P1.1
SYSCFG2 |= USCIB0RMP; /* This is required to change the default I2C0 pins */
SYSCFG3 |= USCIB1RMP; /* This is required to change the default I2C1 pins */
initClockTo16MHz();
initTimer();
start_watchdog();
InitGPIO(); //Init GPIOs
__bis_SR_register(GIE);
printf("fault type :: %d\r\n", fault_type);
fault_type = 0;
}
if(fault_type == 2) {
printf("fault type :: %d\r\n", fault_type);
fault_type = 0;
}
if(fault_type == 1) {
printf("fault type :: %d\r\n", fault_type);
fault_type = 0;
}
if(fault_type > 3) {
fault_type = 0;
}