1、功能说明
    此示例展示了如何使用 SHRTIM、DAC 和 ADC 之间的互连功能。

2、使用环境
    软件开发环境：KEIL MDK-ARM 5.34
                  IAR EWARM 8.50.1

    芯片支持：
        N32H760
        N32H762
        N32H765
        N32H785
        N32H785EC
        N32H787

3、使用说明
    系统配置：
        1、 时钟源：
            HSE=25M,SHRPLL=200M,M7 clock = 600M,  
            SHRTIM clock(SHRPLL) = 200M，High-resolution clock = 200M。
        2、 端口配置：
            SHRTIM1_TA1 (PC6)
            DAC1 OUT (PA4)
            ADC1 channel 3 (PA6)
        3、SHRTIM：
            SHRTIM 主定时器用于触发两个外设：DAC 和 ADC。
            DACTRGOUT1 用于触发 DAC1，
            ADCTRIG1 用作外部触发器开始定期转换 ADC1
            最大周期值0xFFF
        4、DAC与ADC
            DAC1 和 ADC1 的分辨率被编程为 12 位分辨率
            DAC 被配置为在其输出引脚（PA4）上生成三角波形，DAC1 OUT(PA4)连接至ADC channel 3 (PA6)
            在每个 ADC 转换结束的中断时，更新 SHRTIM1_TIMA 计时器的脉冲与 ADC 转换的电压值相对应（这也对应于 DAC1 CH1 的输出电压）
    使用方法： 
        1、 连接PA4与PA6，编译后进入调试模式。示波器观察SHRTIM TA1的波形和DAC1 CH1的波形  



4、注意事项
    无
    
     
1. Function description
    This example demonstrates how to use the interconnect features between SHRTIM, DAC, and ADC.

2. Development environment
    Software development environment: KEIL MDK-ARM 5.34
    MCU suppport: 
        N32H760
        N32H762
        N32H765
        N32H785
        N32H785EC
        N32H787

3. How to use
    System Configuration:
        1. clock source
            HSE=25M,SHRPLL=200M,M7 clock = 600M,  
            SHRTIM clock(SHRPLL) = 200M，High-resolution clock = 200M。
        2. Port configuration:
            SHRTIM1_TA1 (PC6)
            DAC1 OUT (PA4)
            ADC1 channel 3 (PA6)
        3. SHRTIM： 
            The SHRTIM master timer is used to trigger two peripherals: DAC and ADC.
            DACTRGOUT1 is used to trigger DAC1
            ADCTRIG1 is used as an external trigger to start regular conversion of ADC1
            Maximum period value 0xFFF
        4. DAC and ADC
            The resolution of DAC1 and ADC1 is programmed to be 12-bit resolution
            The DAC is configured to generate a triangular waveform on its output pin (PA4), DAC1 OUT(PA4) is connected to ADC1 channel 3(PA6)
            At the end of each ADC conversion interrupt, update the pulse of the SHRTIM1_TIMA timer to correspond with the voltage value of the ADC conversion (this also corresponds to the output voltage of DAC1 CH1)
    Instructions:
        1. Connect PA4 and PA6, compile and enter debug mode. Oscilloscope observes the waveform of SHRTIM TA1 and the waveform of DAC1 CH1.


4. Attention
    None