1、功能说明
    LPTIM2周期性产生EXTI中断，将芯片从低功耗模式（STOP2模式）唤醒

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时钟源2分频
            连续计数模式
            开启比较匹配中断，约4s触发一次
        5、端口配置：
            PA1选择为IO输出,用于D1
            PA3选择为IO输出,用于D3
    
    使用方法：
        1、编译后将程序烧录到开发板并复位运行，D1与D3点亮，并延时约2s。
        2、进入STOP模式，D1与D3熄灭。
        3、LPTIM2唤醒CPU，D1点亮。
        4、约1s后，D3点亮。
        5、约1s后，再次进入STOP模式，循环演示。
        6、通过串口输出运行信息。
        
4、注意事项
    N32H760/762/765系列MCU进入STOP2模式后，退出时无法继续从FLASH执行代码。
    例程中，除了启动和初始化，其他代码都放在SRAM中运行。


1. Function description
    LPTIM2 periodically generates an EXTI interrupt to wake up the chip from low-power mode (STOP2 mode)

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,divide by 2
            Continuous Count mode
            Enalbe compare match interrupt, periodically triggerd about every 4 seconds
        5. Port Configuration:
            PA1 selected as IO output, used for D1
            PA3 selected as IO output, used for D3
    
    Instructions:
        1. After compiling, download the program and reset, the program start running.
           D1 and D3 turn on, then delay about 2 seconds.
        2. System enter STOP mode, D1 and D3 turn off.
        3. LPTIM wake-up system from STOP, D1 turn on.
        4. After about 1 seconds, D3 turn on.
        5. After about 1 seconds, system enter STOP mode again,and then cyclic demonstate.
        6. The running informations are also output through the serial port.
        
4. Attention
    After the N32H760/762/765 series MCU enters STOP2 mode, code can not be executed from FLASH when exiting.
    In this example, code is executed in SRAM, except the startup and initialization code.

