A controller (200; 500) for a switched mode power converter having a switch, wherein the switched mode power converter can operate in a constant current and a constant voltage modes of operation, wherein the controller (200; 500) is configured to output a switch control signal (206; 506) for the switch and receive: a sensed voltage input signal (202; 502); and a primary current input signal (204; 504); wherein the controller (200; 500) comprises: a constant current mode controller (212; 512) configured to process the sensed voltage input signal (202; 502) and generate output control signals (558, 560) for controlling one or both of peak current and switching frequency operational parameters of the switched mode power converter in order to change an output power and maintain a constant output current in a constant current mode of operation; a constant voltage mode controller (214; 514) configured to process the sensed voltage input signal (202; 502) and generate output control signals (538, 540) for controlling one or both of the peak current and switching frequency operational parameters of the switched mode power converter in order to change an output power and maintain a constant output voltage in a constant voltage mode of operation; a primary peak current adjuster (208; 508) configured to process the primary current input signal (204; 504) and one or both of the output control signals (538, 560) from the constant current mode controller (212; 512) and the output control signals of the constant voltage mode controller (214; 514) in order to configure the switch control signal (206; 506) to turn off the switch; a switching frequency adjuster (210; 510) configured to process one or both of the output control signals (540, 558) from the constant current mode controller (212; 512) and the output control signals of the constant voltage mode controller (214; 514) in order to configure the switch control signal (206; 506) to turn on the switch; wherein the controller is configured to operate the switched mode power converter with maximum values for the switching frequency and primary peak current at the transition between the constant current mode of operation and the constant voltage mode of operation; and wherein the controller (200; 500) is configured to enable the constant current mode controller (212; 512) if: (i) the output control signals of the constant voltage mode controller (214; 514) represent operation with peak current and switching frequency at the maximum values; and (ii) the sensed voltage input signal (V FBS; 212) drops to a constant current threshold level (V FBSCC, 304) that is below the voltage level (V FBSCV, 302) when the switched mode power converter is operating in constant voltage mode. a sensed voltage input signal (202; 502); and a primary current input signal (204; 504); a constant current mode controller (212; 512) configured to process the sensed voltage input signal (202; 502) and generate output control signals (558, 560) for controlling one or both of peak current and switching frequency operational parameters of the switched mode power converter in order to change an output power and maintain a constant output current in a constant current mode of operation; a constant voltage mode controller (214; 514) configured to process the sensed voltage input signal (202; 502) and generate output control signals (538, 540) for controlling one or both of the peak current and switching frequency operational parameters of the switched mode power converter in order to change an output power and maintain a constant output voltage in a constant voltage mode of operation; a primary peak current adjuster (208; 508) configured to process the primary current input signal (204; 504) and one or both of the output control signals (538, 560) from the constant current mode controller (212; 512) and the output control signals of the constant voltage mode controller (214; 514) in order to configure the switch control signal (206; 506) to turn off the switch; a switching frequency adjuster (210; 510) configured to process one or both of the output control signals (540, 558) from the constant current mode controller (212; 512) and the output control signals of the constant voltage mode controller (214; 514) in order to configure the switch control signal (206; 506) to turn on the switch; wherein the controller is configured to operate the switched mode power converter with maximum values for the switching frequency and primary peak current at the transition between the constant current mode of operation and the constant voltage mode of operation; and wherein the controller (200; 500) is configured to enable the constant current mode controller (212; 512) if: (i) the output control signals of the constant voltage mode controller (214; 514) represent operation with peak current and switching frequency at the maximum values; and (ii) the sensed voltage input signal (V FBS; 212) drops to a constant current threshold level (V FBSCC, 304) that is below the voltage level (V FBSCV, 302) when the switched mode power converter is operating in constant voltage mode.