1.1.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 Coprocessor and its peripherals and re-loading the metrology library application on Core 1 from 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;

    DRV_METROLOGY_INIT drvMetrologyInitData = {
        .regBaseAddress = DRV_METROLOGY_REG_BASE_ADDRESS,
        .binStartAddress = (uint32_t)&met_bin_start,
        .binEndAddress = (uint32_t)&met_bin_end,

    };

    sysObjDrvMet = DRV_METROLOGY_Reinitialize((SYS_MODULE_INIT *)&drvMetrologyInitData);
Remarks

DRV_METROLOGY_Initialize routine has to be called at some point before this routine is called.