1、功能说明
    此例程展示了SDMMC对SD NANDFLASH的访问操作。

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

    芯片支持：
        N32H730  
        N32H735   
        N32H735EC
        N32H760
        N32H762
        N32H765
        N32H765EC
        N32H785
        N32H785EC
        N32H787
          
    SD nandflash:MKDV4GCL-ABB
    
3、使用说明

    系统配置
        1、时钟源：HSI+PLL
        2、系统时钟频率：600MHz
        3、打印：PA9 - baud rate 115200
        4、SDMMC配置:
            时钟源：100MHz
            
            SDMMC1 IO配置：
            D0   -->   PC8 
            D1   -->   PC9  
            D2   -->   PC10  
            D3   -->   PC11
            D0IR -->   PC6
            D123IR --> PC7
            CLK   -->  PC12 
            CLKIN -->  PB8
            CMD   -->  PD2
            CDIR  -->  PB9
            SEL   -->  PJ12
            CD    -->  PD1
            
            SDMMC2 IO配置：
            D0   -->   PB14 
            D1   -->   PB15  
            D2   -->   PB3  
            D3   -->   PB4
            D0IR -->   PG13
            D123IR --> PG14
            CLK   -->  PD6 
            CLKIN -->  PG4
            CMD   -->  PD7
            CDIR  -->  PG5
            SEL   -->  PJ13
            CD    -->  PD5
            
            mode: DS
            busClock；25MHz
            busWidth: 4bit
            DMA: ADMA
            SD卡工作电压：3.3V

    使用方法：
        1、编译后将程序下载到开发板并复位运行。
        2、查看打印信息，全PASS表示测试OK，有Error打印信息表示测试失败。

4、注意事项
    1.Board_SD_config函数中参数用来配置SD卡的工作模式，可以由用户自行配置
    2.HMI板上CLKIN引脚没有通过外部和CLK引脚连接形成回环，故使用AFIO_SDMMCClkSel函数改成内部回环模式，实际使用中应根据情况删除此语句。
    3.HMI板上CD引脚没有接到MCU端，故使用SDMMC_ConfigCardDetectSignal函数配置成TEST检测模式，默认CD引脚拉高，实际使用中应根据情况删除此语句。
    
1. Function description

     This routine demonstrates the access operation of SDMMC to NANDFLASH.

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
     SD nandflash:MKDV4GCL-ABB

3. How to use

    System Configuration:
        1. Clock source: HSI+PLL
        2. System Clock frequency: 
            600MHz
        3. printf: PA9 - baud rate 115200
        4. SDMMC configuration:
            Clock source: 100MHz
            SDMMC1 IO configuration:
            D0   -->   PC8 
            D1   -->   PC9  
            D2   -->   PC10  
            D3   -->   PC11
            D0IR -->   PC6
            D123IR --> PC7
            CLK   -->  PC12 
            CLKIN -->  PB8
            CMD   -->  PD2
            CDIR  -->  PB9
            SEL   -->  PJ12
            CD    -->  PD1
            
            SDMMC2 IO configuration:
            D0   -->   PB14 
            D1   -->   PB15  
            D2   -->   PB3  
            D3   -->   PB4
            D0IR -->   PG13
            D123IR -->   PG14
            CLK   -->  PD6 
            CLKIN -->  PG4
            CMD   -->  PD7
            CDIR  -->  PG5
            SEL   -->  PJ13
            CD    -->  PD5
            
            mode: DS
            busClock；25MHz
            busWidth: 4bit
            DMA: ADMA
            SD card working voltage：3.3V
            
     Instructions:
        1. After compilation, download the program to the development board and reset it to run.
        2. Check the print information. A full PASS indicates a successful test, 
           while an Error print indicates a failed test.

4. Attention
    1. The parameters in the Board_SD_config function are used to configure 
    the working mode of the SD card, which can be configured by the user themselves.
    2. The CLKIN pin on the HMI board is not connected to the external CLK pin to form a loop, so the AFIO-SDMMCClkSel function is used to change it to internal loop mode. 
    In actual use, this statement should be deleted according to the situation
    3. The CD pin of the full function board is not connected to the MCU terminal, 
    so the SDMMC_ConfigCardDetectSignal function is used to configure the TEST detection mode. 
    The default CD pin is pulled high, but this statement should be deleted according to the situation in actual use.

