MCF8316D: Programming MCF8316D for the First Time

Part Number: MCF8316D
Other Parts Discussed in Thread: MCF8316A

Tool/software:

I have the EVM for this driver and I just received a custom PCB with this driver on it and I realized I do not know the process to program it for the first time. I am assuming it comes with nothing loaded from the factory. 

I have not delt with ICs like this before so im trying to find a good guide for getting it up and running. I have the GUI on my computer which I am using for the EVM. Any help/pointers for this would be very helpful. 

  • Hi Paul,

    Can you share me motor data sheet ? Motor parameters like max rated current, max speed  in rpm and number of poles (pole pair = number of poles / 2).

    I will share you a reference JSON, tuning guide, getting started information later.

    Thanks and Best regards

    Venkatadri S

  • The motor is custom so the specs may change but for now, Max current 4A, Max speed 10,000 RPM, number of pole pairs = 10 

  • Hi Paul,

    MCF8316D max speed is 1500Hz, for 10 pole pair the max speed is 1666Hz.

    We should be able to spin with Flux weakening or Lead angle adjustment feature in Voltage mode.

    I am programming max speed as 1500Hz for now for basic testing.

    What is the voltage rating of the motor?

    Following JSON is configured for Voltage mode, I have kept lead angle 0.

    For parameters, R, L, KE we need to run MPET.

    {
    "signature":"oneui-register-data",
    "data":[
    [
    {
    "idx":0,
    "id":"ISD_CONFIG",
    "value":"0xE4B13018",
    "addr":"0x00000080"
    },
    {
    "idx":1,
    "id":"REV_DRIVE_CONFIG",
    "value":"0x20624080",
    "addr":"0x00000082"
    },
    {
    "idx":2,
    "id":"MOTOR_STARTUP1",
    "value":"0x0B460421",
    "addr":"0x00000084"
    },
    {
    "idx":3,
    "id":"MOTOR_STARTUP2",
    "value":"0xA2822004",
    "addr":"0x00000086"
    },
    {
    "idx":4,
    "id":"CLOSED_LOOP1",
    "value":"0x0E398139",
    "addr":"0x00000088"
    },
    {
    "idx":5,
    "id":"CLOSED_LOOP2",
    "value":"0x8BAD0000",
    "addr":"0x0000008A"
    },
    {
    "idx":6,
    "id":"CLOSED_LOOP3",
    "value":"0x00000000",
    "addr":"0x0000008C"
    },
    {
    "idx":7,
    "id":"CLOSED_LOOP4",
    "value":"0x00002328",
    "addr":"0x0000008E"
    },
    {
    "idx":8,
    "id":"REF_PROFILES1",
    "value":"0x00000000",
    "addr":"0x00000094"
    },
    {
    "idx":9,
    "id":"REF_PROFILES2",
    "value":"0x00000000",
    "addr":"0x00000096"
    },
    {
    "idx":10,
    "id":"REF_PROFILES3",
    "value":"0x00000000",
    "addr":"0x00000098"
    },
    {
    "idx":11,
    "id":"REF_PROFILES4",
    "value":"0x00000000",
    "addr":"0x0000009A"
    },
    {
    "idx":12,
    "id":"REF_PROFILES5",
    "value":"0x00000000",
    "addr":"0x0000009C"
    },
    {
    "idx":13,
    "id":"REF_PROFILES6",
    "value":"0x00000000",
    "addr":"0x0000009E"
    }
    ],
    [
    {
    "idx":0,
    "id":"FAULT_CONFIG1",
    "value":"0xCEE8425F",
    "addr":"0x00000090"
    },
    {
    "idx":1,
    "id":"FAULT_CONFIG2",
    "value":"0xF1D25888",
    "addr":"0x00000092"
    }
    ],
    [
    {
    "idx":0,
    "id":"INT_ALGO_1",
    "value":"0x2423E15D",
    "addr":"0x000000A0"
    },
    {
    "idx":1,
    "id":"INT_ALGO_2",
    "value":"0x800000A3",
    "addr":"0x000000A2"
    }
    ],
    [
    {
    "idx":0,
    "id":"PIN_CONFIG",
    "value":"0x80047800",
    "addr":"0x000000A4"
    },
    {
    "idx":1,
    "id":"DEVICE_CONFIG1",
    "value":"0x00100001",
    "addr":"0x000000A6"
    },
    {
    "idx":2,
    "id":"DEVICE_CONFIG2",
    "value":"0xC000F00F",
    "addr":"0x000000A8"
    },
    {
    "idx":3,
    "id":"PERI_CONFIG1",
    "value":"0xC1041F80",
    "addr":"0x000000AA"
    },
    {
    "idx":4,
    "id":"GD_CONFIG1",
    "value":"0x1C450900",
    "addr":"0x000000AC"
    },
    {
    "idx":5,
    "id":"GD_CONFIG2",
    "value":"0x81A80000",
    "addr":"0x000000AE"
    }
    ],
    [
    {
    "idx":0,
    "id":"GATE_DRIVER_FAULT_STATUS",
    "value":"0x00000000",
    "addr":"0x000000E0"
    },
    {
    "idx":1,
    "id":"CONTROLLER_FAULT_STATUS",
    "value":"0x00000000",
    "addr":"0x000000E2"
    },
    {
    "idx":2,
    "id":"EEPROM_FAULT_STATUS",
    "value":"0x00000000",
    "addr":"0x0000024C"
    }
    ],
    [
    {
    "idx":0,
    "id":"ALGO_STATUS",
    "value":"0x00000004",
    "addr":"0x000000E4"
    },
    {
    "idx":1,
    "id":"MTR_PARAMS",
    "value":"0xC842C000",
    "addr":"0x000000E6"
    },
    {
    "idx":2,
    "id":"ALGO_STATUS_MPET",
    "value":"0xE3000000",
    "addr":"0x000000E8"
    }
    ],
    [
    {
    "idx":0,
    "id":"ALGO_CTRL1",
    "value":"0x20000000",
    "addr":"0x000000EA"
    }
    ],
    [
    {
    "idx":0,
    "id":"ALGO_DEBUG1",
    "value":"0x80000000",
    "addr":"0x000000EC"
    },
    {
    "idx":1,
    "id":"ALGO_DEBUG2",
    "value":"0x00000001",
    "addr":"0x000000EE"
    },
    {
    "idx":2,
    "id":"CURRENT_PI",
    "value":"0x01E101A3",
    "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":6,
    "id":"EEPROM_SECURITY",
    "value":"0x00000000",
    "addr":"0x000000F8"
    }
    ],
    [
    {
    "idx":0,
    "id":"ALGORITHM_STATE",
    "value":"0x00000000",
    "addr":"0x0000018E"
    },
    {
    "idx":1,
    "id":"FG_SPEED_FDBK",
    "value":"0x7FFFFFFF",
    "addr":"0x00000194"
    },
    {
    "idx":2,
    "id":"BUS_CURRENT",
    "value":"0x00000000",
    "addr":"0x0000040C"
    },
    {
    "idx":3,
    "id":"PHASE_CURRENT_A",
    "value":"0x00000000",
    "addr":"0x00000444"
    },
    {
    "idx":4,
    "id":"PHASE_CURRENT_B",
    "value":"0x00000000",
    "addr":"0x00000446"
    },
    {
    "idx":5,
    "id":"PHASE_CURRENT_C",
    "value":"0x00000000",
    "addr":"0x00000448"
    },
    {
    "idx":6,
    "id":"CSA_GAIN_FEEDBACK",
    "value":"0x00010000",
    "addr":"0x0000046C"
    },
    {
    "idx":7,
    "id":"VOLTAGE_GAIN_FEEDBACK",
    "value":"0x00020002",
    "addr":"0x00000477"
    },
    {
    "idx":8,
    "id":"VM_VOLTAGE",
    "value":"0x019A6000",
    "addr":"0x0000047C"
    },
    {
    "idx":9,
    "id":"PHASE_VOLTAGE_VA",
    "value":"0x00006ED9",
    "addr":"0x00000484"
    },
    {
    "idx":10,
    "id":"PHASE_VOLTAGE_VB",
    "value":"0x0000376C",
    "addr":"0x00000486"
    },
    {
    "idx":11,
    "id":"PHASE_VOLTAGE_VC",
    "value":"0x0000A646",
    "addr":"0x00000488"
    },
    {
    "idx":12,
    "id":"SIN_COMMUTATION_ANGLE",
    "value":"0x00000000",
    "addr":"0x000004BC"
    },
    {
    "idx":13,
    "id":"COS_COMMUTATION_ANGLE",
    "value":"0x00000000",
    "addr":"0x000004BE"
    },
    {
    "idx":14,
    "id":"IALPHA",
    "value":"0x00000000",
    "addr":"0x000004DC"
    },
    {
    "idx":15,
    "id":"IBETA",
    "value":"0x00000000",
    "addr":"0x000004DE"
    },
    {
    "idx":16,
    "id":"VALPHA",
    "value":"0x00000000",
    "addr":"0x000004E0"
    },
    {
    "idx":17,
    "id":"VBETA",
    "value":"0x00000000",
    "addr":"0x000004E2"
    },
    {
    "idx":18,
    "id":"ID",
    "value":"0x00000000",
    "addr":"0x000004EC"
    },
    {
    "idx":19,
    "id":"IQ",
    "value":"0x00000000",
    "addr":"0x000004EE"
    },
    {
    "idx":20,
    "id":"VD",
    "value":"0x00000000",
    "addr":"0x000004F0"
    },
    {
    "idx":21,
    "id":"VQ",
    "value":"0x00000000",
    "addr":"0x000004F2"
    },
    {
    "idx":22,
    "id":"IQ_REF_ROTOR_ALIGN",
    "value":"0x00000000",
    "addr":"0x0000052A"
    },
    {
    "idx":23,
    "id":"SPEED_REF_OPEN_LOOP",
    "value":"0x00000000",
    "addr":"0x00000540"
    },
    {
    "idx":24,
    "id":"IQ_REF_OPEN_LOOP",
    "value":"0x00000000",
    "addr":"0x00000550"
    },
    {
    "idx":25,
    "id":"SPEED_REF_CLOSED_LOOP",
    "value":"0x00000000",
    "addr":"0x000005D2"
    },
    {
    "idx":26,
    "id":"ID_REF_CLOSED_LOOP",
    "value":"0x00000000",
    "addr":"0x00000612"
    },
    {
    "idx":27,
    "id":"IQ_REF_CLOSED_LOOP",
    "value":"0x00000000",
    "addr":"0x00000614"
    },
    {
    "idx":28,
    "id":"ISD_STATE",
    "value":"0x00000000",
    "addr":"0x000006AE"
    },
    {
    "idx":29,
    "id":"ISD_SPEED",
    "value":"0x00000000",
    "addr":"0x000006B8"
    },
    {
    "idx":30,
    "id":"IPD_STATE",
    "value":"0x00000000",
    "addr":"0x000006EA"
    },
    {
    "idx":31,
    "id":"IPD_ANGLE",
    "value":"0x00000000",
    "addr":"0x0000072E"
    },
    {
    "idx":32,
    "id":"ED",
    "value":"0x00000000",
    "addr":"0x00000772"
    },
    {
    "idx":33,
    "id":"EQ",
    "value":"0x00000000",
    "addr":"0x00000774"
    },
    {
    "idx":34,
    "id":"SPEED_FDBK",
    "value":"0x00000000",
    "addr":"0x00000782"
    },
    {
    "idx":35,
    "id":"THETA_EST",
    "value":"0x00000000",
    "addr":"0x00000786"
    }
    ]
    ]
    }

    Procedure:

    1. Launch MOTOR STUDIO GUI, follow the HW instructions provided in the GUI Hardware setup.

    2. Load the JSON file

    3. Run MPET for R, L, KE (Do not select for MECH)

    Test this and let me know the result.

    Thanks and Best regards

    Venkatadri S

  • When I go to connect to the PCB would I just use the MSP430 Launchpad to connect the SCL and SDA pins on my PCB and then connect the MSP430 to my computer so I can run the GUI?

    Also, the bus voltage of the motor will be 20V but it can withstand more without damage so that can be adjusted at some point. 

  • Hi Paul,

    Have you used EVM already? EVM has two sections, one portion is MSP430, and the other is MCF8316D.

    MSP430 side is interface to GUI and MSP430 connects to MCF on I2C lines (SLD, SDA, with common GND).

    The FW used is bridge between PC and MCF8316 device like described below

    PC (USB) <--> USB to UART IC <--> MSP430 (UART  to I2C) <--> MCF8316 (I2C)

    Thanks and Best regards

    Venkatadri S

  • Edit 2:  
    When connecting the custom board housing the MCF8316Cs SDA SCL and Ground to the EVM pins for SDA SCL and Aground I try to run Motor Studio but it can no longer detect the motor driver. 

    I know the driver is working because I have several status lights to show the buck and AVDD outputs are on.

    For the driver, NFault, SDA and FG pins are all pulled up to AVDD

    Brake and DRVOFF are pulled low to ground 

    All others are left floating. 

    -----------------------------------(ignore  below)--------------------

    I am just trying to run the MPET after loading the JSON file using the EVM (before I go to the custom board) and it seems like an error is popping up constantly for "Controller_Fault" and "MPET_IPD_Fault" along with D6 flashing red. 

    I also noticed that the EVM has a MCF8316A but the motor-studio gui sees it as MCF8316C which im assuming is contributing to the error. 

    Edit: when I connect to the MCF8316A GUI 1.1.9 I can connect to the EVM read the registers but I cannot write to the registers I get an error "Cannot read properties of undefined ID" I also cannot get any of the configuration or MPET tools to work through the GUI. The driver just sits in Motor_idle state.