AnsweredAssumed Answered

Sharc 21479 simulator crush when using DMA

Question asked by Ezhik452 on Nov 23, 2012
Latest reply on Dec 13, 2012 by Ezhik452

Hello everyone.

 

I'm trying to use DMA Chaining in on 21479. I wrote a simple code as in example for dma chaining enable and I load it on 21479 simulator.

If i try to look at DMA registers(IIx, IMx, Cx, CPx) while DMA load TCB data, my VDSP++ crushes to desktop. I use streaming to file as output of SPORT.

 

Is it possible to use DMA on simulator, or it works only with hardware on board?

 

Here is example of code:

 

#include <cdef21479.h>

#include <def21479.h>

 

int main( void )

{

  unsigned int OFFSET = 0x00080000;

  unsigned int PCI = 0x00080000;

 

          *pSPERRCTL0 = FSERR_EN | DERRA_EN;

 

          section("seg_dmda") int buf1[2];

  buf1[0] = 1;

  buf1[1] = 2;

 

          int tcb1[4] = {0, sizeof(buf1), 1, 0};

          tcb1[3] = (int)buf1 - OFFSET;

 

          *pSPCTL0 = 0;

 

  *pCPSP0A = 0;

          *pCPSP0A = (unsigned int)tcb1 + 3 - OFFSET;

 

          *pSPCTL0 = SPEN_A | SDEN_A | ICLK | SPTRAN | IFS | FSR | SLEN32;

 

          return 0;

}

 

Thanks for your attension.

Outcomes