LFP battery management