Controlling switching frequency

The carrier frequency is always the same: 31.250 kHz (or as close as your system clock allows).