﻿1、功能说明
    1、ADC1规则采样PA6、自动注入采样PA4引脚的模拟电压，在GTIMA1 CC4事件下触发采样
    2、其中规则转换结果通过DMA1_CH0通道读取到变量ADC_RegularConvertedValueTab[32]数组
       注入转换结果通过转换结束中断读取到变量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、端口配置：
            PA6选择为模拟功能
            PA4选择为模拟功能
            PB6选择为通用IO输出
            PA3选择为GTIMA1 CH4 PWM输出
            
        4、DMA：
            DMA1_CH0通道回环模式搬运32个半字的ADC1转换结果到ADC_RegularConvertedValueTab[32]数组
            
        5、ADC：
            ADC1独立工作模式、GTIMA1 CC4触发、12位数据右对齐，规则转换通道PA6，自动注入转换通道PA7的模拟电压数据

        6、GTIMA1:
            GTIMA1 使能 CH4 输出，CH4来触发ADC

    使用方法：
        1、编译后将工程程序下载到开发板并复位运行,打开调试模式，将变量ADC_RegularConvertedValueTab[32],ADC_InjectedConvertedValueTab[32]添加到watch窗口观察
        2、通过改变PA6 PA4引脚的电压，在每个CC4事件发生时转换一次规则和注入通道，变量储存在对应数组中。同时在PA3可以看到GTIMA1 CH4的 PWM 波形
        
4、注意事项
    无
    
1. Function description

    1, ADC1 regularly samples PA6, automatically injects and samples the analog voltage of the PA4 pin, and triggers sampling under the GTIMA1 CC4 event
    2. The regular conversion result is read into the variable ADC_RegularConvertedValueTab[32] 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:
            PA6 is selected as the analog function
            PA4 is selected as the analog function
            PB6 is selected as general IO output
            PA3 is selected as GTIMA1 CH4 PWM output
            
        4. DMA:
            DMA1_CH0 channel loopback mode transfers ADC1 conversion result of 32 half words to ADC_RegularConvertedValueTab[32] array
        5. ADC:
            ADC1 independent working mode, GTIMA1 CC4 trigger, 12-bit data right-aligned, regular conversion channel PA6, automatic injection of analog voltage data of conversion channel PA4.
        6. GTIMA1:
            GTIMA1 turns on CH4 output, CH4 is used to trigger ADC conversion
     
Usage:
    1, After compilation, download the project program to the development board and reset it to run. Enable debug mode, and add the variables ADC_RegularConvertedValueTab[32], ADC_InjectedConvertedValueTab[32] to the watch window for observation
    2. By changing the voltage of the PA6 and PA4 pins, the rules and injection channels are converted once every CC4 event occurs,
       and the variables are stored in the corresponding arrays. At the same time, you can see the PWM waveforms of GTIM1 CH4 in PA3


4. Attention
    None

