1、功能说明
    CORDIC在DMA模式下计算sin函数的示例。
    本示例中输入数据为从 0 到 2*pi 有规律地递增的Q1.31 格式的定点数据，存储在数组aInData[]中，长度64*4字节；
    CORDIC计算结果存储于数组aCalResult[]中。
    CORDIC计算结果与参考结果数组aRefResult[]的值进行比较，若低于最大误差值，则计算结果符合预期。
    最大误差值与配置的Precision有关。


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、打印：PA9 - baud rate 115200

    CORDIC配置：
        1、Function：sin
        2、Precision：6CYCLES（建议最大配置为6cycles）
        3、Scale：0
        4、NbWrite：1
        5、NbRead：1
        6、InSize：32-bits
        7、OutSize：32-bits
        8、InSelect：定点
        9、OutSelect： 定点
        10、CodinLimit：禁用
        11、PhaseLimit：禁用

    DMA1配置：
        1、通道0: 从Cordic 读取计算结果
        2、通道1: 写数据到Cordic
        
    使用方法：
        1、编译后将程序烧录到开发板并复位运行。
        2、通过串口输出运行信息。
        3、若计算结果与参考值的差大于最大误差值，则串口输出“Error”。
        4、若计算结果与参考值的差小于等于最大误差值，则串口输出“CORDIC_Fixed_Sin_DMA test OK!”，
           指示计算结果符合预期。

4、注意事项
     无


1. Function description
    Example of the CORDIC compute sin function in DMA mode.
    In this example, the input data is the fixed-point data in Q1.31 format regularly increasing from 0 to 2*pi, 
    stored in the array aInData[], length 64*4 bytes.
    the result of the CORDIC calculation is stored in the array aCalResult[]. 
    The result of the CORDIC calculation is compared with the value of the reference result array aRefResult[], 
    and if it is lower than the maximum error value, the result of the calculation is as expected. 
    The maximum error value is related to the configured Precision.

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. printf: PA9 - baud rate 115200

    CORDIC configuration:
        1、Function：sin
        2、Precision：6CYCLES（Maximum recommended configuration is 6cycles）.
        3、Scale：0
        4、NbWrite：1
        5、NbRead：1
        6、InSize：32-bits
        7、OutSize：32-bits
        8、InSelect：Fixed Point
        9、OutSelect： Fixed point
        10、CodinLimit：Disabled
        11、PhaseLimit：Disabled
    
    DMA1 configuration:
        1、Channel 0: Cordic Read 
        2、Channel 1: Cordic Write 

Instructions:
        1. After compiling, download the program and reset, the program start running.
        2. The running informations are output through the serial port:
        3. If the difference between the calculated result and the reference value is greater 
            than the maximum error value, the serial port outputs "Error".
        4. If the difference between the calculated result and the reference value is less than 
           or equal to the maximum error value, the serial port outputs "CORDIC_Fixed_Sin_DMA test OK!", 
           indicating that the calculated result meets the expectation.
           
4. Attention
    None

