DC motor on I2C Motor Driver(L298): PWM is 25Hz and can’t be changed

Why is 40ms not good: because our oscillation period Tu=45ms (typical) with EMG30+L298 (see Tu meaning in the Ziegler–Nichols method link.
Here are the response curves for old design:


You can notice the 45ms period on the ultimate gain Ku=100 and the low gain error.