1˵
    1ADCתڲ¶ȴģѹתΪ¶ֵ
2ʹû
    
         
          IDEߣKEIL MDK-ARM V5.34.0.0
                         IAR EWARM 8.50.1

       Ӳ      
          壺N32G430C8L7-STB V1.0

3ʹ˵
    ϵͳã
        1ʱԴ
            HSE=8M,PLL=128M,AHB=128M,APB1=32M,APB2=64M,ADC CLK=128M/16,ADC 1M CLK=HSE/8 
        2DMA
            DMA_CH1ͨػģʽһֵADCתADCConvertedValue
        3ADC
            ADCת12λҶ룬תͨ17ڲ¶ȴģѹ
        4˿ã
            PA9ѡΪUSART1TX
            PA10ѡΪUSART1RX
        5USART
            USART1 115200ʡ8λλ1λֹͣλżУλӲءͺͽʹ
        6ܺ
            TempValue = TempCal(ADCConvertedValue)¶ADCԭʼʽתΪȵĵλĸʽ
    ʹ÷
        1򿪵ģʽADCConvertedValue,TempValueӵwatchڹ۲
        2ڹӵPA9ţ򿪴ڽչ
        3ȫУԿ¶ȱֵڳ½ӽ25ңͬʱڹʾʵʱоƬڵ¶ֵ
4ע
    ϵͳHSEʱʱһHSIҲǴ򿪵ģRCC_ConfigAdc1mClk(RCC_ADC1MCLK_SRC_HSE, RCC_ADC1MCLK_DIV8)ΪHSEHSI
    ϵͳHSIʱʱһHSEǹرյģRCC_ConfigAdc1mClk(RCC_ADC1MCLK_SRC_HSI, RCC_ADC1MCLK_DIV8)ֻΪHSI


1. Function description
    1. ADC samples and converts the analog voltage of the internal temperature sensor to the temperature value
2. Use environment
    Software development environment:   KEIL MDK-ARM V5.34.0.0
                                                                IAR EWARM 8.50.1
    Hardware environment: 
        the evaluation board:   N32G430C8L7-STB V1.0

3. Instructions for use
    System configuration
       1. Clock source:
            HSE=8M,PLL=128M,AHB=128M,APB1=32M,APB2=64M,ADC CLK=128M/16,ADC 1M CLK=HSE/8 
        2DMA
            DMA_CH1 channel loopback mode carries a half-word ADC conversion result to the ADCConvertedValue variable
        3ADC
            ADC continuous conversion, software triggered, 12 bit data right aligned, conversion channel 17 is the analog
            voltage data of the internal temperature sensor
        4. Port Configuration:
            PA9 selects the TX pin of USART1
            PA10 selects the RX pin for USART1
        5USART
           USART1 115200 Baud rate, 8 data bits, 1 Stop bit, no parity bit, no hardware flow control, send and receive enabled
        6Functions:
            TempValue = TempCal(ADCConvertedValue)The temperature ADC function converts the raw format data into degrees
    Usage:
        1compiled to open the debug mode, variable ADCConvertedValue, TempValue added to the watch window to observe
        2Connect the serial port tool to the PA9 pin and open the serial port receiver tool
        3Running at full speed, it can be seen that the value of the temperature variable is close to 25 degrees at room temperature, 
           and the serial port tool displays the real-time temperature value in the chip
4Precautions
       When the system uses the HSE clock (HSI is also normally turned on), RCC_ConfigAdc1mClk(RCC_ADC1MCLK_SRC_HSE, 
       RCC_ADC1MCLK_DIV8)can be configured as HSE or HSI.
       When the system samples the HSI clock (generally, HSE is disabled), RCC_ConfigAdc1mClk(RCC_ADC1MCLK_SRC_HSI, 
       RCC_ADC1MCLK_DIV8) can only be set to HSI.