From: penglei <1624952103@qq.com> Date: Wed, 26 Jun 2024 11:56:25 +0000 (+0800) Subject: 功耗调优 X-Git-Tag: release_V1.2.70_20241020_135402~948^2 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F384%2Fhead;p=mirrors%2FFD230.git 功耗调优 --- diff --git a/code/sdk/application/battery/service/battery_service.cpp b/code/sdk/application/battery/service/battery_service.cpp index 68c9191db..11c89da2e 100644 --- a/code/sdk/application/battery/service/battery_service.cpp +++ b/code/sdk/application/battery/service/battery_service.cpp @@ -238,18 +238,17 @@ static void battery_check_chargement(void) * other stat , use high charge current * pay attention to : debounce */ + enable_charge(); if(percent >=90) { PRINT("%d >= 90 percent , enable low current charge !\r\n",percent); - enable_charge(); enable_02c(); g_chargestatus = 1; } else { PRINT("%d < 90 percent , enable normal current charge !\r\n",percent); - enable_charge(); disable_02c(); g_chargestatus = 2; } @@ -260,7 +259,8 @@ static void battery_check_chargement(void) //冗余操作,理论上不必在此关闭充电IC PRINT("charger not plugged ,disable charge !\r\n"); - disable_charge(); + enable_charge(); //防漏电 + enable_02c(); //防漏电 g_chargestatus = 0; /** @@ -332,7 +332,8 @@ static void battery_check_task(void *arg) g_check_count = 0 ; //超时交换状态 - disable_charge(); + if(get_charge_stat() == 1) + disable_charge(); last_battery_charge_enable_status = false; // charger_plug_event_ui_sendmsg_toUI(0); } diff --git a/code/sdk/drivers/boards/brandy_evb/board_config/board_evb.h b/code/sdk/drivers/boards/brandy_evb/board_config/board_evb.h index 1d618fb85..26fb5c3a4 100755 --- a/code/sdk/drivers/boards/brandy_evb/board_config/board_evb.h +++ b/code/sdk/drivers/boards/brandy_evb/board_config/board_evb.h @@ -279,7 +279,7 @@ const hal_gpio_config_t g_gpio_function_config[PIN_MAX_NUMBER] = { // #define GPIO_PIN_ENABLE_CHARGE S_AGPIO_R9 //low enable // #define GPIO_PIN_ENABLE_CHARGE_0_2C S_AGPIO_L20 //low 0.2c 低电流充电 { S_AGPIO_R9, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_LOW, 0, NULL }, - { S_AGPIO_L20, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_HIGH, 0, NULL }, + { S_AGPIO_L20, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_LOW, 0, NULL }, #else { S_AGPIO_R9, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_LOW, 0, NULL }, { S_AGPIO_L20, HAL_GPIO_DIRECTION_OUTPUT, HAL_GPIO_LEVEL_HIGH, 0, NULL },