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.

MCF8315A: HW_LOCK_ILIMIT

Part Number: MCF8315A

Hi,

I'm trying to spin my motor with the EVM (BLDC, nominal torque 2mNm).

Vdc = 24V.

Motor starts spinning, after about 30sec the motor stops and the fault is HW_LOCK_ILIMIT.

I've tried to set Kp and Ki to zero as suggested by the GUI, unfortunately the motor starts spinning and stops after ~30secs.

What can cause this fault?

Thanks,

Shlomi

  • Hi Shlomi,

    Did you run the MPET to measure the motor parameters? Can you share the register config file? You can download the file by clicking File--> Save registers. 

    Regards,

    Vishnu

  • Hi Vishnu,

    I think the MPET is running automatically at the start, when I'm issuing a non zero speed command (tried analog, and with I2C).

    Below is the config file.

    {
      "signature": "oneui-register-data",
      "data": [
        [
          {
            "idx": 0,
            "id": "isd_config",
            "value": "0x64738C20"
          },
          {
            "idx": 1,
            "id": "rev_drive_config",
            "value": "0xA8200000"
          },
          {
            "idx": 2,
            "id": "motor_startup1",
            "value": "0x0B6807D0"
          },
          {
            "idx": 3,
            "id": "motor_startup2",
            "value": "0xA306600C"
          },
          {
            "idx": 4,
            "id": "closed_loop1",
            "value": "0x0D3201B5"
          },
          {
            "idx": 5,
            "id": "closed_loop2",
            "value": "0x9BADDBB4"
          },
          {
            "idx": 6,
            "id": "closed_loop3",
            "value": "0x1F800004"
          },
          {
            "idx": 7,
            "id": "closed_loop4",
            "value": "0x2F000FF0"
          },
          {
            "idx": 8,
            "id": "speed_profiles1",
            "value": "0x00000000"
          },
          {
            "idx": 9,
            "id": "speed_profiles2",
            "value": "0x00000000"
          },
          {
            "idx": 10,
            "id": "speed_profiles3",
            "value": "0x00000000"
          },
          {
            "idx": 11,
            "id": "speed_profiles4",
            "value": "0x800D0000"
          },
          {
            "idx": 12,
            "id": "speed_profiles5",
            "value": "0x00000000"
          },
          {
            "idx": 13,
            "id": "speed_profiles6",
            "value": "0x00000000"
          }
        ],
        [
          {
            "idx": 0,
            "id": "algo_ctrl1",
            "value": "0x00000000"
          },
          {
            "idx": 1,
            "id": "algo_debug1",
            "value": "0x00000000"
          },
          {
            "idx": 2,
            "id": "algo_debug2",
            "value": "0x00000020"
          },
          {
            "idx": 3,
            "id": "current_pi",
            "value": "0x00330174"
          },
          {
            "idx": 4,
            "id": "speed_pi",
            "value": "0x03180231"
          },
          {
            "idx": 5,
            "id": "dac_1",
            "value": "0x00000000"
          },
          {
            "idx": 6,
            "id": "dac_2",
            "value": "0x00000000"
          }
        ],
        [
          {
            "idx": 0,
            "id": "algorithm_state",
            "value": "0x00000010"
          },
          {
            "idx": 1,
            "id": "fg_speed_fdbk",
            "value": "0x015648EE"
          },
          {
            "idx": 2,
            "id": "bus_current",
            "value": "0x000A3C24"
          },
          {
            "idx": 3,
            "id": "phase_current_a",
            "value": "0x00000000"
          },
          {
            "idx": 4,
            "id": "phase_current_b",
            "value": "0x00040000"
          },
          {
            "idx": 5,
            "id": "phase_current_c",
            "value": "0xFFFE0000"
          },
          {
            "idx": 6,
            "id": "csa_gain_feedback",
            "value": "0x00000001"
          },
          {
            "idx": 7,
            "id": "voltage_gain_feedback",
            "value": "0x00000001"
          },
          {
            "idx": 8,
            "id": "vm_voltage",
            "value": "0x02620000"
          },
          {
            "idx": 9,
            "id": "phase_voltage_va",
            "value": "0x0019FB13"
          },
          {
            "idx": 10,
            "id": "phase_voltage_vb",
            "value": "0x000376CF"
          },
          {
            "idx": 11,
            "id": "phase_voltage_vc",
            "value": "0x0081E75F"
          },
          {
            "idx": 12,
            "id": "sin_commutation_angle",
            "value": "0x07A09098"
          },
          {
            "idx": 13,
            "id": "cos_commutation_angle",
            "value": "0xFD990D3A"
          },
          {
            "idx": 14,
            "id": "ialpha",
            "value": "0xFFC00000"
          },
          {
            "idx": 15,
            "id": "ibeta",
            "value": "0xFFF224C2"
          },
          {
            "idx": 16,
            "id": "valpha",
            "value": "0xFF91DAB8"
          },
          {
            "idx": 17,
            "id": "vbeta",
            "value": "0xFFEC7349"
          },
          {
            "idx": 18,
            "id": "id",
            "value": "0x00035650"
          },
          {
            "idx": 19,
            "id": "iq",
            "value": "0x00414EDE"
          },
          {
            "idx": 20,
            "id": "vd",
            "value": "0x000E7271"
          },
          {
            "idx": 21,
            "id": "vq",
            "value": "0x006EFAAD"
          },
          {
            "idx": 22,
            "id": "iq_ref_rotor_align",
            "value": "0x00000000"
          },
          {
            "idx": 23,
            "id": "speed_ref_open_loop",
            "value": "0x00000000"
          },
          {
            "idx": 24,
            "id": "iq_ref_open_loop",
            "value": "0x00AD49FC"
          },
          {
            "idx": 25,
            "id": "speed_ref_closed_loop",
            "value": "0x015136FA"
          },
          {
            "idx": 26,
            "id": "id_ref_closed_loop",
            "value": "0x00000000"
          },
          {
            "idx": 27,
            "id": "iq_ref_closed_loop",
            "value": "0x00482FFD"
          },
          {
            "idx": 28,
            "id": "isd_state",
            "value": "0x00000000"
          },
          {
            "idx": 29,
            "id": "isd_speed",
            "value": "0x0150BBA2"
          },
          {
            "idx": 30,
            "id": "ipd_state",
            "value": "0x00000000"
          },
          {
            "idx": 31,
            "id": "ipd_angle",
            "value": "0x00000000"
          },
          {
            "idx": 32,
            "id": "ed",
            "value": "0x00031018"
          },
          {
            "idx": 33,
            "id": "eq",
            "value": "0x0056A56A"
          },
          {
            "idx": 34,
            "id": "speed_fdbk",
            "value": "0x014050DD"
          },
          {
            "idx": 35,
            "id": "theta_est",
            "value": "0x02637240"
          }
        ],
        [
          {
            "idx": 0,
            "id": "fault_config1",
            "value": "0x28000000"
          },
          {
            "idx": 1,
            "id": "fault_config2",
            "value": "0xF0D00888"
          }
        ],
        [
          {
            "idx": 0,
            "id": "gate_driver_fault_status",
            "value": "0x00000000"
          },
          {
            "idx": 1,
            "id": "controller_fault_status",
            "value": "0x80040000"
          }
        ],
        [
          {
            "idx": 0,
            "id": "pin_config",
            "value": "0x00000000"
          },
          {
            "idx": 1,
            "id": "device_config1",
            "value": "0x00101462"
          },
          {
            "idx": 2,
            "id": "device_config2",
            "value": "0xC000F00F"
          },
          {
            "idx": 3,
            "id": "peri_config1",
            "value": "0xC1C01F00"
          },
          {
            "idx": 4,
            "id": "gd_config1",
            "value": "0x9C450100"
          },
          {
            "idx": 5,
            "id": "gd_config2",
            "value": "0x80200000"
          }
        ],
        [
          {
            "idx": 0,
            "id": "int_algo_1",
            "value": "0xA433407D"
          },
          {
            "idx": 1,
            "id": "int_algo_2",
            "value": "0x000001A7"
          }
        ],
        [
          {
            "idx": 0,
            "id": "algo_status",
            "value": "0x17727B84"
          },
          {
            "idx": 1,
            "id": "mtr_params",
            "value": "0x00000000"
          },
          {
            "idx": 2,
            "id": "algo_status_mpet",
            "value": "0x10000000"
          }
        ]
      ]
    }

    Thanks,

    Shlomi

  • Shlomi,

    Hardware lock current limit is set to 0.125A. Please set this to a value greater than the rated current of the motor.

    Regards,

    Vishnu

  • Hi Vishnu,

    Thanks, it worked!

    Continuing forward with our setup, we want to use our speed loop, meaning bypass the internal speed ctrl.

    Using only the torque control of the MCF8315A.

    How can I send you an image to explain it better?

    Thanks,

    Shlomi

  • Hi Shlomi,

    I understood your request. This can be achieved by disabling the speed loop (SPEED_LOOP_DIS bit in CLOSED_LOOP1 register). Maximum value for Torque reference can be programmed in ILIMIT (Register name: FAULT_CONFIG1 bit 27-30) and the torque can be commanded by changing the PWM duty cycle/analog voltage (applied to the SPEED pin) or via I2C depending on how the SPEED_MODE is configured.

    Regards,

    Vishnu

  • Hi Vishnu,

    It seems to work. We succeeded to set Kp_curr=1 ; Ki_curr=500.

    Is there a way to decrease further Kp? (below 1), In order to have higher BW for the current loop.

    Thanks,

    Shlomi

  • Shlomi,

    Unfortunately, we cannot decrease Kp below 1. Can you try setting the PWM output frequency to 55 kHz.?

    Regards,

    Vishnu

  • Ok Vishnu, so we increased the PWM frequency to 55KHz and even to 75KHz.

    We need Ki/Kp to be around ~5000. Is this even possible?

    (The max ratio now is 1023)

    Thanks, Shlomi

  • Shlomi,

    Unfortunately we cannot modify the range of Kp and Ki. 

    Regards,

    Vishnu

  • Hi Shlomi, 

    Please let us know if you require further assistance on this debug. 

    If not, please help mark thread as resolved. Thanks 

    Best Regards, 
    Andrew 

  • Hi,

    We have another question relating to the Ki and Kp values.

    The register value transformation is not clear, from the data sheet:

    "10-bit value for current Iq and Id loop Kp. Kp = 8LSB of CURR_LOOP_KP / 10^2MSB of CURR_LOOP_KP"

    For example, Kp in the gui is 1, while the register value is 0x128.

    Thanks,

    Shlomi

  • Shlomi,

    Current Kp and Ki values can be read back from CURRENT_PI register (address: 0x000000F0). Did you read the Kp and Ki from this register?

    Regards,

    Vishnu

  • Yes, thanks, already found it.