Other Parts Discussed in Thread: MSP430G2231, MSP430WARE,
Tool/software:
I am currently using the DRV8834+MSP430G2231 combination to achieve motor control
According to the specification, drv8834 provides two motor drive modes, and I use the indexer mode.
My motor can rotate normally, but I cannot make it move forward with just one pulse. I need to send multiple steps at once to make the motor move.
I looked up the datasheet again and found that it was because I was using the nsleep pin to prevent the motor from overheating.
However, the drv8834 will return the drive coil to home when it comes out of sleep mode.
This is why it won't rotate when I send only one pulse at a time, because it keeps driving the coil in the same position.
So I try to using the nENBL pin to control my motor output to prevent from overheating.
I followed the specifications and connected nsleep to VM and added a 47K resistor. But strangely, if I don't drive the nsleep pin low->hi once before the starts motor control , it won't turn.
That's the line in While(1) under my main:
P1OUT &= ~BIT5;
If I mark it out, the motor becomes uncontrollable again. What's the reason?
Here is my source code, thank you.