cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo-F103RB + IHM01A1 multi byte SPI communication fails

Posted on June 03, 2016 at 14:37

Hello all,

I am using a nucleo board with the IHM01A1 and created my own CubeMX Project to run one stepper Motor. so far, i managed to start the Motor with the Power_ON (0xB0) command and TIM3CH2 pwm Signal on STCK-Pin and can adjust the Speed of the Motor. Now, i want to adjust the Settings inside of the L6474 to fit to my Motor (12V / 1A) to get a higher Speed (it has almost no load, only a Spinning disc). at the Moment, i can only achive 2 rounds per second, at higher Speed the Motor get stuck, with the power on default Settings of the L6474. But every time I want to send a command with data as Parameter or with one or two respond Bytes, i only get the command Byte as a respond and the second Byte is Zero (see attached Picture from my logic analyser). I used DM00043117.pdf and DM00082126.pdf to build my own library for the L6474. (the x-cube-spn1 examples work fine with my Nucleo-F030R8/F401RE, so i expect the Hardware is OK.) What is my mistake ?

Best regards,

Markus.

PS: DM00043117.pdf, Page 42 says GetStatus is 0b11010000, DM00082126.pdf, Page 10 says GetStatus is 0b10110000. Typo ? which is correct ? I tried both values with same result.
3 REPLIES 3
Posted on June 03, 2016 at 16:04

for a better understanding, I attached my CubeMX/ Keil Project files.

I hope, someone can help me.

Thanks in advance,

Markus.

________________

Attachments :

STM32F103RB_L6474_20160603.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzG0&d=%2Fa%2F0X0000000bIt%2Fr_Rl8c6CCGjNZUZDVKI_8BQMrpnmnSwbyQfwxzRxRyc&asPdf=false
Posted on June 08, 2016 at 16:00

Problem solved,

I forgot to toggle the CS Signal after every Byte,

not for one command sequence only.

Thats why single byte commands work and multiple byte command sequences do not work.

Best regards,

Markus
erlend58
Associate
Posted on November 02, 2016 at 14:13

Maybe I can ask for some help from you? I am developing an SPI driver for the PowerStep01, using the X-NUCLEO-IHM03A1, but with a different microcontroller, the P8X32. Communication now works fine, and I can read and write to the chip. But I cannot get the motor turning; whatever such command I send, the chip goes into STALL_A and STALL_B if in Voltage mode, and into OCD if in Current mode. This happens also if the motor is not connected. I have set the stall- and overcurrent- thresholds to the maximum value. What I would very much appreciate is to know what configuration values I need to input to avoid this?

Best regards,

Erlend