1.1.3.4.2 DRV_METROLOGY_Reinitialize Function

C

SYS_MODULE_OBJ DRV_METROLOGY_Reinitialize (
    SYS_MODULE_INIT * init
);

Summary

Re-initializes the metrology driver according to the init parameter.

Description

This routine re-initializes the metrology driver resetting the Core 1 and re-loading the metrology library application on Core 1 from the scratch. The initialization data is specified by the init parameter. It is a single instance driver.

Precondition:

The low-level board initialization must have been completed and the module's initialization function must have been called before the system.

Parameters

ParamDescription
initPointer to the init data structure containing any data necessary to initialize the driver.

Returns

If successful, returns a valid handle to a driver instance object. Otherwise, it returns SYS_MODULE_OBJ_INVALID.

Example

SYS_MODULE_OBJ   sysObjDrvMet;

extern uint8_t met_bin_start;
extern uint8_t met_bin_end;

/* Metrology Driver Initialization Data */
DRV_METROLOGY_INIT drvMetrologyInitData = {

    /* MET bin destination address */
    .regBaseAddress = DRV_METROLOGY_REG_BASE_ADDRESS,

    /* MET Binary start address */
    .binStartAddress = (uint32_t)&met_bin_start,
    
    /* MET Binary end address */
    .binEndAddress = (uint32_t)&met_bin_end,
    
};

sysObjDrvMet = DRV_METROLOGY_Initialize((SYS_MODULE_INIT *)&drvMetrologyInitData);

Remarks

This routine must be called before any other DRV_METROLOGY routine is called.