iLLD_TC27xD  1.0
Channel configuration Functions
Collaboration diagram for Channel configuration Functions:

Functions

IFX_INLINE uint32 IfxDma_getChannelDestinationAddress (Ifx_DMA *dma, IfxDma_ChannelId channelId)
 Get a channel source address. More...
 
IFX_INLINE uint32 IfxDma_getChannelSourceAddress (Ifx_DMA *dma, IfxDma_ChannelId channelId)
 Get a channel source address. More...
 
IFX_INLINE uint32 IfxDma_getChannelTransferCount (Ifx_DMA *dma, IfxDma_ChannelId channelId)
 Return remaining DMA transfer count. More...
 
IFX_INLINE uint32 IfxDma_getTimestamp (Ifx_DMA *dma)
 get the time stamp More...
 
IFX_INLINE void IfxDma_setChannelBlockMode (Ifx_DMA *dma, IfxDma_ChannelId channelId, IfxDma_ChannelMove blockMode)
 Configure the move count for each DMA channel transfer. More...
 
IFX_INLINE void IfxDma_setChannelContinuousMode (Ifx_DMA *dma, IfxDma_ChannelId channelId)
 Configure a DMA channel to "continous transaction mode" After a transaction, the hardware request transaction remain enabled. More...
 
IFX_INLINE void IfxDma_setChannelDestinationAddress (Ifx_DMA *dma, IfxDma_ChannelId channelId, void *address)
 Configure the destination address. More...
 
IFX_INLINE void IfxDma_setChannelDestinationIncrementStep (Ifx_DMA *dma, IfxDma_ChannelId channelId, IfxDma_ChannelIncrementStep incStep, IfxDma_ChannelIncrementDirection direction, IfxDma_ChannelIncrementCircular size)
 Configure a DMA channel destination pointer. More...
 
IFX_INLINE void IfxDma_setChannelMoveSize (Ifx_DMA *dma, IfxDma_ChannelId channelId, IfxDma_ChannelMoveSize moveSize)
 Configure a DMA channel move. More...
 
IFX_INLINE void IfxDma_setChannelShadow (Ifx_DMA *dma, IfxDma_ChannelId channelId, IfxDma_ChannelShadow shadow)
 Configure a DMA channel shadow pointer. More...
 
IFX_INLINE void IfxDma_setChannelSingleMode (Ifx_DMA *dma, IfxDma_ChannelId channelId)
 Configure a DMA channel to "single transaction mode" After a transaction, the hardware request transaction is disabled, and must be set by software again. More...
 
IFX_INLINE void IfxDma_setChannelSingleTransaction (Ifx_DMA *dma, IfxDma_ChannelId channelId)
 Configure a DMA channel to "single transaction mode" One transfer request starts a complete DMA transaction. More...
 
IFX_INLINE void IfxDma_setChannelSingleTransfer (Ifx_DMA *dma, IfxDma_ChannelId channelId)
 Configure a DMA channel to "single transfer mode" A transfer request is required for each transfer. More...
 
IFX_INLINE void IfxDma_setChannelSourceAddress (Ifx_DMA *dma, IfxDma_ChannelId channelId, const void *address)
 Configure the source address. More...
 
IFX_INLINE void IfxDma_setChannelSourceIncrementStep (Ifx_DMA *dma, IfxDma_ChannelId channelId, IfxDma_ChannelIncrementStep incStep, IfxDma_ChannelIncrementDirection direction, IfxDma_ChannelIncrementCircular size)
 Configure a DMA channel source pointer. More...
 
IFX_INLINE void IfxDma_setChannelTransferCount (Ifx_DMA *dma, IfxDma_ChannelId channelId, uint32 transferCount)
 Configure the move count of a DMA channel transaction. More...
 
IFX_INLINE void IfxDma_writeChannelShadowDisable (Ifx_DMA *dma, IfxDma_ChannelId channelId)
 Configure the shadow pointer register to read only. More...
 
IFX_INLINE void IfxDma_writeChannelShadowEnable (Ifx_DMA *dma, IfxDma_ChannelId channelId)
 Configure the shadow pointer register to write-able. More...
 

Detailed Description

Function Documentation

IFX_INLINE uint32 IfxDma_getChannelDestinationAddress ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId 
)

Get a channel source address.

Parameters
dmapointer to DMA module
channelIdDMA channel number
Returns
Actual channel destination address
uint32 destAddr = IfxDma_getChannelDestinationAddress(chn[2].dma, chn[2].channelId);

