I was running a dc current mode on stepper motor and figured out the velocity was not constant. Measuring the currents I could see that one coil is getting spikes.
The blue line is the current magnitude:
What could be the reason for this behavior? The PWM waves are correct.