This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F5244: DMA working problem

Part Number: MSP430F5244


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);
}

  • Please refer to TI-provided code example msp430f524x_dma_03.c and the following E2E thread: e2e.ti.com/.../2085615

    In these instances DMALEVEL is set so that the DMA begins without the need to populate the TXBUF. You also need to confirm your USCI settings to make sure that the buffer is being emptied so that the TXIFG flag is set again.

    Regards,
    Ryan

**Attention** This is a public forum