SLAU367P October 2012 – April 2020 MSP430FR5041 , MSP430FR5043 , MSP430FR50431 , MSP430FR5847 , MSP430FR58471 , MSP430FR5848 , MSP430FR5849 , MSP430FR5857 , MSP430FR5858 , MSP430FR5859 , MSP430FR5867 , MSP430FR58671 , MSP430FR5868 , MSP430FR5869 , MSP430FR5870 , MSP430FR5872 , MSP430FR58721 , MSP430FR5887 , MSP430FR5888 , MSP430FR5889 , MSP430FR58891 , MSP430FR5922 , MSP430FR59221 , MSP430FR5947 , MSP430FR59471 , MSP430FR5948 , MSP430FR5949 , MSP430FR5957 , MSP430FR5958 , MSP430FR5959 , MSP430FR5962 , MSP430FR5964 , MSP430FR5967 , MSP430FR5968 , MSP430FR5969 , MSP430FR5969-SP , MSP430FR59691 , MSP430FR5970 , MSP430FR5972 , MSP430FR59721 , MSP430FR5986 , MSP430FR5987 , MSP430FR5988 , MSP430FR5989 , MSP430FR5989-EP , MSP430FR59891 , MSP430FR5992 , MSP430FR5994 , MSP430FR59941 , MSP430FR6005 , MSP430FR6007 , MSP430FR6035 , MSP430FR6037 , MSP430FR60371 , MSP430FR6041 , MSP430FR6043 , MSP430FR60431 , MSP430FR6045 , MSP430FR6047 , MSP430FR60471 , MSP430FR6820 , MSP430FR6822 , MSP430FR68221 , MSP430FR6870 , MSP430FR6872 , MSP430FR68721 , MSP430FR6877 , MSP430FR6879 , MSP430FR68791 , MSP430FR6887 , MSP430FR6888 , MSP430FR6889 , MSP430FR68891 , MSP430FR6920 , MSP430FR6922 , MSP430FR69221 , MSP430FR6927 , MSP430FR69271 , MSP430FR6928 , MSP430FR6970 , MSP430FR6972 , MSP430FR69721 , MSP430FR6977 , MSP430FR6979 , MSP430FR69791 , MSP430FR6987 , MSP430FR6988 , MSP430FR6989 , MSP430FR69891
The SDHS supports output data rates up to 8 Msps, which is faster than the system DMA can support, so the SDHS has a dedicated Data Transfer Controller (DTC) and an internal data buffer to support up to 8-MHz data transfer speed to the target memory.
Figure 22-14 shows the block diagram of the output data path. A conversion result from digital filter goes first to the internal data buffer. The buffer has 64-word depth. As soon as a new data is available in the buffer, the data is latched with the system clock (called synchronization to the system clock) and is written to SDHSDT register. Then the DTC reads the data from SDHSDT register and transfers to the destination memory location.
The DTC may require more than one sample period to transfer the data to system memory. Thus, the buffer depth is selected to achieve the 8-MHz data transfer speed when the system clock is equal to or higher than the SDHS output data rate. Take care when selecting SDHSCTL1.OSR bits or the system clock frequency. The system clock frequency must be equal to or greater than the SDHS output data rate, or a data overflow may occur.
The DTC is enabled by default but can be disabled when SDHSCTL2.DTCOFF = 1. When the DTC is disabled, the data in the SDHSDT register must be read by CPU. If the SDHSDT register has not been read by CPU over 64 sample periods, the internal buffer becomes full and does not take any more new data. In the case, newly generated data is lost and causes the overflow interrupt (SDHSRIS.OVF).
NOTE
If data conversion is performed with SDHSCTL2.DTCOFF = 1, the data buffer may not be empty when the conversion stops. The CPU can continue to read the data until the buffer is empty. While the CPU is reading the data from the buffer after conversion is stopped, data format configurations (SDHSCTL0.DFMSEL, SDHSCTL0.DALGN, and SDHSCTL0.OBR bits) must not be changed.
The destination system memory is the LEA RAM, which is part of system memory. The DTC automatically recognize the base address of the LEA RAM in the target device. Only offset address needs to be configured to SDHSDTCDA register.
The SDHSDTCCA register value automatically increases by 1 at every data transfer, so the current target address can be monitored by reading SDHSDTCDA register. The maximum offset address is 64KB. The SDHSDTCDA register value resets when the offset address reaches the 64KB limit and starts from zero again.
NOTE
The DTC block supports up to 64KB of memory size; however, the available memory (LEA RAM) could be smaller than 64KB (see the device-specific data sheet). If the SDHSDTCDA register goes beyond the available memory space, data transferred to the outside of the available memory is lost. In this case, the DTC block does not overwrite data in other memory areas, because it accesses only the LEA RAM.
Take care not to go beyond the available memory address range. The DTC cannot detect if the offset address goes beyond the available LEA RAM. TI recommends using SDHSCTL2.SMPSZ[9:0], which controls the total number of samples.
NOTE
While the DTC is transferring data to the destination memory, the memory is blocked from being accessed by CPU or DMA. If the CPU or DMA attempts to access the same memory, 0x3FFF is returned and an NMI is generated (DACCESSIFG).