5.11. DMA
5.11.1. Types
Base type |
Type Name |
Brief |
---|---|---|
enum |
This type defines a range of specific status for Complex driver. |
|
typedef Cdd_Edma_EventCallback |
Callback type. |
5.11.1.1. enum CddDma_StatusType
Enumerator |
Value |
Description |
---|---|---|
CDD_DMA_UNINIT |
0U |
The Complex Driver is not initialized or not usable. |
CDD_DMA_IDLE |
1U |
The Complex Driver is not currently transferring. |
CDD_DMA_ALLOW_ACCESS |
2U |
The Complex Driver is currently open. |
CDD_DMA_BUSY |
3U |
The Complex Driver is performing a write operation. |
CDD_DMA_CLOSE |
4U |
The Complex Driver is currently closed. |
Brief: This type defines a range of specific status for Complex driver.
5.11.1.2. typedef CddDma_CallBackType
typedef Cdd_Edma_EventCallback CddDma_CallBackType;
Brief: Callback type.
5.11.2. Structures
Name |
Brief |
---|---|
Param entry. |
5.11.3. Defines
Name |
Brief |
---|---|
CDD_DMA_SW_MAJOR_VERSION |
Driver Implementation Major Version. |
CDD_DMA_SW_MINOR_VERSION |
Driver Implementation Minor Version. |
CDD_DMA_SW_PATCH_VERSION |
Driver Implementation Patch Version. |
CDD_DMA_AR_RELEASE_MAJOR_VERSION |
AUTOSAR Major version specification implemented by CDD_DMA Driver. |
CDD_DMA_AR_RELEASE_MINOR_VERSION |
AUTOSAR Minor version specification implemented by CDD_DMA Driver. |
CDD_DMA_AR_RELEASE_REVISION_VERSION |
AUTOSAR Patch version specification implemented by CDD_DMA Driver. |
CDD_DMA_VENDOR_ID |
Texas Instruments Vendor ID. |
CDD_DMA_MODULE_ID |
CDD_DMA Driver Module ID. |
CDD_DMA_INSTANCE_ID |
CDD_DMA Driver Instance ID. |
CDD_DMA_ISR_VOID |
void ISR type |
CDD_DMA_ISR_CAT1 |
Category 1 ISR type. |
CDD_DMA_ISR_CAT2 |
Category 2 ISR type. |
CDD_DMA_INIT_SERVICE_ID |
API Service ID for initialization. |
CDD_DMA_DEINIT_SERVICE_ID |
API Service ID for deinitialization. |
CDD_DMA_CBKREGISTER_SERVICE_ID |
API Service ID for IntrRegistration. |
CDD_DMA_PARAMSET_SERVICE_ID |
API Service ID for ParamSet. |
CDD_DMA_LINKCHANNEL_SERVICE_ID |
API Service ID for Param linking. |
CDD_DMA_CHAINCHANNEL_SERVICE_ID |
API Service ID for Channel chaining. |
CDD_DMA_ENABLETRANSFERREGION_SERVICE_ID |
API Service ID for enable a trigger. |
CDD_DMA_GETSTATUS_SERVICE_ID |
API Service ID for reading TCC status |
CDD_DMA_GETVERSIONINFO_SERVICE_ID |
API Service ID for get version info. |
Cdd_Dma_GETINITSTATUS_SERVICE_ID |
API Service ID for get INIT status. |
CDD_DMA_GETPARAM_SERVICE_ID |
API Service ID for GetParam. |
CDD_DMA_DISABLETRANSFERREGION_SERVICE_ID |
API Service ID for disable the transfer region. |
CDD_DMA_REGISTER_READBACK_SERVICE_ID |
API Service ID for Register Read Back. |
CDD_DMA_E_UNINIT |
Error code indicating the DMA is uninitialized. |
CDD_DMA_E_ALREADY_INITIALIZED |
Error code indicating DMA already initialized. |
CDD_DMA_E_PARAM_VALUE |
Error code indicating Service called with wrong param. |
CDD_DMA_E_PARAM_POINTER |
Error code indicating invalid parameter. |
CDD_DMA_E_ALREADY_REGISTERED |
Error code indicating callback is already registered. |
CDD_DMA_E_ALREADY_IN_PROGRESS |
Error code indicating DMA handle already in use. |
CDD_DMA_TRIG_XBAR_EDMA_MODULE_0_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_1_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_2_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_3_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_4_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_5_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_6_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_7_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_8_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_9_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_10_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_11_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_12_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_13_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_14_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_20_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_21_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_22_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_23_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_24_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_25_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_26_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_27_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_28_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_29_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_30_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_31_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_32_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_33_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_34_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_35_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_36_INPUT |
|
CDD_DMA_TRIG_XBAR_EDMA_MODULE_37_INPUT |
|
CddDmaConf_CddDmaDriverHandler_0_Uart_Tx |
|
CddDmaConf_CddDmaDriverHandler_0_Uart_Rx |
|
CddDmaConf_CddDmaDriverHandler_1_Uart_Tx |
|
CddDmaConf_CddDmaDriverHandler_1_Uart_Rx |
|
CddDmaConf_CddDmaDriverHandler_2_Uart_Tx |
|
CddDmaConf_CddDmaDriverHandler_2_Uart_Rx |
|
CddDmaConf_CddDmaDriverHandler_3_Uart_Tx |
|
CddDmaConf_CddDmaDriverHandler_3_Uart_Rx |
|
CddDmaConf_CddDmaDriverHandler_4_Uart_Tx |
|
CddDmaConf_CddDmaDriverHandler_4_Uart_Rx |
|
CddDmaConf_CddDmaDriverHandler_0_Adc |
|
CddDmaConf_CddDmaDriverHandler_1_Adc |
|
CddDmaConf_CddDmaDriverHandler_2_Adc |
|
CddDmaConf_CddDmaDriverHandler_3_Adc |
|
CddDmaConf_CddDmaDriverHandler_4_Adc |
|
CddDmaConf_CddDmaDriverHandler_MemoryTransfer_Interrupt |
|
CddDmaConf_CddDmaDriverHandler_MemoryTransfer_Linking |
|
CddDmaConf_CddDmaDriverHandler_MemoryTransfer_Polling |
|
CddDmaConf_CddDmaDriverHandler_MemoryTransfer_Chaining |
|
CddDmaConf_CddDmaDriverHandler_Spi_0_Tx |
|
CddDmaConf_CddDmaDriverHandler_Spi_0_Rx |
|
CddDmaConf_CddDmaDriverHandler_Spi_1_Tx |
|
CddDmaConf_CddDmaDriverHandler_Spi_1_Rx |
|
CddDmaConf_CddDmaDriverHandler_Spi_2_Tx |
|
CddDmaConf_CddDmaDriverHandler_Spi_2_Rx |
|
CddDmaConf_CddDmaDriverHandler_Spi_3_Tx |
|
CddDmaConf_CddDmaDriverHandler_Spi_3_Rx |
|
CddDmaConf_CddDmaDriverHandler_Spi_4_Tx |
|
CddDmaConf_CddDmaDriverHandler_Spi_4_Rx |
|
CddDmaConf_CddDmaDriverHandler_0_FsiTx |
|
CddDmaConf_CddDmaDriverHandler_1_FsiTx |
|
CddDmaConf_CddDmaDriverHandler_2_FsiTx |
|
CddDmaConf_CddDmaDriverHandler_3_FsiTx |
|
CddDmaConf_CddDmaDriverHandler_0_FsiRx |
|
CddDmaConf_CddDmaDriverHandler_1_FsiRx |
|
CddDmaConf_CddDmaDriverHandler_2_FsiRx |
|
CddDmaConf_CddDmaDriverHandler_3_FsiRx |
|
CddDmaConf_CddDmaDriverHandler_0_Fls |
5.11.4. Functions
Return type |
Function Name |
Brief |
---|---|---|
void |
Cdd_Dma_Init(Cdd_Dma_ConfigType * ConfigPtr) |
Service for CDD_DMA initialization. |
void |
Cdd_Dma_DeInit(void ) |
Service for CDD_DMA de-initialization Function to de-initialize the Cdd_Dma Module.With this call all the handler regsitered for Cdd-Dma module is de-initialized. |
boolean |
Cdd_Dma_GetInitStatus(void ) |
Service for CDD_DMA GetInitStatus. Function to provide the initialization status of the Module. |
uint32 |
Cdd_Dma_CbkRegister(uint32 handleId, void * appdata, Cdd_Edma_EventCallback callback) |
Service for CDD_DMA Callback Register. Function to register callback function for a TCC. |
void |
Cdd_Dma_ParamSet(uint32 handleId, uint32 channelIdx, uint32 paramIndex, Cdd_Dma_ParamEntry paramEntry) |
Service for CDD_DMA Param Setting. Function to Set the paramSet values with the param value associated with the channel of a particular handle. |
void |
Cdd_Dma_LinkChannel(uint32 handleId, uint32 paramIndex0, uint32 paramIndex1) |
Service for CDD_DMA Linking params. Function to Link the param. Often used to link different params within the channel. |
void |
Cdd_Dma_ChainChannel(uint32 handleId, uint32 channelIdx0, uint32 paramIndex0, uint32 channelIdx1, uint32 opt) |
Service for CDD_DMA Chaining Channels Function to Chain multiple channel and can be used in transmission only with one trigger. |
boolean |
Cdd_Dma_EnableTransferRegion(uint32 handleId, uint32 trigMode) |
Service for CDD_DMA Enable transfer region Function to Enable the trigger for transmission. |
boolean |
Cdd_Dma_GetStatus(uint32 handleId) |
Service for CDD_DMA Get status Function to Read the status of the transfer. Used in case of polling mode. |
void |
Cdd_Dma_GetVersionInfo(Std_VersionInfoType * VersionInfoPtr) |
Service for CDD_DMA Get version info. Function to Get Version information. |
void |
Cdd_Dma_GetParam(uint32 handleId, uint32 channelIdx, uint32 paramIndex, CDD_EDMACCEDMACCPaRAMEntry * edmaParam) |
Service for CDD_DMA Param Getting Function to Get the paramSet values with the param value associated with the channel of a particular handle. |
boolean |
Cdd_Dma_DisableTransferRegion(uint32 handleId, uint32 trigMode) |
Service for CDD_DMA Disable transfer region. Function to Disable the trigger for transmission. |
Std_ReturnType |
Cdd_Dma_RegisterReadback(uint32 handleId, Cdd_Dma_RegisterReadbackType * RegPtr) |
This function reads the important registers of the hardware unit and returns the value in the structure. |
5.11.4.1. function Cdd_Dma_Init
void Cdd_Dma_Init(
Cdd_Dma_ConfigType * ConfigPtr
)
Brief: Service for CDD_DMA initialization.
Service ID[hex] : 0x01
Sync/Async : Synchronous
Reentrancy : Non-Reentrant
Parameters:
configPtr - Pointer to configuration set
Returns:
None
Return: None
5.11.4.2. function Cdd_Dma_DeInit
void Cdd_Dma_DeInit(
void
)
Brief: Service for CDD_DMA de-initialization Function to de-initialize the Cdd_Dma Module.With this call all the handler regsitered for Cdd-Dma module is de-initialized.
Service ID[hex] : 0x02
Sync/Async : Synchronous
Reentrancy : Non-Reentrant
Parameters:
None
Returns:
None
Return: None
5.11.4.3. function Cdd_Dma_GetInitStatus
boolean Cdd_Dma_GetInitStatus(
void
)
Brief: Service for CDD_DMA GetInitStatus. Function to provide the initialization status of the Module.
Service ID[hex] : 0x0A
Sync/Async : Synchronous
Reentrancy : Non-Reentrant
Parameters:
None
Returns:
True or False
Return: boolean
5.11.4.4. function Cdd_Dma_CbkRegister
uint32 Cdd_Dma_CbkRegister(
uint32 handleId,
void * appdata,
Cdd_Edma_EventCallback callback
)
Brief: Service for CDD_DMA Callback Register. Function to register callback function for a TCC.
Service ID[hex] : 0x03
Sync/Async : Synchronous
Reentrancy : Reentrant
Parameters:
handleId - Cdd_Dma handle is passed for which we want to register callback
appdata - data associated with it
callback - registered callback which will be called on interrupt
Returns:
E_OK Status Ok
E_NOT_OK Status Not Ok
Return: uint32
5.11.4.5. function Cdd_Dma_ParamSet
void Cdd_Dma_ParamSet(
uint32 handleId,
uint32 channelIdx,
uint32 paramIndex,
Cdd_Dma_ParamEntry paramEntry
)
Brief: Service for CDD_DMA Param Setting. Function to Set the paramSet values with the param value associated with the channel of a particular handle.
Service ID[hex] : 0x04
Sync/Async : Synchronous
Reentrancy : Non-Reentrant
Parameters:
handleId - Cdd_Dma handle is passed for which we want to set the param set value
channelIdx - Index of the channel for that particular handle
paramIndex - Index of the param for which we want to set the param values
paramEntry - Structure which contains the required paramSet fields to be used for the particular param value.
Returns:
None
Return: None
5.11.4.6. function Cdd_Dma_LinkChannel
void Cdd_Dma_LinkChannel(
uint32 handleId,
uint32 paramIndex0,
uint32 paramIndex1
)
Brief: Service for CDD_DMA Linking params. Function to Link the param. Often used to link different params within the channel.
Service ID[hex] : 0x05
Sync/Async : Synchronous
Reentrancy : Non-Reentrant
Parameters:
handleId - Cdd_Dma handle is passed for which we want to used linking
paramIndex0 - Index of the param which should be linked to another param
paramIndex1 - Index of the param which is supposed to be linked to the first one
Returns:
None
Return: None
5.11.4.7. function Cdd_Dma_ChainChannel
void Cdd_Dma_ChainChannel(
uint32 handleId,
uint32 channelIdx0,
uint32 paramIndex0,
uint32 channelIdx1,
uint32 opt
)
Brief: Service for CDD_DMA Chaining Channels Function to Chain multiple channel and can be used in transmission only with one trigger.
Service ID[hex] : 0x06
Sync/Async : Synchronous
Reentrancy : Non-Reentrant
Parameters:
handleId - Cdd_Dma handle is passed for which we want to used Chaining
channelIdx0 - Index of the first channel which is used for Chaining
paramIndex0 - Index of the param which is supposed to be linked to the first one
channelIdx1 - Index of the second channel which is used for Chaining
opt - Chain Option to be used while Chaining
Returns:
None
Return: None
5.11.4.8. function Cdd_Dma_EnableTransferRegion
boolean Cdd_Dma_EnableTransferRegion(
uint32 handleId,
uint32 trigMode
)
Brief: Service for CDD_DMA Enable transfer region Function to Enable the trigger for transmission.
Service ID[hex] : 0x07
Sync/Async : Synchronous
Reentrancy : Non-Reentrant
Parameters:
handleId - Cdd_Dma handle is passed for which we want to enable the transfer
trigMode - Trigger mode which is used to enable the transmission
Returns:
Indicate successfully enabled transfer or not with value True or False
Return: boolean
5.11.4.9. function Cdd_Dma_GetStatus
boolean Cdd_Dma_GetStatus(
uint32 handleId
)
Brief: Service for CDD_DMA Get status Function to Read the status of the transfer. Used in case of polling mode.
Service ID[hex] : 0x08
Sync/Async : Synchronous
Reentrancy : Non-Reentrant
Parameters:
handleId - Cdd_Dma handle is passed for which we want to get the status of the TCC
Returns:
Returns status as True or False
Return: boolean
5.11.4.10. function Cdd_Dma_GetVersionInfo
void Cdd_Dma_GetVersionInfo(
Std_VersionInfoType * VersionInfoPtr
)
Brief: Service for CDD_DMA Get version info. Function to Get Version information.
Service ID[hex] : 0x09
Sync/Async : Synchronous
Reentrancy : Non-Reentrant
Parameters:
VersionInfoPtr - pointer to the structure for which data should be stored
Returns:
None
Return: None
5.11.4.11. function Cdd_Dma_GetParam
void Cdd_Dma_GetParam(
uint32 handleId,
uint32 channelIdx,
uint32 paramIndex,
CDD_EDMACCEDMACCPaRAMEntry * edmaParam
)
Brief: Service for CDD_DMA Param Getting Function to Get the paramSet values with the param value associated with the channel of a particular handle.
Service ID[hex] : 0x0B
Sync/Async : Synchronous
Reentrancy : Non-Reentrant
Parameters:
handleId - Cdd_Dma handle is passed for which we want to get the param value
channelIdx - Index of the channel for that particular handle
paramIndex - Index of the param for which we want to get the param values
edmaParam - EDMA Parameter RAM struct
Returns:
None
Return: None
5.11.4.12. function Cdd_Dma_DisableTransferRegion
boolean Cdd_Dma_DisableTransferRegion(
uint32 handleId,
uint32 trigMode
)
Brief: Service for CDD_DMA Disable transfer region. Function to Disable the trigger for transmission.
Service ID[hex] : 0x0C
Sync/Async : Synchronous
Reentrancy : Non-Reentrant
Parameters:
handleId - Cdd_Dma handle is passed for which we want to disable the transfer
trigMode - Trigger mode which is used to disable the transmission
Returns:
Indicate successfully disabled transfer or not with value as True or False
Return: boolean
5.11.4.13. function Cdd_Dma_RegisterReadback
Std_ReturnType Cdd_Dma_RegisterReadback(
uint32 handleId,
Cdd_Dma_RegisterReadbackType * RegPtr
)
Brief: This function reads the important registers of the hardware unit and returns the value in the structure.
Service ID[hex] : 0x0D
Sync/Async : Synchronous
Reentrancy : Non-Reentrant
Parameters:
handleId - Cdd_Dma handle is passed for which we want to read the register value
RegPtr - Pointer to where to store the readback values. If this pointer is NULL_PTR, then the API will return E_NOT_OK.
Returns:
E_OK Register read back has been done
E_NOT_OK Register read back failed
Return: Std_ReturnType