comparison src/cs/drivers/drv_app/fchg/fchg_process.c @ 364:44795dbadbae

FCHG: bug in CV process caused the control loop to be skipped
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 30 Dec 2017 06:10:48 +0000
parents cce24b9de6db
children 65d53dede3b2
comparison
equal deleted inserted replaced
363:cce24b9de6db 364:44795dbadbae
178 { 178 {
179 if (pwr_ctrl->batt_mv < pwr_ctrl->config.overvoltage) 179 if (pwr_ctrl->batt_mv < pwr_ctrl->config.overvoltage)
180 return 0; 180 return 0;
181 if (pwr_ctrl->cv_dac_curr != 181 if (pwr_ctrl->cv_dac_curr !=
182 (pwr_ctrl->cv_dac_init - pwr_ctrl->config.cv_dac_max_decr)) 182 (pwr_ctrl->cv_dac_init - pwr_ctrl->config.cv_dac_max_decr))
183 return; 183 return 0;
184 rvf_send_trace("Stopping charge by overvoltage condition", 40, 184 rvf_send_trace("Stopping charge by overvoltage condition", 40,
185 NULL_PARAM, RV_TRACE_LEVEL_DEBUG_HIGH, FCHG_USE_ID); 185 NULL_PARAM, RV_TRACE_LEVEL_DEBUG_HIGH, FCHG_USE_ID);
186 ABB_Write_Register_on_page(PAGE0, BCICTL2, 0); 186 ABB_Write_Register_on_page(PAGE0, BCICTL2, 0);
187 pwr_init_discharge(); 187 pwr_init_discharge();
188 pwr_ctrl->state = FCHG_STATE_READY_TO_RECHARGE; 188 pwr_ctrl->state = FCHG_STATE_READY_TO_RECHARGE;