vedderb / bldc

The VESC motor control firmware
2.09k stars 1.31k forks source link

Can 1 STM32F drive 2 mosfet Driver? #682

Open Knockoi opened 7 months ago

Knockoi commented 7 months ago

DRV8301: MOSI: GPIOC 12 MISO: GPIOC 11
SCK: GPIOC 10 CS: GPIOC 9

DRV8305: MOSI: GPIOC 12
MISO: GPIOC 11 SCK: GPIOC 10 CS: GPIOB 5

Knockoi commented 7 months ago

I want to drive two mosfet drivers with one stm32f like foCbox unity. I'm going to use two DRV8301's. I don't know if VESC allows 1 STM32F to receive SPI from two Mosfet Drivers. Is there anyone who can help me with the PROJECT?

ilbeylia commented 6 months ago

This project allows you to control two DRV8301 MOSFET drivers using a single STM32F4 microcontroller through SPI. The STM32F4 series typically has two or more SPI interfaces. Here are the SPI pin connections:

You can use two SPI units, for example, SPI1 and SPI2. Example pin connections for SPI1:

SCK: PA5 MISO: PA6 MOSI: PA7 NSS: PA4 Example pin connections for SPI2: SCK: PB13 MISO: PB14 MOSI: PB15 NSS: PB12 You can configure these connections using the STM32CubeIDE and write the necessary code to complete your project. If you need assistance, feel free to reach out to me.

Knockoi commented 6 months ago

Thank you very much for the information, I still need to connect the Hall detector, voltage, current and other data lines so how do I do it? It seems that the hwconfig file can only be used with one drv8301?

Abdurrahman İlbeyli @.***> 於 2023年12月19日 週二 上午6:47寫道:

This project allows you to control two DRV8301 MOSFET drivers using a single STM32F4 microcontroller through SPI. The STM32F4 series typically has two or more SPI interfaces. Here are the SPI pin connections:

You can use two SPI units, for example, SPI1 and SPI2. Example pin connections for SPI1:

SCK: PA5 MISO: PA6 MOSI: PA7 NSS: PA4 Example pin connections for SPI2: SCK: PB13 MISO: PB14 MOSI: PB15 NSS: PB12 You can configure these connections using the STM32CubeIDE and write the necessary code to complete your project. If you need assistance, feel free to reach out to me.

— Reply to this email directly, view it on GitHub https://github.com/vedderb/bldc/issues/682#issuecomment-1861811723, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXNKJXXRQVRJRPHCFZU7IDLYKDBWVAVCNFSM6AAAAABAEW4OKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRRHAYTCNZSGM . You are receiving this because you authored the thread.Message ID: @.***>