Force Feedback Yoke project

Yes, I keep calling them sine… because I don’t know what the real name is :smiley:
But I have implemented these waveforms:

Yesterday I managed to find a datasheet with the hall sensor output and waveforms, so I could finally understand the right order.
Still, although they work now, I can’t get them sinchronized properly with the hall sensor. They keep jumping back and forth, and I don’t really understand where the error is. The motor moves of two “quadrants” (from 180º to 300º in the diagram, apparently) and jumps back, but in the code the sequence at each change of the hall sensor seems to be correct.
I need to work more on that.