Definition at line 1326 of file IfxDma.h.

IFX_INLINE uint32 IfxDma_getChannelSourceAddress ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId 
)

Get a channel source address.

Parameters
dmapointer to DMA module
channelIdDMA channel number
Returns
Actual channel source address
uint32 sourceAddr = IfxDma_getChannelSourceAddress(chn[2].dma, chn[2].channelId);

Definition at line 1354 of file IfxDma.h.

IFX_INLINE uint32 IfxDma_getChannelTransferCount ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId 
)

Return remaining DMA transfer count.

Parameters
dmapointer to DMA module
channelIdDMA channel number
Returns
Remaining DMA transfer count
// Wait till transfer count (TCOUNT) becomes 0
bool notFinished;
do {
notFinished = false;
if( IfxDma_getChannelTransferCount(chn[0].dma, chn[0].channelId) ) {
notFinished = true;
break;
}
} while( notFinished );

Definition at line 1366 of file IfxDma.h.

IFX_INLINE uint32 IfxDma_getTimestamp ( Ifx_DMA *  dma)

get the time stamp

Parameters
dmapointer to DMA module
Returns
the current time stamp
uint32 timestamp = IfxDma_getTimestamp(chn[0].dma);

Definition at line 1419 of file IfxDma.h.

IFX_INLINE void IfxDma_setChannelBlockMode ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId,
IfxDma_ChannelMove  blockMode 
)

Configure the move count for each DMA channel transfer.

Parameters
dmapointer to DMA module
channelIdDMA channel number
blockModevalue holds the number of moves with in a DMA transfer
Returns
None

A coding example can be found in IfxDma_setChannelTransferCount

Definition at line 1455 of file IfxDma.h.

IFX_INLINE void IfxDma_setChannelContinuousMode ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId 
)

Configure a DMA channel to "continous transaction mode" After a transaction, the hardware request transaction remain enabled.

Parameters
dmapointer to DMA module
channelIdDMA channel number
Returns
None

A coding example can be found in IfxDma_enableChannelTransaction

Definition at line 1461 of file IfxDma.h.

IFX_INLINE void IfxDma_setChannelDestinationAddress ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId,
void *  address 
)

Configure the destination address.

Parameters
dmapointer to DMA module
channelIdDMA channel number
addressis the Initial address of the destination pointer
Returns
None

A coding example can be found in IfxDma_setChannelSourceAddress

Definition at line 1467 of file IfxDma.h.

Referenced by IfxDma_Dma_setChannelDestinationAddress().

IFX_INLINE void IfxDma_setChannelDestinationIncrementStep ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId,
IfxDma_ChannelIncrementStep  incStep,
IfxDma_ChannelIncrementDirection  direction,
IfxDma_ChannelIncrementCircular  size 
)

Configure a DMA channel destination pointer.

Parameters
dmapointer to DMA module
channelIdDMA channel number
incStepSpecifies the pointer incrementation step
directionSpecifies the incrementation direction
sizeSpecifies the size of the circular buffer
Returns
None

A coding example can be found in IfxDma_setChannelSourceIncrementStep

Definition at line 1473 of file IfxDma.h.

IFX_INLINE void IfxDma_setChannelMoveSize ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId,
IfxDma_ChannelMoveSize  moveSize 
)

Configure a DMA channel move.

Parameters
dmapointer to DMA module
channelIdDMA channel number
moveSizevalue holds the opcode or size of data of individual moves with in a DMA transfer
Returns
None

A coding example can be found in IfxDma_setChannelTransferCount

Definition at line 1496 of file IfxDma.h.

IFX_INLINE void IfxDma_setChannelShadow ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId,
IfxDma_ChannelShadow  shadow 
)

Configure a DMA channel shadow pointer.

Parameters
dmapointer to DMA module
channelIdDMA channel number
shadowSpecifies the shadow pointer
Returns
None
// Push the shadow mode into double buffer
IfxDma_setChannelShadow(chn[0].dma, chn[0].channelId,

Definition at line 1502 of file IfxDma.h.

IFX_INLINE void IfxDma_setChannelSingleMode ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId 
)

Configure a DMA channel to "single transaction mode" After a transaction, the hardware request transaction is disabled, and must be set by software again.

Parameters
dmapointer to DMA module
channelIdDMA channel number
Returns
None

A coding example can be found in IfxDma_enableChannelTransaction

