I have to use a 3D DMA to extract Y data from an NTSC input stream on the DM6437. I am using the basic EDMA driver calls found in edma3_lld_1_05_00\packages\ti\sdo\edma3\drv\src\edma3.c. To extract the Y data points, I have acnt = 1, bcnt = 720 and ccnt = 480. I use the following calls to set up the DMA channel:
EDMA3_DRV_requestChannel
EDMA3_DRV_setTransferParams
EDMA3_DRV_setSrcIndex
EDMA3_DRV_setDestIndex
EDMA3_DRV_setOptField
EDMA3_DRV_setSrcParams
EDMA3_DRV_setDestParams
I want to set off 1 event to trigger all ccnt transfers, so I have set up chaining by enabling the ITCCHEN bit. I have the STATIC bit set to 0, as section 3.3 of the EDMA user's guide specifies. I also have the TCINTEN bit set to notify the DSP when the entire transfer is complete. The first event is kicked off by a call to EDMA3_DRV_enableTransfer. I then use the EDMA3_DRV_waitAndClearTcc function to wait for completion to finish.
This works fine on the first call. All the data is transferred and I can get past the EDMA3_DRV_waitAndClearTcc call. However, the second time around no data is transferred and the DSP gets stuck in the EDMA3_DRV_waitAndClearTcc call. The only way I can fix this is if I call EDMA3_DRV_freeChannel and go through the DMA channel initialization process again. Does anyone know why I have to do this? Shouldn't the next 3D transfer just work?
Thanks,
Jason