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