These two parameters are accomplished by adjusting the pulse width.
In fact, the voltage is a constant value, such as 12 volts. When no load is connected, adjust the pulse width to the minimum direction until the output voltage is 12 volts. This is the minimum maintenance pulse width.
When the load is connected, the voltage immediately drops because the output current becomes larger. At this time, the pulse width needs to be increased and adjusted until the voltage output is 12 volts.
When the pulse width reaches a certain level, it can no longer be adjusted upward, because no matter how wide it is, the transformer cannot pass it, and the efficiency becomes very low, and may even damage the transformer and power components. At this time, it will immediately enter the overload protection state. To put it simply, if the pulse width is adjusted to the maximum value and it still cannot reach 12 volts, it will be overloaded.
There is another situation, that is, short-circuit protection, which means adjusting the pulse width, but the voltage does not change and is always 0 volts. In this case, short-circuit protection will be entered immediately.
Because the switching power supply always adjusts upward from the minimum pulse width, and as long as it is from a regular merchant, or the chip you use has overload and short-circuit protection, it is very safe.