1˵
    1TIM3 CH2ͨCH1½غCH2ؼռձȺƵ
2ʹû
      KEIL MDK-ARM V5.34.0.0
    Ӳ        N32G003F5S7-STB V1.0
3ʹ˵
    ϵͳã
        1ʱԴ
                    AHB=48M,APB=48M,TIM3 CLK=48M
        2жϣ
                    TIM3 CC2Ƚжϴ򿪣ȼ1
        3˿ã
                    PA2ѡΪTIM3CH2
                    PA3ѡΪIO
        4TIM
                    TIM3 CH1CH2źŵ½ءTIM3 CH2CH2źŵ
    ʹ÷
        1򿪵ģʽPA3PA2FrequencyDutyCyclegOnePulsEnӵwatch
        2кĬgOnePulsEn=0ÿֶgOnePulsEn=1ʱԿ񵽵ռձȺƵʵֱֵ洢DutyCycleFrequency
4ע
    ĬPA2,PA3ñӵNSLINK⴮ڣPA2PA3ڣ;εñ

1. Function description
    1. TIM3 CH2 capture pin calculates the duty cycle and frequency through the falling edge of CH1 and the rising edge of CH2
2. Use environment
    Software development environment: 	KEIL MDK-ARM V5.34.0.0
    Hardware environment:    	             	N32G003F5S7-STB V1.0
3. Instructions for use
     System Configuration;
         1. Clock source:
                    AHB=48M,APB=48M,TIM3 CLK=48M
         2. Interrupt:
                    TIM3 CC2 compare interrupt is turned on, priority level 1
         3. Port configuration:
                    PA2 is selected as the CH2 input of TIM3
                    PA3 is selected as IO output
         4. TIM:
                    TIM3 CH1 captures the falling edge of CH2 signals.TIM3 CH2 captures the rising edge of CH2. 
     Instructions:
         1. Open the debug mode after compiling, connect PA3 and PA2, and add the variables TIM3Freq and gOnePulsEn to the watch window
         2. The default gOnePulsEn=0, manually give gOnePulsEn=1 each time, then you can see that the values of the duty cycle and frequency captured are stored in the DutyCycle and Frequency variables.
4. Matters needing attention
  By default, the PA2 and PA3 jumper caps of the development board are connected to the virtual serial port of NSLINK. If PA2 and PA3 are not used as serial ports in the project, and are used for other purposes, the serial port jumper caps must be unplugged.
