Design and Implementation of Fault-Tolerant Firmware Updating Methods for Time-Critical Battery Products