Make load OC and LVD recovery delay configurable
This commit is contained in:
committed by
Martin Jäger
parent
ab63204adb
commit
6be4e20f04
@@ -70,6 +70,7 @@
|
||||
label = "Load output";
|
||||
gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>;
|
||||
current-max = <10>;
|
||||
kconfig-flag; /* make node visible in Kconfig */
|
||||
};
|
||||
|
||||
usb-pwr {
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
label = "Load output";
|
||||
gpios = <&gpiob 15 GPIO_ACTIVE_LOW>;
|
||||
current-max = <20>;
|
||||
kconfig-flag; /* make node visible in Kconfig */
|
||||
};
|
||||
|
||||
charge_pump {
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
label = "Load output";
|
||||
gpios = <&gpiob 2 GPIO_ACTIVE_LOW>;
|
||||
current-max = <20>;
|
||||
kconfig-flag; /* make node visible in Kconfig */
|
||||
};
|
||||
|
||||
uext_en {
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
label = "Load output";
|
||||
gpios = <&gpiob 2 GPIO_ACTIVE_LOW>;
|
||||
current-max = <15>;
|
||||
kconfig-flag; /* make node visible in Kconfig */
|
||||
};
|
||||
|
||||
usb-pwr {
|
||||
|
||||
+4
-2
@@ -34,8 +34,10 @@ LoadOutput::LoadOutput(DcBus *dc_bus, void (*drv_switch_fn)(bool), void (*drv_in
|
||||
|
||||
switch_set(false);
|
||||
junction_temperature = 25; // starting point: 25°C
|
||||
oc_recovery_delay = 5*60; // default: 5 minutes
|
||||
lvd_recovery_delay = 60*60; // default: 1 hour
|
||||
|
||||
oc_recovery_delay = CONFIG_LOAD_OC_RECOVERY_DELAY;
|
||||
lvd_recovery_delay = CONFIG_LOAD_LVD_RECOVERY_DELAY;
|
||||
|
||||
ov_hysteresis = 0.3;
|
||||
|
||||
enable = true; // switch on in next control() call if everything is fine
|
||||
|
||||
@@ -45,3 +45,5 @@
|
||||
#define CONFIG_BAT_CHARGE_TEMP_MIN 0
|
||||
#define CONFIG_BAT_DISCHARGE_TEMP_MAX 50
|
||||
#define CONFIG_BAT_DISCHARGE_TEMP_MIN -10
|
||||
#define CONFIG_LOAD_OC_RECOVERY_DELAY 300
|
||||
#define CONFIG_LOAD_LVD_RECOVERY_DELAY 300
|
||||
|
||||
@@ -291,6 +291,23 @@ endmenu # Custom temperature settings
|
||||
|
||||
endmenu # Battery default settings
|
||||
|
||||
|
||||
menu "Load output settings"
|
||||
depends on $(dt_node_has_bool_prop,/outputs/load,kconfig-flag)
|
||||
|
||||
config LOAD_OC_RECOVERY_DELAY
|
||||
int "Overcurrent recovery delay (s)"
|
||||
default 300
|
||||
|
||||
config LOAD_LVD_RECOVERY_DELAY
|
||||
int "Low-voltage disconnect recovery delay (s)"
|
||||
default 300
|
||||
help
|
||||
Prevents toggling load output in case of heavy load and low state of charge.
|
||||
|
||||
endmenu # Load output settings
|
||||
|
||||
|
||||
endmenu # Charge controller setup
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user