1、功能说明

    此例程提供了一种DMA Mem-to-Mem模式单块传输的用法。

    首先定义一个数组srcBuffer，再配置DMA1，通道0，用于将数据传输到数组dstBuffer中；

    开启DMA的传输完成中断（IntTfr中断），用于指示传输已完成；

    等待数据传输完成，并逐一比较dstBuffer中的数据与srcBuffer中的数据是否一致，如一致，打印“DMA Single-block Transfer passed.”，反之，打印“DMA Single-block Transfer failed.”。


2、使用环境

    软件环境：
        KEIL MDK-ARM 5.34.0
        IAR EWARM 8.50.1
    
    芯片支持：
        N32H785
        N32H785xxxEC
        N32H787


3、使用说明
    
    1、时钟源：HSI+PLL

    2、系统时钟：
        M4核：300MHz

    3、DMA通道：DMA1_CH0
    
    4、USART1配置：
        TX  -->  PB10            AF_PP
        波特率：115200
        数据位：8bit
        停止位：1bit
        无校验

    5、使用方法：
        a，将78x的GPIO的LedBlink demo和当前CM4的工程程序分别编译后下载到开发板并复位运行
        b，通过串口调试助手查看打印信息，验证结果

4、注意事项
    当Src或Dst是内存时，IntSrcTran/IntDstTran中断应该被忽略，因为内存没有“DMA事务级别”的概念。
    


1. Function description

    This demo provides a use of DMA Mem-to-Mem mode Single-block transfers.

    Firstly, a array srcBuffer was defined. Then, DMA1 and channel 0 were configured to transfer the data to the array dstBuffer.

    Enable the DMA transfer completion interrupt (IntTfr interrupt) to indicate that the transfer has been completed.

    Wait for the data transfer to complete, and compare the data in the dstBuffer with the data in the srcBuffer one by one. If it is, print "DMA Single-block Transfer passed." Otherwise, print "DMA Single-block Transfer failed."

    
2. Development environment

    Software environment: 
        KEIL MDK-ARM 5.34.0
        IAR EWARM 8.50.1
    
    Supported chips:
        N32H785
        N32H785xxxEC
        N32H787

3. How to use

    1. Clock source: HSI+PLL

    2. System clock:
        M4 core: 300MHz

    3. DMA channel: DMA1_CH0

    4. USART1 configuration: 
        TX --> PB10      AF_PP
        Baud rate: 115200
        Data bit: 8 bits
        Stop bit: 1bit
        No check

    5. Usage:
        a. Compile the LedBlink demo for 78x's GPIO and the current CM4 project program respectively, then download them to the development board and reset to run
        b. Check the printed information and verify the results through the serial debugging assistant

4. Attention
    When Src or Dst is memory, IntSrcTran/IntDstTran interrupts should be ignored because memory has no notion of a "DMA transaction level".

