1、功能说明
    LPTIM2 计数IN1 IN2正交编码的上升沿个数

2、使用环境
    软件开发环境： KEIL MDK-ARM V5.34
                IAR EWARM 8.50.1

    芯片支持：
        N32H730  
        N32H735   
        N32H735EC
        N32H760
        N32H762
        N32H765
        N32H765EC
        N32H785
        N32H785EC
        N32H787

3、使用说明
    系统配置；
        1、时钟源： HSI+PLL
        2、系统时钟频率： 600MHz
        3、打印：PA9 - baud rate 115200
        4、LPTIM2: LSI时钟源,正交编码器模式，连续计数IN1 IN2上升沿个数
        5、端口配置：
            PD12选择为LPTIM2 IN1输入
            PD11选择为LPTIM2 IN2输入
            PB0选择为IO输出
            PB1选择为IO输出

    使用方法：
        1、分别连接PB0和PD12，PB1和PD11
        2、编译后将程序烧录到开发板并复位运行。
        3、PB0 PB1输出20个脉冲周期
        4、检查LPTIM2计数值，如果为40，测试通过，并打印“LPTIM_ENC demo success!!!”。
        5、如果计数值不为40，测试失败，打印“LPTIM_ENC demo failed!!!”

4、注意事项
    无


1. Function description
    LPTIM2 Counts the number of rising edges of IN1 IN2 encoder

2. Development environment
    Software development environment: KEIL MDK-ARM V5.34
                                      IAR EWARM 8.50.1

    Supported chips:
        N32H730  
        N32H735   
        N32H735EC
        N32H760
        N32H762
        N32H765
        N32H765EC
        N32H785
        N32H785EC
        N32H787

3. How to use
    System Configuration:
        1. Clock source: HSI+PLL
        2. System Clock frequency: 600MHz
        3. printf: PA9 - baud rate 115200
        4. LPTIM2: use LSI as clock source, encoder mode,count the number of IN1 IN2 rising edges.
        5. Port Configuration:
            PD12 selected for LPTIM2 IN1 input
            PD11 selected for LPTIM2 IN2 input
            PB0 selected for IO output
            PB1 selected for IO output

    Instructions:
        1. Connect PB0 and PD12, PB1 and PD11.
        2. After compiling, download the program and reset, the program start running.
        3. PB0 and PB1 output 20 pulse cycles respectively.
        4. If the count result of LPTIM2 is 40, test success, and print "LPTIM_ENC demo success!!!". 
        5. Otherwise, print "LPTIM_ENC demo failed!!!".

4. Attention
    None

