NUC970 Technical Reference Manual
Publication Release Date: Dec. 15, 2015
- 908 -
Revision V1.30
NUC97
0
T
E
CHNIC
A
L
RE
F
E
RE
N
CE
MA
NUA
L
5.26.4 Basic Configuration
Before using SD host controller
, it’s necessary to configure related pins as the SDH function and
enable SDH
’s clock.
For SD host related pin configuration, please refer to the register SYS_MFP_GPDL,
SYS_MFP_GPEL, SYS_MFP_GPEH, SYS_MFP_GPHL and SYS_MFP_GPHH to know how to
configure related pins as the SD host function.
Set SDH (CLK_HCLKEN[30]) high to turn on clock for SD host controller. In addition, it
’s necessary to
configure SDH_S (CLK_DIVCTL9[4:0]) and SDH_N (CLK_DIVCTL9[15:8]) to generate SD_CLK to
SD, SDHC or SDIO card properly.
Scatter-Gather DMA Disabled
5.26.4.1
1.
Set DMAEN (SDH_DMACTL[0]) to enable DMA.
2.
Fill corresponding starting address in SDH_DMASA.
3.
Enable IP to start DMA transfer.
4.
Wait IP f
inished, software doesn’t need to take care of DMA.
Scatter-Gather DMA Enabled
5.26.4.2
1.
Set DMAEN (SDH_DMACTL[0]) to enable DMACand SGEN (SDH_DMACTL[3]) to enable
Scatter-Gather function.
2.
Fill corresponding starting address of Physical Address Descriptor (PAD) table in
SDH_DMASA.
3.
When bit-0 of SDH_DMASA
is 1, the PAD will fetch in out of order, otherwise, it’s fetched in
order from PAD. The first time of writing bit-0 with 1 or not is not available for this function.
The bits will be available in PAD table.
4.
Enable IP to start DMA transfer.
5.
Wait IP finished, software doesn’t need to take care of DMA.
5.26.5 Functional Description
DMA Controller
5.26.5.1
The DMA Controller provides a DMA (Direct Memory Access) function for SDH to exchange data
between system memory (ex. SDRAM) and shared buffer (128 bytes). After filling in the starting
address and enables DMA, DMA would handle the data transfer automatically.
There is a 128 bytes shared buffer inside DMA. This 128 bytes buffer is directly accessible when SDH
is not in busy.
Secure-Digital (SD)
5.26.5.2
SDH provides an interface for SD/SDHC/SDIO/MMC card access. This SDH controller provides two
SD ports
–port0 and port1. Each port can provide 1-bit/4-bit data bus mode, card detect function and
SDIO interrupt.