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.

MCF8316AEVM: Startup issues in firmware

Part Number: MCF8316AEVM
Other Parts Discussed in Thread: MCF8316A

Tool/software:

Hello,

I am trying to use Motor Studio and a MCF8316AEVM to spin up a 3-phase BLDC motor. Running into issues in Motor Studio "Quick Spin". 

There is a drop down menu to select a JSON file type to load default parameters to the eval board. I found a JSON file for the MCF8316C in one thread on the E2E forums. I downloaded and tried loading into the GUI but get an invalid file pop-up. Can you please supply a JSON file for the MCF8316A?

  • Hi Joe,

    Here is a default register configuration for the MCF8316A.

    {
    "signature":"oneui-register-data",
    "data":[
    [
    {
    "idx":0,
    "id":"ISD_CONFIG",
    "value":"0x44638C20",
    "addr":"0x00000080"
    },
    {
    "idx":1,
    "id":"REV_DRIVE_CONFIG",
    "value":"0x283AF064",
    "addr":"0x00000082"
    },
    {
    "idx":2,
    "id":"MOTOR_STARTUP1",
    "value":"0x0B6807D0",
    "addr":"0x00000084"
    },
    {
    "idx":3,
    "id":"MOTOR_STARTUP2",
    "value":"0x23066000",
    "addr":"0x00000086"
    },
    {
    "idx":4,
    "id":"CLOSED_LOOP1",
    "value":"0x0C3181B0",
    "addr":"0x00000088"
    },
    {
    "idx":5,
    "id":"CLOSED_LOOP2",
    "value":"0x1AAD0000",
    "addr":"0x0000008A"
    },
    {
    "idx":6,
    "id":"CLOSED_LOOP3",
    "value":"0x00000000",
    "addr":"0x0000008C"
    },
    {
    "idx":7,
    "id":"CLOSED_LOOP4",
    "value":"0x0000012C",
    "addr":"0x0000008E"
    },
    {
    "idx":8,
    "id":"SPEED_PROFILES1",
    "value":"0x00000000",
    "addr":"0x00000094"
    },
    {
    "idx":9,
    "id":"SPEED_PROFILES2",
    "value":"0x00000000",
    "addr":"0x00000096"
    },
    {
    "idx":10,
    "id":"SPEED_PROFILES3",
    "value":"0x00000000",
    "addr":"0x00000098"
    },
    {
    "idx":11,
    "id":"SPEED_PROFILES4",
    "value":"0x00000000",
    "addr":"0x0000009A"
    },
    {
    "idx":12,
    "id":"SPEED_PROFILES5",
    "value":"0x00000000",
    "addr":"0x0000009C"
    },
    {
    "idx":13,
    "id":"SPEED_PROFILES6",
    "value":"0x00000000",
    "addr":"0x0000009E"
    }
    ],
    [
    {
    "idx":0,
    "id":"FAULT_CONFIG1",
    "value":"0x5FE80206",
    "addr":"0x00000090"
    },
    {
    "idx":1,
    "id":"FAULT_CONFIG2",
    "value":"0x74000000",
    "addr":"0x00000092"
    }
    ],
    [
    {
    "idx":0,
    "id":"INT_ALGO_1",
    "value":"0x00B3407D",
    "addr":"0x000000A0"
    },
    {
    "idx":1,
    "id":"INT_ALGO_2",
    "value":"0x000001A7",
    "addr":"0x000000A2"
    }
    ],
    [
    {
    "idx":0,
    "id":"PIN_CONFIG",
    "value":"0x00000000",
    "addr":"0x000000A4"
    },
    {
    "idx":1,
    "id":"DEVICE_CONFIG1",
    "value":"0x00100000",
    "addr":"0x000000A6"
    },
    {
    "idx":2,
    "id":"DEVICE_CONFIG2",
    "value":"0x0000B000",
    "addr":"0x000000A8"
    },
    {
    "idx":3,
    "id":"PERI_CONFIG1",
    "value":"0x40000000",
    "addr":"0x000000AA"
    },
    {
    "idx":4,
    "id":"GD_CONFIG1",
    "value":"0x0C000100",
    "addr":"0x000000AC"
    },
    {
    "idx":5,
    "id":"GD_CONFIG2",
    "value":"0x00200000",
    "addr":"0x000000AE"
    }
    ],
    [
    {
    "idx":0,
    "id":"GATE_DRIVER_FAULT_STATUS",
    "value":"0x00000000",
    "addr":"0x000000E0"
    },
    {
    "idx":1,
    "id":"CONTROLLER_FAULT_STATUS",
    "value":"0x00000000",
    "addr":"0x000000E2"
    }
    ],
    [
    {
    "idx":0,
    "id":"ALGO_STATUS",
    "value":"0x00000000",
    "addr":"0x000000E4"
    },
    {
    "idx":1,
    "id":"MTR_PARAMS",
    "value":"0x00000000",
    "addr":"0x000000E6"
    },
    {
    "idx":2,
    "id":"ALGO_STATUS_MPET",
    "value":"0x00000000",
    "addr":"0x000000E8"
    }
    ],
    [
    {
    "idx":0,
    "id":"ALGO_CTRL1",
    "value":"0x00000000",
    "addr":"0x000000EA"
    }
    ],
    [
    {
    "idx":0,
    "id":"ALGO_DEBUG1",
    "value":"0x00000000",
    "addr":"0x000000EC"
    },
    {
    "idx":1,
    "id":"ALGO_DEBUG2",
    "value":"0x00000000",
    "addr":"0x000000EE"
    },
    {
    "idx":2,
    "id":"CURRENT_PI",
    "value":"0x00000000",
    "addr":"0x000000F0"
    },
    {
    "idx":3,
    "id":"SPEED_PI",
    "value":"0x00000000",
    "addr":"0x000000F2"
    },
    {
    "idx":4,
    "id":"DAC_1",
    "value":"0x00000000",
    "addr":"0x000000F4"
    },
    {
    "idx":5,
    "id":"DAC_2",
    "value":"0x00000000",
    "addr":"0x000000F6"
    }
    ],
    [
    {
    "idx":0,
    "id":"ALGORITHM_STATE",
    "value":"0x00000000",
    "addr":"0x00000210"
    },
    {
    "idx":1,
    "id":"FG_SPEED_FDBK",
    "value":"0x00000000",
    "addr":"0x00000216"
    },
    {
    "idx":2,
    "id":"BUS_CURRENT",
    "value":"0x00000000",
    "addr":"0x00000410"
    },
    {
    "idx":3,
    "id":"PHASE_CURRENT_A",
    "value":"0x00000000",
    "addr":"0x0000043E"
    },
    {
    "idx":4,
    "id":"PHASE_CURRENT_B",
    "value":"0x00000000",
    "addr":"0x00000440"
    },
    {
    "idx":5,
    "id":"PHASE_CURRENT_C",
    "value":"0x00000000",
    "addr":"0x00000442"
    },
    {
    "idx":6,
    "id":"CSA_GAIN_FEEDBACK",
    "value":"0x00000000",
    "addr":"0x00000466"
    },
    {
    "idx":7,
    "id":"VOLTAGE_GAIN_FEEDBACK",
    "value":"0x00000000",
    "addr":"0x00000476"
    },
    {
    "idx":8,
    "id":"VM_VOLTAGE",
    "value":"0x00000000",
    "addr":"0x0000047A"
    },
    {
    "idx":9,
    "id":"PHASE_VOLTAGE_VA",
    "value":"0x00000000",
    "addr":"0x0000047E"
    },
    {
    "idx":10,
    "id":"PHASE_VOLTAGE_VB",
    "value":"0x00000000",
    "addr":"0x00000480"
    },
    {
    "idx":11,
    "id":"PHASE_VOLTAGE_VC",
    "value":"0x00000000",
    "addr":"0x00000482"
    },
    {
    "idx":12,
    "id":"SIN_COMMUTATION_ANGLE",
    "value":"0x00000000",
    "addr":"0x000004BA"
    },
    {
    "idx":13,
    "id":"COS_COMMUTATION_ANGLE",
    "value":"0x00000000",
    "addr":"0x000004BC"
    },
    {
    "idx":14,
    "id":"IALPHA",
    "value":"0x00000000",
    "addr":"0x000004D4"
    },
    {
    "idx":15,
    "id":"IBETA",
    "value":"0x00000000",
    "addr":"0x000004D6"
    },
    {
    "idx":16,
    "id":"VALPHA",
    "value":"0x00000000",
    "addr":"0x000004D8"
    },
    {
    "idx":17,
    "id":"VBETA",
    "value":"0x00000000",
    "addr":"0x000004DA"
    },
    {
    "idx":18,
    "id":"ID",
    "value":"0x00000000",
    "addr":"0x000004E4"
    },
    {
    "idx":19,
    "id":"IQ",
    "value":"0x00000000",
    "addr":"0x000004E6"
    },
    {
    "idx":20,
    "id":"VD",
    "value":"0x00000000",
    "addr":"0x000004E8"
    },
    {
    "idx":21,
    "id":"VQ",
    "value":"0x00000000",
    "addr":"0x000004EA"
    },
    {
    "idx":22,
    "id":"IQ_REF_ROTOR_ALIGN",
    "value":"0x00000000",
    "addr":"0x00000524"
    },
    {
    "idx":23,
    "id":"SPEED_REF_OPEN_LOOP",
    "value":"0x00000000",
    "addr":"0x0000053A"
    },
    {
    "idx":24,
    "id":"IQ_REF_OPEN_LOOP",
    "value":"0x00000000",
    "addr":"0x00000548"
    },
    {
    "idx":25,
    "id":"SPEED_REF_CLOSED_LOOP",
    "value":"0x00000000",
    "addr":"0x000005CC"
    },
    {
    "idx":26,
    "id":"ID_REF_CLOSED_LOOP",
    "value":"0x00000000",
    "addr":"0x000005FC"
    },
    {
    "idx":27,
    "id":"IQ_REF_CLOSED_LOOP",
    "value":"0x00000000",
    "addr":"0x000005FE"
    },
    {
    "idx":28,
    "id":"ISD_STATE",
    "value":"0x00000000",
    "addr":"0x0000067A"
    },
    {
    "idx":29,
    "id":"ISD_SPEED",
    "value":"0x00000000",
    "addr":"0x00000684"
    },
    {
    "idx":30,
    "id":"IPD_STATE",
    "value":"0x00000000",
    "addr":"0x000006B8"
    },
    {
    "idx":31,
    "id":"IPD_ANGLE",
    "value":"0x00000000",
    "addr":"0x000006FC"
    },
    {
    "idx":32,
    "id":"ED",
    "value":"0x00000000",
    "addr":"0x00000742"
    },
    {
    "idx":33,
    "id":"EQ",
    "value":"0x00000000",
    "addr":"0x00000744"
    },
    {
    "idx":34,
    "id":"SPEED_FDBK",
    "value":"0x00000000",
    "addr":"0x00000752"
    },
    {
    "idx":35,
    "id":"THETA_EST",
    "value":"0x00000000",
    "addr":"0x00000756"
    }
    ]
    ]
    }

    Regards,

    Joshua

  • Thanks Joshua,

    Does this json file control the max speed the motor can spin? There appears to be a field to enter max speed for the motor. When I try to drive my motor at 70k rpm the max I get out of it seems to be 45k based on the speed feedback. It looks like the GUI is setting the closed loop speed to be 75k but the motor only gets to 45k...

    The motor parameters from the datasheet are as follows:

    # of Pole Pairs: 1 pole pair

    Max Speed: 120k rpm

    Terminal Resistance: 0.576 ohms

    Terminal Inductance: 0.0135 mH

    25W motor driving at 18V - so expected max continuous current is ~1.5A.

  • Hi Joe,

    This default configuration will set the Max Speed of the motor to be 50 Hz so this will have to be set to your desired max speed using the following options:

    Can you enable Voltage Magnitude in the Motor Status section and Saturation Flags in the fault configuration? If the current loop flag is being shown then increasing the ILIMIT current limit will allow the MCF8316A to provide more current to the motor. if the voltage magnitude is not reaching 100% then more voltage may need to be provided to allow the motor to spin faster,

    Please also use an oscilloscope to monitor the VM voltage to monitor for drops in voltage and the phase current for oscillations.

    Regards,

    Joshua

  • Hi Joshua,

    Thanks for all the help!

    I figured out the motor I was using was a 45k max motor (I thought it was 75k). I now have the 75k motor. I am able to run the configuration of the MPET successfully by altering the configuration of registers for limits.

    When I try to use the I2C speed control and bring the motor up to even 25% speed 2x faults get triggered. "CONTROLLER_FAULT" and "HW_LOCK_LIMIT". I don't understand how to move past this issue since I am able to configure the motor / GUI successfully but then can't exercise the motor to any useful state.

    Edit: When I try to go back and run the MPET again on the same exact setup I get a plethora of faults. I took a picture of the MPET results when it was successful so I wouldn't lose it. 

    Resistance: 0.48

    Inductance: 0.01

    BEMF: 5.00

    Kp: 0.35

    Ki: 0.35

  • Hi Joe,

    1. When you re-attempt MPET did you power cycle the MCF8316AEVM and re-program the register configuration. Can you do this if you have not tried this already? Sometimes the experiences a power cycle due to VM dipping and the EEPROM configuration is loaded which can lead to faults.
    2. Does the motor move at all when given a speed command?
    3. Can you tell me what the text is on the top of the die of the MCF8316 on the EVM?
    4. Can you enable IQ_RAMP_EN? this will help to smooth the current during the handoff from open to closed loop
    5. Can you provide a capture of the phase current, nFault signal, and VM voltage starting from when the motor is given a speed command to when the fault occurs?

    Regards,

    Joshua 

  • 1) Backed out of the GUI completely. Perhaps didn't power cycle.

    2) For a split second yes.

    3) PMCF / 8316C1V / TI 358 / AHP4 G4

    4) I will give this a try.

    5) I can certainly try.

  • Hi Joe,

    Can you monitor the Algorithm State in the Motor Status box and check what the last reported state is before the motor faults? Given the motor is able to move, I suspect that the fault is occurring during MOTOR_CLOSED_LOOP_UNALIGNED which is the handoff period. If you can provide the capture of the phase current, VM, etc. that I requested, I can check if VM is dipping and where/what is leading to the HW_LOCK_ILIMIT being reached. 

    During this algorithm state, the MCF8316C will align the measured rotor angle so that it matches the algorithms estimated rotor angle. If IQ_RAMP_EN is disabled, the current can spike during this algorithm state leading to a HW_LOCK_ILIMIT fault. If this is the case, you could also try decreasing the THETA_ERROR_RAMP_RATE to slow down this transition period (I recommend trying 0.1 deg/msec) and/or decrease the OPEN_LOOP_CURRENT limit.

    Regards,

    Joshua

  • Above is Phase A voltage and current. Yellow = current with 5A / div. Blue = voltage with 5V / div.

    Below is what Phase B and C voltage and current look like. Again yellow and blue are current and voltage respectively.

    These are when the motor is attempting to spin up using the I2C commands after running a successful MPET. It reaches some speed and then triggers a HW_LOCK_LIMIT fault. You can tell from the scope captures where the motor stops spinning and goes into brake or standby mode.

    EDIT: I decreased the ALIGN_SLOW_RAMP_RATE from the default 25A/s to 1A/s and decreased the ALIGN_TIME from 3s to 10ms. This seems to kick the motor into closed loop mode fast enough to avoid tripping any faults. I am now able to spin the motor at the expected speed! Thanks for sticking with me!

  • That is great that you were able to get the motor to spin at full speed!

    If you require any further assistance, please create a new thread and we will make sure to assist you as best we can.

    Regards,

    Joshua