How to regulate PWM to control a boost converter
Short answer: vary duty cycle, keep frequency constant. Preferably, use the highest feasible frequency.

The common approach for designing the control of a switched-mode supply is using the state-space averaged model of the system (first introduced by Cuk in 1976, link).

This averaged model best represents the actual system the closer the switching period is to zero. Therefore, choose the highest feasible frequency for PWM (achievable by the microcontroller, without signal corruption), and don't change it.

The control action is then inherently a matter of duty-cycle calculation. The most direct approach is using the steady-state assumption (output voltage is already constant) and obatin duty cycle like the wikipedia article \$D = 1-\frac{Vi}{Vo}\$. Or make use of the state-space averaged model and design a controller with PI action.