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.

IDMA & 6437 simulator

I just tried to use the IDMA to fast page memory from L2 SRAM to L1D SRAM on the dm6437 simulator.  I opened a memory window for the L2 buffer, wrote some values, then opened the L1D buffer and looked at results.  Nothing happened.  Is IDMA paging not supported by the simulator, or am I doing something wrong?

#define IDMA1_SOURCE (0x01820108u)

static void idmaPageSourceBlock1()
{
 static char *put = &source_frame_L1D[0];
 static char *get = &source_frame_L2[0];
 int *pIDMAreg = (int *)IDMA1_SOURCE;

 *pIDMAreg++ = (int)get;  // IDMA1 source address
 *pIDMAreg++ = (int)put;  // IDMA1 destination address
 *pIDMAreg++ =     // IDMA1 count
    (0 << 29) ||  // Priority? (0 = highest, 7 = lowest)
    (0 << 28) ||  // Interrupt when done? (1 = yes)
    (0 << 16) ||  // Block fill (1 = yes)
    (IDMA_BLOCK1_SIZE & 0xfffc); // Must be multiple of 4 bytes

 get += IDMA_BLOCK1_SIZE;
 // wrap get if overflowed

 put += IDMA_BLOCK1_SIZE;
 // wrap put if overflowed

}

  • Ok, so I sort of found my own mistake.  Besides the || instead of | fiasco, apparently L1D & L2 memory is dual mapped in the DSP.  L1D starts at x10f04000 AND at x00f04000.  When I declare an array in L1D, it is given the address offset from 10f04000.  But the idma transfer only worked when I passed it the address offset from 00f04000.  (there is a similar situation for L2 being dual mapped).

    So is the way to address this memory for IDMA use to just mask off the high nibble from the pointer to my buffer?  Or is there a more elegant/intuitive way to access the other L1/L2 map?