cancel
Showing results for 
Search instead for 
Did you mean: 

I have a question about the microstep using the L6480 driver

EnenJ
Associate

I use L6480 stepping motor control driver. and I use microstep function (resolution 1/128)

There was a problem that the motor did not move in a certain section when the motor was driven 1 step at a time with the microstep.

This picture below is the part that doesn't work when I check the section that doesn't move with the oscilloscope.

EnenJ_0-1687487278082.png

It does not move in the square marked in red.

The circuit is the same as the Eval 6480H.

Please help me How can I Move every 1 step in every section?

 

This is my parameter.

 

/* Acceleration rate settings to cSPIN_CONF_PARAM_ACC in steps/s2, range 14.55 to 59590 steps/s2 */
cSPIN_RegsStruct.ACC = 0xE8C6;//AccDec_Steps_to_Par(cSPIN_CONF_PARAM_ACC);
/* Deceleration rate settings to cSPIN_CONF_PARAM_DEC in steps/s2, range 14.55 to 59590 steps/s2 */
cSPIN_RegsStruct.DEC = 0x1;//AccDec_Steps_to_Par(cSPIN_CONF_PARAM_DEC); 
/* Maximum speed settings to cSPIN_CONF_PARAM_MAX_SPEED in steps/s, range 15.25 to 15610 steps/s */
cSPIN_RegsStruct.MAX_SPEED = 0x3CFA;//MaxSpd_Steps_to_Par(cSPIN_CONF_PARAM_MAX_SPEED);
/* Full step speed settings cSPIN_CONF_PARAM_FS_SPD in steps/s, range 7.63 to 15625 steps/s */
cSPIN_RegsStruct.FS_SPD.data.FS_SPD = 0x3CFA;//FSSpd_Steps_to_Par(cSPIN_CONF_PARAM_FS_SPD);
 
/* Minimum speed settings to cSPIN_CONF_PARAM_MIN_SPEED in steps/s, range 0 to 976.3 steps/s */
cSPIN_RegsStruct.MIN_SPEED.data.MIN_SPEED = 0x000;//cSPIN_CONF_PARAM_LSPD_BIT|MinSpd_Steps_to_Par(cSPIN_CONF_PARAM_MIN_SPEED);
//cSPIN_RegsStruct.MIN_SPEED.data.MIN_SPEED = 0xffe;//cSPIN_CONF_PARAM_LSPD_BIT|MinSpd_Steps_to_Par(cSPIN_CONF_PARAM_MIN_SPEED);
cSPIN_RegsStruct.MIN_SPEED.data.LSPD_OPT = 0;//cSPIN_CONF_PARAM_LSPD_BIT|MinSpd_Steps_to_Par(cSPIN_CONF_PARAM_MIN_SPEED);
     /* Acceleration duty cycle (torque) settings to cSPIN_CONF_PARAM_KVAL_ACC in %, range 0 to 99.6% */
cSPIN_RegsStruct.KVAL_ACC = 0x2F;
     /* Deceleration duty cycle (torque) settings to cSPIN_CONF_PARAM_KVAL_DEC in %, range 0 to 99.6% */
cSPIN_RegsStruct.KVAL_DEC = 0x2F;
     /* Run duty cycle (torque) settings to cSPIN_CONF_PARAM_KVAL_RUN in %, range 0 to 99.6% */
cSPIN_RegsStruct.KVAL_RUN = 0x2F;
     /* Hold duty cycle (torque) settings to cSPIN_CONF_PARAM_KVAL_HOLD in %, range 0 to 99.6% */
cSPIN_RegsStruct.KVAL_HOLD = 0x2f;
       /* Thermal compensation param settings to cSPIN_CONF_PARAM_K_THERM, range 1 to 1.46875 */
