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.

DRV8316-Q1: DRV8316RQ SDO can not reponse right data

Part Number: DRV8316-Q1
Other Parts Discussed in Thread: DRV8316

Tool/software:

We are using the 8316RQ for development and we need to modify the configuration via SPI because the current gain is not enough. During the modification we found that the MISO (i.e. the output of the 8316RQ was not as expected, it was always 3V3)It's taken a long time, but I still haven't found the cause...Please help to analyse .Thanks.

The following is the timing flow for unlocking all registers

In the photo below:

clk & SDO(always high)

In the photo below 

the clk is about 3M (<5M), and the two bytes of MOSI are 0X06 (register address 3, even parity: 1) and 0X03 (unlocked) respectively

clk & nSCS

clk & nSleep

sch

Perform a read operation to register 0. SDO is also always high!

  • It could be the clock polarity and clock phase are not set correctly. Could you please check those settings?

  • I had my suspicions at first and grabbed the waveform as well.

    In this photo.,I send two bytes of MOSI are 0X06 (register address 3, even parity: 1) and 0X03 (unlocked) respectively。

    The bytes sent match the actual waveform.(cpol=0, cpha=1)

  • Ok thank you for confirming. The clock polarity and clock phase are correct.

    It could be because of a short circuit on the PCB, or because the microcontroller is pulling the MISO line to 3.3V. Can you check for short circuits with a multimeter? Can you temporarily set the microcontroller pin connected to SDO to input mode so it is guaranteed to be disconnected from the SDO line, and check if the SDO line is still stuck at 3.3V when reading from SPI? Alternatively you can desolder the resistor connecting the SDO line to the microcontroller.

  • 1. I measured the resistance between AVDD (drv8316 LDO output, pin25) and SDO (pin33) and it's 4.7k ohms, which matches the schematic and rules out a 3V3 short.

    2. I remove R3220 ( the resistor connecting the SDO line to the microcontroller

    Send command to read register 0 (1000 0001b), SDO pin remains at 3V3 (pull-up resistor 4.7K)

    clk & mosi

    clk & miso

  • Can I ask a few more details about the problem?

    Are the SPI writes completing successfully? For example if you write to the gain register and change the gain, has the gain changed or did the command have no effect?

    Have you tried another board to rule out the possibility of a damaged chip?

  • I tried it with another board and the result was the same。

    I was planning to use the spi's return value to determine if the write was successful, when I realised this

  • Could you please answer this question to help me narrow down the cause of the problem, whether the problem is due to the chip not recognizing the input, or whether it is due to some problem with the output.

    Are the SPI writes completing successfully? For example if you write to the gain register and change the gain, has the gain changed or did the command have no effect?

  • Okay, I'll get the motor and try it.

    Also, how long does it take for nsleep to go high before the spi bus can be used?

    Does it matter if the interval is now 300us

    clk & nsleep

  • The wakeup time is specified to be a maximum of 1ms, so to be safe wait at least 1ms after nsleep is pulled high before sending the SPI commands.

  • Now the SDO waveform is normal. But there is no difference in the current gain effect when the motor is driven. Can you tell me if the register information of drv8316 will go back to the default state again after using spi to configure the control register, pulling down nsleep and then pulling it up again?

  • Yes, pulling nsleep low will put the DRV8316 into sleep mode and reset the registers. When you pull nsleep high again you will need to re-write all the registers through SPI.