Generally speaking, PWM is to obtain the average voltage corresponding to the duty ratio by modifying the duty ratio; His high and low level change is only a microscopic situation, macro-speaking is indeed the accumulation of voltage.
The PWM voltage transferred to the L298NENA ENB port is weak and can not directly change the motor speed, so don't forget his name L298N double H-bridge DC motor driver chip carefully observe the small black block is the MOS tube, simply speaking, it is the duty cycle of the pwm signal injected into the ENA ENB To control the periodic on-off of the MOS tube, and then the output value of 12V voltage can be modified to achieve the purpose of speed regulation. In fact, duty cycle is an average voltage concept.