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.

DRV8301-69M-KIT: Torque Mode Iq_Ref commands from another microcontroller via SPI

Part Number: DRV8301-69M-KIT
Other Parts Discussed in Thread: DRV8301, MOTORWARE, DRV8302

I am interested in placing my DRV8301-69M-KIT control card in "torque mode" and then supply the desired Iq ref command from another microcontroller via SPI. Jerome Strombosky at TI wrote:

"The EVM does not directly send torque commands over SPI for InstaSPIN. It using a sort of shared global variable system that works over UART (works well with the GUI). The only thing over SPI is the driver configs and fault reporting. There are several ways to do this depending on exactly what you are trying to send. Have the customer post on the InstaSPIN e2e and Sean can probably help them get started."

  • The DRV8301 uses the SPI-B module for inter-IC commands, leaving you SPI-A module if you want to setup comms to another MCU. In HAL_setParams() function, which is called from main in the proj_labxx.c files, you'll find the setup routines for the SPI peripherals. Control-click to follow the HAL_setupSpiA() call into the function instantiation. Here you can change the initialization flow/parameters as needed for your system. Using the TRM, find which GPIOs the MISO/MOSI/CLK/STE signals are routed to, and pick a set that are not used by the system (check the schematic in MotorWare for your kit to see which GPIOs are routed for use). Once you've picked the pins, setup the pins in HAL_setupGpios(). Looks like GPI016:19 are setup by default for SPI-A, you can change as needed.

    Sean
  • Does that mean I only have one SPI slave channel available to me? More specifically can I setup one set of GPIO pins on my DRV8301-69M-KIT as a SPI master to get data from a third party SPI sensor then setup a second set GPIO pins as a SPI slave that will transfer that sensor data upon request to a different main MCU SPI master? Thanks!
  • Yes, you only have one SPI module available when using the DRV8301 kit, as the driver control interface is SPI. If you want use of both SPI modules on the C2000 device, you can investigate the DRV8302 which uses PWM as the control interface. For GPIO implementation of SPI, this should be possible given you have enough GPIO pins available to you.


    Sean

  • Hi Michael,

    What's update on your side? Do you need any further assistant?