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.

DRV10983: Fault3 (no motor) error

Part Number: DRV10983

Dear SIr,

I have a some question for working DRV10983.
1. DRV10983EVM can control motor speed to change BEMF value per frequency?
2. I checked to work for using  (DRV10983EVM + our motor).
but it occurred fault.3 error(no motor) for our board.
could you please check below code, what is problem.

==================================================================

#include "stm32f7xx_hal.h"

#define DRV10983_I2C_PORT hi2c2
#define DRV10983_I2C_ADDR 0xA4
#define SPEED_CNTL_ANALOG   0
#define SPEED_CNTL_PWM      1
#define SPEED_CNTL_I2C      2
#define REG_LOCK            0
#define REG_UNLOCK          1
//Register Address
#define SpeedCtrl1      0x00
#define SpeedCtrl2      0x01
#define DevCtrl         0x02
#define EECtrl          0x03
#define Status          0x10
#define MotorSpeed1     0x11
#define MotorSpeed2     0x12
#define MotorPeriod1    0x13
#define MotorPeriod2    0x14
#define MotorKt1        0x15
#define MotorKt2        0x16
#define IPDPosition     0x19
#define SupplyVoltage   0x1A
#define SpeedCmd        0x1B
#define SpdCmdBuffer    0x1C
#define FaultCode       0x1E
#define MotorParam1     0x20
#define MotorParam2     0x21
#define MotorParam3     0x22
#define SysOpt1         0x23
#define SysOpt2         0x24
#define SysOpt3         0x25
#define SysOpt4         0x26
#define SysOpt5         0x27
#define SysOpt6         0x28
#define SysOpt7         0x29
#define SysOpt8         0x2A
#define SysOpt9         0x2B
extern I2C_HandleTypeDef DRV10983_I2C_PORT;
uint32_t drv10983_control_init(void);
uint32_t drv10983_i2c_write(uint8_t reg_addr,uint8_t reg_value);
uint32_t drv10983_i2c_read(uint8_t reg_addr,uint16_t *reg_value,uint8_t length);
uint32_t drv10983_speed_control_mode(uint8_t mode);
uint32_t drv10983_lock_mode(uint8_t mode);
====================================================================
#include "drv10983.h"
uint8_t speed_mode = 0x00;
uint32_t drv10983_control_init(void)
{
    HAL_StatusTypeDef i2c_ack;
    uint32_t ack_sum = 0;
    ack_sum += drv10983_lock_mode(REG_UNLOCK);
    HAL_Delay(10);
    ack_sum += drv10983_speed_control_mode(SPEED_CNTL_PWM);
    HAL_Delay(10);
    ack_sum += drv10983_i2c_write(MotorParam1,    0x4C); //{0x20,0x49}4C
    HAL_Delay(10);
    ack_sum += drv10983_i2c_write(MotorParam2,    0x2E); //{0x21,0x2A}3A
    HAL_Delay(10);
    ack_sum += drv10983_i2c_write(MotorParam3,    0x2A); //{0x22,0x2A}2A
    HAL_Delay(10);
    ack_sum += drv10983_i2c_write(SysOpt1,        0x00); //{0x23,0x00}00
    HAL_Delay(10);
    ack_sum += drv10983_i2c_write(SysOpt2,        0x78); //{0x24,0xF8}78
    HAL_Delay(10);
    ack_sum += drv10983_i2c_write(SysOpt3,        0xFF); //{0x25,0xFF}FF
    HAL_Delay(10);
    ack_sum += drv10983_i2c_write(SysOpt4,        0xA1); //{0x26,0x99}A1
    HAL_Delay(10);
    ack_sum += drv10983_i2c_write(SysOpt5,        0xFC); //{0x27,0xFC}FC
    HAL_Delay(10);
    ack_sum += drv10983_i2c_write(SysOpt6,        0xEF); //{0x28,0xAD}EF
    HAL_Delay(10);
    ack_sum += drv10983_i2c_write(SysOpt7,        0xF7); //{0x29,0xF7}E7 E9
    HAL_Delay(10);
    ack_sum += drv10983_i2c_write(SysOpt8,        0x0D); //{0x2A,0x0D}0D
    HAL_Delay(10);
    ack_sum += drv10983_i2c_write(SysOpt9,        (0x0C + speed_mode) ); //{0x2B,0x0D}0C
    HAL_Delay(10);
    return ack_sum;
}
uint32_t drv10983_i2c_write(uint8_t reg_addr,uint8_t reg_value)
{
    HAL_StatusTypeDef i2c_ack;
    i2c_ack = HAL_I2C_Mem_Write(&DRV10983_I2C_PORT,DRV10983_I2C_ADDR,reg_addr,1,&reg_value,1,10);
    return i2c_ack;
}
uint32_t drv10983_i2c_read(uint8_t reg_addr,uint16_t *reg_value16,uint8_t length)
{
    HAL_StatusTypeDef i2c_ack;
    uint8_t reg_value;
    if(length == 1)
    {
        i2c_ack = HAL_I2C_Mem_Read(&DRV10983_I2C_PORT,DRV10983_I2C_ADDR,reg_addr,1,&reg_value,1,10);
        *reg_value16 = reg_value;
        return i2c_ack;
    }
    else if(length == 2)
    {
        i2c_ack = HAL_I2C_Mem_Read(&DRV10983_I2C_PORT,DRV10983_I2C_ADDR,reg_addr,1,&reg_value,1,10);
        *reg_value16 = reg_value << 8;
        HAL_Delay(10);
        i2c_ack = HAL_I2C_Mem_Read(&DRV10983_I2C_PORT,DRV10983_I2C_ADDR,reg_addr+1,1,&reg_value,1,10);
        *reg_value16 += reg_value;
        return i2c_ack;
    }
    else
        return 0xff;
}
uint32_t drv10983_speed_control_mode(uint8_t mode)
{
    HAL_StatusTypeDef i2c_ack=0;
    if(mode == SPEED_CNTL_I2C)
     i2c_ack = drv10983_i2c_write(SpeedCtrl2,        0x80);
    else                      
     i2c_ack = drv10983_i2c_write(SpeedCtrl2,        0x00);
    if(mode == SPEED_CNTL_PWM ) speed_mode = 0x02;
    else                        speed_mode = 0x00;
    return i2c_ack;
}
uint32_t drv10983_lock_mode(uint8_t mode)
{
    HAL_StatusTypeDef i2c_ack=0;
    if(mode == REG_UNLOCK)
      i2c_ack = drv10983_i2c_write(EECtrl,        0x40);
    else                  
      i2c_ack = drv10983_i2c_write(EECtrl,        0x00);
    return i2c_ack;
}
  • Hey Dexter,

         Please correct me if I'm wrong, but I believe you're saying your problem is you're not able to get your motor to spin and get the "no motor fault" with the DRV10983.

    For just initially getting the motor to spin, I would solely use the EVM and EVM GUI, not the code.

    What is the code used for? You should be able to change the EEPROM registers and send I2C commands and spin the motor through the GUI.

    Please make sure the motor is connected to the EVM and is within this application range. Especially if the phase resistance of the motor is greater than the range, then the DRV10983 will have a no motor fault.

    Also make sure that the motor is connected to the EVM. Use these documents as references:

    1) 

    2) 

    3) 

    Let me know if this helps.

  • Dear Sir,

    it is initial code of my customer board,
    I already checked to operate motor to spin for motor + DRV10983EVM.
    Can i get to export the code in DRV10983EVM GUI?
  • So you are saying the DRV10983EVM was able to spin the motor with no problems?

    But when you use the code, you get the no motor fault error?

    Please confirm the above.

    If so, this is a code issue, which we are not experts on, but I can try to help.

    The DRV10983EVM GUI cannot export code in your format, but if you have your desired eeprom settings in the EVM GUI, you can see the list of addresses and their values to write through I2C by using the "save" button on the "Basic Settings" page of the GUI, which will save the eeprom settings as a csv file.

    zcx.csv

    To see what actions in the GUI correspond to different commands, you can go to the "script" tab in the GUI, select "Launch new window", and then in the "script" tab, click "Start Recording". Then any actions in the GUI will be recorded with the corresponding I2C EEPROM command.

    Let me know if anything is unclear

  • Dear Sanmesh,

    Yes, the DRV10983EVM was able to spin the motor with no problems. but when my customer board is not working because of 'no motor fault error'.

    do you have any example code for register setting?
  • Unfortunately we don't have example code in C. The instructions I provided showed how to get the python example of setting the registers. The only other thing I can recommend is:

    1) Make sure the customer has the motor properly connected to the DRV10983.
    2) Check the customer board to make sure the schematic is correct. Specifically check that the traces to the IC motor phases are properly connected.
    3) Make sure the customer's motor is in the "recommended application range".