AnsweredAssumed Answered

Chained Memory DMA - callbacks on more than one descriptor?

Question asked by CannonFodder on Jul 1, 2010
Latest reply on Aug 7, 2012 by bala


I've been trying to do a 2D memory DMA using chained descriptors, using system services, and want to be called back when each destination descriptor is processed.

However I'm finding that this generates an exception and only when one destination descriptor is tagged for a callback will it work correctly.

Debugging in it appears that in DataHandler(adi_dma.c) it processes the associated source descriptor first before processing the destination descriptor. This is fine on the first interrupt however on the subsequent event ProcessDataInterrupt(adi_dma.c) deferences a NULL pointer and this causes the exception.

This can be demonstrated using the chained DMA example that's distributed under BF561 Ezkit samples.

Just changing it to the following on each destination descriptor induces the error:-


     DestinationBuffers[i].Config.b_DI_EN = 1;

DestinationBuffers[i].CallbackFlag = TRUE;


Should it be expected to support deferred callbacks on intermediate descriptors when doing a chained memory DMA?