A control circuit for a polarity inverting buck-boost DC-DC converter,
includes an operational trans-conductance amplifier that has inputs to
which a sensed voltage difference signal is applied and an output
connected to an input of a voltage-to-duty-cycle converter. A
compensation capacitance is connected between the output of the amplifier
and a fixed supply terminal. The compensation capacitance includes a
first capacitor that is permanently connected between the output of the
amplifier and the fixed supply terminal and a second capacitor that has a
switched connection between the output of the amplifier and the fixed
supply terminal. The first capacitor has a small capacitance compared to
the second capacitor. The switched connection of the second capacitor is
controlled by a continuous-discontinuous mode detection circuit.