cSPIN_RegsStruct.K_THERM.data = 0x0000;//KTherm_to_Par(cSPIN_CONF_PARAM_K_THERM);
/* Intersect speed settings for BEMF compensation to cSPIN_CONF_PARAM_INT_SPD in steps/s, range 0 to 3906 steps/s */
cSPIN_RegsStruct.INT_SPD = 0x9d1;//0x0274
/* BEMF start slope settings for BEMF compensation to cSPIN_CONF_PARAM_ST_SLP in % step/s, range 0 to 0.4% s/step */
cSPIN_RegsStruct.ST_SLP = 0x37;
cSPIN_RegsStruct.ST_SLP = 0x17;
/* BEMF final acc slope settings for BEMF compensation to cSPIN_CONF_PARAM_FN_SLP_ACC in% step/s, range 0 to 0.4% s/step */
cSPIN_RegsStruct.FN_SLP_ACC = 0x46;
/* BEMF final dec slope settings for BEMF compensation to cSPIN_CONF_PARAM_FN_SLP_DEC in% step/s, range 0 to 0.4% s/step */
cSPIN_RegsStruct.FN_SLP_DEC = 0x46;
/* Stall threshold settings to cSPIN_CONF_PARAM_STALL_TH in mV, range 31.25 to 1000mV */
cSPIN_RegsStruct.STALL_TH.data = 0x1F;
cSPIN_RegsStruct.STALL_TH.data = 0x14;
        /* Set Config register according to config parameters */
        /* clock setting, switch hard stop interrupt mode, */
        /*  supply voltage compensation, overcurrent shutdown */
        /* UVLO threshold, VCC reg output voltage , PWM frequency */
cSPIN_RegsStruct.CONFIG.data.OSC_SEL = 0x0;
cSPIN_RegsStruct.CONFIG.data.EXT_CLK = 0;
cSPIN_RegsStruct.CONFIG.data.SW_MODE = 1; //
cSPIN_RegsStruct.CONFIG.data.EN_VSCOMP = 0; // User disposal
cSPIN_RegsStruct.CONFIG.data.RESERVED = 0;
cSPIN_RegsStruct.CONFIG.data.OC_SD = 1; // shutdown
cSPIN_RegsStruct.CONFIG.data.UVLOVAL = 0;
cSPIN_RegsStruct.CONFIG.data.VCCVAL = 0; // 7.5V
// cSPIN_RegsStruct.CONFIG.data.VCCVAL = 1; // 15V
cSPIN_RegsStruct.CONFIG.data.F_PWM_DEC = 0x3;//
cSPIN_RegsStruct.CONFIG.data.F_PWM_INT = 0x1;
cSPIN_RegsStruct.CONFIG.data.F_PWM_DEC = 0x0;//
cSPIN_RegsStruct.CONFIG.data.F_PWM_INT = 0x6;
//  0x2E80
// cSPIN_RegsStruct.CONFIG.data16 = 0x1e81;
 
/* Overcurrent threshold settings to cSPIN_CONF_PARAM_OCD_TH, range 31.25 to 1000mV */
cSPIN_RegsStruct.OCD_TH.data = 0x1F;        
cSPIN_RegsStruct.OCD_TH.data = 0x15;        
cSPIN_RegsStruct.OCD_TH.data = 0x13;   
        /* Alarm settings to cSPIN_CONF_PARAM_ALARM_EN */
cSPIN_RegsStruct.ALARM_EN.data8 = 0xFF;
        /* Step mode and sycn mode settings via cSPIN_CONF_PARAM_SYNC_MODE and cSPIN_CONF_PARAM_STEP_MODE */
cSPIN_RegsStruct.STEP_MODE.data.STEP_SEL = 0x3;
cSPIN_RegsStruct.STEP_MODE.data.Lockbit = 0x0;
cSPIN_RegsStruct.STEP_MODE.data.SYNC_SEL = 0x0;
cSPIN_RegsStruct.STEP_MODE.data.SYNC_EN = 0x0;
 
        /* Sink/source current, duration of constant current phases, duration of overboost phase settings */
 
cSPIN_RegsStruct.GATECFG1.data.TCC = 0x1;
        cSPIN_RegsStruct.GATECFG1.data.IGATE = 0x0;
        cSPIN_RegsStruct.GATECFG1.data.TBOOST = 0x1;
        cSPIN_RegsStruct.GATECFG1.data.WD_EN = 0x0;  // 0X00e7
 
//         cSPIN_RegsStruct.GATECFG1.data16 = 0x0057;
 
        /* Blank time, Dead time stiings */
         cSPIN_RegsStruct.GATECFG2.data.TDT = 0x1;
         cSPIN_RegsStruct.GATECFG2.data.TBLANK = 0x2; // 0X0061
 

 

 

 

 

 

0 REPLIES 0