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.

DRV8434S: Direction Change Issue

Part Number: DRV8434S

Tool/software:

Hello,

I'm using the DRV8434S motor driver and facing an issue when changing direction. When stepping in one direction, I write to Control Register 3 (e.g., 0x70). When I switch direction, I write 0xF0, but the motor does not reverse direction on the first cycle. It moves in the original direction, and only after writing to the register a second time does it switch to the correct direction.

To dive in further, the Ctrl 3 register shows the previous value when I first make a direction switch, and only updates when I write the second time. For example, if I made several steps using 0xF0 (CW) command and then send 0x70 (CCW) to make direction switch the register will return 0xB0 and move CW (wrong direction) one step after writing 0x07. Also, SDI showed 0xB0 when I send 0x70 first time I send the command. Then subsequent commands return a correct value (0x30) and the motor moves in the correct direction until I make a direction switch again. Please see the image below. Is there anything special that needs to be done when switching direction to clear the previous value? My main question is why it latches on to the old value one write cycle when I sent a new direction and step command.

I am using full step mode.

I'd appreciate any insight you may have regarding this phenomenon.

Thank you!

Vusal




  • Hi Vusal,

    Thank you for posting in this forum.

    To dive in further, the Ctrl 3 register shows the previous value when I first make a direction switch, and only updates when I write the second time. For example, if I made several steps using 0xF0 (CW) command and then send 0x70 (CCW) to make direction switch the register will return 0xB0 and move CW (wrong direction) one step after writing 0x07.

    This is expected behavior. The updated value in the register will be latched only at the rising edge of the nSCS at the end of the write register frame. So the STEP pulse issued during the SPI_DIR change will continue that one step with the current direction. To avoid this you can send a separate SPI_DIR change frame without issuing a SPI_STEP pulse and then continue with SPI_STEP writes. 

    Also, SDI showed 0xB0 when I send 0x70 first time I send the command. Then subsequent commands return a correct value (0x30) and the motor moves in the correct direction until I make a direction switch again. Please see the image below.

    This is also expected behavior. The SDI for the current frame will contain the existing value in the register not the written value. The written value is latched at the rising edge of the nSCS of the write frame. So a second read or write will show the last written contents. 

    Regards, Murugavel