L6474 communication works but motor is not turning
I have connected various stepper motors to multiple x-nucleo-ihm01a1 shields on a NUCLEO F466RE.
The code is the same as ST's X-CUBE-SPN1 (i just changed the function names) In main() after SPI has been initiliazited at 2MHz at mode 3, I set the registers to their init settings ( begin() ) then attempt to move the motor forward 16000 steps.
L6474 myL6474;
int32_t pos;
uint16_t mySpeed;
//----- Init
/* Start the library to use 1 shield */
/* The L6474 registers are set with the predefined values */
/* from file l6474_target_config.h*/
myL6474.Begin(1);
chThdSleepMilliseconds(500);
// /* Move shield 0 of 16000 steps in the FORWARD direction*/
myL6474.Move(0, FORWARD, 16000);
// See whats happening in status register after move command
myL6474.GetStatus(0);
// /* Wait for the motor of shield 0 ends moving */
myL6474.WaitWhileActive(0);
The SPI communication is working as the waveforms show the right commands (commands in hex on the right side of screen). (Pic 3 is init , pic 2 is move 16000 steps, pic 1 is get status .... pics are in reverse order.
The motor gets powered but is stuck and doesnt move and the program gets stuck forever at the WaitWhileActive() command. On sending the getstatus command, none of the error flags are triggered and HiZ is low as desired. Everything looks good unless i've missed something, why doesnt the motor move?



