Phase Current Spikes on STM32G4 sensorless FOC Setup

I’m working on a custom board with an STM32G4 and a 7‑cell Li‑ion setup to drive a motor using sensorless FOC. My phase‑current waveform is not clean — instead of a smooth sinusoidal shape, I’m seeing spikes in the phase current.

  • Yellow trace: real phase‑current measurement from the current probe

  • Red trace: DAC output of my phase current Ia

Key Data:

  • Reference Schematic: EVSPIN32G4

  • PWM Freq: 20kHz

  • Low inductance motor: 0,03 mH

Question:

What could be the reason for the spikes?
My intention is to solve the root cause.