TIM2_CCMR1=0;
// TIM2_CCMR1=0x00; //IC1F=0000 輸入信號不分頻
TIM2_CCMR1 |=0x01;//CC1S=01 IC1 is mapped on TI1FP1
/*00: CC1 channel is configured as output
01: CC1 channel is configured as input, IC1 is mapped on TI1FP1
10: CC1 channel is configured as input, IC1 is mapped on TI2FP1
11: Reserved */
TIM2_CCMR2=0;
// TIM2_CCMR2=0x00;//IC1PSC=0 輸入信號不分頻
TIM2_CCMR2 |=0x02;// TIM2_CCMR2_CC2S=0x2
/* 00: CC2 channel is configured as output
01: CC2 channel is configured as input, IC2 is mapped on TI2FP2
10: CC2 channel is configured as input, IC2 is mapped on TI1FP2
11:CC2 channel is configured as input, IC2 is mapped on TRC */