2017-05-07 03:50 AM
An arm cortex-M0 MCU is adopted to drive the powetstep01.
The initialization of SPI is done including CS, SDO, SDI, CK,BUSY, STBY.
Here is the problem, I want the step motor run, so I write this:
CS=low;//chip select
SPI1_TX0 = param;//param=0xFF50, since the address of the run command is 0101000DIR, and FF represents speed
SPI1_CNTRL |= GO_BUSY;//start the transmit
delay;
CS=high;
The powerstep01 did not work. Is this the right way?
Or what else should be done before sending commands(SPI has been initialized already)?
Thank you very much!
2017-05-12 12:47 AM
Hi,
The speed parameter that should be passed after the Run command is 3 bytes long, so I think you need to send two more bytes to the device in order to make the device execute the command.
Other possible issues: