﻿1、功能说明
    1、ADC1规则通道采样PA6、PA7引脚的模拟电压，注入通道采样PA4、PA5引脚的模拟电压
    2、其中规则转换结果通过DMA1_CH0通道读取到变量ADC_RegularConvertedValueTab[64]数组
       注入转换结果通过转换结束中断读取到变量ADC_InjectedConvertedValueTab[32]数组

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、系统时钟频率：
            M7核 ：600MHz 
            
        3、端口配置：
            PA4选择为模拟功能
            PB5选择为模拟功能
            PB6选择为模拟功能
            PB7选择为模拟功能
            PC0选择为外部EXTI事件上升沿触发
            PC1选择为外部EXTI事件上升沿触发
        4、DMA：
            DMA1_CH0通道回环模式搬运64个半字的ADC1规则通道转换结果到ADC_RegularConvertedValueTab[64]数组
            
        5、ADC：
            ADC1规则通道独立工作模式、扫描模式、EXTI0触发、12位数据右对齐，转换通道PA6和PA7的模拟电压数据
            ADC1注入通道独立工作模式、扫描模式、EXTI1触发、12位数据右对齐，转换通道PA4和PA5的模拟电压数据

    使用方法：
        1、编译后将CM7和CM4的工程程序分别下载到开发板并复位运行,打开调试模式，将变量ADC_RegularConvertedValueTab[64],ADC_InjectedConvertedValueTab[32]添加到watch窗口观察
        2、通过PC0给上升沿可以触发规则通道数据采样，PC1给上升沿可以触发注入通道数据采样
        
4、注意事项
    无
    
1. Function description

    1, The ADC1 regular channel samples the analog voltage of the PA6 and PA7 pins, and the injection channel samples the analog voltage of the PA4 and PA5 pins
    2. The regular conversion result is read into the variable ADC_RegularConvertedValueTab[64] array through the DMA1_CH0 channel
       The injected conversion result is read into the variable ADC_InjectedConvertedValueTab[32] array through the conversion end interrupt.

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: 
            M7 Core：600MHz 
            
        3. Port configuration:
            PA4 is selected as the analog function 
            PB5 is selected as the analog function 
            PB6 is selected as the analog function 
            PB7 is selected as the analog function 
            PC0 is selected as external EXTI event rising edge trigger
            PC1 is selected as external EXTI event rising edge trigger
        4. DMA:
           DMA1_CH0 channel loopback mode transfers 64 halfwords of ADC1 regular channel conversion results to ADC_RegularConvertedValueTab[64] array
             
        5. ADC:
           ADC1 regular channel independent working mode, scan mode, EXTI0 trigger, 12-bit data right-aligned, convert the analog voltage data of channels PA6 and PA7
           ADC1 injects channel independent working mode, scan mode, EXTI1 trigger, 12-bit data right-aligned, and converts the analog voltage data of channels PA4 and PA5.
     
Usage:
        1, After compiling, download the program  and reset, open the debugging mode, and add the variables ADC_RegularConvertedValueTab[64], ADC_InjectedConvertedValueTab[32] to the watch window for observation
        2. The rising edge of PC0 can trigger regular channel data sampling, and the rising edge of PC1 can trigger the injection channel data sampling


4. Attention
    None

