Method for controlling a device for charging a motor vehicle battery, the charging device comprising a rectifier stage providing a power factor correction function, said rectifier stage being connected at input to an electricity supply grid and including two DC supply buses at output, to each of which an output capacitor (C1, C2) is connected, each output capacitor being coupled at input to an LLC resonant converter circuit (14, 16) of a DC-to-DC converter stage connected to the battery, each LLC resonant converter circuit (14, 16) comprising a set of switches (140, 160) connected at input to one of the output capacitors (C1, C2) of the rectifier stage and at output in series to a resonant circuit (L, C) and to the first winding of a transformer, the second winding of the transformer being linked to a diode bridge linked to the battery, said method being characterized in that it comprises the following steps, for each LLC resonant converter circuit: - a measured voltage (V_DC) across the terminals of the output capacitor coupled at the input of the LLC resonant converter circuit is compared with a setpoint voltage (V_DC_REF), - the switching frequency (f_control) of the switches of said set of switches is set depending on the sign of the difference between the measurement of the voltage across the terminals of the output capacitor and the setpoint voltage; more specifically: - it is determined whether the difference between the measurement of the voltage across the terminals of the output capacitor and the setpoint voltage is higher than zero, - if this is the case, the switching frequency is set to a first frequency value (f_power) designed to make the switches of said set operate so as to transmit the energy stored in the output capacitor to the battery by way of said LLC resonant circuit, and - if not, if the difference between the measurement of the voltage across the terminals of the output capacitor and the setpoint voltage becomes lower than zero, the switching frequency is set to a third frequency value (f_low) higher than said first frequency value (f_power) for as long as said difference in absolute value is lower than a threshold (low_threshold), and the switching frequency is set to a second frequency value (f_cutoff) when said difference in absolute value becomes higher than said threshold, said second frequency value (f_cutoff) being designed to cut off any transfer of energy from the output capacitor to the battery. - a measured voltage (V_DC) across the terminals of the output capacitor coupled at the input of the LLC resonant converter circuit is compared with a setpoint voltage (V_DC_REF), - the switching frequency (f_control) of the switches of said set of switches is set depending on the sign of the difference between the measurement of the voltage across the terminals of the output capacitor and the setpoint voltage; more specifically: - it is determined whether the difference between the measurement of the voltage across the terminals of the output capacitor and the setpoint voltage is higher than zero, - if this is the case, the switching frequency is set to a first frequency value (f_power) designed to make the switches of said set operate so as to transmit the energy stored in the output capacitor to the battery by way of said LLC resonant circuit, and - if not, if the difference between the measurement of the voltage across the terminals of the output capacitor and the setpoint voltage becomes lower than zero, the switching frequency is set to a third frequency value (f_low) higher than said first frequency value (f_power) for as long as said difference in absolute value is lower than a threshold (low_threshold), and the switching frequency is set to a second frequency value (f_cutoff) when said difference in absolute value becomes higher than said threshold, said second frequency value (f_cutoff) being designed to cut off any transfer of energy from the output capacitor to the battery.