MA702 SPI and Encoder simultaniously

Hello,
I am using a MA702, I seem to be having a problem reading the angle through SPI and using the encoder interface simultaneously.

With an STM32L4 chip, I am reading the angle through SPI with a looping DMA.
Meanwhile, I am using a hardware timer in encoder input mode to read the encoder output of the MA702 and trigger based on a capture compare register.

Operating individually, the encoder functions as expected. With a magnet on a BLDC motor, If I trigger off of the Z pulse on an oscilloscope, and output the timer interrupt based on encoder input I see a nice stationary square wave.

However, if I turn on the SPI/DMA to read the angle, now the signal from my timer slowly moves to the right on the scope. If I stop SPI/DMA reads, it stops moving.

I suspect the MA702 cannot handle both operations and is lagging. Is this known behavior that can be worked around, or do I need to refactor my code not to use the constant SPI/DMA stream?

1 Like

Hello,

Apoligies for the delayed response.

The MA702 should be able to handle SPI and ABZ operation in parallel.

Are you still working on this application? If yes, I can try to help finding the root cause.

Best regards,

Carmine