XIAO ESP32C2 ~5 ms pause/freeze every 2 seconds

Some more tests i did in the meantime:

  • changing motor speed from 200 to 100
  • testing another program to log the serial data
  • disabling ledcSetup, ledcAttachPin and ledcWrite so that no PWM signal is created and the motor is at standstill
    Nothing changed, the problem is still there.

What do you mean by that? I only use the code posted in post 3