Driver for the MHU peripherals on RZ MPUs. This module implements the MHU Interface (for secure and non secure channels).
Overview
MHU is a function for message communication between Cortex-A55 and Cortex-M33 cores incorporated in RZ/G2L. Message communication is done by shared RAM (On-chip RAM) for passing message and response between CPUs and the function (MHU) for notifying when messages and responses are stored in the memory.
Features
The MHU_NS module supports the following features:
- Generete interrupt to notify Cortex-A55 when the message/response is stored in shared RAM(On-chip RAM).
- Receive interrupt when the message/response is stored by Cortex-A55 in shared RAM(On-chip RAM).
◆ mhu_ns_instance_ctrl_t
struct mhu_ns_instance_ctrl_t |
Channel control block. DO NOT INITIALIZE. Initialization occurs when mhu_api_t::open is called.
◆ R_MHU_NS_Open()
Initializes the MHU_NS module instance. Implements mhu_api_t::open.
- Return values
-
FSP_SUCCESS | Initialization was successful. |
FSP_ERR_ASSERTION | A required input pointer is NULL. |
FSP_ERR_ALREADY_OPEN | R_MHU_NS_Open has already been called for this p_ctrl. |
FSP_ERR_INVALID_ARGUMENT | The specified IRQ number is invalid. |
FSP_ERR_INVALID_CHANNEL | Requested channel number is not available on MHU_NS. |
◆ R_MHU_NS_MsgSend()
Send message via MHU. Implements mhu_api_t::msgSend.
- Return values
-
FSP_SUCCESS | Send message successfully. |
FSP_ERR_ASSERTION | A required pointer was NULL. |
FSP_ERR_NOT_OPEN | The instance control structure is not opened. |
◆ R_MHU_NS_Close()
Disables interrupts, clears internal driver data. mhu_api_t::close.
- Return values
-
FSP_SUCCESS | MHU_NS closed. |
FSP_ERR_ASSERTION | p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | The instance control structure is not opened. |
◆ R_MHU_NS_CallbackSet()
Updates the user callback with the option to provide memory for the callback argument structure. Implements mhu_api_t::callbackSet.
- Return values
-
FSP_SUCCESS | Callback updated successfully. |
FSP_ERR_ASSERTION | A required pointer is NULL. |
FSP_ERR_NOT_OPEN | The control block has not been opened. |
FSP_ERR_NO_CALLBACK_MEMORY | p_callback is non-secure and p_callback_memory is either secure or NULL. |
◆ R_MHU_NS_IsrSub()
void R_MHU_NS_IsrSub |
( |
uint32_t |
irq | ) |
|
MHU_NS receive interrupt sub function (for OpenAMP)
- Parameters
-
[in] | irq | irq number for inter-core interrupt |