![]() |
MCUSW
|
IPC module is provided as an CDD and implements IPC based on shared memory and Mailbox IP of the SoC
The IPC Driver implements interfaces specified in MCAL_CDD_IPC_Design document.
Provides methods to transport N bytes of data across core's in TDAxx class of processors. Some of the abilities of this driver are
Sub Modules | |
| CDD_IPC Configuration | |
CDD IPC Error Codes | |
| typedef void(* | Cdd_Ipc_NewMessage) (void) |
| #define | CDD_IPC_E_OK (0x00U) |
| No errors. | |
| #define | CDD_IPC_E_INIT_FAILED (0x01U) |
| Error code indicating initialization failure. | |
| #define | CDD_IPC_E_UNINIT (0x02U) |
| Error code indicating the IPC is uninitialized. | |
| #define | CDD_IPC_E_PARAM_POINTER (0x03U) |
| Error code indicating driver is un-initialized. | |
| #define | CDD_IPC_E_ALREADY_INITIALIZED (0x04U) |
| Error code indicating IPC has already been initialized. | |
| #define | CDD_IPC_E_INVALID_CONFIG (0x05U) |
| Error code indicating wrong configuration. | |
| #define | CDD_IPC_E_SEND (0x06U) |
| Error code indicating sending of an message failed. | |
| #define | CDD_IPC_E_RECEIVE_RETRY (0x07U) |
| Error code indicating reception of invalid message. | |
| #define | CDD_IPC_E_NOT_SUPPORTED (0x08U) |
| Error code indicating feature is not supported. | |
| #define | CDD_IPC_E_CALLBACK_NULL (0x09U) |
| Error code indicating Callback function passed as NULL pointer. | |
| #define | CDD_IPC_MAX_MSG_LEN (496U) |
| Maximum message length that can be transported. | |
| #define | CDD_IPC_MAX_CTRL_MSG_LEN (32U) |
| Maximum length of control message. | |
| #define | CDD_IPC_MAX_RETRY_NOTIFY (2U) |
| Maximum number of times notify via mailbox is attempted. | |
| void | Cdd_IpcGetVersionInfo (Std_VersionInfoType *VersionInfoPtr) |
| Service for getting CDD version. | |
| void | Cdd_IpcInit (void) |
| Service for CDD Initialization. | |
| Std_ReturnType | Cdd_IpcDeinit (void) |
| Service for deinitializing CDD. | |
| Std_ReturnType | Cdd_IpcSendMsg (VAR(uint32,) chId, const void *pBuf, VAR(uint32,) bufLen) |
| Service for sending an message to remote cores. | |
| Std_ReturnType | Cdd_IpcReceiveMsg (VAR(uint32,) chId, void *pBuf, uint32 *bufLen) |
| Service for reception of N bytes of data from remote cores. | |
| Std_ReturnType | Cdd_IpcAnnounce (const UCHAR *pBuf, VAR(uint32,) chId) |
| Service for broadcasting capabilities of this core to all other cores. | |
| Std_ReturnType | Cdd_IpcReceiveCtrlMsg (uint32 *pRemoteProcId, uint32 *pRemoteEndPt, void *pBuf, uint32 *bufLen) |
| Service for reception of N bytes of control message from remote cores. | |
| Std_ReturnType | Cdd_IpcRegisterReadBack (uint32 remoteProcId, Cdd_IpcRegRbValues *pRegArgs) |
| Service for reading the configuration registers of the MCAL modules. | |
| boolean | Cdd_IpcIsInitDone (void) |
| Service for checking if IPC module is initialized. | |
| uint32 | Cdd_IpcGetMaxMsgSize (VAR(uint32,) chId) |
| Service for checking if IPC module is initialized. | |
| uint32 | Cdd_IpcGetMailboxStatus (VAR(uint32,) remoteProcId) |
| Service to get Mailbox state is FULL or not. | |
CDD IPC Driver Module SW Version Info | |
Defines for CDD IPC Driver AUTOSAR version used for compatibility checks. Expected to change with each each change in IPC implementation | |
| #define | CDD_IPC_SW_MAJOR_VERSION (11U) |
| Driver Implementation Major Version. | |
| #define | CDD_IPC_SW_MINOR_VERSION (0U) |
| Driver Implementation Minor Version. | |
| #define | CDD_IPC_SW_PATCH_VERSION (0U) |
| Driver Implementation patch Version. | |
CDD IPC Driver Module AUTOSAR Version Info | |
Defines for CDD Driver AUTOSAR version used for compatibility checks | |
| #define | CDD_IPC_AR_RELEASE_MAJOR_VERSION (4U) |
| AUTOSAR Major version specification implemented by CDD Driver. | |
| #define | CDD_IPC_AR_RELEASE_MINOR_VERSION (3U) |
| AUTOSAR Minor version specification implemented by CDD Driver. | |
| #define | CDD_IPC_AR_RELEASE_REVISION_VERSION (1U) |
| AUTOSAR Patch version specification implemented by CDD Driver. | |
CDD IPC Driver Module, AUTOSAR Version Info | |
Defines for CDD IPC Driver AUTOSAR version used for compatibility checks | |
| #define | CDD_IPC_MODULE_ID ((uint16) 255U) |
| CDD Module ID. | |
| #define | CDD_IPC_VENDOR_ID ((uint16) 44U) |
| Texas Instruments Vendor ID. | |
| #define | CDD_IPC_INSTANCE_ID ((uint8) 0U) |
| IPC Instance ID. | |
CDD API Service ID | |
| #define | CDD_IPC_SID_GETVERSIONINFO (0x01U) |
| API Service ID for get version info. | |
| #define | CDD_IPC_SID_INIT (0x02U) |
| API Service ID for initialization. | |
| #define | CDD_IPC_SID_SEND (0x03U) |
| API Service ID to send message to remote core. | |
| #define | CDD_IPC_SID_RECEIVE (0x04U) |
| API Service ID to receive message from remote core. | |
| #define | CDD_IPC_SID_ANNOUNCE (0x05U) |
| API Service ID to announce message all remote core. | |
| #define | CDD_IPC_SID_INTERNAL_ISR_ID (0x06U) |
| API Service ID for ISR. | |
| #define | CDD_IPC_SID_REG_READBACK (0x07U) |
| API Service ID for register read back. | |
| #define | CDD_IPC_SID_DEINIT (0x08U) |
| API Service ID for De initialization. | |
| #define | CDD_IPC_SID_CTRL_RECEIVE (0x09U) |
| API Service ID to receive control message from remote core. | |
| #define | CDD_IPC_SID_IS_INIT_DONE (0x0AU) |
| API Service ID to determine if module is initialized. | |
| #define | CDD_IPC_SID_GET_MAX_MSG_SIZE (0x0BU) |
| API Service ID to determine the maximum message size configured. | |
| #define | CDD_IPC_SID_MAILBOX_STATE (0x0CU) |
| API Service ID to determine the state of the mailbox. | |
| #define CDD_IPC_SW_MAJOR_VERSION (11U) |
Driver Implementation Major Version.
| #define CDD_IPC_SW_MINOR_VERSION (0U) |
Driver Implementation Minor Version.
| #define CDD_IPC_SW_PATCH_VERSION (0U) |
Driver Implementation patch Version.
| #define CDD_IPC_AR_RELEASE_MAJOR_VERSION (4U) |
AUTOSAR Major version specification implemented by CDD Driver.
| #define CDD_IPC_AR_RELEASE_MINOR_VERSION (3U) |
AUTOSAR Minor version specification implemented by CDD Driver.
| #define CDD_IPC_AR_RELEASE_REVISION_VERSION (1U) |
AUTOSAR Patch version specification implemented by CDD Driver.
| #define CDD_IPC_MODULE_ID ((uint16) 255U) |
CDD Module ID.
| #define CDD_IPC_VENDOR_ID ((uint16) 44U) |
Texas Instruments Vendor ID.
| #define CDD_IPC_INSTANCE_ID ((uint8) 0U) |
IPC Instance ID.
| #define CDD_IPC_SID_GETVERSIONINFO (0x01U) |
API Service ID for get version info.
| #define CDD_IPC_SID_INIT (0x02U) |
API Service ID for initialization.
| #define CDD_IPC_SID_SEND (0x03U) |
API Service ID to send message to remote core.
| #define CDD_IPC_SID_RECEIVE (0x04U) |
API Service ID to receive message from remote core.
| #define CDD_IPC_SID_ANNOUNCE (0x05U) |
API Service ID to announce message all remote core.
| #define CDD_IPC_SID_INTERNAL_ISR_ID (0x06U) |
API Service ID for ISR.
| #define CDD_IPC_SID_REG_READBACK (0x07U) |
API Service ID for register read back.
| #define CDD_IPC_SID_DEINIT (0x08U) |
API Service ID for De initialization.
| #define CDD_IPC_SID_CTRL_RECEIVE (0x09U) |
API Service ID to receive control message from remote core.
| #define CDD_IPC_SID_IS_INIT_DONE (0x0AU) |
API Service ID to determine if module is initialized.
| #define CDD_IPC_SID_GET_MAX_MSG_SIZE (0x0BU) |
API Service ID to determine the maximum message size configured.
| #define CDD_IPC_SID_MAILBOX_STATE (0x0CU) |
API Service ID to determine the state of the mailbox.
| #define CDD_IPC_E_OK (0x00U) |
No errors.
| #define CDD_IPC_E_INIT_FAILED (0x01U) |
Error code indicating initialization failure.
| #define CDD_IPC_E_UNINIT (0x02U) |
Error code indicating the IPC is uninitialized.
| #define CDD_IPC_E_PARAM_POINTER (0x03U) |
Error code indicating driver is un-initialized.
| #define CDD_IPC_E_ALREADY_INITIALIZED (0x04U) |
Error code indicating IPC has already been initialized.
| #define CDD_IPC_E_INVALID_CONFIG (0x05U) |
Error code indicating wrong configuration.
| #define CDD_IPC_E_SEND (0x06U) |
Error code indicating sending of an message failed.
| #define CDD_IPC_E_RECEIVE_RETRY (0x07U) |
Error code indicating reception of invalid message.
| #define CDD_IPC_E_NOT_SUPPORTED (0x08U) |
Error code indicating feature is not supported.
| #define CDD_IPC_E_CALLBACK_NULL (0x09U) |
Error code indicating Callback function passed as NULL pointer.
| #define CDD_IPC_MAX_MSG_LEN (496U) |
Maximum message length that can be transported.
| #define CDD_IPC_MAX_CTRL_MSG_LEN (32U) |
Maximum length of control message.
| #define CDD_IPC_MAX_RETRY_NOTIFY (2U) |
Maximum number of times notify via mailbox is attempted.
In cases where the remote core is not processing mailbox notification, the driver would attempt to notify multiple times.
| typedef void(* Cdd_Ipc_NewMessage) (void) |
| void Cdd_IpcGetVersionInfo | ( | Std_VersionInfoType * | VersionInfoPtr | ) |
Service for getting CDD version.
* Service name : Cdd_IpcGetVersionInfo * Syntax : void Cdd_IpcGetVersionInfo(Std_VersionInfoType * VersionInfoPtr) * Mode : User Mode (Non-Privileged Mode) * Service ID[hex] : CDD_IPC_SID_GETVERSIONINFO * Sync/Async : Synchronous * Reentrancy : Non Reentrant * Parameters (in) : VersionInfoPtr - Pointer to version info element * Parameters (inout) : None * Parameters (out) : None * Return value : None * Description : Service for getting CDD version. *
| void Cdd_IpcInit | ( | void | ) |
Service for CDD Initialization.
* Service name : Cdd_IpcInit * Syntax : Std_ReturnType Cdd_IpcInit(void) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : CDD_IPC_SID_INIT * Sync/Async : Synchronous * Reentrancy : Non Reentrant * Parameters (in) : None * Parameters (inout) : None * Parameters (out) : None * Return value : None * Description : Service for CDD Initialization. *
| Std_ReturnType Cdd_IpcDeinit | ( | void | ) |
Service for deinitializing CDD.
* Service name : Cdd_IpcDeinit * Syntax : Std_ReturnType Cdd_IpcDeinit(void* ConfigPtr) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : CDD_IPC_SID_DEINIT * Sync/Async : Synchronous * Reentrancy : Non-Reentrant * Parameters (in) : ConfigPtr - Not used for now, reserved for future * Parameters (inout) : None * Parameters (out) : None * Return value : Std_ReturnType * Description : Service for deinitializing the CDD and change the * driver state to uninitialized *
Service for sending an message to remote cores.
* Service name : Cdd_IpcSendMsg * Syntax : Std_ReturnType Cdd_IpcSendMsg( * uint32 chId, * void *pBuf, * uint32 bufLen) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : CDD_IPC_SID_SEND * Sync/Async : Synchronous * Reentrancy : NonReentrant * Parameters (in) : chId - Communication channel identifier * : pBuf - non NULL_PTR, that describes the message to be * sent * : bufLen - Length in bytes and cannot exceed * CDD_IPC_MAX_MSG_LEN * Parameters (inout) : None * Parameters (out) : None * Return value : Std_ReturnType * Description : This API is used to transport N bytes of data across * cores. *
| Std_ReturnType Cdd_IpcReceiveMsg | ( | VAR(uint32,) | chId, |
| void * | pBuf, | ||
| uint32 * | bufLen ) |
Service for reception of N bytes of data from remote cores.
* Service name : Cdd_IpcReceiveMsg * Syntax : Std_ReturnType Cdd_IpcReceiveMsg( * uint32 chId, * void *pBuf, * uint32 bufLen) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : CDD_IPC_SID_RECEIVE * Sync/Async : Synchronous * Reentrancy : NonReentrant * Parameters (in) : chId - Communication channel identifier * : pBuf - non NULL_PTR, that describes the memory space * that can hold received message. The length * shall be CDD_IPC_MAX_MSG_LEN * : bufLen - Received message length in bytes and will not * exceed CDD_IPC_MAX_MSG_LEN. * Parameters (inout) : None * Parameters (out) : None * Return value : Std_ReturnType * Description : This API is used to receive message from remote core * If there are no messages E_NOT_OK shall be * returned. * *
| Std_ReturnType Cdd_IpcAnnounce | ( | const UCHAR * | pBuf, |
| VAR(uint32,) | chId ) |
Service for broadcasting capabilities of this core to all other cores.
* Service name : Cdd_IpcAnnounce * Syntax : Std_ReturnType Cdd_IpcAnnounce( * void *pBuf, * uint32 bufLen) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : CDD_IPC_SID_ANNOUNCE * Sync/Async : Synchronous * Reentrancy : NonReentrant * Parameters (in) : pBuf - non NULL_PTR, that describes the message to be * sent. * : bufLen - Length in bytes and cannot exceed * CDD_IPC_MAX_MSG_LEN * Parameters (inout) : None * Parameters (out) : None * Return value : Std_ReturnType * Description : This API is used to announce the capability of this * core to all other cores. *
| Std_ReturnType Cdd_IpcReceiveCtrlMsg | ( | uint32 * | pRemoteProcId, |
| uint32 * | pRemoteEndPt, | ||
| void * | pBuf, | ||
| uint32 * | bufLen ) |
Service for reception of N bytes of control message from remote cores.
* Service name : Cdd_IpcReceiveCtrlMsg * Syntax : Std_ReturnType Cdd_IpcReceiveCtrlMsg( * uint32 pRemoteProcId, * uint32 pRemoteEndPt, * void *pBuf, * uint32 *bufLen) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : CDD_IPC_SID_CTRL_RECEIVE * Sync/Async : Synchronous * Reentrancy : NonReentrant * Parameters (inout) : pRemoteProcId - Holds the remote processor identifier * that iniciated this control message * : pRemoteEndPt - Holds remote end point number that * iniciated this control message * : pBuf - non NULL_PTR, that describes the memory space * that can hold received message. The length * shall be CDD_IPC_MAX_MSG_LEN * : bufLen - Received message length in bytes and will not * exceed CDD_IPC_MAX_MSG_LEN. * Parameters (in) : None * Parameters (out) : None * Return value : Std_ReturnType * Description : This API is used to receive control message from * remote core. If there are no messages E_NOT_OK * shall be returned. * *
| Std_ReturnType Cdd_IpcRegisterReadBack | ( | uint32 | remoteProcId, |
| Cdd_IpcRegRbValues * | pRegArgs ) |
Service for reading the configuration registers of the MCAL modules.
* Service name : Cdd_RegisterReadBack * Syntax : Std_ReturnType Cdd_RegisterReadBack(uint8* mod_name) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : None * Sync/Async : Synchronous * Reentrancy : Reentrant * Parameters (in) : None * Parameters (inout) : pRegArgs - Pointer to structure that would hold values * of registers read back by this API * Parameters (out) : None * Return value : Std_ReturnType * Description : Service for reading the critical configuration * registers of the Mailbox/IPC *
| boolean Cdd_IpcIsInitDone | ( | void | ) |
Service for checking if IPC module is initialized.
* Service name : Cdd_IpcIsInitDone * Syntax : boolean Cdd_IpcIsInitDone(void) * Mode : User Mode (Non-Privileged Mode) * Service ID[hex] : CDD_IPC_SID_IS_INIT_DONE * Sync/Async : Synchronous * Reentrancy : Reentrant * Parameters (in) : None * Parameters (inout) : None * Parameters (out) : None * Return value : boolean * Description : Returns TRUE if Cdd_ipcInit is completed else FALSE *
| uint32 Cdd_IpcGetMaxMsgSize | ( | VAR(uint32,) | chId | ) |
Service for checking if IPC module is initialized.
* Service name : Cdd_IpcGetMaxMsgSize * Syntax : uint32 Cdd_IpcGetMaxMsgSize(uint32 chId) * Mode : User Mode (Non-Privileged Mode) * Service ID[hex] : CDD_IPC_SID_GET_MAX_MSG_SIZE * Sync/Async : Synchronous * Reentrancy : Reentrant * Parameters (in) : chId - Communication channel identifier * Parameters (inout) : None * Parameters (out) : None * Return value : uint32 * Description : Returns max msg size for the specified channel *
| uint32 Cdd_IpcGetMailboxStatus | ( | VAR(uint32,) | remoteProcId | ) |
Service to get Mailbox state is FULL or not.
* Service name : Cdd_IpcGetMailboxStatus * Syntax : uint32 Cdd_IpcGetMailboxStatus(uint32 chId) * Mode : User Mode (Non-Privileged Mode) * Service ID[hex] : CDD_IPC_SID_MAILBOX_STATE * Sync/Async : Synchronous * Reentrancy : Reentrant * Parameters (in) : remoteProcId - Remote ID * Parameters (inout) : None * Parameters (out) : None * Return value : uint32 * Description : Returns the mailbox state *