cancel
Showing results for 
Search instead for 
Did you mean: 

powerstep01

Lin SS
Associate
Posted on May 07, 2017 at 12:50

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!

This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Enrico Poli
ST Employee
Posted on May 12, 2017 at 09:47

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:

  1. The CS line must be raised at the end of each by transmission. The SPI of the device accept one byte at a time.
  2. You are putting two bytes in your SPI interface. In which order are they transmitted (LSB first or MSB first)?