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: SPI Issues

Part Number: DRV8301

I've got the BOOSTXL-DRV8301 board. How can I tell that writing to Control Register 1 and Control Register 2 have succeeded? There doesn't seem to be any positive feedback.

I'm writing to both of these registers, but certain settings don't seem to take effect. For example, when I try to change the gain of the shunt amplifiers in Control Register 2 from 10 V/V to 80 V/V I would expect to see a change in the output voltage on the SO1 and SO2 outputs, but I don't.

A similar thing happens when I try to put the DRV8301 in DC Calibrate mode by setting DC_CAL_CH1 and DC_CAL_CH2 in Control Register 2 to 1, but I see no change in SO1 and SO2 outputs.

My SPI clock rate is 3 MHz, which is slower than the DRV8301's max of 10 MHz. I've verified that the SPI signals look good on a logic analyzer. CPOL=0 and CPHA=1.

When reading Status Register 2, what should the values of Device ID [3..0] be? When I read SR2, I get 0x1 in Device ID.

  • Hey Jerry,

    Thanks for reaching out! Let’s first make sure the SPI communication is functioning properly. The SO1 and SO2 outputs will not change if the register values are not adjusted accordingly.

    I'm writing to both of these registers, but certain settings don't seem to take effect.

    Send a READ command to SDI with address 0b0010 (Control Register 1) or 0b0011 (Control register 2). SDO will respond with the data at the specified address in the next clock cycle. This will allow you to see if the changes you are making to the control registers are working.

    For example, when I try to change the gain of the shunt amplifiers in Control Register 2 from 10 V/V to 80 V/V I would expect to see a change in the output voltage on the SO1 and SO2 outputs, but I don't.

    Issue a read command for Control Register 2. For the example you gave (changing the shunt resistor gain from 10 V/V to 80V/V), Bits 3 and 2 in the response should be 0b11.

    When reading Status Register 2, what should the values of Device ID [3..0] be? When I read SR2, I get 0x1 in Device ID.

    This is the correct Device ID. The data sheet says Status Register 2 contains all zeroes, but this is incorrect. See this thread for more information: https://e2e.ti.com/support/motor-drivers-group/motor-drivers/f/motor-drivers-forum/254551/drv8301---default-device-id

    Check over the registers and make sure their values are what you are expecting. If they are, we can continue working together to resolve the issue.

    Thanks,

    Tyler McCulloch

  • Thanks, Tyler. That works. I missed the fact that the controller registers are R/W and assumed they were write-only.