1˵
    1ADCPB1,PB2ŵģѹTIM1 CC1¼´;
    2תжжȡת
    
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
        2жϣ
            ADCͨתɻжϣжȼΪ0
            жϺнͨĽȡADCConvertedValue[5]飬תPA6ƽ
        3˿ã
            PB1ѡΪģ⹦
            PB2ѡΪģ⹦
            PA6ѡΪͨIO
            PA9ѡΪTIM1 CH1 PWM

        4ADC
            ADC TIM1 CC112λҶ룬תͨPB1,PB2ģѹ
        6TIM
            TIM1CH1CH1ADCת 
    ʹ÷
        1򿪵ģʽADCConvertedValue[5]ӵwatchڹ۲
        2ͨıPB1,PB2ŵĵѹÿCC1¼ʱתһιͨڶӦ, ͬʱPA9 ԿTIM1 CH1 PWM 
    
4ע
    

1. Function description
    1. The ADC regularly samples the analog voltage of the PB1,PB2 pin, and triggers sampling under the TIM1 CC1 event;
    2. Read the conversion result in the conversion completion interrupt.

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. Interrupt:
            ADC regular conversion result complete will enter interrupt function, interrupt priority level set to 0.
            In the interrupt function, the regular result is read into the ADCConvertedValue[5] array, and the PA6 level is flipped
        3. Port configuration:
            PA3 is selected as the analog function
            PA4 is selected as the analog function
            PA6 is selected as general IO output
            PA9 is selected as TIM1 CH1 PWM output
        5. ADC:
            ADC configuration: TIM1 CC1 trigger, 12-bit data right-aligned, analog voltage data of regular conversion channel PB1,PB2 Pin
        6. TIM:
            TIM1 turns on CH1 output, and CH1 is used to trigger ADC conversion 
    Instructions:
        1. Open the debug mode after compiling and add the variables ADCConvertedValue[5] to the watch window for observation
        2. By changing the voltage of the PB1,PB2 pin,regular channel are converted once every CC1 event occurs, 
            and the variables are stored in the corresponding array.At the same time, you can see the PWM waveform of TIM1 CH1 on PA9

4. Matters needing attention
    None