changeset 261:61e0be63559c

pirelli/fw-disasm: pwr_start_CV_charging() analyzed
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 26 Dec 2017 07:13:21 +0000
parents 863b483bf9e7
children db000ea183a5
files pirelli/fw-disasm
diffstat 1 files changed, 28 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pirelli/fw-disasm	Tue Dec 26 06:49:53 2017 +0000
+++ b/pirelli/fw-disasm	Tue Dec 26 07:13:21 2017 +0000
@@ -567,7 +567,7 @@
   2e2264:	0280		lsl	r0, r0, #10
   2e2266:	4979		ldr	r1, =0x801734	; via 0x2e244c
   2e2268:	8809		ldrh	r1, [r1, #0]
-  2e226a:	f114 ffc7	bl	0x3f71fc
+  2e226a:	f114 ffc7	bl	0x3f71fc	; U$DIV
   2e226e:	4668		mov	r0, sp
   2e2270:	8101		strh	r1, [r0, #8]
   2e2272:	8900		ldrh	r0, [r0, #8]
@@ -2354,6 +2354,26 @@
   32e242:	b002		add	sp, #8
   32e244:	bdf0		pop	{r4, r5, r6, r7, pc}
 
+; This function gets called at the beginning of CI and CV charging phases
+; it clears the Ichg averaging structure
+  32e246:	4a84		ldr	r2, =0x1774e38	; via 0x32e458
+  32e248:	6810		ldr	r0, [r2, #0]
+  32e24a:	2100		mov	r1, #0
+  32e24c:	8601		strh	r1, [r0, #48]	; 0x30
+  32e24e:	8581		strh	r1, [r0, #44]	; 0x2c
+  32e250:	6812		ldr	r2, [r2, #0]
+  32e252:	2000		mov	r0, #0
+  32e254:	0043		lsl	r3, r0, #1
+  32e256:	18d3		add	r3, r2, r3
+  32e258:	8419		strh	r1, [r3, #32]	; 0x20
+  32e25a:	1c40		add	r0, r0, #1
+  32e25c:	0400		lsl	r0, r0, #16
+  32e25e:	0c00		lsr	r0, r0, #16
+  32e260:	2806		cmp	r0, #6
+  32e262:	dbf7		blt	0x32e254
+  32e264:	4770		bx	lr
+  32e266:	46c0		nop			(mov r8, r8)
+
 ; This function seems to be in charge of enforcing some kind of time limit
 ; on the charging process, with non-understood handling when this limit
 ; is exceeded and the "Charge Process exceeds .!!" trace is emitted.
@@ -5287,6 +5307,13 @@
 0x17749b8:	8-bit var zeroed in pwr_stop_charging(), set to 1 in
 		pwr_start_CI_charging() and pwr_start_CV_charging()
 
+0x17749c0:	16-bit var, init to 0 in pwr_start_CV_charging()
+0x17749c2:	16-bit var, init to 0 in pwr_start_CV_charging()
+0x17749c4:	16-bit var, init to 3 in pwr_start_CV_charging()
+0x17749c6:	16-bit var, initial CV DAC value gets written here
+0x17749c8:	16-bit var, init to 0 in pwr_start_CV_charging()
+0x17749ca:	16-bit var, initial CV DAC value gets written here
+
 0x1774b78:	16-bit var, gets -4 written into it if the battery T
 		is too high, or -5 if it is too low
 0x1774b7a:	16-bit var set to 0 when starting CI charging,