Maker Pro
Maker Pro

BLDC VESC using DRV8301 and STM32

Kranthi

Sep 15, 2017
2
Joined
Sep 15, 2017
Messages
2
Hello everyone,

I have built a hardware similar to VESC by Benjamin Vedder. I have also attached the screenshots of the schematic built. I'm using STm32Cube ide to code.
Below is a simple code I have written to check for the output on one phase. I'm able to see the PWM on an Oscilloscope from the MCU. But I'm unable to see any output on the drv8301 outputs. Is there any configuration to be set on drv8301 to generate the outputs. please suggest

I'm using a Power supply and have gone upto 20V on V_supply

PWM on highside mosfet H1-PA8
On on lowside mosftet L2-PB14
EN_GATE-PB5

HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1);


while (1)
{

HAL_GPIO_WritePin(GPIOB, GPIO_PIN_5, GPIO_PIN_SET);

TIM1->CCR1 = 50000;
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_14, GPIO_PIN_SET);



}
 

Attachments

  • mcu.PNG
    mcu.PNG
    145 KB · Views: 8
  • drv.PNG
    drv.PNG
    163.5 KB · Views: 7
Top