DSPRelated.com
Forums

Re: Linked EDMA example?

Started by William C Bonner March 19, 2008
Sorry to respond before I got any group input. In the immortal words of
Maxwell Smart, I was "this close" to having something working. I added
EDMA_disableChannel(hEdma); to the beginning of my acquisition step and
the successive reads now seem to be working.

William C Bonner wrote:
> I've got a sequence of items that I'm trying to accomplish with a
> linked EDMA sequence. I believe that linking and chaining are two
> completely different things, and I'm trying to use linking, with the
> last item in the linked list set to produce an EDMA completion interrupt.
>
> I've got error handling that makes sure that the table entries are
> allocated correctly, and the initial channel opens.
>
> My setup code opens the EDMA Channel, allocates extra table entries
> and then starts the first acquisition step.
>
> The acquisition step configures the first handle, and then loops
> through the table first configuring all of the table entries and then
> linking them. with a last entry of all zeros.
>
> The acquisition step is called by the interrupt service routine until
> the number of acquisitions that I want have been captured, and then
> when I've got that number I call the cleanup step.
>
> If I put a breakpoint in the acquisition step, it only gets there
> three times, and then is off in lala land. Am I doing something
> explicitly wrong in my setup?
>
> I am under the impression that the user ram that I've got my table
> declared will not be modified unless I explicitly modify it. Is that
> correct?
>
> Can anyone point me to a linked EDMA example, preferably ending by
> setting an interrupt on completion?
>
> While what I'm doing is more involved with the interrupt setup,
> essentially I'm doing the following:
>
> // setup
> hEdma = EDMA_open(EDMA_CHA_EXTINT5,EDMA_OPEN_RESET); // EDMA sample
> transfer synchronized by INT5 Input
> int cnt > EDMA_allocTableEx(SimpleSweepSequenceCount-1,SimpleSweepSequenceHandles);
>
> // acquisition step
> SimpleSweepSequence[13].dst > EDMA_DST_OF(&(RampSampleBuffer[RampSample][0]));
> EDMA_disableChannel(hEdma); // put here just to make sure that
> the channel is not running.
> EDMA_config(hEdma, &(SimpleSweepSequence[0])); // setup EDMA for
> sample data transfer
> for (int index = 0; index < SimpleSweepSequenceHandleCount; index++)
>
> EDMA_config(SimpleSweepSequenceHandles[index],&(SimpleSweepSequence[index+1]));
>
> EDMA_link(hEdma,SimpleSweepSequenceHandles[0]);
> for (int index = 0; index < SimpleSweepSequenceHandleCount-1; index++)
>
> EDMA_link(SimpleSweepSequenceHandles[index],SimpleSweepSequenceHandles[index+1]);
>
> EDMA_intClear(0); // Clears EDMA transfer completion
> interrupt pending flag
> EDMA_enableChannel(hEdma); // start datatransfer
>
> // cleanup
> EDMA_freeTableEx(SimpleSweepSequenceCount-1,SimpleSweepSequenceHandles);
> EDMA_disableChannel(hEdma);
> EDMA_close(hEdma); // EDMA sample transfer synchronized by INT5 Input
> hEdma = (EDMA_Handle) INV;