SC6xEDMAChannel Functions

Top  Previous  Next

These functions all operate on one of the SC6xEDMAChannel pointers returned by the 'claim' functions described above.

 

Note that functions dealing with external devices do not set the various device enables that are necessary to allow EDMA synchronisation or CPU interrupts. Refer to your C6000 module’s hardware documentation for a description of enabling events and interrupts for particular devices. EDMA termination interrupts are automatically managed for you.

 

SC6xEDMAChannel_AwaitInterrupt

#include <edma.h>

void SC6xEDMAChannel_AwaitInterrupt(SC6xEDMAChannel *channel);

stand-alone

You use this function when you do not wish to call SC6xEDMAChannel_StartWait or SC6xEDMAChannel_KickWait that start an EDMA transfer and wait for it automatically. This is usually because you want to do something between starting the transfer and waiting for it to complete.

 

Start the transfer using SC6xEDMAChannel_Start and then later use SC6xEDMAChannel_AwaitInterrupt to wait until it has finished.

 

channel must be a pointer returned by one of the 'claim' functions listed above.

SC6xEDMAChannel_Disable

#include <edma.h>

void SC6xEDMAChannel_Disable(SC6xEDMAChannel *channel);

stand-alone

This function is rarely used, but prevents an EDMA channel from responding to synchronisation events. Any part of a transfer that is already in progress will continue to be processed, but no subsequent synchronisation events will be recognised.

 

It encapsulates the sequence:

1.

Clear the bit in CIER or CIERH corresponding to the given channel;

2.

Clear the bit in EER or EERH corresponding to the given channel.

 

channel must be a pointer returned by one of the 'claim' functions listed above.

SC6xEDMAChannel_Enable

#include <edma.h>

void SC6xEDMAChannel_Enable(SC6xEDMAChannel *channel);

stand-alone

This function puts an EDMA channel into a state where it will start operating as soon as its synchronisation event happens. It is useful when several related EDMA transfers have to be started but the application needs to wait for the completion of only the final one. SC6xEDMAChannel_AwaitInterrupt can be used later to wait for the transfer to complete.

 

It encapsulates the sequence:

1.

SC6xEDMAChannel_ResetEvent(channel);

2.

Set the bit in CIER or CIERH corresponding to the given channel;

3.

Set the bit in EER or EERH corresponding to the given channel.

 

channel must be a pointer returned by one of the 'claim' functions listed above.

 

SC6xEDMAChannel_KickWait

#include <edma.h>

void SC6xEDMAChannel_KickWait(SC6xEDMAChannel *channel);

stand-alone

This function is provided for the common case where the EDMA channel does not need to wait for a synchronisation signal before initiating a transfer.

 

It encapsulates the sequence:

1.

SC6xEDMAChannel_ResetEvent(channel);

2.

Set the bit in CIER or CIERH corresponding to the given channel;

3.

Set the bit in EER or EERH corresponding to the given channel;

4.

Set the bit in ESR or ESRH corresponding to the given channel to start the transfer immediately;

5.

SC6xEDMAChannel_AwaitInterrupt(channel);

6.

Clear the bit in CIER or CIERH corresponding to the given channel;

7.

Clear the bit in EER or EERH corresponding to the given channel.

 

channel must be a pointer returned by one of the 'claim' functions listed above.

SC6xEDMAChannel_Release

#include <edma.h>

void SC6xEDMAChannel_Release(SC6xEDMAChannel *channel);

stand-alone

channel must be a pointer returned by one of the claim functions listed above. The EDMA channel described by this pointer is released to the free pool.

SC6xEDMAChannel_ResetEvent

#include <edma.h>

void SC6xEDMAChannel_ResetEvent(SC6xEDMAChannel *channel);

stand-alone

Each SC6xEDMAChannel has an EVENT synchronisation object associated with it. The kernel catches interrupts from the underlying hardware EDMA channel (EDMA_INT) and arranges for the appropriate event to be signalled. This function is used to clear the event before waiting for an interrupt by calling SC6xEDMAChannel_AwaitInterrupt. You must be careful to do this before starting the EDMA transfer or setting the EDMA interrupt conditions, as setting them might trigger an unexpected interrupt. The channel functions SC6xEDMAChannel_StartWait and SC6xEDMAChannel_KickWait automatically clear the event.

 

channel must be a pointer returned by one of the 'claim' functions listed above.

SC6xEDMAChannel_Start

#include <edma.h>

void SC6xEDMAChannel_Start(SC6xEDMAChannel *channel);

stand-alone

This function starts an EDMA transfer by setting the bit in ESR or ESRH corresponding to the given channel.

SC6xEDMAChannel_StartWait

#include <edma.h>

void SC6xEDMAChannel_StartWait(SC6xEDMAChannel *channel);

stand-alone

This function is provided for the common situation where a thread has nothing to do between initiating an EDMA operation and dealing with its completion. It assumes that the actual transfer will be started by the synchronisation event associated with the EDMA channel being used. You should call SC6xEDMAChannel_KickWait when you want the transfer to start immediately.

 

It encapsulates the sequence:

1.

SC6xEDMAChannel_ResetEvent(channel);

2.

Set the bit in CIER or CIERH corresponding to the given channel;

3.

Set the bit in EER or EERH corresponding to the given channel;

4.

Note that ESR and ESRH are not touched;

5.

SC6xEDMAChannel_AwaitInterrupt(channel);

6.

Clear the bit in CIER or CIERH corresponding to the given channel;

7.

Clear the bit in EER or EERH corresponding to the given channel.

 

channel must be a pointer returned by one of the 'claim' functions listed above.