Connect with us

BLDC VESC using DRV8301 and STM32

Discussion in 'Microcontrollers, Programming and IoT' started by Kranthi, May 7, 2021.

Scroll to continue with content
  1. Kranthi

    Kranthi

    2
    0
    Sep 15, 2017
    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);



    }
     

    Attached Files:

    • mcu.PNG
      mcu.PNG
      File size:
      145 KB
      Views:
      2
    • drv.PNG
      drv.PNG
      File size:
      163.5 KB
      Views:
      2
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-