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

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

    芯片支持：
        N32H785
        N32H785EC
        N32H787

3、使用说明
    系统配置；
        1、时钟源： HSI+PLL
        2、系统时钟频率：
            M7核 600MHz  M4核 300MHz
        3、打印：PB10 - 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、将78x的GPIO的LedBlink demo和当前CM4的工程程序分别编译后下载到开发板并复位运行。
        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 in the condition of CM4.

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

    MCU support:
        N32H785
        N32H785EC
        N32H787

3. How to use
    System Configuration:
        1. Clock source: HSI+PLL
        2. System Clock frequency: 
            M7 Core：600MHz  M4 Core：300MHz
        3. printf: PB10 - 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. Compile the LedBlink demo for 78x's GPIO and the current CM4 project program respectively, 
           then download them to the development board and reset to run.
        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

