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.
Part Number: DRV8301-HC-C2-KIT
Tool/software: Code Composer Studio
Hello,
Im using DRV 8301 development kit. Im trying to run HVBLDC_Sensored Project, but I'm unable to run the motor. In Build Level 2 the motor has to run in open loop, but motor is not running. Please help me in running the project to run BLDC motor.
Thank you.
The project is based on High voltage kit, you need to change the device configuration file and add the DRV8301 driver by yourself according to the hardware if you want to run the project on DRV8301-HC-Kit.
You might take a look at the following link.
https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/864875
Thanks a lot for the reply. Is Device configuration file means: "HVBLDC_Sensored-DevInit_F2803x.c" ? Do I have to change GPIO's in the mentioned file?
How to add DRV 8301 driver to the current HVBLDC_Sensored project.
Please help. Thank you
I'm trying to edit BLDC_Sensored project to run with my DRV8301-HC-C2-KIT. I tried editing the BLDCSensored.C code by including DRV8301 snippet in void A1() function. I tried copying the snippet from PM_Sensorless.C code.
The below is the code which I pasted in BLDCSensored.C code:
#ifdef DRV8301
DRV8301_cntrl_reg1.bit.GATE_CURRENT = 0; // full current 1.7A
// DRV8301_cntrl_reg1.bit.GATE_CURRENT = 1; // med current 0.7A
// DRV8301_cntrl_reg1.bit.GATE_CURRENT = 2; // min current 0.25A
DRV8301_cntrl_reg1.bit.GATE_RESET = 0; // Normal Mode
DRV8301_cntrl_reg1.bit.PWM_MODE = 0; // six independant PWMs
// DRV8301_cntrl_reg1.bit.OC_MODE = 0; // current limiting when OC detected
DRV8301_cntrl_reg1.bit.OC_MODE = 1; // latched OC shutdown
// DRV8301_cntrl_reg1.bit.OC_MODE = 2; // Report on OCTWn pin and SPI reg only, no shut-down
// DRV8301_cntrl_reg1.bit.OC_MODE = 3; // OC protection disabled
// DRV8301_cntrl_reg1.bit.OC_ADJ_SET = 0; // OC @ Vds=0.060V
// DRV8301_cntrl_reg1.bit.OC_ADJ_SET = 4; // OC @ Vds=0.097V
// DRV8301_cntrl_reg1.bit.OC_ADJ_SET = 6; // OC @ Vds=0.123V
// DRV8301_cntrl_reg1.bit.OC_ADJ_SET = 9; // OC @ Vds=0.175V
DRV8301_cntrl_reg1.bit.OC_ADJ_SET = 15; // OC @ Vds=0.358V
// DRV8301_cntrl_reg1.bit.OC_ADJ_SET = 16; // OC @ Vds=0.403V
// DRV8301_cntrl_reg1.bit.OC_ADJ_SET = 17; // OC @ Vds=0.454V
// DRV8301_cntrl_reg1.bit.OC_ADJ_SET = 18; // OC @ Vds=0.511V
DRV8301_cntrl_reg1.bit.Reserved = 0;
// DRV8301_cntrl_reg2.bit.OCTW_SET = 0; // report OT and OC
DRV8301_cntrl_reg2.bit.OCTW_SET = 1; // report OT only
#if DRV_GAIN == 10
DRV8301_cntrl_reg2.bit.GAIN = 0; // CS amplifier gain = 10
#elif DRV_GAIN == 20
DRV8301_cntrl_reg2.bit.GAIN = 1; // CS amplifier gain = 20
#elif DRV_GAIN == 40
DRV8301_cntrl_reg2.bit.GAIN = 2; // CS amplifier gain = 40
#elif DRV_GAIN == 80
DRV8301_cntrl_reg2.bit.GAIN = 3; // CS amplifier gain = 80
#endif
DRV8301_cntrl_reg2.bit.DC_CAL_CH1 = 0; // not in CS calibrate mode
DRV8301_cntrl_reg2.bit.DC_CAL_CH2 = 0; // not in CS calibrate mode
DRV8301_cntrl_reg2.bit.OC_TOFF = 0; // normal mode
DRV8301_cntrl_reg2.bit.Reserved = 0;
//write to DRV8301 control register 1, returns status register 1
DRV8301_stat_reg1.all = DRV8301_SPI_Write(&SpibRegs,CNTRL_REG_1_ADDR,DRV8301_cntrl_reg1.all);
//write to DRV8301 control register 2, returns status register 1
DRV8301_stat_reg1.all = DRV8301_SPI_Write(&SpibRegs,CNTRL_REG_2_ADDR,DRV8301_cntrl_reg2.all);
#endif
with this snippet, the motor rotated for 2 rotations and stopped. Kindly help me with this project. I want to run BLDC motor with hall sensors and encoders. As a startup exercise, I'm trying to port BLDCSensored code to my kit. Please help. Thank you.
You might find the related reference code in controlSUITE for BLDC with hall sensor, or PMSM with incremental encoder. Please take a look at these reference projects first, and let's know if you have any questions on these reference codes. Let's know if you have any questions on the reference code. Unfortunately, on this forum, we are difficult to check the detailed code you changed.