This module is used for inter-processor communications.
|
| static void | IPC_setFlagLtoR (IPC_Channel_t ipcChannel, uint32_t flags) |
| |
| static void | IPC_clearFlagLtoR (IPC_Channel_t ipcChannel, uint32_t flags) |
| |
| static void | IPC_triggerInterrupt (IPC_Channel_t ipcChannel) |
| |
| static void | IPC_ackFlagRtoL (IPC_Channel_t ipcChannel, uint32_t flags) |
| |
| static bool | IPC_isFlagBusyLtoR (IPC_Channel_t ipcChannel, uint32_t flags) |
| |
| static bool | IPC_isFlagBusyRtoL (IPC_Channel_t ipcChannel, uint32_t flags) |
| |
| static void | IPC_waitForFlag (IPC_Channel_t ipcChannel, uint32_t flag) |
| |
| static void | IPC_waitForAck (IPC_Channel_t ipcChannel, uint32_t flag) |
| |
| static void | IPC_sync (IPC_Channel_t ipcChannel, uint32_t flag) |
| |
| static void | IPC_init (IPC_Channel_t ipcChannel) |
| |
| bool | IPC_sendCommand (IPC_Channel_t ipcChannel, uint32_t flags, uint32_t command, uint32_t addr, uint32_t data) |
| |
| bool | IPC_readCommand (IPC_Channel_t ipcChannel, uint32_t flags, uint32_t *command, uint32_t *addr, uint32_t *data) |
| |
| static void | IPC_sendResponse (IPC_Channel_t ipcChannel, uint32_t data) |
| |
| static uint32_t | IPC_getResponse (IPC_Channel_t ipcChannel) |
| |
| static uint64_t | IPC_getCounter (void) |
| |
|
| enum | IPC_Channel_t {
IPC_CPU1_L_CPU2_R_CH0 = CPU1IPCSEND_BASE + IPC_O_CPU1TOCPU2INTIPCSET(0U)
, IPC_CPU1_L_CPU2_R_CH1 = CPU1IPCSEND_BASE + IPC_O_CPU1TOCPU2INTIPCSET(1U)
, IPC_CPU1_L_CPU2_R_CH2 = CPU1IPCSEND_BASE + IPC_O_CPU1TOCPU2INTIPCSET(2U)
, IPC_CPU1_L_CPU2_R_CH3 = CPU1IPCSEND_BASE + IPC_O_CPU1TOCPU2INTIPCSET(3U)
,
IPC_CPU1_L_CPU3_R_CH0 = CPU1IPCSEND_BASE + IPC_O_CPU1TOCPU3INTIPCSET(0U)
, IPC_CPU1_L_CPU3_R_CH1 = CPU1IPCSEND_BASE + IPC_O_CPU1TOCPU3INTIPCSET(1U)
, IPC_CPU1_L_CPU3_R_CH2 = CPU1IPCSEND_BASE + IPC_O_CPU1TOCPU3INTIPCSET(2U)
, IPC_CPU1_L_CPU3_R_CH3 = CPU1IPCSEND_BASE + IPC_O_CPU1TOCPU3INTIPCSET(3U)
,
IPC_CPU2_L_CPU1_R_CH0 = CPU2IPCSEND_BASE + IPC_O_CPU2TOCPU1INTIPCSET(0U)
, IPC_CPU2_L_CPU1_R_CH1 = CPU2IPCSEND_BASE + IPC_O_CPU2TOCPU1INTIPCSET(1U)
, IPC_CPU2_L_CPU1_R_CH2 = CPU2IPCSEND_BASE + IPC_O_CPU2TOCPU1INTIPCSET(2U)
, IPC_CPU2_L_CPU1_R_CH3 = CPU2IPCSEND_BASE + IPC_O_CPU2TOCPU1INTIPCSET(3U)
,
IPC_CPU2_L_CPU3_R_CH0 = CPU2IPCSEND_BASE + IPC_O_CPU2TOCPU3INTIPCSET(0U)
, IPC_CPU2_L_CPU3_R_CH1 = CPU2IPCSEND_BASE + IPC_O_CPU2TOCPU3INTIPCSET(1U)
, IPC_CPU2_L_CPU3_R_CH2 = CPU2IPCSEND_BASE + IPC_O_CPU2TOCPU3INTIPCSET(2U)
, IPC_CPU2_L_CPU3_R_CH3 = CPU2IPCSEND_BASE + IPC_O_CPU2TOCPU3INTIPCSET(3U)
,
IPC_CPU3_L_CPU1_R_CH0 = CPU3IPCSEND_BASE + IPC_O_CPU3TOCPU1INTIPCSET(0U)
, IPC_CPU3_L_CPU1_R_CH1 = CPU3IPCSEND_BASE + IPC_O_CPU3TOCPU1INTIPCSET(1U)
, IPC_CPU3_L_CPU1_R_CH2 = CPU3IPCSEND_BASE + IPC_O_CPU3TOCPU1INTIPCSET(2U)
, IPC_CPU3_L_CPU1_R_CH3 = CPU3IPCSEND_BASE + IPC_O_CPU3TOCPU1INTIPCSET(3U)
,
IPC_CPU3_L_CPU2_R_CH0 = CPU3IPCSEND_BASE + IPC_O_CPU3TOCPU2INTIPCSET(0U)
, IPC_CPU3_L_CPU2_R_CH1 = CPU3IPCSEND_BASE + IPC_O_CPU3TOCPU2INTIPCSET(1U)
, IPC_CPU3_L_CPU2_R_CH2 = CPU3IPCSEND_BASE + IPC_O_CPU3TOCPU2INTIPCSET(2U)
, IPC_CPU3_L_CPU2_R_CH3 = CPU3IPCSEND_BASE + IPC_O_CPU3TOCPU2INTIPCSET(3U)
} |
| |
◆ IPC_NO_FLAG
| #define IPC_NO_FLAG 0x00000000U |
◆ IPC_FLAG0
| #define IPC_FLAG0 0x00000001U |
◆ IPC_FLAG1
| #define IPC_FLAG1 0x00000002U |
◆ IPC_FLAG2
| #define IPC_FLAG2 0x00000004U |
◆ IPC_FLAG3
| #define IPC_FLAG3 0x00000008U |
◆ IPC_FLAG4
| #define IPC_FLAG4 0x00000010U |
◆ IPC_FLAG5
| #define IPC_FLAG5 0x00000020U |
◆ IPC_FLAG6
| #define IPC_FLAG6 0x00000040U |
◆ IPC_FLAG7
| #define IPC_FLAG7 0x00000080U |
◆ IPC_FLAG8
| #define IPC_FLAG8 0x00000100U |
◆ IPC_FLAG9
| #define IPC_FLAG9 0x00000200U |
◆ IPC_FLAG10
| #define IPC_FLAG10 0x00000400U |
◆ IPC_FLAG11
| #define IPC_FLAG11 0x00000800U |
◆ IPC_FLAG12
| #define IPC_FLAG12 0x00001000U |
◆ IPC_FLAG13
| #define IPC_FLAG13 0x00002000U |
◆ IPC_FLAG14
| #define IPC_FLAG14 0x00004000U |
◆ IPC_FLAG15
| #define IPC_FLAG15 0x00008000U |
◆ IPC_FLAG16
| #define IPC_FLAG16 0x00010000U |
◆ IPC_FLAG17
| #define IPC_FLAG17 0x00020000U |
◆ IPC_FLAG18
| #define IPC_FLAG18 0x00040000U |
◆ IPC_FLAG19
| #define IPC_FLAG19 0x00080000U |
◆ IPC_FLAG20
| #define IPC_FLAG20 0x00100000U |
◆ IPC_FLAG21
| #define IPC_FLAG21 0x00200000U |
◆ IPC_FLAG22
| #define IPC_FLAG22 0x00400000U |
◆ IPC_FLAG23
| #define IPC_FLAG23 0x00800000U |
◆ IPC_FLAG24
| #define IPC_FLAG24 0x01000000U |
◆ IPC_FLAG25
| #define IPC_FLAG25 0x02000000U |
◆ IPC_FLAG26
| #define IPC_FLAG26 0x04000000U |
◆ IPC_FLAG27
| #define IPC_FLAG27 0x08000000U |
◆ IPC_FLAG28
| #define IPC_FLAG28 0x10000000U |
◆ IPC_FLAG29
| #define IPC_FLAG29 0x20000000U |
◆ IPC_FLAG30
| #define IPC_FLAG30 0x40000000U |
◆ IPC_FLAG31
| #define IPC_FLAG31 0x80000000U |
◆ IPC_FLAG_ALL
| #define IPC_FLAG_ALL 0xFFFFFFFFU |
◆ IPC_CPU2_TO_CPU1_INT1
| #define IPC_CPU2_TO_CPU1_INT1 INT_IPC_1_1 |
◆ IPC_CPU2_TO_CPU1_INT2
| #define IPC_CPU2_TO_CPU1_INT2 INT_IPC_1_2 |
◆ IPC_CPU2_TO_CPU1_INT3
| #define IPC_CPU2_TO_CPU1_INT3 INT_IPC_1_3 |
◆ IPC_CPU2_TO_CPU1_INT4
| #define IPC_CPU2_TO_CPU1_INT4 INT_IPC_1_4 |
◆ IPC_CPU3_TO_CPU1_INT1
| #define IPC_CPU3_TO_CPU1_INT1 INT_IPC_2_1 |
◆ IPC_CPU3_TO_CPU1_INT2
| #define IPC_CPU3_TO_CPU1_INT2 INT_IPC_2_2 |
◆ IPC_CPU3_TO_CPU1_INT3
| #define IPC_CPU3_TO_CPU1_INT3 INT_IPC_2_3 |
◆ IPC_CPU3_TO_CPU1_INT4
| #define IPC_CPU3_TO_CPU1_INT4 INT_IPC_2_4 |
◆ IPC_CPU1_TO_CPU2_INT1
| #define IPC_CPU1_TO_CPU2_INT1 INT_IPC_1_1 |
◆ IPC_CPU1_TO_CPU2_INT2
| #define IPC_CPU1_TO_CPU2_INT2 INT_IPC_1_2 |
◆ IPC_CPU1_TO_CPU2_INT3
| #define IPC_CPU1_TO_CPU2_INT3 INT_IPC_1_3 |
◆ IPC_CPU1_TO_CPU2_INT4
| #define IPC_CPU1_TO_CPU2_INT4 INT_IPC_1_4 |
◆ IPC_CPU3_TO_CPU2_INT1
| #define IPC_CPU3_TO_CPU2_INT1 INT_IPC_2_1 |
◆ IPC_CPU3_TO_CPU2_INT2
| #define IPC_CPU3_TO_CPU2_INT2 INT_IPC_2_2 |
◆ IPC_CPU3_TO_CPU2_INT3
| #define IPC_CPU3_TO_CPU2_INT3 INT_IPC_2_3 |
◆ IPC_CPU3_TO_CPU2_INT4
| #define IPC_CPU3_TO_CPU2_INT4 INT_IPC_2_4 |
◆ IPC_CPU1_TO_CPU3_INT1
| #define IPC_CPU1_TO_CPU3_INT1 INT_IPC_1_1 |
◆ IPC_CPU1_TO_CPU3_INT2
| #define IPC_CPU1_TO_CPU3_INT2 INT_IPC_1_2 |
◆ IPC_CPU1_TO_CPU3_INT3
| #define IPC_CPU1_TO_CPU3_INT3 INT_IPC_1_3 |
◆ IPC_CPU1_TO_CPU3_INT4
| #define IPC_CPU1_TO_CPU3_INT4 INT_IPC_1_4 |
◆ IPC_CPU2_TO_CPU3_INT1
| #define IPC_CPU2_TO_CPU3_INT1 INT_IPC_2_1 |
◆ IPC_CPU2_TO_CPU3_INT2
| #define IPC_CPU2_TO_CPU3_INT2 INT_IPC_2_2 |
◆ IPC_CPU2_TO_CPU3_INT3
| #define IPC_CPU2_TO_CPU3_INT3 INT_IPC_2_3 |
◆ IPC_CPU2_TO_CPU3_INT4
| #define IPC_CPU2_TO_CPU3_INT4 INT_IPC_2_4 |
◆ IPC_SEND_TO_RCV_STEP
| #define IPC_SEND_TO_RCV_STEP (CPU1IPCRCV_BASE - CPU1IPCSEND_BASE) |
◆ IPC_REG_SET
◆ IPC_REG_CLR
◆ IPC_REG_FLG
◆ IPC_REG_SENDCOM
| #define IPC_REG_SENDCOM |
( |
| x | ) |
|
◆ IPC_REG_SENDADDR
| #define IPC_REG_SENDADDR |
( |
| x | ) |
|
◆ IPC_REG_SENDDATA
| #define IPC_REG_SENDDATA |
( |
| x | ) |
|
◆ IPC_REG_REMOTEREPLY
| #define IPC_REG_REMOTEREPLY |
( |
| x | ) |
|
◆ IPC_REG_STS
Value:
#define IPC_SEND_TO_RCV_STEP
Definition ipc.h:162
◆ IPC_REG_ACK
◆ IPC_REG_RECVCOM
| #define IPC_REG_RECVCOM |
( |
| x | ) |
|
◆ IPC_REG_RECVADDR
| #define IPC_REG_RECVADDR |
( |
| x | ) |
|
◆ IPC_REG_RECVDATA
| #define IPC_REG_RECVDATA |
( |
| x | ) |
|
◆ IPC_REG_LOCALREPLY
| #define IPC_REG_LOCALREPLY |
( |
| x | ) |
|
◆ IPC_Channel_t
Values that can be passed as parameter ipcChannel in all the driver functions
| Enumerator |
|---|
| IPC_CPU1_L_CPU2_R_CH0 | |
| IPC_CPU1_L_CPU2_R_CH1 | |
| IPC_CPU1_L_CPU2_R_CH2 | |
| IPC_CPU1_L_CPU2_R_CH3 | |
| IPC_CPU1_L_CPU3_R_CH0 | |
| IPC_CPU1_L_CPU3_R_CH1 | |
| IPC_CPU1_L_CPU3_R_CH2 | |
| IPC_CPU1_L_CPU3_R_CH3 | |
| IPC_CPU2_L_CPU1_R_CH0 | |
| IPC_CPU2_L_CPU1_R_CH1 | |
| IPC_CPU2_L_CPU1_R_CH2 | |
| IPC_CPU2_L_CPU1_R_CH3 | |
| IPC_CPU2_L_CPU3_R_CH0 | |
| IPC_CPU2_L_CPU3_R_CH1 | |
| IPC_CPU2_L_CPU3_R_CH2 | |
| IPC_CPU2_L_CPU3_R_CH3 | |
| IPC_CPU3_L_CPU1_R_CH0 | |
| IPC_CPU3_L_CPU1_R_CH1 | |
| IPC_CPU3_L_CPU1_R_CH2 | |
| IPC_CPU3_L_CPU1_R_CH3 | |
| IPC_CPU3_L_CPU2_R_CH0 | |
| IPC_CPU3_L_CPU2_R_CH1 | |
| IPC_CPU3_L_CPU2_R_CH2 | |
| IPC_CPU3_L_CPU2_R_CH3 | |
◆ IPC_setFlagLtoR()
| static void IPC_setFlagLtoR |
( |
IPC_Channel_t | ipcChannel, |
|
|
uint32_t | flags ) |
|
inlinestatic |
Local core sets Local to Remote IPC Flag
- Parameters
-
| ipcChannel | is the enum corresponding to the IPC instance used |
| flags | is the IPC flag mask for the flags being set |
This function will allow the Local core system to set the designated IPC flags to send to the Remote core system. The flags parameter can be any of the IPC flag values: IPC_FLAG0 - IPC_FLAG31.
Note that the IPC interrupt can only be triggered by IPC flag 0.
- Returns
- None.
◆ IPC_clearFlagLtoR()
| static void IPC_clearFlagLtoR |
( |
IPC_Channel_t | ipcChannel, |
|
|
uint32_t | flags ) |
|
inlinestatic |
Local core clears Local to Remote IPC Flag
- Parameters
-
| ipcChannel | is the enum corresponding to the IPC instance used |
| flags | is the IPC flag mask for the flags being cleared |
This function will allow the Local core system to clear the designated IPC flags sent to the Remote core system. The flags parameter can be any of the IPC flag values: IPC_FLAG0 - IPC_FLAG31.
- Returns
- None.
◆ IPC_triggerInterrupt()
Local core triggers Interrupt to Remote
- Parameters
-
| ipcChannel | is the enum corresponding to the IPC instance used |
This function will allow the Local core system to set the IPC_FLAG0 event flag for the Remote core system. This will trigger interrupt in the receiving CPU via the PIPE.
Note that the IPC interrupt can only be triggered by IPC flag 0.
- Returns
- None.
◆ IPC_ackFlagRtoL()
| static void IPC_ackFlagRtoL |
( |
IPC_Channel_t | ipcChannel, |
|
|
uint32_t | flags ) |
|
inlinestatic |
Local core acknowledges Remote to Local IPC Flag.
- Parameters
-
| ipcChannel | is the enum corresponding to the IPC instance used |
| flags | is the IPC flag mask for the flags being acknowledged. |
This function will allow the Local core system to acknowledge/clear the IPC flag set by the Remote core system. The flags parameter can be any of the IPC flag values: IPC_FLAG0 - IPC_FLAG31.
- Returns
- None.
◆ IPC_isFlagBusyLtoR()
| static bool IPC_isFlagBusyLtoR |
( |
IPC_Channel_t | ipcChannel, |
|
|
uint32_t | flags ) |
|
inlinestatic |
Determines whether the given IPC flags are busy or not.
- Parameters
-
| ipcChannel | is the enum corresponding to the IPC instance used |
| flags | is the Local to Remote IPC flag masks to check the status of |
Allows the caller to determine whether the designated Local to Remote IPC flags are pending. The flags parameter can be any of the IPC flag values: IPC_FLAG0 - IPC_FLAG31.
- Returns
- Returns true if the any of the designated IPC flags are busy or false if all the designated IPC flags are free.
◆ IPC_isFlagBusyRtoL()
| static bool IPC_isFlagBusyRtoL |
( |
IPC_Channel_t | ipcChannel, |
|
|
uint32_t | flags ) |
|
inlinestatic |
Determines whether the given Remote to Local IPC flags are busy or not.
- Parameters
-
| ipcChannel | is the enum corresponding to the IPC instance used |
| flags | is the Remote to Local IPC Flag masks to check the status of |
Allows the caller to determine whether the designated Remote to Local IPC flags are pending. The flags parameter can be any of the IPC flag values: IPC_FLAG0 - IPC_FLAG31.
- Returns
- Returns true if the any of the designated IPC flags are busy or false if all the designated IPC flags are free.
◆ IPC_waitForFlag()
| static void IPC_waitForFlag |
( |
IPC_Channel_t | ipcChannel, |
|
|
uint32_t | flag ) |
|
inlinestatic |
Wait for the remote core to send a flag
- Parameters
-
| ipcChannel | is the enum corresponding to the IPC instance used |
| flag | is the Remote to Local IPC flag mask to wait for |
Allows the caller to wait for the Remote to Local flag to be send by the remote core. The flags parameter can be any of the IPC flag values: IPC_FLAG0 - IPC_FLAG31.
- Returns
- None
◆ IPC_waitForAck()
| static void IPC_waitForAck |
( |
IPC_Channel_t | ipcChannel, |
|
|
uint32_t | flag ) |
|
inlinestatic |
Wait for the IPC flag to be acknowledged
- Parameters
-
| ipcChannel | is the enum corresponding to the IPC instance used |
| flag | is the IPC flag mask for which ack is pending |
Allows the caller to wait for the IPC flag to be acknowledged by the remote core. The flagsparameter can be any of the IPC flag values: IPC_FLAG0 - IPC_FLAG31.
- Returns
- None
◆ IPC_sync()
Synchronises the two cores
- Parameters
-
| ipcChannel | is the enum corresponding to the IPC instance used |
| flag | is the IPC flag mask with which synchronisation is done |
Allows the local and remote cores to synchronise. Neither core will return from this function call before the other core enters it.
- Note
- Must be called with same flag mask on both the cores
- Returns
- None
◆ IPC_init()
Initialize IPC
- Parameters
-
| ipcChannel | is the enum corresponding to the IPC instance used This function initializes IPC by clearing all the flags |
- Returns
- None
◆ IPC_sendCommand()
| bool IPC_sendCommand |
( |
IPC_Channel_t | ipcChannel, |
|
|
uint32_t | flags, |
|
|
uint32_t | command, |
|
|
uint32_t | addr, |
|
|
uint32_t | data ) |
|
extern |
Sends a command to the Remote core
- Parameters
-
| ipcChannel | is the enum corresponding to the IPC instance used |
| flags | is the IPC flag mask for the flags to be set |
| command | is the 32-bit command value |
| addr | is the 32-bit address to be sent as part of command |
| data | is the 32-bit data to be sent as part of command |
Allows the caller to send a command to the remote core. A command consists of a unique command value, a 32-bit address and a 32-bit data. The function also sends the designated flags to the remote core.
The flags parameter can be any of the IPC flag values: IPC_FLAG0 - IPC_FLAG31.
The application shall use the function IPC_getResponse to read the response sent by the remote core.
- Note
- The application is expected to wait until the response is received before sending another command using the same channel.
- Returns
- Returns true if the command is sent properly and false if the designated flags were busy and hence command was not sent.
◆ IPC_readCommand()
| bool IPC_readCommand |
( |
IPC_Channel_t | ipcChannel, |
|
|
uint32_t | flags, |
|
|
uint32_t * | command, |
|
|
uint32_t * | addr, |
|
|
uint32_t * | data ) |
|
extern |
Reads a command sent by the Remote core
- Parameters
-
| ipcChannel | is the enum corresponding to the IPC instance used |
| flags | is the IPC flag mask for the flags sent by the remote core |
| command | is the 32-bit pointer at which the command value is read to |
| addr | is the 32-bit pointer at which address value is read to |
| data | is the 32-bit pointer at which the data is read to |
Allows the caller to read a command sent by the remote core. A command consists of a unique command value, a 32-bit address and a 32-bit data.
The flags parameter can be any of the IPC flag values: IPC_FLAG0 - IPC_FLAG31.
- Note
- The application is expected to acknowledge the flag and send a response (if needed) after reading the command.
- Returns
- Returns true if the command is read properly and false if the designated flags were empty and hence command was not read.
◆ IPC_sendResponse()
| static void IPC_sendResponse |
( |
IPC_Channel_t | ipcChannel, |
|
|
uint32_t | data ) |
|
inlinestatic |
Sends the response to the command sent by remote core.
- Parameters
-
| ipcChannel | is the enum corresponding to the IPC instance used |
| data | is the 32-bit value of the response to be sent |
Allows the caller to send a response to the command previously sent by the remote core
- Returns
- None.
◆ IPC_getResponse()
Reads the response from the remote core.
- Parameters
-
| ipcChannel | is the enum corresponding to the IPC instance used |
Allows the caller to read the response sent by the remote core to the command previously sent by the local core
- Returns
- the 32-bit value of the response.
◆ IPC_getCounter()
| static uint64_t IPC_getCounter |
( |
void | | ) |
|
|
inlinestatic |
Reads the timestamp counter value.
- Parameters
-
| ipcChannel | is the enum corresponding to the IPC instance used |
Allows the caller to read the IPC timestamp counter value.
- Returns
- 64-bit counter value.