RZG Flexible Software Package Documentation  Release v2.0.1

 
Message Handling Unit for secure channels (r_mhu_s)

Functions

fsp_err_t R_MHU_S_Open (mhu_ctrl_t *p_ctrl, mhu_cfg_t const *const p_cfg)
 
fsp_err_t R_MHU_S_MsgSend (mhu_ctrl_t *const p_ctrl, uint32_t const msg)
 
fsp_err_t R_MHU_S_Close (mhu_ctrl_t *const p_ctrl)
 
fsp_err_t R_MHU_S_CallbackSet (mhu_ctrl_t *const p_api_ctrl, void(*p_callback)(mhu_callback_args_t *), void const *const p_context, mhu_callback_args_t *const p_callback_memory)
 
void R_MHU_S_IsrSub (uint32_t irq)
 

Detailed Description

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_S module supports the following features:

Data Structures

struct  mhu_s_instance_ctrl_t
 

Data Structure Documentation

◆ mhu_s_instance_ctrl_t

struct mhu_s_instance_ctrl_t

Channel control block. DO NOT INITIALIZE. Initialization occurs when mhu_api_t::open is called.

Data Fields

uint32_t open
 Indicates whether the open() API has been successfully called.
 
mhu_cfg_t const * p_cfg
 Pointer to instance configuration.
 
R_MHU0_Type * p_regs
 Base register for this channel.
 
uint32_t channel
 channel
 
mhu_send_type_t send_type
 Send Type: Message or Response.
 
uint32_t * p_shared_memory_tx
 Pointer to send data area.
 
uint32_t * p_shared_memory_rx
 Pointer to recv data area.
 

Function Documentation

◆ R_MHU_S_Open()

fsp_err_t R_MHU_S_Open ( mhu_ctrl_t *const  p_ctrl,
mhu_cfg_t const *const  p_cfg 
)

Initializes the MHU_S module instance. Implements mhu_api_t::open.

Return values
FSP_SUCCESSInitialization was successful.
FSP_ERR_ASSERTIONA required input pointer is NULL.
FSP_ERR_ALREADY_OPENR_MHU_S_Open has already been called for this p_ctrl.
FSP_ERR_INVALID_ARGUMENTThe specified IRQ number is invalid.
FSP_ERR_INVALID_CHANNELRequested channel number is not available on MHU_S.

◆ R_MHU_S_MsgSend()

fsp_err_t R_MHU_S_MsgSend ( mhu_ctrl_t *const  p_ctrl,
uint32_t const  msg 
)

Send message via MHU. Implements mhu_api_t::msgSend.

Return values
FSP_SUCCESSSend message successfully.
FSP_ERR_ASSERTIONA required pointer was NULL.
FSP_ERR_NOT_OPENThe instance control structure is not opened.

◆ R_MHU_S_Close()

fsp_err_t R_MHU_S_Close ( mhu_ctrl_t *const  p_ctrl)

Disables interrupts, clears internal driver data. mhu_api_t::close.

Return values
FSP_SUCCESSMHU_S closed.
FSP_ERR_ASSERTIONp_ctrl is NULL.
FSP_ERR_NOT_OPENThe instance control structure is not opened.

◆ R_MHU_S_CallbackSet()

fsp_err_t R_MHU_S_CallbackSet ( mhu_ctrl_t *const  p_api_ctrl,
void(*)(mhu_callback_args_t *)  p_callback,
void const *const  p_context,
mhu_callback_args_t *const  p_callback_memory 
)

Updates the user callback with the option to provide memory for the callback argument structure. Implements mhu_api_t::callbackSet.

Return values
FSP_SUCCESSCallback updated successfully.
FSP_ERR_ASSERTIONA required pointer is NULL.
FSP_ERR_NOT_OPENThe control block has not been opened.
FSP_ERR_NO_CALLBACK_MEMORYp_callback is non-secure and p_callback_memory is either secure or NULL.

◆ R_MHU_S_IsrSub()

void R_MHU_S_IsrSub ( uint32_t  irq)

MHU_S receive interrupt sub function (for OpenAMP)

Parameters
[in]irqirq number for inter-core interrupt