Data Structures | |
struct | EDMA3_DRV_ChainOptions |
Structure to be used to configure interrupt generation and chaining options. More... | |
Enumerations | |
enum | EDMA3_DRV_OptField { EDMA3_DRV_OPT_FIELD_SAM = 0, EDMA3_DRV_OPT_FIELD_DAM = 1, EDMA3_DRV_OPT_FIELD_SYNCDIM = 2, EDMA3_DRV_OPT_FIELD_STATIC = 3, EDMA3_DRV_OPT_FIELD_FWID = 4, EDMA3_DRV_OPT_FIELD_TCCMODE = 5, EDMA3_DRV_OPT_FIELD_TCC = 6, EDMA3_DRV_OPT_FIELD_TCINTEN = 7, EDMA3_DRV_OPT_FIELD_ITCINTEN = 8, EDMA3_DRV_OPT_FIELD_TCCHEN = 9, EDMA3_DRV_OPT_FIELD_ITCCHEN = 10 } |
OPT Field Offset. More... | |
enum | EDMA3_DRV_AddrMode { EDMA3_DRV_ADDR_MODE_INCR = 0, EDMA3_DRV_ADDR_MODE_FIFO = 1 } |
EDMA Addressing modes. More... | |
enum | EDMA3_DRV_SyncType { EDMA3_DRV_SYNC_A = 0, EDMA3_DRV_SYNC_AB = 1 } |
EDMA Transfer Synchronization type. More... | |
enum | EDMA3_DRV_StaticMode { EDMA3_DRV_STATIC_DIS = 0, EDMA3_DRV_STATIC_EN = 1 } |
True/False: PaRAM set is Static or not. A Static PaRAM set is updated or linked after TR is submitted. More... | |
enum | EDMA3_DRV_FifoWidth { EDMA3_DRV_W8BIT = 0, EDMA3_DRV_W16BIT = 1, EDMA3_DRV_W32BIT = 2, EDMA3_DRV_W64BIT = 3, EDMA3_DRV_W128BIT = 4, EDMA3_DRV_W256BIT = 5 } |
EDMA3 FIFO width. More... | |
enum | EDMA3_DRV_TccMode { EDMA3_DRV_TCCMODE_NORMAL = 0, EDMA3_DRV_TCCMODE_EARLY = 1 } |
Transfer complete code mode. Indicates the point at which a transfer is considered completed for chaining and interrupt generation. More... | |
enum | EDMA3_DRV_TcintEn { EDMA3_DRV_TCINTEN_DIS = 0, EDMA3_DRV_TCINTEN_EN = 1 } |
Transfer complete interrupt enable. More... | |
enum | EDMA3_DRV_ItcintEn { EDMA3_DRV_ITCINTEN_DIS = 0, EDMA3_DRV_ITCINTEN_EN = 1 } |
Intermediate Transfer complete interrupt enable. More... | |
enum | EDMA3_DRV_TcchEn { EDMA3_DRV_TCCHEN_DIS = 0, EDMA3_DRV_TCCHEN_EN = 1 } |
Transfer complete chaining enable. More... | |
enum | EDMA3_DRV_ItcchEn { EDMA3_DRV_ITCCHEN_DIS = 0, EDMA3_DRV_ITCCHEN_EN = 1 } |
Intermediate Transfer complete chaining enable. More... | |
enum | EDMA3_DRV_TrigMode { EDMA3_DRV_TRIG_MODE_MANUAL = 0, EDMA3_DRV_TRIG_MODE_QDMA = 1, EDMA3_DRV_TRIG_MODE_EVENT = 2, EDMA3_DRV_TRIG_MODE_NONE = 3 } |
EDMA Trigger Mode Selection. More... | |
Functions | |
EDMA3_DRV_Result | EDMA3_DRV_setOptField (EDMA3_DRV_Handle hEdma, unsigned int lCh, EDMA3_DRV_OptField optField, unsigned int newOptFieldVal) |
Set a particular OPT field in the PaRAM set associated with the logical channel 'lCh'. | |
EDMA3_DRV_Result | EDMA3_DRV_getOptField (EDMA3_DRV_Handle hEdma, unsigned int lCh, EDMA3_DRV_OptField optField, unsigned int *optFieldVal) |
Get a particular OPT field in the PaRAM set associated with the logical channel 'lCh'. | |
EDMA3_DRV_Result | EDMA3_DRV_setSrcParams (EDMA3_DRV_Handle hEdma, unsigned int lCh, unsigned int srcAddr, EDMA3_DRV_AddrMode addrMode, EDMA3_DRV_FifoWidth fifoWidth) |
DMA source parameters setup. | |
EDMA3_DRV_Result | EDMA3_DRV_setDestParams (EDMA3_DRV_Handle hEdma, unsigned int lCh, unsigned int destAddr, EDMA3_DRV_AddrMode addrMode, EDMA3_DRV_FifoWidth fifoWidth) |
DMA Destination parameters setup. | |
EDMA3_DRV_Result | EDMA3_DRV_setSrcIndex (EDMA3_DRV_Handle hEdma, unsigned int lCh, int srcBIdx, int srcCIdx) |
DMA source index setup. | |
EDMA3_DRV_Result | EDMA3_DRV_setDestIndex (EDMA3_DRV_Handle hEdma, unsigned int lCh, int destBIdx, int destCIdx) |
DMA destination index setup. | |
EDMA3_DRV_Result | EDMA3_DRV_setTransferParams (EDMA3_DRV_Handle hEdma, unsigned int lCh, unsigned int aCnt, unsigned int bCnt, unsigned int cCnt, unsigned int bCntReload, EDMA3_DRV_SyncType syncType) |
DMA transfer parameters setup. | |
EDMA3_DRV_Result | EDMA3_DRV_chainChannel (EDMA3_DRV_Handle hEdma, unsigned int lCh1, unsigned int lCh2, const EDMA3_DRV_ChainOptions *chainOptions) |
Chain the two specified channels. | |
EDMA3_DRV_Result | EDMA3_DRV_unchainChannel (EDMA3_DRV_Handle hEdma, unsigned int lCh) |
Unchain the two channels. | |
EDMA3_DRV_Result | EDMA3_DRV_enableTransfer (EDMA3_DRV_Handle hEdma, unsigned int lCh, EDMA3_DRV_TrigMode trigMode) |
Start EDMA transfer on the specified channel. | |
EDMA3_DRV_Result | EDMA3_DRV_disableTransfer (EDMA3_DRV_Handle hEdma, unsigned int lCh, EDMA3_DRV_TrigMode trigMode) |
Disable DMA transfer on the specified channel. | |
EDMA3_DRV_Result | EDMA3_DRV_disableLogicalChannel (EDMA3_DRV_Handle hEdma, unsigned int lCh, EDMA3_DRV_TrigMode trigMode) |
Disable the event driven DMA channel or QDMA channel. |
enum EDMA3_DRV_AddrMode |
EDMA Addressing modes.
The EDMA3 TC supports two addressing modes
The SAM (Source Addressing Mode) and the DAM (Destination Addressing Mode) can be independently set to either of the two via the OPT register.
enum EDMA3_DRV_FifoWidth |
EDMA3 FIFO width.
The user can set the width of the FIFO using this enum. This is done via the OPT register. This is valid only if the EDMA3_DRV_ADDR_MODE_FIFO value is used for the enum EDMA3_DRV_AddrMode.
enum EDMA3_DRV_ItcchEn |
Intermediate Transfer complete chaining enable.
enum EDMA3_DRV_ItcintEn |
Intermediate Transfer complete interrupt enable.
enum EDMA3_DRV_OptField |
OPT Field Offset.
Use this enum to set or get any of the Fields within an OPT of a Parameter RAM set.
enum EDMA3_DRV_StaticMode |
True/False: PaRAM set is Static or not. A Static PaRAM set is updated or linked after TR is submitted.
enum EDMA3_DRV_SyncType |
EDMA Transfer Synchronization type.
Two types of Synchronization of transfers are possible
A Sync
enum EDMA3_DRV_TcchEn |
Transfer complete chaining enable.
enum EDMA3_DRV_TccMode |
Transfer complete code mode. Indicates the point at which a transfer is considered completed for chaining and interrupt generation.
enum EDMA3_DRV_TcintEn |
Transfer complete interrupt enable.
enum EDMA3_DRV_TrigMode |
EDMA Trigger Mode Selection.
Use this enum to select the EDMA trigger mode while enabling the EDMA transfer
EDMA3_DRV_Result EDMA3_DRV_chainChannel | ( | EDMA3_DRV_Handle | hEdma, | |
unsigned int | lCh1, | |||
unsigned int | lCh2, | |||
const EDMA3_DRV_ChainOptions * | chainOptions | |||
) |
Chain the two specified channels.
This API is used to chain two previously allocated logical (DMA/QDMA) channels.
Chaining is different from Linking. The EDMA3 link feature reloads the current channel parameter set with the linked parameter set. The EDMA3 chaining feature does not modify or update any channel parameter set; it provides a synchronization event to the chained channel.
hEdma | [IN] Handle to the EDMA Driver Instance. | |
lCh1 | [IN] Channel to which particular channel will be chained. | |
lCh2 | [IN] Channel which needs to be chained to the first channel. | |
chainOptions | [IN] Options such as intermediate interrupts are required or not, intermediate/final chaining is enabled or not etc. |
References EDMA3_DRV_E_INVALID_PARAM, EDMA3_DRV_ITCCHEN_EN, EDMA3_DRV_ITCINTEN_EN, EDMA3_DRV_LOG_CH_MAX_VAL, EDMA3_DRV_OPT_ITCCHEN_CLR_MASK, EDMA3_DRV_OPT_ITCCHEN_SET_MASK, EDMA3_DRV_OPT_ITCINTEN_CLR_MASK, EDMA3_DRV_OPT_ITCINTEN_SET_MASK, EDMA3_DRV_OPT_TCC_CLR_MASK, EDMA3_DRV_OPT_TCC_SET_MASK, EDMA3_DRV_OPT_TCCHEN_CLR_MASK, EDMA3_DRV_OPT_TCCHEN_SET_MASK, EDMA3_DRV_OPT_TCINTEN_CLR_MASK, EDMA3_DRV_OPT_TCINTEN_SET_MASK, EDMA3_DRV_TCCHEN_EN, EDMA3_DRV_TCINTEN_EN, EDMA3_DRV_Object::gblCfgParams, EDMA3_DRV_GblConfigParams::globalRegs, EDMA3_DRV_ChainOptions::itcchEn, EDMA3_DRV_ChainOptions::itcintEn, EDMA3_DRV_GblConfigParams::numPaRAMSets, EDMA3_DRV_ChBoundResources::paRAMId, EDMA3_DRV_Instance::pDrvObjectHandle, EDMA3_DRV_Object::phyCtrllerInstId, EDMA3_DRV_ChainOptions::tcchEn, EDMA3_DRV_ChainOptions::tcintEn, and EDMA3_DRV_ChBoundResources::trigMode.
EDMA3_DRV_Result EDMA3_DRV_disableLogicalChannel | ( | EDMA3_DRV_Handle | hEdma, | |
unsigned int | lCh, | |||
EDMA3_DRV_TrigMode | trigMode | |||
) |
Disable the event driven DMA channel or QDMA channel.
This API disables the DMA channel (which was previously triggered in event mode) by clearing the Event Enable Register; it disables the QDMA channel by clearing the QDMA Event Enable Register.
This API should NOT be used for DMA channels which are not mapped to any hardware events and are used for memory-to-memory copy based transfers. In case of that, this API returns error.
hEdma | [IN] Handle to the EDMA Driver Instance | |
lCh | [IN] DMA/QDMA Channel which needs to be disabled | |
trigMode | [IN] Mode of triggering start of transfer |
References EDMA3_DRV_GblConfigParams::dmaChannelHwEvtMap, EDMA3_DRV_E_INVALID_PARAM, EDMA3_DRV_LOG_CH_MAX_VAL, EDMA3_DRV_QDMA_CH_MAX_VAL, EDMA3_DRV_QDMA_CH_MIN_VAL, EDMA3_DRV_TRIG_MODE_EVENT, EDMA3_DRV_TRIG_MODE_MANUAL, EDMA3_DRV_TRIG_MODE_QDMA, EDMA3_DRV_Object::gblCfgParams, EDMA3_DRV_Instance::pDrvObjectHandle, and EDMA3_DRV_Instance::shadowRegs.
EDMA3_DRV_Result EDMA3_DRV_disableTransfer | ( | EDMA3_DRV_Handle | hEdma, | |
unsigned int | lCh, | |||
EDMA3_DRV_TrigMode | trigMode | |||
) |
Disable DMA transfer on the specified channel.
There are multiple ways by which an EDMA3 transfer could be triggered. The triggering mode option allows choosing from the available triggering modes: Event, Manual or QDMA.
To disable a channel which was previously triggered in manual mode, this API clears the Secondary Event Register and Event Miss Register, if set, for the specific DMA channel.
To disable a channel which was previously triggered in QDMA mode, this API clears the QDMA Event Enable Register, for the specific QDMA channel.
To disable a channel which was previously triggered in event mode, this API clears the Event Enable Register, Event Register, Secondary Event Register and Event Miss Register, if set, for the specific DMA channel.
hEdma | [IN] Handle to the EDMA Driver Instance | |
lCh | [IN] Channel on which transfer has to be stopped | |
trigMode | [IN] Mode of triggering start of transfer |
To disable a channel which was previously triggered in manual mode, this API clears the Secondary Event Register and Event Miss Register, if set, for the specific DMA channel.
To disable a channel which was previously triggered in QDMA mode, this API clears the QDMA Even Enable Register, for the specific QDMA channel.
To disable a channel which was previously triggered in event mode, this API clears the Event Enable Register, Event Register, Secondary Event Register and Event Miss Register, if set, for the specific DMA channel.
hEdma | [IN] Handle to the EDMA Driver Instance | |
lCh | [IN] Channel on which transfer has to be stopped | |
trigMode | [IN] Mode of triggering start of transfer |
References EDMA3_DRV_GblConfigParams::dmaChannelHwEvtMap, EDMA3_DRV_DMA_CH_MAX_VAL, EDMA3_DRV_E_INVALID_PARAM, EDMA3_DRV_LOG_CH_MAX_VAL, EDMA3_DRV_QDMA_CH_MAX_VAL, EDMA3_DRV_QDMA_CH_MIN_VAL, EDMA3_DRV_TRIG_MODE_EVENT, EDMA3_DRV_TRIG_MODE_MANUAL, EDMA3_DRV_TRIG_MODE_QDMA, EDMA3_DRV_Object::gblCfgParams, EDMA3_DRV_GblConfigParams::globalRegs, EDMA3_DRV_Instance::pDrvObjectHandle, and EDMA3_DRV_Instance::shadowRegs.
EDMA3_DRV_Result EDMA3_DRV_enableTransfer | ( | EDMA3_DRV_Handle | hEdma, | |
unsigned int | lCh, | |||
EDMA3_DRV_TrigMode | trigMode | |||
) |
Start EDMA transfer on the specified channel.
There are multiple ways to trigger an EDMA3 transfer. The triggering mode option allows choosing from the available triggering modes: Event, Manual or QDMA.
In event triggered, a peripheral or an externally generated event triggers the transfer. This API clears the Event and Event Miss Register and then enables the DMA channel by writing to the EESR.
In manual triggered mode, CPU manually triggers a transfer by writing a 1 in the Event Set Register (ESR/ESRH). This API writes to the ESR/ESRH to start the transfer.
In QDMA triggered mode, a QDMA transfer is triggered when a CPU (or other EDMA3 programmer) writes to the trigger word of the QDMA channel PaRAM set (auto-triggered) or when the EDMA3CC performs a link update on a PaRAM set that has been mapped to a QDMA channel (link triggered). This API enables the QDMA channel by writing to the QEESR register.
hEdma | [IN] Handle to the EDMA Driver Instance | |
lCh | [IN] Channel on which transfer has to be started | |
trigMode | [IN] Mode of triggering start of transfer (Manual, QDMA or Event) |
References EDMA3_DRV_GblConfigParams::dmaChannelHwEvtMap, EDMA3_DRV_DMA_CH_MAX_VAL, EDMA3_DRV_E_INVALID_PARAM, EDMA3_DRV_LOG_CH_MAX_VAL, EDMA3_DRV_QDMA_CH_MAX_VAL, EDMA3_DRV_QDMA_CH_MIN_VAL, EDMA3_DRV_TRIG_MODE_EVENT, EDMA3_DRV_TRIG_MODE_MANUAL, EDMA3_DRV_TRIG_MODE_QDMA, EDMA3_DRV_Object::gblCfgParams, EDMA3_DRV_GblConfigParams::globalRegs, EDMA3_DRV_Instance::pDrvObjectHandle, EDMA3_DRV_Object::phyCtrllerInstId, EDMA3_DRV_Instance::shadowRegs, and EDMA3_DRV_ChBoundResources::trigMode.
EDMA3_DRV_Result EDMA3_DRV_getOptField | ( | EDMA3_DRV_Handle | hEdma, | |
unsigned int | lCh, | |||
EDMA3_DRV_OptField | optField, | |||
unsigned int * | optFieldVal | |||
) |
Get a particular OPT field in the PaRAM set associated with the logical channel 'lCh'.
This API can be used to read various optional parameters for an EDMA3 transfer. Like enable/disable completion interrupts, enable/disable chaining, setting the transfer mode (A/AB Sync), setting the FIFO width etc.
hEdma | [IN] Handle to the EDMA Driver Instance. | |
lCh | [IN] Logical Channel, bound to which PaRAM set OPT field is required. | |
optField | [IN] The particular field of OPT Word that is needed | |
optFieldVal | [IN/OUT] Value of the OPT field |
References EDMA3_DRV_E_INVALID_PARAM, EDMA3_DRV_LOG_CH_MAX_VAL, EDMA3_DRV_OPT_DAM_GET_MASK, EDMA3_DRV_OPT_FIELD_DAM, EDMA3_DRV_OPT_FIELD_FWID, EDMA3_DRV_OPT_FIELD_ITCCHEN, EDMA3_DRV_OPT_FIELD_ITCINTEN, EDMA3_DRV_OPT_FIELD_SAM, EDMA3_DRV_OPT_FIELD_STATIC, EDMA3_DRV_OPT_FIELD_SYNCDIM, EDMA3_DRV_OPT_FIELD_TCC, EDMA3_DRV_OPT_FIELD_TCCHEN, EDMA3_DRV_OPT_FIELD_TCCMODE, EDMA3_DRV_OPT_FIELD_TCINTEN, EDMA3_DRV_OPT_FWID_GET_MASK, EDMA3_DRV_OPT_ITCCHEN_GET_MASK, EDMA3_DRV_OPT_ITCINTEN_GET_MASK, EDMA3_DRV_OPT_SAM_GET_MASK, EDMA3_DRV_OPT_STATIC_GET_MASK, EDMA3_DRV_OPT_SYNCDIM_GET_MASK, EDMA3_DRV_OPT_TCC_GET_MASK, EDMA3_DRV_OPT_TCCHEN_GET_MASK, EDMA3_DRV_OPT_TCCMODE_GET_MASK, EDMA3_DRV_OPT_TCINTEN_GET_MASK, EDMA3_DRV_Object::gblCfgParams, EDMA3_DRV_GblConfigParams::globalRegs, EDMA3_DRV_GblConfigParams::numPaRAMSets, EDMA3_DRV_ChBoundResources::paRAMId, EDMA3_DRV_Instance::pDrvObjectHandle, and EDMA3_DRV_Object::phyCtrllerInstId.
EDMA3_DRV_Result EDMA3_DRV_setDestIndex | ( | EDMA3_DRV_Handle | hEdma, | |
unsigned int | lCh, | |||
int | destBIdx, | |||
int | destCIdx | |||
) |
DMA destination index setup.
It is used to program the destination B index and destination C index.
DSTBIDX is a 16-bit signed value (2s complement) used for destination address modification between each array in the 2nd dimension. Valid values for DSTBIDX are between -32768 and 32767. It provides a byte address offset from the beginning of the destination array to the beginning of the next destination array within the current frame. It applies to both A-synchronized and AB-synchronized transfers.
DSTCIDX is a 16-bit signed value (2s complement) used for destination address modification in the 3rd dimension. Valid values are between -32768 and 32767. It provides a byte address offset from the beginning of the current array (pointed to by DST address) to the beginning of the first destination array TR in the next frame. It applies to both A-synchronized and AB-synchronized transfers. Note that when DSTCIDX is applied, the current array in an A-synchronized transfer is the last array in the frame, while the current array in a AB-synchronized transfer is the first array in the frame
hEdma | [IN] Handle to the EDMA Driver Instance | |
lCh | [IN] Logical Channel for which dest indices are to be configured | |
destBIdx | [IN] Destination B index | |
destCIdx | [IN] Destination C index |
References EDMA3_DRV_DSTBIDX_MAX_VAL, EDMA3_DRV_DSTBIDX_MIN_VAL, EDMA3_DRV_DSTCIDX_MAX_VAL, EDMA3_DRV_DSTCIDX_MIN_VAL, EDMA3_DRV_E_INVALID_PARAM, EDMA3_DRV_LOG_CH_MAX_VAL, EDMA3_DRV_PARAM_ENTRY_SRC_DST_BIDX, EDMA3_DRV_PARAM_ENTRY_SRC_DST_CIDX, EDMA3_DRV_Object::gblCfgParams, EDMA3_DRV_GblConfigParams::globalRegs, EDMA3_DRV_GblConfigParams::numPaRAMSets, EDMA3_DRV_ChBoundResources::paRAMId, EDMA3_DRV_Instance::pDrvObjectHandle, and EDMA3_DRV_Object::phyCtrllerInstId.
EDMA3_DRV_Result EDMA3_DRV_setDestParams | ( | EDMA3_DRV_Handle | hEdma, | |
unsigned int | lCh, | |||
unsigned int | destAddr, | |||
EDMA3_DRV_AddrMode | addrMode, | |||
EDMA3_DRV_FifoWidth | fifoWidth | |||
) |
DMA Destination parameters setup.
It is used to program the destination address, destination side addressing mode (INCR or FIFO) and the FIFO width in case the addressing mode is FIFO.
In FIFO Addressing mode, memory location must be 32 bytes aligned.
hEdma | [IN] Handle to the EDMA Driver Instance | |
lCh | [IN] Logical Channel for which the destination parameters are to be configured | |
destAddr | [IN] Destination address | |
addrMode | [IN] Address mode [FIFO or Increment] | |
fifoWidth | [IN] Width of FIFO (Valid only if addrMode is FIFO)
|
In FIFO Addressing mode, memory location must be 32 bytes aligned
Memory is not 32 bytes aligned
If request is for FIFO mode, check whether the FIFO size is supported by the Transfer Controller which will be used for this transfer or not.
mappedEvtQ contains the event queue and hence the TC which will process this transfer request. Check whether this TC supports the FIFO size or not.
References EDMA3_DRV_ADDR_MODE_FIFO, EDMA3_DRV_ADDR_MODE_INCR, EDMA3_DRV_DMA_CH_MAX_VAL, EDMA3_DRV_DMAQNUM_CLR_MASK, EDMA3_DRV_E_ADDRESS_NOT_ALIGNED, EDMA3_DRV_E_FIFO_WIDTH_NOT_SUPPORTED, EDMA3_DRV_E_INVALID_PARAM, EDMA3_DRV_LOG_CH_MAX_VAL, EDMA3_DRV_OPT_DAM_CLR_MASK, EDMA3_DRV_OPT_DAM_SET_MASK, EDMA3_DRV_OPT_FWID_CLR_MASK, EDMA3_DRV_OPT_FWID_SET_MASK, EDMA3_DRV_PARAM_ENTRY_DST, EDMA3_DRV_QDMA_CH_MAX_VAL, EDMA3_DRV_QDMA_CH_MIN_VAL, EDMA3_DRV_QDMAQNUM_CLR_MASK, EDMA3_DRV_W256BIT, EDMA3_DRV_W8BIT, EDMA3_DRV_Object::gblCfgParams, EDMA3_DRV_GblConfigParams::globalRegs, EDMA3_DRV_GblConfigParams::numPaRAMSets, EDMA3_DRV_ChBoundResources::paRAMId, EDMA3_DRV_Instance::pDrvObjectHandle, EDMA3_DRV_Object::phyCtrllerInstId, and EDMA3_DRV_GblConfigParams::tcDefaultBurstSize.
EDMA3_DRV_Result EDMA3_DRV_setOptField | ( | EDMA3_DRV_Handle | hEdma, | |
unsigned int | lCh, | |||
EDMA3_DRV_OptField | optField, | |||
unsigned int | newOptFieldVal | |||
) |
Set a particular OPT field in the PaRAM set associated with the logical channel 'lCh'.
This API can be used to set various optional parameters for an EDMA3 transfer. Like enable/disable completion interrupts, enable/disable chaining, setting the transfer mode (A/AB Sync), setting the FIFO width etc.
hEdma | [IN] Handle to the EDMA Driver Instance. | |
lCh | [IN] Logical Channel, bound to which PaRAM set OPT field needs to be set. | |
optField | [IN] The particular field of OPT Word that needs setting | |
newOptFieldVal | [IN] The new OPT field value |
References EDMA3_DRV_E_INVALID_PARAM, EDMA3_DRV_LOG_CH_MAX_VAL, EDMA3_DRV_OPT_DAM_CLR_MASK, EDMA3_DRV_OPT_DAM_SET_MASK, EDMA3_DRV_OPT_FIELD_DAM, EDMA3_DRV_OPT_FIELD_FWID, EDMA3_DRV_OPT_FIELD_ITCCHEN, EDMA3_DRV_OPT_FIELD_ITCINTEN, EDMA3_DRV_OPT_FIELD_SAM, EDMA3_DRV_OPT_FIELD_STATIC, EDMA3_DRV_OPT_FIELD_SYNCDIM, EDMA3_DRV_OPT_FIELD_TCC, EDMA3_DRV_OPT_FIELD_TCCHEN, EDMA3_DRV_OPT_FIELD_TCCMODE, EDMA3_DRV_OPT_FIELD_TCINTEN, EDMA3_DRV_OPT_FWID_CLR_MASK, EDMA3_DRV_OPT_FWID_SET_MASK, EDMA3_DRV_OPT_ITCCHEN_CLR_MASK, EDMA3_DRV_OPT_ITCCHEN_SET_MASK, EDMA3_DRV_OPT_ITCINTEN_CLR_MASK, EDMA3_DRV_OPT_ITCINTEN_SET_MASK, EDMA3_DRV_OPT_SAM_CLR_MASK, EDMA3_DRV_OPT_SAM_SET_MASK, EDMA3_DRV_OPT_STATIC_CLR_MASK, EDMA3_DRV_OPT_STATIC_SET_MASK, EDMA3_DRV_OPT_SYNCDIM_CLR_MASK, EDMA3_DRV_OPT_SYNCDIM_SET_MASK, EDMA3_DRV_OPT_TCC_CLR_MASK, EDMA3_DRV_OPT_TCC_SET_MASK, EDMA3_DRV_OPT_TCCHEN_CLR_MASK, EDMA3_DRV_OPT_TCCHEN_SET_MASK, EDMA3_DRV_OPT_TCCMODE_CLR_MASK, EDMA3_DRV_OPT_TCCMODE_SET_MASK, EDMA3_DRV_OPT_TCINTEN_CLR_MASK, EDMA3_DRV_OPT_TCINTEN_SET_MASK, EDMA3_DRV_Object::gblCfgParams, EDMA3_DRV_GblConfigParams::globalRegs, EDMA3_DRV_GblConfigParams::numPaRAMSets, EDMA3_DRV_ChBoundResources::paRAMId, EDMA3_DRV_Instance::pDrvObjectHandle, and EDMA3_DRV_Object::phyCtrllerInstId.
EDMA3_DRV_Result EDMA3_DRV_setSrcIndex | ( | EDMA3_DRV_Handle | hEdma, | |
unsigned int | lCh, | |||
int | srcBIdx, | |||
int | srcCIdx | |||
) |
DMA source index setup.
It is used to program the source B index and source C index.
SRCBIDX is a 16-bit signed value (2s complement) used for source address modification between each array in the 2nd dimension. Valid values for SRCBIDX are between -32768 and 32767. It provides a byte address offset from the beginning of the source array to the beginning of the next source array. It applies to both A-synchronized and AB-synchronized transfers.
SRCCIDX is a 16-bit signed value (2s complement) used for source address modification in the 3rd dimension. Valid values for SRCCIDX are between -32768 and 32767. It provides a byte address offset from the beginning of the current array (pointed to by SRC address) to the beginning of the first source array in the next frame. It applies to both A-synchronized and AB-synchronized transfers. Note that when SRCCIDX is applied, the current array in an A-synchronized transfer is the last array in the frame, while the current array in an AB-synchronized transfer is the first array in the frame.
hEdma | [IN] Handle to the EDMA Driver Instance | |
lCh | [IN] Logical Channel for which source indices are to be configured | |
srcBIdx | [IN] Source B index | |
srcCIdx | [IN] Source C index |
References EDMA3_DRV_E_INVALID_PARAM, EDMA3_DRV_LOG_CH_MAX_VAL, EDMA3_DRV_PARAM_ENTRY_SRC_DST_BIDX, EDMA3_DRV_PARAM_ENTRY_SRC_DST_CIDX, EDMA3_DRV_SRCBIDX_MAX_VAL, EDMA3_DRV_SRCBIDX_MIN_VAL, EDMA3_DRV_SRCCIDX_MAX_VAL, EDMA3_DRV_SRCCIDX_MIN_VAL, EDMA3_DRV_Object::gblCfgParams, EDMA3_DRV_GblConfigParams::globalRegs, EDMA3_DRV_GblConfigParams::numPaRAMSets, EDMA3_DRV_ChBoundResources::paRAMId, EDMA3_DRV_Instance::pDrvObjectHandle, and EDMA3_DRV_Object::phyCtrllerInstId.
EDMA3_DRV_Result EDMA3_DRV_setSrcParams | ( | EDMA3_DRV_Handle | hEdma, | |
unsigned int | lCh, | |||
unsigned int | srcAddr, | |||
EDMA3_DRV_AddrMode | addrMode, | |||
EDMA3_DRV_FifoWidth | fifoWidth | |||
) |
DMA source parameters setup.
It is used to program the source address, source side addressing mode (INCR or FIFO) and the FIFO width in case the addressing mode is FIFO.
In FIFO Addressing mode, memory location must be 32 bytes aligned.
hEdma | [IN] Handle to the EDMA Driver Instance | |
lCh | [IN] Logical Channel for which the source parameters are to be configured | |
srcAddr | [IN] Source address | |
addrMode | [IN] Address mode [FIFO or Increment] | |
fifoWidth | [IN] Width of FIFO (Valid only if addrMode is FIFO)
|
In FIFO Addressing mode, memory location must be 32 bytes aligned
Memory is not 32 bytes aligned
If request is for FIFO mode, check whether the FIFO size is supported by the Transfer Controller which will be used for this transfer or not.
mappedEvtQ contains the event queue and hence the TC which will process this transfer request. Check whether this TC supports the FIFO size or not.
References EDMA3_DRV_ADDR_MODE_FIFO, EDMA3_DRV_ADDR_MODE_INCR, EDMA3_DRV_DMA_CH_MAX_VAL, EDMA3_DRV_DMAQNUM_CLR_MASK, EDMA3_DRV_E_ADDRESS_NOT_ALIGNED, EDMA3_DRV_E_FIFO_WIDTH_NOT_SUPPORTED, EDMA3_DRV_E_INVALID_PARAM, EDMA3_DRV_LOG_CH_MAX_VAL, EDMA3_DRV_OPT_FWID_CLR_MASK, EDMA3_DRV_OPT_FWID_SET_MASK, EDMA3_DRV_OPT_SAM_CLR_MASK, EDMA3_DRV_OPT_SAM_SET_MASK, EDMA3_DRV_PARAM_ENTRY_SRC, EDMA3_DRV_QDMA_CH_MAX_VAL, EDMA3_DRV_QDMA_CH_MIN_VAL, EDMA3_DRV_QDMAQNUM_CLR_MASK, EDMA3_DRV_W256BIT, EDMA3_DRV_W8BIT, EDMA3_DRV_Object::gblCfgParams, EDMA3_DRV_GblConfigParams::globalRegs, EDMA3_DRV_GblConfigParams::numPaRAMSets, EDMA3_DRV_ChBoundResources::paRAMId, EDMA3_DRV_Instance::pDrvObjectHandle, EDMA3_DRV_Object::phyCtrllerInstId, and EDMA3_DRV_GblConfigParams::tcDefaultBurstSize.
EDMA3_DRV_Result EDMA3_DRV_setTransferParams | ( | EDMA3_DRV_Handle | hEdma, | |
unsigned int | lCh, | |||
unsigned int | aCnt, | |||
unsigned int | bCnt, | |||
unsigned int | cCnt, | |||
unsigned int | bCntReload, | |||
EDMA3_DRV_SyncType | syncType | |||
) |
DMA transfer parameters setup.
It is used to specify the various counts (ACNT, BCNT and CCNT), B count reload and the synchronization type
ACNT represents the number of bytes within the 1st dimension of a transfer. ACNT is a 16-bit unsigned value with valid values between 0 and 65535. Therefore, the maximum number of bytes in an array is 65535 bytes (64K - 1 bytes). ACNT must be greater than or equal to 1 for a TR to be submitted to EDMA3 Transfer Controller. An ACNT equal to 0 is considered either a null or dummy transfer. A dummy or null transfer generates a completion code depending on the settings of the completion bit fields in OPT.
BCNT is a 16-bit unsigned value that specifies the number of arrays of length ACNT. For normal operation, valid values for BCNT are between 1 and 65535. Therefore, the maximum number of arrays in a frame is 65535 (64K - 1 arrays). A BCNT equal to 0 is considered either a null or dummy transfer. A dummy or null transfer generates a completion code depending on the settings of the completion bit fields in OPT.
CCNT is a 16-bit unsigned value that specifies the number of frames in a block. Valid values for CCNT are between 1 and 65535. Therefore, the maximum number of frames in a block is 65535 (64K - 1 frames). A CCNT equal to 0 is considered either a null or dummy transfer. A dummy or null transfer generates a completion code depending on the settings of the completion bit fields in OPT. A CCNT value of 0 is considered either a null or dummy transfer.
BCNTRLD is a 16-bit unsigned value used to reload the BCNT field once the last array in the 2nd dimension is transferred. This field is only used for A-synchronized transfers. In this case, the EDMA3CC decrements the BCNT value by 1 on each TR submission. When BCNT (conceptually) reaches 0, the EDMA3CC decrements CCNT and uses the BCNTRLD value to reinitialize the BCNT value. For AB-synchronized transfers, the EDMA3CC submits the BCNT in the TR and the EDMA3TC decrements BCNT appropriately. For AB-synchronized transfers, BCNTRLD is not used.
hEdma | [IN] Handle to the EDMA Driver Instance | |
lCh | [IN] Logical Channel for which transfer parameters are to be configured | |
aCnt | [IN] Count for 1st Dimension. | |
bCnt | [IN] Count for 2nd Dimension. | |
cCnt | [IN] Count for 3rd Dimension. | |
bCntReload | [IN] Reload value for bCnt. | |
syncType | [IN] Transfer synchronization dimension 0: A-synchronized. Each event triggers the transfer of a single array of ACNT bytes. 1: AB-synchronized. Each event triggers the transfer of BCNT arrays of ACNT bytes. |
References EDMA3_DRV_ACNT_MAX_VAL, EDMA3_DRV_BCNT_MAX_VAL, EDMA3_DRV_BCNTRELD_MAX_VAL, EDMA3_DRV_CCNT_MAX_VAL, EDMA3_DRV_E_INVALID_PARAM, EDMA3_DRV_LOG_CH_MAX_VAL, EDMA3_DRV_OPT_SYNCDIM_CLR_MASK, EDMA3_DRV_OPT_SYNCDIM_SET_MASK, EDMA3_DRV_PARAM_ENTRY_ACNT_BCNT, EDMA3_DRV_PARAM_ENTRY_CCNT, EDMA3_DRV_PARAM_ENTRY_LINK_BCNTRLD, EDMA3_DRV_SYNC_A, EDMA3_DRV_SYNC_AB, EDMA3_DRV_Object::gblCfgParams, EDMA3_DRV_GblConfigParams::globalRegs, EDMA3_DRV_GblConfigParams::numPaRAMSets, EDMA3_DRV_ChBoundResources::paRAMId, EDMA3_DRV_Instance::pDrvObjectHandle, and EDMA3_DRV_Object::phyCtrllerInstId.
EDMA3_DRV_Result EDMA3_DRV_unchainChannel | ( | EDMA3_DRV_Handle | hEdma, | |
unsigned int | lCh | |||
) |
Unchain the two channels.
hEdma | [IN] Handle to the EDMA Driver Instance. | |
lCh | [IN] Channel whose chaining with the other channel has to be removed. |
References EDMA3_DRV_E_INVALID_PARAM, EDMA3_DRV_LOG_CH_MAX_VAL, EDMA3_DRV_OPT_ITCCHEN_CLR_MASK, EDMA3_DRV_OPT_TCCHEN_CLR_MASK, EDMA3_DRV_Object::gblCfgParams, EDMA3_DRV_GblConfigParams::globalRegs, EDMA3_DRV_GblConfigParams::numPaRAMSets, EDMA3_DRV_ChBoundResources::paRAMId, EDMA3_DRV_Instance::pDrvObjectHandle, and EDMA3_DRV_Object::phyCtrllerInstId.