AnsweredAssumed Answered

Regarding ADSP-BF533 Uart Dma Transfer

Question asked by achar123 on Aug 18, 2012
Latest reply on Aug 26, 2012 by Prashant

Hello sir/madam,

 

            I am working on ADSP- BF533. I want to enable dma on uart. I have tried but not getting the required results. Its displaying sending some junk values through UART.

 

            I am writing my code below Please look after it and please reply with the necessary bugs in the code.

 

            Please do attach any code if you have for the series.

 

#include<cdefBF533.h>

#include<stdio.h>

#include<sys/exception.h>

 

unsigned static int buffer[64]=

{48, 48, 48, 48, 48, 48, 48, 48, 48, 48,

48, 48, 48, 48, 48, 48, 48, 48, 48, 48,

48, 48, 48, 48, 48, 48, 48, 48, 48, 48,

48, 48, 48, 48, 48, 48, 48, 48, 48, 48,

48, 48, 48, 48, 48, 48, 48, 48, 48, 48};

;

EX_INTERRUPT_HANDLER(uart);

 

 

void main()

{

  register_handler(ik_ivg10, uart);

 

  *pSIC_IMASK = 0x8000;

 

 

 

  printf("configuring the DMA\n");

 

  *pDMA7_PERIPHERAL_MAP = 0x7000;

  *pDMA7_CONFIG = 0x0000;

// *pDMA7_START_ADDR = (unsigned char*)&tx_buff;

    *pDMA7_START_ADDR = bufferb;

  *pDMA7_X_COUNT = 0x0032;

    *pDMA7_Y_COUNT = 0x0001;

  *pDMA7_X_MODIFY = 0x0001;

  *pDMA7_CONFIG = 0x00A1;

 

 

 

 

  printf("configuring UART\n");

 

  *pUART_LCR = 0x0080;

  // *pUART_IER |= ETBEI;

 

 

  *pUART_THR = 0x00;

  *pUART_DLH = 0x00;

  *pUART_DLL = 0x48;

 

 

  *pUART_LCR = 0x0000;

 

  *pUART_LCR = 0x0003;

 

  *pUART_IER = 0x0002;

 

  *pUART_GCTL = 0x0001;

  asm("ssync;");

 

 

  while(1)

  {

  printf("Entered while loop\n");

  }

  

}

 

 

EX_INTERRUPT_HANDLER(uart)

{

 

 

  *pDMA7_IRQ_STATUS |= DMA_DONE;// Acknowleging the Interupt

     *pDMA7_CONFIG = 0; // Disable DMA and DMA Interrupt

     *pUART_IER &= ~ETBEI;          // Disable UART Transmit Buffer Empty Interrupt

     *pSIC_IMASK = 0x0000;     // Disable DMA Channel 7 (UART TX) Interrupt Request

 

  

// *pDMA7_CONFIG = 0x0000;

  printf("DMA Done");

 

 

  *pDMA7_IRQ_STATUS |= 0x0001;

  printf("\n Interrupt \n");

 

}

 

            Please, kindly do the needful I will be waiting for the same.

 

Thanks & Regards

Sandeep

Outcomes