A method comprising: charging a battery through a first charger and a second charger connected in parallel, wherein the charging comprises a constant current phase and a constant voltage phase, and wherein the first charger is a buck converter, and the second charger is a switched capacitor converter; during a first transition from the constant current charging phase to the constant voltage charging phase, wherein the first transition comprises the time interval from a time point T3 to a time point T4, enabling the second charger at a first time instant and disabling the first charger at a second time instant (T3+), the second time instant (T3+) being after the first time instant, wherein the first charger and the second charger are configured to charge the battery simultaneously between the first time instant and the second time instant (T3+), whereby a voltage bus V bus feeding the first and the second charger is controlled by a DC/DC converter resulting in turning on the second charger at the first time instant and in increasing the current flowing through the second charger by raising the output voltage of a rectifier, whose output is connected to the DC/DC converter; and during the constant voltage charging phase, enabling the first charger at a third time instant upon detecting that a current flowing through the battery is less than a predetermined current threshold and disabling the second charger at a fourth time instant (T5+), the third time instant being after the second time instant (T3+) and the fourth time instant (T5+) being after the third time instant, wherein the first charger and the second charger are configured to charge the battery simultaneously between the third time instant and the fourth time instant (T5+), wherein a current limit function of a controller configured to control the charging of the battery is used to smooth the transition between the first charger and the second charger, whereby during the first transition the current flowing through the first charger is kept the same or slowly decreasing though adjusting the current limit of the first charger by the current limit function. charging a battery through a first charger and a second charger connected in parallel, wherein the charging comprises a constant current phase and a constant voltage phase, and wherein the first charger is a buck converter, and the second charger is a switched capacitor converter; during a first transition from the constant current charging phase to the constant voltage charging phase, wherein the first transition comprises the time interval from a time point T3 to a time point T4, enabling the second charger at a first time instant and disabling the first charger at a second time instant (T3+), the second time instant (T3+) being after the first time instant, wherein the first charger and the second charger are configured to charge the battery simultaneously between the first time instant and the second time instant (T3+), whereby a voltage bus V bus feeding the first and the second charger is controlled by a DC/DC converter resulting in turning on the second charger at the first time instant and in increasing the current flowing through the second charger by raising the output voltage of a rectifier, whose output is connected to the DC/DC converter; and during the constant voltage charging phase, enabling the first charger at a third time instant upon detecting that a current flowing through the battery is less than a predetermined current threshold and disabling the second charger at a fourth time instant (T5+), the third time instant being after the second time instant (T3+) and the fourth time instant (T5+) being after the third time instant, wherein the first charger and the second charger are configured to charge the battery simultaneously between the third time instant and the fourth time instant (T5+), wherein a current limit function of a controller configured to control the charging of the battery is used to smooth the transition between the first charger and the second charger, whereby during the first transition the current flowing through the first charger is kept the same or slowly decreasing though adjusting the current limit of the first charger by the current limit function.