Definition at line 1508 of file IfxDma.h.

IFX_INLINE void IfxDma_setChannelSingleTransaction ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId 
)

Configure a DMA channel to "single transaction mode" One transfer request starts a complete DMA transaction.

Parameters
dmapointer to DMA module
channelIdDMA channel number
Returns
None

A coding example can be found in IfxDma_setChannelTransferCount

Definition at line 1514 of file IfxDma.h.

IFX_INLINE void IfxDma_setChannelSingleTransfer ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId 
)

Configure a DMA channel to "single transfer mode" A transfer request is required for each transfer.

Parameters
dmapointer to DMA module
channelIdDMA channel number
Returns
None

A coding example can be found in IfxDma_setChannelTransferCount

Definition at line 1520 of file IfxDma.h.

IFX_INLINE void IfxDma_setChannelSourceAddress ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId,
const void *  address 
)

Configure the source address.

Parameters
dmapointer to DMA module
channelIdDMA channel number
addressis the Initial address of the source pointer
Returns
None
// Check for the end of current transaction and before trigger the channel request for
// for another channel, re configure the source and destination addresses
while(!(IfxDma_getAndClearChannelInterrupt(chn[1].dma, chn[1].channelId)));
// Re-Program the source address for the channel 2
IfxDma_setChannelSourceAddress(chn[2].dma, chn[2].channelId,Sadr);
// Re-Program the destination address for channel 2
IfxDma_setChannelDestinationAddress(chn[2].dma, chn[2].channelId,Dadr);
// Start DMA transaction for channel 2

Definition at line 1526 of file IfxDma.h.

Referenced by IfxDma_Dma_setChannelSourceAddress().

IFX_INLINE void IfxDma_setChannelSourceIncrementStep ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId,
IfxDma_ChannelIncrementStep  incStep,
IfxDma_ChannelIncrementDirection  direction,
IfxDma_ChannelIncrementCircular  size 
)

Configure a DMA channel source pointer.

Parameters
dmapointer to DMA module
channelIdDMA channel number
incStepSpecifies the pointer incrementation step
directionSpecifies the incrementation direction
sizeSpecifies the size of the circular buffer
Returns
None

Definition at line 1532 of file IfxDma.h.

IFX_INLINE void IfxDma_setChannelTransferCount ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId,
uint32  transferCount 
)

Configure the move count of a DMA channel transaction.

Parameters
dmapointer to DMA module
channelIdDMA channel number
transferCountvalue holds the DMA transfers within a transaction (1..16383; 0 handled like 1 transaction)
Returns
None
// Start DMA transaction
// Wait till end of transaction
while(!(IfxDma_getAndClearChannelInterrupt(chn[0].dma, chn[0].channelId)));
// Change the TREL configuration for channel 1
IfxDma_setChannelTransferCount(chn[1].dma, chn[1].channelId,0x6);
// Change the BLKM configuration for channel 1
IfxDma_setChannelBlockMode(chn[1].dma, chn[1].channelId,IfxDma_ChannelMove_3);
// Change the Move size configuration for channel 1
// Pull down the channel pending request after the first transfer is initiated
IfxDma_setChannelSingleTransfer(chn[1].dma, chn[1].channelId);
// Pull down the channel pending request after the transaction gets over
IfxDma_setChannelSingleTransaction(chn[2].dma, chn[2].channelId);
// Start DMA transaction
// Start DMA transaction

Definition at line 1543 of file IfxDma.h.

Referenced by IfxDma_Dma_setChannelTransferCount().

IFX_INLINE void IfxDma_writeChannelShadowDisable ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId 
)

Configure the shadow pointer register to read only.

Parameters
dmapointer to DMA module
channelIdDMA channel number
Returns
None
// Disable the shadow mode to come out of double buffer mode
IfxDma_writeChannelShadowDisable(chn[0].dma, chn[0].channelId);

Definition at line 1570 of file IfxDma.h.

IFX_INLINE void IfxDma_writeChannelShadowEnable ( Ifx_DMA *  dma,
IfxDma_ChannelId  channelId 
)

Configure the shadow pointer register to write-able.

Parameters
dmapointer to DMA module
channelIdDMA channel number
Returns
None
// Enable the shadow mode to come out of double buffer mode
IfxDma_writeChannelShadowEnable(chn[0].dma, chn[0].channelId);

Definition at line 1576 of file IfxDma.h.