This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BOOSTXL-DRV8301: BOOSTXL-DRV8301

Part Number: BOOSTXL-DRV8301
Other Parts Discussed in Thread: MOTORWARE, DRV8305

Hi,

I'm running a BLDC motor using Motorware FOC lab05b, my motor is  57HBL74, see link below for details.

We are moving a load up and down via a lead screw and some gearing.

The load is up to 200 kg moving at about 25 mm/sec on the up stroke.

At about 120 kg things works just fine, up and down. The speed is controlled by the PID controller nicely.

With 200 kg load on the downs stroke when the gravity is helping the motor the software fails (and never recovers) and the load basically freefalls.

I just noticed this so I've not yet hooked the BOOSTXL board to Code Composer Studio debugger to see what actually happens,

that will have to wait until Monday but I figured I'll put the question up here what could be the problem so I can use the weekend to mull over the possibilities.

Have a nice weekend everyone,

wbr Kusti

http://www.fullingmotor.com/product/br/129.html

  • Hi Kusti,

    Have you examined the nFAULT pin and the status registers in the device? When the device stops, information at the nFAULT pin and status registers are good clues.

    What do you need to do to restart the system?
  • Hi Rick,

    thanks for answering.

    No I've not had chance to connect the system to a PC , but will do that on Monday.

    To make it work I have to power cycle the BOOSTXL board, but this does not
    tell much as IIRC the FOC lab code always how to be power cycled if it enters
    an error state.

    I was just fishing for probable or know issues that happen when the load is
    turning the motor as opposed to the motor moving the load.

    Unless there are any known issues or good guesses that is ok I will examine
    more and come back with more details on Monday.

    wbr Kusti
  • Hi,

    I connected CCS debugger and I cannot see any error or anything that catch my eye.

    I grabbed the variable expression view contents and dumped to text file attached.

    First dump when it is running ok and then when it fails.

    What I should be looking for, what info should I provide time zone difference makes iteration slow...

    wbr Kusti

    dump (2).txt
    OK, RUNNING UP
    
    
    
    
    gMotorVars	struct _MOTOR_Vars_t_	{...}	0x000000C0@Data	
    	Flag_enableSys	unsigned char	.	0x000000C0@Data	
    	Flag_Run_Identify	unsigned char	.	0x000000C1@Data	
    	Flag_MotorIdentified	unsigned char	.	0x000000C2@Data	
    	Flag_enableForceAngle	unsigned char	.	0x000000C3@Data	
    	Flag_enableFieldWeakening	unsigned char	.	0x000000C4@Data	
    	Flag_enableRsRecalc	unsigned char	.	0x000000C5@Data	
    	Flag_enableUserParams	unsigned char	.	0x000000C6@Data	
    	Flag_enableOffsetcalc	unsigned char	.	0x000000C7@Data	
    	Flag_enablePowerWarp	unsigned char	.	0x000000C8@Data	
    	Flag_enableSpeedCtrl	unsigned char	.	0x000000C9@Data	
    	Flag_enableRun	unsigned char	.	0x000000CA@Data	
    	Flag_RunState	unsigned char	.	0x000000CB@Data	
    	Flag_enableFlyingStart	unsigned char	.	0x000000CC@Data	
    	CtrlState	enum unknown	CTRL_State_OnLine	0x000000CD@Data	
    	EstState	enum unknown	EST_State_OnLine	0x000000CE@Data	
    	UserErrorCode	enum unknown	USER_ErrorCode_NoError	0x000000CF@Data	
    	CtrlVersion	struct _CTRL_Version_	{...}	0x000000D0@Data	
    	IdRef_A	long	0	0x000000D4@Data	
    	IqRef_A	long	0	0x000000D6@Data	
    	SpeedRef_pu	long	0	0x000000D8@Data	
    	SpeedRef_krpm	long	11841536	0x000000DA@Data	
    	SpeedTraj_krpm	long	11532672	0x000000DC@Data	
    	MaxAccel_krpmps	long	83886080	0x000000DE@Data	
    	Speed_krpm	long	11435762	0x000000E0@Data	
    	OverModulation	long	8388608	0x000000E2@Data	
    	RsOnLineCurrent_A	long	25165824	0x000000E4@Data	
    	SvgenMaxModulation_ticks	long	400	0x000000E6@Data	
    	Flux_Wb	long	158541	0x000000E8@Data	
    	Torque_Nm	long	1857436	0x000000EA@Data	
    	MagnCurr_A	float	0.0	0x000000EC@Data	
    	Rr_Ohm	float	0.0	0x000000EE@Data	
    	Rs_Ohm	float	0.138	0x000000F0@Data	
    	RsOnLine_Ohm	float	0.0	0x000000F2@Data	
    	Lsd_H	float	0.00015	0x000000F4@Data	
    	Lsq_H	float	0.00015	0x000000F6@Data	
    	Flux_VpHz	float	0.0593624	0x000000F8@Data	
    	ipd_excFreq_Hz	float	0.0	0x000000FA@Data	
    	ipd_Kspd	long	0	0x000000FC@Data	
    	ipd_excMag_coarse_pu	long	0	0x000000FE@Data	
    	ipd_excMag_fine_pu	long	0	0x00000100@Data	
    	ipd_waitTime_coarse_sec	float	0.0	0x00000102@Data	
    	ipd_waitTime_fine_sec	float	0.0	0x00000104@Data	
    	Kp_spd	long	10.0 (Q-Value(24))	0x00000106@Data	
    	Ki_spd	long	0.06666666269 (Q-Value(24))	0x00000108@Data	
    	Kp_Idq	long	0.5625 (Q-Value(24))	0x0000010A@Data	
    	Ki_Idq	long	0.06133329868 (Q-Value(24))	0x0000010C@Data	
    	Vd	long	0.0 (Q-Value(24))	0x0000010E@Data	
    	Vq	long	0.0 (Q-Value(24))	0x00000110@Data	
    	Vs	long	0.0 (Q-Value(24))	0x00000112@Data	
    	VsRef	long	0.3999999762 (Q-Value(24))	0x00000114@Data	
    	VdcBus_kV	long	0.02831476927 (Q-Value(24))	0x00000116@Data	
    	Id_A	long	0.0 (Q-Value(24))	0x00000118@Data	
    	Iq_A	long	0.0 (Q-Value(24))	0x0000011A@Data	
    	Is_A	long	0.0 (Q-Value(24))	0x0000011C@Data	
    	I_bias	struct _MATH_vec3_	{...}	0x0000011E@Data	
    		value	long[3]	0x0000011E@Data	0x0000011E@Data	
    	V_bias	struct _MATH_vec3_	{...}	0x00000124@Data	
    	SpeedSet_krpm	long	10066330	0x0000012A@Data	
    	angle_sen_pu	long	0	0x0000012C@Data	
    	angle_est_pu	long	0	0x0000012E@Data	
    	speed_sen_pu	long	0	0x00000130@Data	
    	speed_est_pu	long	0	0x00000132@Data	
    	speedHigh_hall2fast_pu	long	0	0x00000134@Data	
    	speedLow_hall2fast_pu	long	0	0x00000136@Data	
    gMotorVars.UserErrorCode	enum unknown	USER_ErrorCode_NoError	0x000000CF@Data	
    gMotorVars.CtrlVersion	struct _CTRL_Version_	{...}	0x000000D0@Data	
    gMotorVars.Flag_enableSys	unsigned char	.	0x000000C0@Data	
    gMotorVars.Flag_Run_Identify	unsigned char	.	0x000000C1@Data	
    gMotorVars.Flag_enableForceAngle	unsigned char	.	0x000000C3@Data	
    gMotorVars.Flag_enablePowerWarp	unsigned char	.	0x000000C8@Data	
    gMotorVars.CtrlState	enum unknown	CTRL_State_OnLine	0x000000CD@Data	
    gMotorVars.EstState	enum unknown	EST_State_OnLine	0x000000CE@Data	
    gMotorVars.SpeedRef_krpm	long	0.0 (Q-Value(24))	0x000000DA@Data	
    gMotorVars.MaxAccel_krpmps	long	5.0 (Q-Value(24))	0x000000DE@Data	
    gMotorVars.Speed_krpm	long	0.7029044032 (Q-Value(24))	0x000000E0@Data	
    gMotorVars.Torque_lbin	unknown	Error: member 'Torque_lbin' not found 	at (gMotorVars).Torque_lbin 	
    gMotorVars.MagnCurr_A	float	0.0	0x000000EC@Data	
    gMotorVars.Rr_Ohm	float	0.0	0x000000EE@Data	
    gMotorVars.Rs_Ohm	float	0.138	0x000000F0@Data	
    gMotorVars.Lsd_H	float	0.00015	0x000000F4@Data	
    gMotorVars.Lsq_H	float	0.00015	0x000000F6@Data	
    gMotorVars.Flux_VpHz	float	0.05933823	0x000000F8@Data	
    gMotorVars.I_bias	struct _MATH_vec3_	{...}	0x0000011E@Data	
    gMotorVars.V_bias	struct _MATH_vec3_	{...}	0x00000124@Data	
    gMotorVars.VdcBus_kV	long	0.02826064825 (Q-Value(24))	0x00000116@Data	
    gDrvSpi8301Vars	unknown	Error: identifier not found: gDrvSpi8301Vars	
    Add new expression	
    
    
    FAIL, RUNNING DOWN WITH 200 kg LOAD
    
    
    
    gMotorVars	struct _MOTOR_Vars_t_	{...}	0x000000C0@Data	
    	Flag_enableSys	unsigned char	.	0x000000C0@Data	
    	Flag_Run_Identify	unsigned char	.	0x000000C1@Data	
    	Flag_MotorIdentified	unsigned char	.	0x000000C2@Data	
    	Flag_enableForceAngle	unsigned char	.	0x000000C3@Data	
    	Flag_enableFieldWeakening	unsigned char	.	0x000000C4@Data	
    	Flag_enableRsRecalc	unsigned char	.	0x000000C5@Data	
    	Flag_enableUserParams	unsigned char	.	0x000000C6@Data	
    	Flag_enableOffsetcalc	unsigned char	.	0x000000C7@Data	
    	Flag_enablePowerWarp	unsigned char	.	0x000000C8@Data	
    	Flag_enableSpeedCtrl	unsigned char	.	0x000000C9@Data	
    	Flag_enableRun	unsigned char	.	0x000000CA@Data	
    	Flag_RunState	unsigned char	.	0x000000CB@Data	
    	Flag_enableFlyingStart	unsigned char	.	0x000000CC@Data	
    	CtrlState	enum unknown	CTRL_State_OnLine	0x000000CD@Data	
    	EstState	enum unknown	EST_State_OnLine	0x000000CE@Data	
    	UserErrorCode	enum unknown	USER_ErrorCode_NoError	0x000000CF@Data	
    	CtrlVersion	struct _CTRL_Version_	{...}	0x000000D0@Data	
    	IdRef_A	long	0	0x000000D4@Data	
    	IqRef_A	long	0	0x000000D6@Data	
    	SpeedRef_pu	long	0	0x000000D8@Data	
    	SpeedRef_krpm	long	-15368192	0x000000DA@Data	
    	SpeedTraj_krpm	long	-15368192	0x000000DC@Data	
    	MaxAccel_krpmps	long	83886080	0x000000DE@Data	
    	Speed_krpm	long	-15586596	0x000000E0@Data	
    	OverModulation	long	8388608	0x000000E2@Data	
    	RsOnLineCurrent_A	long	25165824	0x000000E4@Data	
    	SvgenMaxModulation_ticks	long	400	0x000000E6@Data	
    	Flux_Wb	long	158833	0x000000E8@Data	
    	Torque_Nm	long	-169692	0x000000EA@Data	
    	MagnCurr_A	float	0.0	0x000000EC@Data	
    	Rr_Ohm	float	0.0	0x000000EE@Data	
    	Rs_Ohm	float	0.138	0x000000F0@Data	
    	RsOnLine_Ohm	float	0.0	0x000000F2@Data	
    	Lsd_H	float	0.00015	0x000000F4@Data	
    	Lsq_H	float	0.00015	0x000000F6@Data	
    	Flux_VpHz	float	0.05942518	0x000000F8@Data	
    	ipd_excFreq_Hz	float	0.0	0x000000FA@Data	
    	ipd_Kspd	long	0	0x000000FC@Data	
    	ipd_excMag_coarse_pu	long	0	0x000000FE@Data	
    	ipd_excMag_fine_pu	long	0	0x00000100@Data	
    	ipd_waitTime_coarse_sec	float	0.0	0x00000102@Data	
    	ipd_waitTime_fine_sec	float	0.0	0x00000104@Data	
    	Kp_spd	long	10.0 (Q-Value(24))	0x00000106@Data	
    	Ki_spd	long	0.06666666269 (Q-Value(24))	0x00000108@Data	
    	Kp_Idq	long	0.5625 (Q-Value(24))	0x0000010A@Data	
    	Ki_Idq	long	0.06133329868 (Q-Value(24))	0x0000010C@Data	
    	Vd	long	0.0 (Q-Value(24))	0x0000010E@Data	
    	Vq	long	0.0 (Q-Value(24))	0x00000110@Data	
    	Vs	long	0.0 (Q-Value(24))	0x00000112@Data	
    	VsRef	long	0.3999999762 (Q-Value(24))	0x00000114@Data	
    	VdcBus_kV	long	0.02832555771 (Q-Value(24))	0x00000116@Data	
    	Id_A	long	0.0 (Q-Value(24))	0x00000118@Data	
    	Iq_A	long	0.0 (Q-Value(24))	0x0000011A@Data	
    	Is_A	long	0.0 (Q-Value(24))	0x0000011C@Data	
    	I_bias	struct _MATH_vec3_	{...}	0x0000011E@Data	
    		value	long[3]	0x0000011E@Data	0x0000011E@Data	
    	V_bias	struct _MATH_vec3_	{...}	0x00000124@Data	
    	SpeedSet_krpm	long	10066330	0x0000012A@Data	
    	angle_sen_pu	long	0	0x0000012C@Data	
    	angle_est_pu	long	0	0x0000012E@Data	
    	speed_sen_pu	long	0	0x00000130@Data	
    	speed_est_pu	long	0	0x00000132@Data	
    	speedHigh_hall2fast_pu	long	0	0x00000134@Data	
    	speedLow_hall2fast_pu	long	0	0x00000136@Data	
    gMotorVars.UserErrorCode	enum unknown	USER_ErrorCode_NoError	0x000000CF@Data	
    gMotorVars.CtrlVersion	struct _CTRL_Version_	{...}	0x000000D0@Data	
    gMotorVars.Flag_enableSys	unsigned char	.	0x000000C0@Data	
    gMotorVars.Flag_Run_Identify	unsigned char	.	0x000000C1@Data	
    gMotorVars.Flag_enableForceAngle	unsigned char	.	0x000000C3@Data	
    gMotorVars.Flag_enablePowerWarp	unsigned char	.	0x000000C8@Data	
    gMotorVars.CtrlState	enum unknown	CTRL_State_OnLine	0x000000CD@Data	
    gMotorVars.EstState	enum unknown	EST_State_OnLine	0x000000CE@Data	
    gMotorVars.SpeedRef_krpm	long	-0.9143066406 (Q-Value(24))	0x000000DA@Data	
    gMotorVars.MaxAccel_krpmps	long	5.0 (Q-Value(24))	0x000000DE@Data	
    gMotorVars.Speed_krpm	long	-0.8941062093 (Q-Value(24))	0x000000E0@Data	
    gMotorVars.Torque_lbin	unknown	Error: member 'Torque_lbin' not found 	at (gMotorVars).Torque_lbin 	
    gMotorVars.MagnCurr_A	float	0.0	0x000000EC@Data	
    gMotorVars.Rr_Ohm	float	0.0	0x000000EE@Data	
    gMotorVars.Rs_Ohm	float	0.138	0x000000F0@Data	
    gMotorVars.Lsd_H	float	0.00015	0x000000F4@Data	
    gMotorVars.Lsq_H	float	0.00015	0x000000F6@Data	
    gMotorVars.Flux_VpHz	float	0.05949756	0x000000F8@Data	
    gMotorVars.I_bias	struct _MATH_vec3_	{...}	0x0000011E@Data	
    gMotorVars.V_bias	struct _MATH_vec3_	{...}	0x00000124@Data	
    gMotorVars.VdcBus_kV	long	0.02835804224 (Q-Value(24))	0x00000116@Data	
    gDrvSpi8301Vars	unknown	Error: identifier not found: gDrvSpi8301Vars	
    Add new expression	

  • Hi Kusti,

    You do not need the CCS debugger for the information requested.

    Did you monitor the nFAULT pin? Did it change from a logic one to a low zero? If it did, please read the status registers to determine the cause of the fault.
  • Oops, did not grasp that. Ok, I will check the nFAULT tomorrow ... I will need the debugger to read the status reg though ;) so good that I have that up and running now.

    cheers Kusti
  • Hi,

    first of all, I'm using DRV8305 not 8301 as I wrongly stated, sorry about that.

    I checked the nFAULT LED and indeed it turns ON when the system fails.

    I tried to look at the status registers but did not get that to function (I think).

    In CCS Expressions tab I show the gDrvSpi8305Vars variable, but all the

    Stat_Reg_01 - Stat_Reg_04 show all the status bits as 1 regardless of 

    what I do, see below:

    I verified that the main loop (in proj_lab05b.c) goes through the read/write SPI stuff around line 479:

    #ifdef DRV8305_SPI
        	debug[0]++;
            HAL_writeDrvData(halHandle,&gDrvSpi8305Vars);
        	gDrvSpi8305Vars.ReadCmd = 1;
            HAL_readDrvData(halHandle,&gDrvSpi8305Vars);
    #endif
    

    I can see in the Expressions tab my debug[0] keeps counting up. 

    Also tried (as it was originally) without ReadCmd=1.

    I must be missing something very basic but what?

    wbr Kusti

     

  • Hi,



    first of all, I'm using DRV8305 not 8301 as I wrongly stated, sorry about that.

    I checked the nFAULT LED and indeed it turns ON when the system fails.

    I tried to look at the status registers but did not get that to function (I think).

    In CCS Expressions tab I show the gDrvSpi8305Vars variable, but all the

    Stat_Reg_01 - Stat_Reg_04 show all the status bits as 1 regardless of

    what I do, see below


    I verified that the main loop (in proj_lab05b.c) goes through the read/write SPI stuff around line 479:

    #ifdef DRV8305_SPI
    debug[0]++;
    HAL_writeDrvData(halHandle,&gDrvSpi8305Vars);
    gDrvSpi8305Vars.ReadCmd = 1;
    HAL_readDrvData(halHandle,&gDrvSpi8305Vars);
    #endif
    I can see in the Expressions tab my debug[0] keeps counting up.

    Also tried (as it was originally) without ReadCmd=1.

    I must be missing something very basic but what?


    wbr Kusti
  • Hi,

    first of all, I'm using DRV8305 not 8301 as I wrongly stated, sorry about that.

    I checked the nFAULT LED and indeed it turns ON when the system fails.

    I tried to look at the status registers but did not get that to function (I think).

    In CCS Expressions tab I show the gDrvSpi8305Vars variable, but all the

    Stat_Reg_01 - Stat_Reg_04 show all the status bits as 1 regardless of

    what I do, see below

    I verified that the main loop (in proj_lab05b.c) goes through the read/write SPI stuff around line 479:

    #ifdef DRV8305_SPI

        debug[0]++;

           HAL_writeDrvData(halHandle,&gDrvSpi8305Vars);

        gDrvSpi8305Vars.ReadCmd = 1;

           HAL_readDrvData(halHandle,&gDrvSpi8305Vars);

    #endif

    I can see in the Expressions tab my debug[0] keeps counting up.

    Also tried (as it was originally) without ReadCmd=1.

    I must be missing something very basic but what?

    wbr Kusti

  • Hi Kusti,

    Thanks for the clarification.

    It is difficult to determine, but the reading of the registers may be all 1's. It is recommended to try to read a register prior to motor operation to confirm the SPI transactions are correct.

    Once the SPI reads are confirmed to be correct, the registers can be read after the fault to determine the reason for the fault.