This is an application for pulse output using PWM (Pulse Width Modulation). The settings are the same as for the fixed pulse application, but the count clock is set to 1 kHz.
For PWM output, a variable ARR_val of 1000 generates a 1 Hz pulse, resulting in LED blinking at 1 second intervals. In the case of PWM, the ARR cycle is the pulse frequency; changing the ARR_val value will change the blinking cycle.
When the variable duty_ratio is 2, the ON/OFF ratio of output pulses is 1:1. The blinking cycle is fixed, but the lighting period changes.