Jump to main content

##

# 3.3.19.6 tmcFly_State_s Struct

## C

    /* Structure defining the state parameters for flying start operation */
    typedef struct tmcFly_State_s
    {
        /** Switches */
        bool enable;                       /* Flag indicating flying start module enable status */
        bool initDone;                     /* Flag indicating flying start module initialization status */

        /** State variables */
        tmcFly_FlyingStartState_e flyingStartState; /* An enumerated type that represents the current state of the flying start state machine */
        uint32_t exceedCounter;            /* A counter used to track how long the rotor speed has exceeded a certain threshold */
        uint32_t detectCounter;            /* A counter used during the detection phase to monitor the number of iterations */
        uint32_t fadeOutCounter;           /* A counter used during the fade-out phase to manage the timing of the PWM signals */
        uint32_t fadeOutBurstCounter;      /* A counter used to manage the timing of bursts within the fade-out phase */

        /** Parameters */
        uint32_t detectLoopCount;          /* The number of iterations required during the detection phase */
        uint32_t exceedCounterCount;       /* The threshold value for the exceedCounter */
        float32_t minSpeedForFlyingStart;  /* The minimum rotor speed required for the flying start process to be considered successful */
        float32_t flyingStartCurrent;      /* The current reference used during the flying start process */
        float32_t brakeCurrent;            /* The current applied to brake the motor if necessary */
        float32_t brakeCurrentStep;        /* The step value used to increment or decrement the brakeCurrent during the braking process */
        uint32_t fadeOutLoopCount;         /* The number of loops or iterations required during the fade-out phase */
        uint32_t halfFadeOutBurstLoopCount;/* Half the number of iterations for a fade-out burst cycle */
        uint32_t fadeOutBurstLoopCount;    /* The total number of iterations for a complete fade-out burst cycle */
        uint16_t halfPwmPeriodCount;       /* The value representing half of the PWM period count */

    }tmcFly_State_s;

## Summary

Flying start module structure

## Description

This structure holds the state and parameters for the flying start module. It includes control flags, state variables, and various control parameters.

## Remarks

Refer the generated header file for the exact typedef signature.