AnsweredAssumed Answered

bf535 memory dma problem

Question asked by novemer on May 1, 2012
Latest reply on May 2, 2012 by novemer

hi all:

     i'm a new to use blackfin i'm using bf535.there is a problem that how to use the memory dma to transfer data.i want to copy data of sdram to asynchronous memory( was connected to a fpga) by is the code:


#define pFpgaAddr  (unsigned long *)0x20000000

#define pSramAddr  (unsigned long *)0x0


pNext =pL2_BASE+10;

  *pNext =0x0;

  unsigned char *dma_decr0;

  unsigned char *dma_decr1;

  dma_decr0 =0xff800d80;

  dma_decr1 =0xff800d90;


*(dma_decr0+2) =0xa;

  *(dma_decr0+4) =0x0;

  *(dma_decr0+6) =0x2000;

  *(dma_decr0+8) =pNext;

*(dma_decr1+2) =0xa;

  *(dma_decr1+4) =0x0;

  *(dma_decr1+6) =0x0;

  *(dma_decr1+8) =pNext;


*dma_decr0 =0x8001;

  *dma_decr1 =0x8001;

  *pMDS_DND =0x0d80;

  *pDMA_DBP =0xff80;   //dma descriptor base pointer reg

  *pMDD_DND =0x0d90;

  *pMDD_DCFG =0x8009;   //dma config

  *pMDS_DCFG =0x8009;   //dma config


i don't know the meaning of configration bit0(dma enabe) and bit15(descriptor block ownership).does it set bit15 first then set bit0 or bit0 first?