summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-08-26 07:41:20 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-08-26 08:34:07 -0400
commitf791df13751d0c43a2b1ae0adb6f6bc4385c2cc3 (patch)
treeee62b4805f477e1ca31380e1db324af60a43cc44
parent099bde885d8ef81ee3cbf96dadee72b5c5e9a8c7 (diff)
downloadrockbox-f791df13751d0c43a2b1ae0adb6f6bc4385c2cc3.tar.gz
rockbox-f791df13751d0c43a2b1ae0adb6f6bc4385c2cc3.zip
xduoox3: Update battery discharge curve and runtime estimates
(Brand new unit lasted one minute shy of 12 hours!) Change-Id: I0330f43065412d432a45b555bb310f943eb526e7
-rw-r--r--firmware/export/config/xduoox3.h4
-rw-r--r--firmware/target/mips/ingenic_jz47xx/xduoo_x3/sadc-xduoo_x3.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/firmware/export/config/xduoox3.h b/firmware/export/config/xduoox3.h
index 75f9b43cb0..30f0330edd 100644
--- a/firmware/export/config/xduoox3.h
+++ b/firmware/export/config/xduoox3.h
@@ -116,6 +116,10 @@
116#define BATTERY_CAPACITY_INC 100 /* capacity increment */ 116#define BATTERY_CAPACITY_INC 100 /* capacity increment */
117#define BATTERY_TYPES_COUNT 1 /* only one type */ 117#define BATTERY_TYPES_COUNT 1 /* only one type */
118 118
119#define CURRENT_NORMAL 167 // 2.78mA * 60s
120#define CURRENT_BACKLIGHT 180 // 15mA * 60s
121#define CURRENT_MAX_CHG 500 // bursts higher if needed
122
119#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 123#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
120 124
121/* Hardware controlled charging with monitoring */ 125/* Hardware controlled charging with monitoring */
diff --git a/firmware/target/mips/ingenic_jz47xx/xduoo_x3/sadc-xduoo_x3.c b/firmware/target/mips/ingenic_jz47xx/xduoo_x3/sadc-xduoo_x3.c
index d227255b8a..e1e578ae67 100644
--- a/firmware/target/mips/ingenic_jz47xx/xduoo_x3/sadc-xduoo_x3.c
+++ b/firmware/target/mips/ingenic_jz47xx/xduoo_x3/sadc-xduoo_x3.c
@@ -151,26 +151,26 @@ void KEY_INT_IRQ(void)
151const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = 151const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
152{ 152{
153 /* 5% */ 153 /* 5% */
154 3634 154 3414
155}; 155};
156 156
157const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 157const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
158{ 158{
159 /* 0% */ 159 /* 0% */
160 3300 160 3307
161}; 161};
162 162
163 163
164/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 164/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
165const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 165const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
166{ 166{
167 { 3300, 3652, 3704, 3730, 3753, 3786, 3836, 3906, 3973, 4061, 4160 } 167 { 3307, 3459, 3530, 3575, 3608, 3648, 3723, 3819, 3918, 4022, 4162 }
168}; 168};
169 169
170#if CONFIG_CHARGING 170#if CONFIG_CHARGING
171/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ 171/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
172const unsigned short percent_to_volt_charge[11] = 172const unsigned short percent_to_volt_charge[11] =
173 { 3300, 3652, 3704, 3730, 3753, 3786, 3836, 3906, 3973, 4061, 4160 }; 173 { 3307, 3459, 3530, 3575, 3608, 3648, 3723, 3819, 3918, 4022, 4162 };
174#endif /* CONFIG_CHARGING */ 174#endif /* CONFIG_CHARGING */
175 175
176/* VBAT = (BDATA/1024) * 2.5V */ 176/* VBAT = (BDATA/1024) * 2.5V */