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.

DRV8301-69M-KIT: Porting with TMS320F2800157

Part Number: DRV8301-69M-KIT
Other Parts Discussed in Thread: TMDSCNCD2800157, TMDSADAP180TO100, DRV8301, TMS320F2800157, TMDSCNCD2800137, TMDSHVMTRINSPIN

Hi,

Hardware:

- DRV8301-69M-KIT

- TMDSCNCD2800157

- TMDSADAP180TO100

DRV8301-69M-KIT --> TMDSADAP180TO100 --> TMDSCNCD2800157

Software:

- CCS 12.7

- Motor Control SDK 4.2.1

I am trying to run the universal_motorcontrol_lab_f280015x with DRV8301 but I am always getting overCurrent fault.

I have two queries mentioned below:

1. The fault is not coming from SPI but from HAL_getMtrTripFaults function inside runMotor1Control func inside motor1_drive.c Somehow the EPWM_getTripZoneFlagStatus is not returning zero.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
static inline uint16_t HAL_getMtrTripFaults(HAL_MTR_Handle handle)
{
HAL_MTR_Obj *obj = (HAL_MTR_Obj *)handle;
uint16_t tripFault = 0;
tripFault = (EPWM_getTripZoneFlagStatus(obj->pwmHandle[0]) &
(EPWM_TZ_FLAG_OST | EPWM_TZ_FLAG_DCAEVT1 | EPWM_TZ_FLAG_DCAEVT2)) |
(EPWM_getTripZoneFlagStatus(obj->pwmHandle[1]) &
(EPWM_TZ_FLAG_OST | EPWM_TZ_FLAG_DCAEVT1 | EPWM_TZ_FLAG_DCAEVT2)) |
(EPWM_getTripZoneFlagStatus(obj->pwmHandle[2]) &
(EPWM_TZ_FLAG_OST | EPWM_TZ_FLAG_DCAEVT1 | EPWM_TZ_FLAG_DCAEVT2));
return(tripFault);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


2. For some reason I am unable to use the SPI to talk to the DRV8301 because the pins SPI CS and CLK are used/blocked by XTAL.

We tried to turn the switch down but then the code is stuck in the while for XTAL source clock saturation.

Please advice how to successfully port DRV8301-69M-KIT with TMS320F2800157.

Thank you in advance

  • Hi Sheershak,

    1. What is your ADC current sensing reference configuration, external or internal?

    2. F2800157 only has one SPI. So if you want to use SPI, you may only be able to use internal oscillator.

    Thanks,

    Jiaxin

  • The ADC current sensing reference config is in default setting as the example of universal lab controller.

    Please advice how do we use/configure internal oscillator?

  • Hi Sheershak,

    Did you refer to "section 3.2.6 TMDSCNCD2800137 Setup" in the universal motor control lab user's guide for setting the switches on the control card? The TMDSCNCDF2800157 has different locations for the switches. Please refer to the schematic and make sure the switch positions match your software configurations.

    Since you are not using the high voltage kit "TMDSHVMTRINSPIN" to drive motor (the one in the software project of universal control lab with F280015x), please double check your peripheral initializations in hal.c/h (e.g., ADC, PWM, ...) are correct.

    Thanks,

    Jiaxin

  • Hi,

    I was getting overcurrent error because EPWM_getTripZoneFlagStatus was giving OST, CBC, DCAEVT1, DCBEVT1 error. We saw this in the TZFLG register.

    So we disabled HAL_setupMtrFaults in the hal.c file, and we can operate the motor as we want. 

    Can you please tell why are we getting these error? Would disabling it give any other issues in future?

  • Hi Sheershak,

    "HAL_setupMtrFaults()" is the PWM tripzone protection configuration for over-current. What is your overcurrent threshold setting in software? When you disable the protection function, does harmful large current occur?

    Thanks,

    Jiaxin

  • my USER_MOTOR1_OVER_CURRENT_A is set to 50.0 A inside user_mtr1.h, but I don't when is it setting or comparing this value inside TripZone.


    No, when I comment HAL_setupMtrFaults(), I don't see any large currents even when I am running the motor at high speeds.

  • Hi Sheershak,

    The function "HAL_getMtrTripFaults()" resides inside "runMotor1Control()", which is in the background loop and occurs when the CPU is idle. If you have "HAL_setupMtrFaults()" at your initialization, you will have this peripheral level over-current protection. 

    You probably can disable this protection according to your system specification, but if you still want to enable and debug this trip zone function, please make sure you modify the settings in "HAL_setupMtrFaults()" according to your hardware.

    Thanks,

    Jiaxin

  • Yes, I want to debug it and that's where I need your help. We are using DRV8301-69M-KIT by TI only. I have checked all the settings like the MTR_IU/V/W_XBAR_EPWM_MUX, MTR1_XBAR_TRIP and pwmHandles but still getting the issue. (I have left most of the values as default and only changed pwm channels as configured on the TMDSCNCD2800157 control card)

    Any help in debugging the Tripzone will be much appreciated. 
    Thank you

  • Hi Sheershak,

    Sure. What build level are you testing now? Did you make changes to the ADC channel configuration and their corresponding comparator (CMPSS) module according to your customized system?

    Thanks,

    Jiaxin