• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

BLDC VESC using DRV8301 and stm32

Kranthikkenoch

New Member
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

Latest threads

EE World Online Articles

Loading
Top