Mitigation of Single Event Upsets in the control logic of a charge equalizer for Li-ion batteries