RZ Flexible Software Package Documentation  Release v4.1.0

 
RM_ETHOSU

Functions

fsp_err_t RM_ETHOSU_Open (rm_ethosu_ctrl_t *p_api_ctrl, rm_ethosu_cfg_t const *const p_cfg)
 
fsp_err_t RM_ETHOSU_CallbackSet (rm_ethosu_ctrl_t *const p_api_ctrl, void(*p_callback)(rm_ethosu_callback_args_t *), void *const p_context, rm_ethosu_callback_args_t *const p_callback_memory)
 
fsp_err_t RM_ETHOSU_Close (rm_ethosu_ctrl_t *p_api_ctrl)
 

Detailed Description

Classes

struct  rm_ethosu_instance_ctrl_t
 

Class Documentation

◆ rm_ethosu_instance_ctrl_t

struct rm_ethosu_instance_ctrl_t

Instance control block. This is private to the FSP and should not be used or modified by the application.

Function Documentation

◆ RM_ETHOSU_Open()

fsp_err_t RZG::RM_ETHOSU_Open ( rm_ethosu_ctrl_t p_api_ctrl,
rm_ethosu_cfg_t const *const  p_cfg 
)

Enable Ethos-U NPU and initialize driver. Implements rm_ethosu_api_t::open.

This function performs the following tasks:

  • Performs parameter checking and processes error conditions.
  • Enables NPU module
  • Initializes Ethos-U NPU driver.
  • Provides the handle for use with other API functions.
Parameters
p_api_ctrlPointer to the control structure.
p_cfgPointer to a configuration structure.
Return values
FSP_SUCCESSNPU initialized successfully.
FSP_ERR_ASSERTIONAn input parameter is invalid or NULL.
FSP_ERR_ALREADY_OPENThe instance has already been opened.
FSP_ERR_INVALID_ARGUMENTFailed to initialize ethosu driver

◆ RM_ETHOSU_CallbackSet()

fsp_err_t RZG::RM_ETHOSU_CallbackSet ( rm_ethosu_ctrl_t *const  p_api_ctrl,
void(*)(rm_ethosu_callback_args_t *)  p_callback,
void *const  p_context,
rm_ethosu_callback_args_t *const  p_callback_memory 
)

Updates the user callback and has option of providing memory for callback structure. Implements rm_ethosu_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.

◆ RM_ETHOSU_Close()

fsp_err_t RZG::RM_ETHOSU_Close ( rm_ethosu_ctrl_t p_api_ctrl)

Disable NPU and set the instance as not open. Implements rm_ethosu_api_t::close.

Parameters
p_api_ctrlPointer to an opened instance.
Return values
FSP_SUCCESSChannel successfully closed.
FSP_ERR_ASSERTIONThe parameter p_api_ctrl is NULL.
FSP_ERR_NOT_OPENThe channel has not been opened. Open the channel first.