3.4.1 mcRpcI_RotorPositionCalcInit

C


/* Initialize rotor position calculation(RPC) module */
void  mcRpcI_RotorPositionCalcInit( tmcRpc_ModuleData_s * const pModule )	

Summary

Initialize rotor position calculation module.

Description

This function initializes the Rotor Position Calculation (RPC) module by configuring the necessary parameters for accurate rotor position and velocity calculation based on encoder feedback. It links a state variable structure to the module, configures key parameters, and sets up thresholds and scaling factors for the encoder.

Precondition

None.

Parameters

ParamDescription
pParametersA pointer to the rotor position calculation module parameter structure.

Returns

None

Example

// Define the rotor position calculation module data structure
tmcRpc_Parameters_s rpcParameters;

/** Initialize parameters */
mcRpcI_RotorPositionCalcInit(&rpcParameters);
    

Remarks

Note: Ensure that the pParameters structure is properly updated with valid values before calling this function.