﻿1、功能说明
    1、ADC1开启增益补偿与偏移补偿的条件下进行采样、转换PA6引脚的模拟电压
    2、其中ADC1转换结果通过DMA1_CH0通道读取到变量ADC1ConvertedValue

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、端口配置：
            PA6选择为模拟功能
            
        4、DMA：
            DMA1_CH0通道回环模式搬运一个半字的ADC1转换结果到ADC1ConvertedValue变量
            
        5、ADC：
            ADC1独立工作模式、软件触发转换、12位数据右对齐，转换PA6 的模拟电压数据,增益补偿系数为2*4096 ,正向偏移 0x400,饱和使能

    使用方法：
        1、编译后将CM7和CM4的工程程序分别下载到开发板并复位运行,打开调试模式，将变量ADC1ConvertedValue添加到watch窗口观察
        2、通过改变PA6引脚的电压Voltage，可以看到转换结果变量同步改变，数据寄存器的结果Result = Voltage * 2 * 4095/3.3 + 0x400.
        
4、注意事项
    无
    
1. Function description

    1, ADC1 performs sampling with gain compensation and offset compensation enabled ,converts the analog voltage of the PA6 pin
    2. The ADC1 conversion result is read to the variable ADC1ConvertedValue through the DMA1_CH0 channel.

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. Port configuration:
            PA6 is selected as the analog function
4. DMA:
     DMA1_CH0 channel loopback mode transfers a halfword of ADC1 conversion result to ADC1ConvertedValue variable
     
5. ADC:
     ADC1 independent working mode, software-triggered conversion, 12-bit data is right-aligned, and analog voltage data of PA6 is converted. 
     Gain compensation factor is 2*4096, positive offset 0x400,enable saturation .
     
Usage:
    1, After compiling, download the program  and reset, open the debugging mode, the variable ADC1ConvertedValue added to the watch window to observe
    2, By changing the voltage of PA6 pin, you can see that the conversion result variable changes synchronously . the data register result = Voltage * 2 * 4095/3.3 + 0x400.


4. Attention
    None

