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.

RTOS/EVMK2H: Why DMA does not accept floating point buffers

Part Number: EVMK2H
Other Parts Discussed in Thread: TCI6636K2H

Tool/software: TI-RTOS

I am using edma3 driver example edma3_drv_bios6_tci6636k2h_st_sample. I changed source and destination buffers type from 'signed char' to 'float'. The buffer pointers are also changed to float.

//data buffers, with sin(x) in source buffer
float _srcBuff[NUM_BUFFERS][MAX_BUFFER_SIZE];
float _dstBuff[NUM_BUFFERS][MAX_BUFFER_SIZE];
//pointers
float *srcBuff[NUM_BUFFERS];
float *dstBuff[NUM_BUFFERS];

When passing these buffers to DMA PaRAMs I type cast them to uint32_t

result |= EDMA3_DRV_setSrcParams(hEdma, chId[i], (uint32_t) (srcBuff[i]),
					EDMA3_DRV_ADDR_MODE_INCR, EDMA3_DRV_W8BIT);
result |= EDMA3_DRV_setDestParams(hEdma, chId[i],(uint32_t) (dstBuff[i]),
					EDMA3_DRV_ADDR_MODE_INCR, EDMA3_DRV_W8BIT);

but DMA does not transfer the data and return with EDMA3_RM_XFER_COMPLET code.

Does EDMA strictly work with 'signed char' due to addressing the memory?

  • Hi,

    Does EDMA strictly work with 'signed char' due to addressing the memory?

    EDMA itself should not care about the data type, so it should NOT be restricted to signed char only.

    Can you share which SDK version are you using, which version of edma lld ?

    Best Regards,
    Yordan
  • its PDK K2HK4_0_4. and edma3_lld_2_12_02_26

    edma comes back to ISR with transfer complete flag but when I look at the memory, there is no data update. I used _getParamEntry for destination address to make sure I am writing the correct destination address and it is the correct address

  • EDMA transfer did not happen because EDMA sees global address (if I am not wrong), and not the core's local L2D addresses. When I moved from signed char to float or int32_t, I could not use the given function as follows

    int32_t* pingpongSrcBuf;
    pingpongSrcBuf = (signed char*) GLOBAL_ADDR(_pingpongSrcBuf);

    Hence I used normal notation for pointer addressing as follows

    pingpongSrcBuf = &(_pingpongSrcBuf[0]);

    For now, I have hardcoded the global address for L2 of Core0 as follows, but is there any library call that maps local address to global in 32-bit int format?

    pingpongSrcBuf =(int32_t*) ((1<<28)|(unsigned int)(pingpongSrcBuf));

    problem 2:
    ACNT is the 'number' of bytes for EDMA whereas the other project constant definitions are with respect to a number of 32-bit words. I am working on that issue now.