Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Anonymous
Not applicable

I am attaching my code for running stepper motor ,could you please tell me is there any mistake in it.With this program my motor is not working.

0 Likes
1 Solution
Bob_Marlowe
Expert II

int SPItransfer(uint_8 Data)

{

SPI_WriteTxData(Data);

SPI_ReadRxData();

return Data;

}

This will not work, you need to wait until the data transfer has completed before reading the result.

Bob

View solution in original post

1 Reply
Bob_Marlowe
Expert II

int SPItransfer(uint_8 Data)

{

SPI_WriteTxData(Data);

SPI_ReadRxData();

return Data;

}

This will not work, you need to wait until the data transfer has completed before reading the result.

Bob

View solution in original post