cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring STEVAL-SPIN3202 to control a brushless gimbal (6 step commutation - STSPIN32F0_Uart example)

VChan.2
Associate II

Hi,

I am trying to do six step BLDC commutation on STEVAL-SPIN3202 to control a gimbal motor https://www.robotshop.com/ca/en/ipower-gbm5208h-200t-gimbal-motor.html

I am using the STSPIN32F0_Uart example under the following sw package

https://www.st.com/resource/en/user_manual/dm00446043-getting-started-with-the-stswspin3202-and-stswspin3204-firmware-packages-stmicroelectronics.pdf

I was able to build and debug the example and talk to the board through UART. Each time I sent STARTM command, the motor momentarily starts and within a few seconds, I get LF_TIMER_FAILURE error back

>>> START MOTOR COMMAND RECEIVED ! <<
>>>Status: LF_TIMER_FAILURE
>>> START MOTOR COMMAND RECEIVED ! <<
>>>Status: LF_TIMER_FAILURE

Kindly help me debug this issue. I want to know if it is a motor startup error or something to do with the LF TIMER (TIM2) Initialization/ Auto reload.

I also dont know what motor parameters to input for 

<INIREF> Startup reference (0-4095)
 
<ACCELE> Motor acceleration

I am including MC_SixStep_param_BR2804_1700_KV_1.h as the example motor. I know that I would have to tweak motor parameters for smooth operation but I dont know exactly what to change - right now, meddling with macros such as 

#define STARTUP_DUTY_CYCLE 90 /*!< Tenths of percentage of PWM on time */
#define ACC 20000 /*!< Mechanical acceleration rate (setting available in manual mode, LOAD_TYPE = 0) */
#define MINIMUM_ACC 500 /*!< Mechanical acceleration rate for BIG load application */
#define NUMBER_OF_STEPS 20000 /*!< Number of elements for motor start-UP (max value 65535)*/
#define TIME_FOR_ALIGN 500 /*!< Time for alignment (msec)*/
#define NUMBER_ZCR 12 /*!< Number of zero crossing event during the startup for closed loop control begin */

Any pointers on how to debug LF_TIMER_FAILURE would be helpful. I dont wanna do FOC control (using Motor Control workbench) as I feel it is a lot more complicated

Thanks and Regards,

Vimal

0 REPLIES 0