Jump to main content

##

# 3.6.3 mcIpdI_InitialPositionDetect

## C

    /* Perform initial position detection */
    void mcIpdI_InitialPositionDetect(tmcIpd_ModuleData_s * const pModule);

## Summary

This function performs initial position detection.

## Description

This function performs the Initial Position Detection (IPD) process to determine the initial rotor position of the PMSM motor before normal operation. It achieves this by exciting the motor with a specified PWM signal, reads the resulting phase currents, and calculating the rotor position based on the input data.

## Precondition

The IPD module must be initialized and enabled.

## Parameters

Param | Description
--- | ---
pParameters | A pointer to the IPD module parameter structure

## Returns

None

## Example

    // Define the IPD module data structure
    tmcIpd_ModuleData_s ipdParameters;

    /* Perform initial position detection */
    mcIpdI_InitialPositionDetect(&ipdParameters);

## Remarks

Refer the generated header file for the exact function signature.