There will be a sharp sound when the motor is running in STM32

When using STM32 and AS5600 encoders to control the motor operation, there will be a sharp sound. How can this problem be solved.

Which mode of the AS5600 are you using? I2C?

I’m using the AS5600 in I2C mode

Hmmm is it platformio or arduinoIDE? If platformio, do you have the lib_archive=false option in platformio.ini?

Otherwise, could you share some more details of your setup and perhaps a video of the sound you’re hearing?

ok, it seems I haven’t set this parameter.