Jump to main content

##

# 3.2.3 mcCurI_CurrentCalculation

## C

    /* Function to calculate the phase currents */
    void mcCurI_CurrentCalculation( tmcCur_ModuleData_s * const pModule )

## Summary

Calculate the Motor phase currents

## Description

This function reads the measured ADC values and calculates the phase currents based on the current measurement offset and initial values. The results are stored in the module's output structure.

## Precondition

mcCurI_CurrentCalculationInit() must have been initialized and the mcCurI_CurrentOffsetCalculation() must have been completed.

## Parameters

Param | Description
--- | ---
pModule | A constant pointer to the module data structure. This structure contains both input and output data relevant to the current calculation

## Returns

None

## Example

    tmcCur_ModuleData_s mcCurI_ModuleData_gds;
    mcCurI_CurrentCalculation(&mcCurI_ModuleData_gds);

## Remarks

None.