Motor Evaluation Kit NEVC-MCTRL-100-t01-1.0.0
Firmware for NEVB-MCTRL-100-01 for trapezoidal control of BLDC motors using Hall-effect sensors
Loading...
Searching...
No Matches
To Do List

This page lists all the macros that can be set by the user to quickly modify operating parameters such as switching frequencies and speed control methods. If this is the first time you are running the code with the motor provided in the kit, then you do not have to modify the parameters unless other parameters are preferred.

Each entry is linked to the part of the code where it was mentioned.

Member COMMUTATION_TICKS_STOPPED
Define how many 'ticks' before the motor is considered stopped.
Member CURRENT_ERROR_THRESHOLD
Calculate and set the register value for the current error threshold.
Member CURRENT_WARNING_THRESHOLD
Calculate and set the register value for the current warning threshold.
Member DEAD_TIME
Specify the desired dead time in nanoseconds.
Member EMULATE_HALL
Enable or disable motor emulation by setting to TRUE or FALSE.
Member HALL_PULLUP_ENABLE
Enable or disable internal pull-ups on hall sensor inputs by setting to TRUE or FALSE.
Member MOTOR_POLES
Specify the number of poles of the specific motor being used.
Member PID_K_D
Adjust the value as needed for the derivative gain in the PID controller when operating in closed-loop speed control mode based on your system's control requirements.
Member PID_K_D_ENABLE
Enable or disable derivative control by assigning TRUE or FALSE based on your system's control requirements when operating in closed-loop speed control mode.
Member PID_K_I
Adjust the value as needed for the integral gain in the PID controller when operating in closed-loop speed control mode based on your system's control requirements.
Member PID_K_P
Adjust the value as needed for the proportional gain in the PID controller when operating in closed-loop speed control mode based on your system's control requirements.
Member SPEED_CONTROL_METHOD
Select the speed control method by assigning SPEED_CONTROL_OPEN_LOOP or SPEED_CONTROL_CLOSED_LOOP.
Member SPEED_CONTROLLER_MAX_DELTA
Adjust the value to set the desired maximum change in speed reference for open-loop control according to your system's speed response requirements.
Member SPEED_CONTROLLER_MAX_SPEED
Set to the maximum speed based on the system's safety and operational requirements.
Member TIM3_FREQ
Specify the desired electrical rotational frequency in Hz.
Member TIM4_FREQ
Specify the desired gate switching frequency.
Member TURN_OFF_MODE
Select the turn mode by assigning TURN_OFF_MODE_COAST or TURN_OFF_MODE_BRAKE.