1˵
    1ADC1תPA2 PA12ŵģѹ
    2һΣɼһεķʽ
2ʹû
      KEIL MDK-ARM V5.30.0.0
    Ӳ      N32G003F5S7-STB V1.0
3ʹ˵
    ϵͳã
        1ʱԴ
                    HSI=48M,AHB=48M,APB1=48M,ADC CLK=48M/12,ADC 1M CLK=HSI/48
        2˿ã
                    PA2ѡΪģ⹦ADCתͨ0
                    PA12ѡΪģ⹦ADCתͨ1
        3ADC
                    ADCת12λҶ룬תPA2 PA12ģѹ
    ʹ÷
        1򿪵ģʽADCConvertedValueӵwatchڹ۲
        2ͨıPA2 PA12ŵĵѹԿתͬı
4ע
    1.ϵͳʱHSIΪ48MʱRCC_ADC_1M_Clock_Config(RCC_ADC1MCLK_DIV48)ƵҪóRCC_ADC1MCLK_DIV48
    2.ϵͳʱHSIΪ40MʱRCC_ADC_1M_Clock_Config(RCC_ADC1MCLK_DIV40)ƵҪóRCC_ADC1MCLK_DIV40


1. Function description
    1. ADC1 samples and converts the analog voltage of PA2 PA12 pin
    2. Use software to trigger once and collect once

2. Use environment
    Software development environment: KEIL MDK-ARM V5.30.0.0
    Hardware environment: Developed based on the development board N32G003F5S7-STB V1.0 

3. Instructions for use
    System Configuration;
        1. Clock source:
                    HSI=48M,AHB=48M,APB1=48M,ADC CLK=48M/12,ADC 1M CLK=HSI/48
        2. Port configuration:
                    PA2 is selected as analog function, ADC conversion channel 0
                    PA12 is selected as analog function, ADC conversion channel 1
        3. ADC:
                    ADC configuration: software trigger, 12-bit data is right-aligned, and converts the analog voltage data of PA2 PA12
    Instructions:
        1. Open the debug mode after compiling and add the variable ADCConvertedValue to the watch window for observation
        2. By changing the voltage of the PA2 PA12 pin, you can see that the conversion result variable changes synchronously

4. Matters needing attention
    1.When the system sampling clock HSI is 48M, RCC_ADC_1M_Clock_Config(RCC_ADC1MCLK_DIV48), frequency division needs to be configured as RCC_ ADC1MCLK_ DIV48
    2.When the system sampling clock HSI is 40M, RCC_ADC_1M_Clock_Config(RCC_ADC1MCLK_DIV40), frequency division needs to be configured as RCC_ ADC1MCLK_ DIV40