Menu

#32 dma memory queue basic, CallFlag in descriptor is incorrect

system_services
open
nobody
5
2010-07-12
2010-07-12
Kevin Yang
No

BTP\testcases\tutorials\services\dma\dma_memory_queue_basic\dma_memory_queue_basic.c

line 175, shall be removed

will cause memory leakage and incorrect setting values of DestinationDescriptor[]
DestinationDescriptor[i - 1].CallbackFlag = TRUE;
in this case,
SourceDescriptor[3].CallbackFlag=TRUE; // mem leakage
DestinationDescriptor[0].CallbackFlag= TRUE;
DestinationDescriptor[1].CallbackFlag= TRUE;
DestinationDescriptor[2].CallbackFlag= TRUE;
DestinationDescriptor[3].CallbackFlag= TRUE; //set by additional code out of for loop

should be simple as,
DestinationDescriptor[i].CallbackFlag = TRUE;
which only enables callback after dma write is completed.

Discussion


Log in to post a comment.