L6472 Motor Driver SPI - Cannot Connect

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
ToVa_285016
Level 5
Level 5
100 replies posted 50 replies posted 50 questions asked

Hi,

   

I am trying to operate an L6472 stepper motor driver:

   

http://www.st.com/web/en/resource/technical/document/datasheet/DM00047136.pdf

   

I am having trouble connecting at all, and getting anything in return other than a 0x00 byte.

   

Any suggestions?  I am a beginner coder, so suggestions for code structure are not out of bounds.

   

Regards,
Tom

0 Likes
2 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The cause might be that the ss-line is not kept active throughout a multi-byte write. You wait for the byte transmitted which will release the ss line when done. As a test I would suggest to define your own pin as ss-line, remove the hardware connection and set it with SS_Pin_Write() to the desired level (active low) when a transaction starts or ends.

   

 

   

Bob

0 Likes
ToVa_285016
Level 5
Level 5
100 replies posted 50 replies posted 50 questions asked

Hi,

   

If I use the SendArray() function the SS remains low.  However, the only data I ever get back is identical to the data sent, just like an echo, with no parameter information that should be returning.  Any idea what this might indicate?  The miso and mosi pins are not crossed or shorted.

   

Thank you,
Tom

0 Likes