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.

DRV8899-Q1EVM: SPI Unexpected Behavior

Part Number: DRV8899-Q1EVM
Other Parts Discussed in Thread: DRV8899-Q1

I'm currently working to control a stepper motor using the DRV8899-Q1EVM board with SPI commands. The current behavior is that the board will either respond with an incorrect word format on the Status bits or will not reflect the data being written on the Report bits. After several write attempts the Fault LED turns on.

I can see that I'm sending the correct SPI word with the oscilloscope and my sniffer tool, so I'm really not sure if I'm missing something. 

  • Hello, Pablo,

    Do you use your own controller to send the SPI commands to DRV8899-Q1EVM?

    If you want to control the EVM with your own controller, you have remove zero ohm resistor between DRV8899-Q1EVM's MSP430 and DRV8899-Q1.

    Regards,

    Wang

  • Hi,

    Yes, I'm using a RL78/F13 to send the SPI commands. I've checked and the resistors have been removed. 

  • Pablo,

    Would you test SDI, SCL, nSCS and SDO signal waveform with a scope and share the test waveform here or compare it with an EVM?

    Regards,

    Wang Li

  • Hi,

    I'm attaching a capture from the oscilloscope. I'm also attaching a capture made with our sniffing software.

    The SDO word is not following the format set by the datasheet, and it's not mirroring the data being written. 

    Regards,

    Pablo.

  • Pablo,

    Use CTRL3 as example, SDI command 0677h would write CTRL3 with 0x77h. 

     SDO output shows the 37 value in  the CTRL3 before the writing command. Would you read/write CTRL3 again to check the SDO value?

    I want to confirm the value because the "37" value could be the previous value.

    Also, STRL3's bit 6 is STEP bit. This bit is self-clearing, automatically becomes '0' after writing '1'.

    Regards,

    Wang

  • Hi,

    For CTRL3 wouldn't it be 0A77h since the address is 05h? I've tried both IDs just to be sure and I'm attaching the result: when I try to read the same behavior occurs.

    Thanks for your support!

  • Pablo,

    I cannot understand what issue is on your board. would you compare the SDI and SDO signal with the EVM?

    Regards,

    Wang

  • Hi,

    Do you mean like an oscilloscope capture?

    On the last image the MOSI rows are the SDI signals and the MISO rows are the SDO signals on the EVM. I'm sending 0A77h to write a microstep using CTRL3 and the board is answering C000h, and when I try to read that register sending 4A00h, the board answers 7004h.

    Regards,

    Pablo.

  • Pablo,

    Write command:

    SDI=0x0A77h; write 0x77h to  CTRL3. 

    SDO=0xC000h; no fault; CTRL3=0x00h before writing 0x77h.

    Read command:

    SDI=0x4A00h; read CTRL3.

    SDO=0x7004h; It could be UVLO. I am not sure it is true UVLO or not.

    (BTW, the first waveform in this e2e thread shows CTRL3=0x37h while sending 0x77h. This is normal because the STEP bit is self-clearing, automatically becomes '0' after writing '1'.)

    would you compare the SDI and SDO signal an the EVM? (Use GUI to send and read out CTRL3).

    Regards,

    Wang Li

  • Hi,

    I've compared the signals sent by the micro and the GUI:

    I'm seeing movement with the GUI, but not the micro.

    My current setup unplugs the resistors near J3 when I'm using the micro. Could this have something to do with the lack of movement?

    Thanks for your support,

    Pablo.

  • Pablo,

    "I've compared the signals sent by the micro and the GUI:"

    Which waveform is from the GUI? Do you send the same command? I saw SDI signal was different. Which one do you think it is correct?

    Regards,

    Wang

  • Hello,

    Left is my MICRO, right is the GUI. They were taken of different moments of sending the same sequence of frames. Looking at what the GUI is sending actually solved my issue. I was able to modify the clock and the SS timing to match what I'm sending. Thanks a lot for your support!