My code for the DMA spi is given below, but the problem is I'm not able to transfer not even single byte using the function. Help me anybody if I'm doing something wrong in the funcion.
void SPI_DMATx(uint8_t* SrcAddr,uint16_t Len)
{
DMACTL0 = DMA0TSEL_23; // DMA interrupt trigger is spi_b1
__data16_write_addr((unsigned short) &DMA0SA,(unsigned long) &SrcAddr[1]);
// Source block address
__data16_write_addr((unsigned short) &DMA0DA,(unsigned long) &UCB1TXBUF);
// Destination single address
DMA0SZ = Len-1; // Block size
DMA0CTL = DMASRCINCR_3|DMASBDB|DMADT_0; // inc src
DMA0CTL |=DMAEN;
UCB1TXBUF=SrcAddr[0];
while (DMA1CTL & DMAEN);
}