//Init TIMER3 to measure PG inf
void Time3Init(void){
PINSEL5&=(~(3<<14));
PINSEL5|=(2<<14);//CAP3.1 P2.23
PCONP |= (1<<23);//Open TIME3 power and clock
T3CTCR = (1<<0) | (1<<2); //Config T3 as a Counter, counting on rising edge of CAP3.1 pin
T3TC=0; //reset T3
T3TCR=0; //Stop Counting
}