1˵
    1ADCתPB1ŵģѹģ⿴ŹֵΧжϳ
    
2ʹû

    KEIL MDK-ARM V5.34.0.0
    Ӳ 
        N32G05xϵУ
            N32G05xRBQ7_STB V1.0
        N32G05xϵУ
            N32G05xRBL7_STB V1.0

3ʹ˵
    ϵͳã
        1ʱԴ
            HSI=8M,AHB=64M,APB1=32M,APB2=64M,ADC CLK=64M/16,ADC 1M CLK=HSI/8
        2ADC
            ADCת12λҶ
        3˿ã
            PB1ѡΪģ⹦
        4жϣ
            ADCģ⿴Źжϴ򿪣ȼ0
    ʹ÷
        1򿪵ģʽgCntAwdgӵwatchڹ۲
        2ıPB1ŵѹֵѹֵģ⿴Ź0x3000.6V0xB002.26VΧ⣬һжϣۼӲ.
4ע
    


1. Function description
    1.ADC samples and converts the analog voltage of the PB1 pin. If it exceeds the threshold range defined by the analog watchdog, then jump into the interrupt program

2. Use environment

    Software development environment: KEIL MDK-ARM V5.34.0.0
    Hardware development environment:
         N32G05x series:
            Developed based on the evaluation board N32G05xRBQ7_STB V1.0
         N32G05x series:
            Developed based on the evaluation board N32G05xRBL7_STB V1.0

3. Instructions for use
    System Configuration;
        1. Clock source:
            HSI=8M,AHB=64M,APB1=32M,APB2=64M,ADC CLK=64M/16,ADC 1M CLK=HSI/8
        2. ADC:
            ADC configuration: continuous conversion, software trigger, 12-bit data right-aligned.
        3. Port configuration:
            PB1 is selected as analog function
        4. Interrupt:
            ADC analog watchdog interrupt is turned on, priority 0
    Instructions:
        1. Open the debug mode after compiling and add the variable gCntAwdg to the watch window for observation
        2. Change the voltage value of the PB1 pin. When the voltage value exceeds the range defined by the analog watchdog from 0x300 (ie 0.6V) to 0xB00 (ie 2.26V), 
           an interrupt is entered, and the variable is accumulated.

4. Matters needing attention
    None