Loading ...
Sorry, an error occurred while loading the content.
 

DMA & SCI

Expand Messages
  • marjan_hanc
    Hello guys, I need little help, if anyone can help me to come along with the on chip peripherals and the DMA on TMS470. I was trying to send and receive the
    Message 1 of 1 , Dec 19, 2006
      Hello guys,

      I need little help, if anyone can help me to come along with the
      on chip peripherals and the DMA on TMS470.

      I was trying to send and receive the data via SCI1 by using the DMA,
      but without luck :-(

      Interestingly, the memory2memory transfers are working fine.

      Below is the example code I was using to setup the TMS470R1B1M.

      Even if I force TXRDY to 1 by filling the SCI1TXBUF, DMA does not
      react and does not start the data transfer.

      Have I overseen something ?

      Thanks for the help and best regards,
      Marjan

      // Example code

      unsigned char txdata[255];

      // Initialize SCI1 (115200bps @ 14.477MHz)

      SCI1CTL3 &= ~SW_NRESET;
      SCI1CCR = 0x17;
      SCI1CTL1 |= RXENA + RX_DMA_ENA + RX_DMA_ALL;
      SCI1CTL2 |= TXENA + TX_DMA_ENA;
      SCI1CTL3 |= CLOCK + RX_ACTION_ENA + TX_ACTION_ENA;
      SCI1LBAUD = 15;
      SCI1PC2 |= RX_FUNC;
      SCI1PC3 |= TX_FUNC;
      SCI1CTL3 |= SW_NRESET;

      // DMA Control packet definitions

      DMAC00 = TRSIZE_0 + SRCINC + SRCMOD_2 + DSTMOD_15;
      DMASA00 = (unsigned long)&txdata;
      DMADA00 = (unsigned long)&SC1TXBUF;
      DMATC00 = 16;

      // DMA channel initialization

      DMACC0 = SEN0 + RQEN0;

      // DMA global registers initialization

      DMAGC = 0;
      DMAGD = 0;
      DMACPS = 1;
      DMACCP0 = DMEN0 + CCPACK0_0;
    Your message has been successfully submitted and would be delivered to recipients shortly.