This paper describes a hardware-description-language-coded autotuning algorithm for digital PID-controlled DC-DC power converters based on online frequency-response measurement. The algorithm determines the PID controller parameters required to maximize the closed-loop bandwidth of the feedback control system while maintaining user-specified stability margins and integral-based no-limit-cycling criteria, as well as ensuring single-crossover-frequency operation and sufficiently high loop gain magnitude at low frequencies. Experimental results are provided for five different pulsewidth-modulated DC-DC converters, including a well-damped synchronous buck, a lightly damped synchronous buck with and without a poorly damped input filter, a boost operating in continuous-conduction mode, and a boost operating in discontinuous-conduction mode.