diff pirelli/fw-disasm @ 262:db000ea183a5

pirelli/fw-disasm: CV charging analyzed
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 26 Dec 2017 12:26:23 +0000
parents 61e0be63559c
children
line wrap: on
line diff
--- a/pirelli/fw-disasm	Tue Dec 26 07:13:21 2017 +0000
+++ b/pirelli/fw-disasm	Tue Dec 26 12:26:23 2017 +0000
@@ -1291,6 +1291,426 @@
   2e29a8:	b002		add	sp, #8
   2e29aa:	bd70		pop	{r4, r5, r6, pc}
 
+$pwr_CI_charge_timer_process:
+  2e29e4:	b510		push	{r4, lr}
+  2e29e6:	b082		sub	sp, #8
+  2e29e8:	f066 fc90	bl	0x34930c	; $ABB_Read_Status
+  2e29ec:	09c0		lsr	r0, r0, #7
+  2e29ee:	d324		bcc	0x2e2a3a	; return
+; charging power still present
+  2e29f0:	4cec		ldr	r4, =0x1774e70	; via 0x2e2da4
+  2e29f2:	6820		ldr	r0, [r4, #0]
+  2e29f4:	8f81		ldrh	r1, [r0, #60]	; 0x3c
+  2e29f6:	8f40		ldrh	r0, [r0, #58]	; 0x3a
+  2e29f8:	0840		lsr	r0, r0, #1
+  2e29fa:	4281		cmp	r1, r0
+  2e29fc:	dd08		ble	0x2e2a10
+; taking too long?
+  2e29fe:	f7ff fbdd	bl	0x2e21bc
+  2e2a02:	2800		cmp	r0, #0
+  2e2a04:	d104		bne	0x2e2a10
+  2e2a06:	6820		ldr	r0, [r4, #0]
+  2e2a08:	303c		add	r0, #60	; 0x3c
+  2e2a0a:	8801		ldrh	r1, [r0, #0]
+  2e2a0c:	3901		sub	r1, #1
+  2e2a0e:	e003		b	0x2e2a18
+; no time issue
+  2e2a10:	6820		ldr	r0, [r4, #0]
+  2e2a12:	303c		add	r0, #60	; 0x3c
+  2e2a14:	8801		ldrh	r1, [r0, #0]
+  2e2a16:	3101		add	r1, #1
+  2e2a18:	8001		strh	r1, [r0, #0]
+  2e2a1a:	6820		ldr	r0, [r4, #0]
+  2e2a1c:	8f81		ldrh	r1, [r0, #60]	; 0x3c
+  2e2a1e:	8f40		ldrh	r0, [r0, #58]	; 0x3a
+  2e2a20:	4281		cmp	r1, r0
+  2e2a22:	dd08		ble	0x2e2a36
+  2e2a24:	48e9		ldr	r0, =0xa0020	; via 0x2e2dcc
+  2e2a26:	9000		str	r0, [sp, #0]
+  2e2a28:	a02e		add	r0, pc, #184	; 0xb8
+  2e2a2a:	211d		mov	r1, #29	; 0x1d
+  2e2a2c:	2200		mov	r2, #0
+  2e2a2e:	43d2		mvn	r2, r2
+  2e2a30:	2302		mov	r3, #2
+  2e2a32:	f0f8 f8ff	bl	0x3dac34
+  2e2a36:	f04b f903	bl	0x32dc40	; $pwr_get_battery_temperature
+  2e2a3a:	b002		add	sp, #8
+  2e2a3c:	bd10		pop	{r4, pc}
+  2e2a3e:	46c0		nop			(mov r8, r8)
+
+$pwr_CV_charge_process:
+  2e2b14:	b5f0		push	{r4, r5, r6, r7, lr}
+  2e2b16:	4640		mov	r0, r8
+  2e2b18:	4649		mov	r1, r9
+  2e2b1a:	4652		mov	r2, r10
+  2e2b1c:	465b		mov	r3, r11
+  2e2b1e:	b40f		push	{r0, r1, r2, r3}
+  2e2b20:	b082		sub	sp, #8
+  2e2b22:	2138		mov	r1, #56	; 0x38
+  2e2b24:	489f		ldr	r0, =0x1774e70	; via 0x2e2da4
+  2e2b26:	6800		ldr	r0, [r0, #0]
+  2e2b28:	5e08		ldrsh	r0, [r1, r0]
+  2e2b2a:	f04a fff8	bl	0x32db1e	; $pwr_bat_temp_within_limits
+  2e2b2e:	2800		cmp	r0, #0
+  2e2b30:	d115		bne	0x2e2b5e
+; error path
+  2e2b32:	f7ff fbdc	bl	0x2e22ee
+  2e2b36:	48a5		ldr	r0, =0xa0020	; via 0x2e2dcc
+  2e2b38:	9000		str	r0, [sp, #0]
+  2e2b3a:	a037		add	r0, pc, #220	; 0xdc
+  2e2b3c:	2121		mov	r1, #33	; 0x21
+  2e2b3e:	2200		mov	r2, #0
+  2e2b40:	43d2		mvn	r2, r2
+  2e2b42:	2302		mov	r3, #2
+  2e2b44:	f0f8 f876	bl	0x3dac34
+  2e2b48:	2000		mov	r0, #0
+  2e2b4a:	f0b2 f9ba	bl	0x394ec2
+  2e2b4e:	2032		mov	r0, #50	; 0x32
+  2e2b50:	493a		ldr	r1, =0x1774e38	; via 0x2e2c3c
+  2e2b52:	6809		ldr	r1, [r1, #0]
+  2e2b54:	5c40		ldrb	r0, [r0, r1]
+  2e2b56:	2800		cmp	r0, #0
+  2e2b58:	d100		bne	0x2e2b5c
+  2e2b5a:	e11d		b	0x2e2d98
+  2e2b5c:	e157		b	0x2e2e0e
+; good path
+  2e2b5e:	4e37		ldr	r6, =0x1774e38	; via 0x2e2c3c
+  2e2b60:	2133		mov	r1, #51	; 0x33
+  2e2b62:	6830		ldr	r0, [r6, #0]
+  2e2b64:	5c08		ldrb	r0, [r1, r0]
+  2e2b66:	2800		cmp	r0, #0
+  2e2b68:	d10d		bne	0x2e2b86
+; is_adc_on FALSE
+  2e2b6a:	2001		mov	r0, #1
+  2e2b6c:	2122		mov	r1, #34	; 0x22
+  2e2b6e:	2200		mov	r2, #0
+  2e2b70:	f066 fb4c	bl	0x34920c
+  2e2b74:	2001		mov	r0, #1
+  2e2b76:	f7ce fe92	bl	0x2b189e
+  2e2b7a:	2001		mov	r0, #1
+  2e2b7c:	2122		mov	r1, #34	; 0x22
+  2e2b7e:	f066 fb6c	bl	0x34925a
+  2e2b82:	1c04		add	r4, r0, #0
+  2e2b84:	e001		b	0x2e2b8a
+; is_adc_on TRUE
+  2e2b86:	6830		ldr	r0, [r6, #0]
+  2e2b88:	8904		ldrh	r4, [r0, #8]
+; is_adc_on paths join
+  2e2b8a:	1c20		add	r0, r4, #0
+  2e2b8c:	f04b fae1	bl	0x32e152	; Ichg averaging
+  2e2b90:	1c04		add	r4, r0, #0
+  2e2b92:	4d4e		ldr	r5, =0x1774b78	; via 0x2e2ccc
+  2e2b94:	f04a ffb1	bl	0x32dafa	; $pwr_adc_to_mA
+  2e2b98:	80e8		strh	r0, [r5, #6]
+  2e2b9a:	88e8		ldrh	r0, [r5, #6]
+  2e2b9c:	f04b fa8e	bl	0x32e0bc
+; "TIMER2" trace
+  2e2ba0:	488a		ldr	r0, =0xa0020	; via 0x2e2dcc
+  2e2ba2:	9000		str	r0, [sp, #0]
+  2e2ba4:	a0cd		add	r0, pc, #820	; 0x334
+  2e2ba6:	2106		mov	r1, #6
+  2e2ba8:	2200		mov	r2, #0
+  2e2baa:	43d2		mvn	r2, r2
+  2e2bac:	2302		mov	r3, #2
+  2e2bae:	f0f8 f841	bl	0x3dac34
+; "Ichg (MADC code) " trace
+  2e2bb2:	4886		ldr	r0, =0xa0020	; via 0x2e2dcc
+  2e2bb4:	9000		str	r0, [sp, #0]
+  2e2bb6:	a040		add	r0, pc, #256	; 0x100
+  2e2bb8:	2111		mov	r1, #17	; 0x11
+  2e2bba:	1c22		add	r2, r4, #0
+  2e2bbc:	2305		mov	r3, #5
+  2e2bbe:	f0f8 f839	bl	0x3dac34
+  2e2bc2:	2133		mov	r1, #51	; 0x33
+  2e2bc4:	6830		ldr	r0, [r6, #0]
+  2e2bc6:	5c08		ldrb	r0, [r1, r0]
+  2e2bc8:	2800		cmp	r0, #0
+  2e2bca:	d10c		bne	0x2e2be6
+; is_adc_on FALSE
+  2e2bcc:	2001		mov	r0, #1
+  2e2bce:	211e		mov	r1, #30	; 0x1e
+  2e2bd0:	2200		mov	r2, #0
+  2e2bd2:	f066 fb1b	bl	0x34920c
+  2e2bd6:	2001		mov	r0, #1
+  2e2bd8:	f7ce fe61	bl	0x2b189e
+  2e2bdc:	2001		mov	r0, #1
+  2e2bde:	211e		mov	r1, #30	; 0x1e
+  2e2be0:	f066 fb3b	bl	0x34925a
+  2e2be4:	e001		b	0x2e2bea
+; is_adc_on TRUE
+  2e2be6:	f04b fa77	bl	0x32e0d8
+; is_adc_on paths join
+  2e2bea:	4680		mov	r8, r0
+  2e2bec:	4d37		ldr	r5, =0x1774b78	; via 0x2e2ccc
+  2e2bee:	4640		mov	r0, r8
+  2e2bf0:	f04a ff7a	bl	0x32dae8	; $pwr_adc_to_mvolt
+  2e2bf4:	80a8		strh	r0, [r5, #4]
+  2e2bf6:	486b		ldr	r0, =0x1774e70	; via 0x2e2da4
+  2e2bf8:	4681		mov	r9, r0
+  2e2bfa:	2138		mov	r1, #56	; 0x38
+  2e2bfc:	6800		ldr	r0, [r0, #0]
+  2e2bfe:	5e08		ldrsh	r0, [r1, r0]
+  2e2c00:	3001		add	r0, #1
+  2e2c02:	2800		cmp	r0, #0
+  2e2c04:	d100		bne	0x2e2c08
+  2e2c06:	e098		b	0x2e2d3a
+; temperature != -1
+  2e2c08:	88aa		ldrh	r2, [r5, #4]
+  2e2c0a:	48d6		ldr	r0, =0x108c	; via 0x2e2f64
+  2e2c0c:	4282		cmp	r2, r0
+  2e2c0e:	da17		bge	0x2e2c40
+; Vbat < 4236
+  2e2c10:	49d6		ldr	r1, =0x17749c8	; via 0x2e2f6c
+  2e2c12:	2000		mov	r0, #0
+  2e2c14:	8008		strh	r0, [r1, #0]
+  2e2c16:	e046		b	0x2e2ca6
+; Vbat >= 4236
+  2e2c40:	4bca		ldr	r3, =0x17749c8	; via 0x2e2f6c
+  2e2c42:	8818		ldrh	r0, [r3, #0]
+  2e2c44:	3001		add	r0, #1
+  2e2c46:	0400		lsl	r0, r0, #16
+  2e2c48:	0c01		lsr	r1, r0, #16
+  2e2c4a:	8019		strh	r1, [r3, #0]
+  2e2c4c:	48c8		ldr	r0, =0x17749c4	; via 0x2e2f70
+  2e2c4e:	4682		mov	r10, r0
+  2e2c50:	8800		ldrh	r0, [r0, #0]
+  2e2c52:	4281		cmp	r1, r0
+  2e2c54:	dd27		ble	0x2e2ca6
+; Vbat has been high 4 times in a row
+  2e2c56:	4fc7		ldr	r7, =0x17749ca	; via 0x2e2f74
+  2e2c58:	8839		ldrh	r1, [r7, #0]
+  2e2c5a:	48c7		ldr	r0, =0x17749c6	; via 0x2e2f78
+  2e2c5c:	8800		ldrh	r0, [r0, #0]
+  2e2c5e:	3830		sub	r0, #48	; 0x30
+  2e2c60:	4288		cmp	r0, r1
+  2e2c62:	dc1d		bgt	0x2e2ca0
+; DAC -= 2
+  2e2c64:	1e88		sub	r0, r1, #2
+  2e2c66:	8038		strh	r0, [r7, #0]
+  2e2c68:	2001		mov	r0, #1
+  2e2c6a:	213a		mov	r1, #58	; 0x3a
+  2e2c6c:	2200		mov	r2, #0
+  2e2c6e:	f066 facd	bl	0x34920c
+  2e2c72:	883a		ldrh	r2, [r7, #0]
+  2e2c74:	2001		mov	r0, #1
+  2e2c76:	2132		mov	r1, #50	; 0x32
+  2e2c78:	f066 fac8	bl	0x34920c
+  2e2c7c:	2001		mov	r0, #1
+  2e2c7e:	213a		mov	r1, #58	; 0x3a
+  2e2c80:	2201		mov	r2, #1
+  2e2c82:	f066 fac3	bl	0x34920c
+; set counter threshold to 10 (started out as 3)
+  2e2c86:	4650		mov	r0, r10
+  2e2c88:	210a		mov	r1, #10	; 0xa
+  2e2c8a:	8001		strh	r1, [r0, #0]
+; "Sub CV DAC" trace
+  2e2c8c:	883a		ldrh	r2, [r7, #0]
+  2e2c8e:	484f		ldr	r0, =0xa0020	; via 0x2e2dcc
+  2e2c90:	9000		str	r0, [sp, #0]
+  2e2c92:	a094		add	r0, pc, #592	; 0x250
+  2e2c94:	210b		mov	r1, #11	; 0xb
+  2e2c96:	2305		mov	r3, #5
+  2e2c98:	f0f7 ffcc	bl	0x3dac34
+  2e2c9c:	48bc		ldr	r0, =0x1774b7c	; via 0x2e2f90
+  2e2c9e:	8802		ldrh	r2, [r0, #0]
+; counter to 0
+  2e2ca0:	48b2		ldr	r0, =0x17749c8	; via 0x2e2f6c
+  2e2ca2:	2100		mov	r1, #0
+  2e2ca4:	8001		strh	r1, [r0, #0]
+; end of high Vbat check
+; now check against low threshold of 4160
+  2e2ca6:	2041		mov	r0, #65	; 0x41
+  2e2ca8:	0180		lsl	r0, r0, #6
+  2e2caa:	4282		cmp	r2, r0
+  2e2cac:	db10		blt	0x2e2cd0
+; Vbat >= 4160
+  2e2cae:	49b3		ldr	r1, =0x17749c0	; via 0x2e2f7c
+  2e2cb0:	2000		mov	r0, #0
+  2e2cb2:	8008		strh	r0, [r1, #0]
+  2e2cb4:	e041		b	0x2e2d3a
+; Vbat < 4160
+; increment counter
+  2e2cd0:	49aa		ldr	r1, =0x17749c0	; via 0x2e2f7c
+  2e2cd2:	8808		ldrh	r0, [r1, #0]
+  2e2cd4:	3001		add	r0, #1
+  2e2cd6:	0400		lsl	r0, r0, #16
+  2e2cd8:	0c00		lsr	r0, r0, #16
+  2e2cda:	8008		strh	r0, [r1, #0]
+  2e2cdc:	4fa4		ldr	r7, =0x17749c4	; via 0x2e2f70
+  2e2cde:	8839		ldrh	r1, [r7, #0]
+  2e2ce0:	4288		cmp	r0, r1
+  2e2ce2:	dd2a		ble	0x2e2d3a
+; counter incremented past the limit
+  2e2ce4:	2000		mov	r0, #0
+  2e2ce6:	4683		mov	r11, r0
+  2e2ce8:	49a2		ldr	r1, =0x17749ca	; via 0x2e2f74
+  2e2cea:	880b		ldrh	r3, [r1, #0]
+  2e2cec:	1c18		add	r0, r3, #0
+  2e2cee:	3807		sub	r0, #7
+  2e2cf0:	4aa1		ldr	r2, =0x17749c6	; via 0x2e2f78
+  2e2cf2:	8812		ldrh	r2, [r2, #0]
+  2e2cf4:	4290		cmp	r0, r2
+  2e2cf6:	dc1d		bgt	0x2e2d34
+  2e2cf8:	468a		mov	r10, r1
+  2e2cfa:	1c58		add	r0, r3, #1
+  2e2cfc:	8008		strh	r0, [r1, #0]
+  2e2cfe:	2001		mov	r0, #1
+  2e2d00:	213a		mov	r1, #58	; 0x3a
+  2e2d02:	2200		mov	r2, #0
+  2e2d04:	f066 fa82	bl	0x34920c
+  2e2d08:	4650		mov	r0, r10
+  2e2d0a:	8802		ldrh	r2, [r0, #0]
+  2e2d0c:	2001		mov	r0, #1
+  2e2d0e:	2132		mov	r1, #50	; 0x32
+  2e2d10:	f066 fa7c	bl	0x34920c
+  2e2d14:	2001		mov	r0, #1
+  2e2d16:	213a		mov	r1, #58	; 0x3a
+  2e2d18:	2201		mov	r2, #1
+  2e2d1a:	f066 fa77	bl	0x34920c
+  2e2d1e:	200a		mov	r0, #10	; 0xa
+  2e2d20:	8038		strh	r0, [r7, #0]
+; "Add CV DAC" trace
+  2e2d22:	4650		mov	r0, r10
+  2e2d24:	8802		ldrh	r2, [r0, #0]
+  2e2d26:	4829		ldr	r0, =0xa0020	; via 0x2e2dcc
+  2e2d28:	9000		str	r0, [sp, #0]
+  2e2d2a:	a071		add	r0, pc, #452	; 0x1c4
+  2e2d2c:	210b		mov	r1, #11	; 0xb
+  2e2d2e:	2305		mov	r3, #5
+  2e2d30:	f0f7 ff80	bl	0x3dac34
+; zero the counter
+  2e2d34:	4891		ldr	r0, =0x17749c0	; via 0x2e2f7c
+  2e2d36:	4659		mov	r1, r11
+  2e2d38:	8001		strh	r1, [r0, #0]
+; end of DAC adjustment logic
+; "Vbat (MADC code) " trace
+  2e2d3a:	4824		ldr	r0, =0xa0020	; via 0x2e2dcc
+  2e2d3c:	9000		str	r0, [sp, #0]
+  2e2d3e:	a07c		add	r0, pc, #496	; 0x1f0
+  2e2d40:	2111		mov	r1, #17	; 0x11
+  2e2d42:	4642		mov	r2, r8
+  2e2d44:	2305		mov	r3, #5
+  2e2d46:	f0f7 ff75	bl	0x3dac34
+; get the display backlight current draw
+  2e2d4a:	f0fc faba	bl	0x3df2c2
+  2e2d4e:	4649		mov	r1, r9
+  2e2d50:	6809		ldr	r1, [r1, #0]
+  2e2d52:	894a		ldrh	r2, [r1, #10]	; 0xa
+  2e2d54:	1810		add	r0, r2, r0
+  2e2d56:	0400		lsl	r0, r0, #16
+  2e2d58:	0c00		lsr	r0, r0, #16
+  2e2d5a:	4284		cmp	r4, r0
+  2e2d5c:	dc38		bgt	0x2e2dd0
+; Ichg <= end_current + display_backlight_current
+  2e2d5e:	4a88		ldr	r2, =0x17749c2	; via 0x2e2f80
+  2e2d60:	8810		ldrh	r0, [r2, #0]
+  2e2d62:	3001		add	r0, #1
+  2e2d64:	0400		lsl	r0, r0, #16
+  2e2d66:	0c00		lsr	r0, r0, #16
+  2e2d68:	8010		strh	r0, [r2, #0]
+  2e2d6a:	281e		cmp	r0, #30	; 0x1e
+  2e2d6c:	dd1c		ble	0x2e2da8
+; this seems to be the end-of-charge condition
+  2e2d6e:	4985		ldr	r1, =0x17749b8	; via 0x2e2f84
+  2e2d70:	2000		mov	r0, #0
+  2e2d72:	7008		strb	r0, [r1, #0]
+  2e2d74:	f7ff fabb	bl	0x2e22ee	; $pwr_stop_charging
+  2e2d78:	f0b2 f86a	bl	0x394e50	; $pwr_send_charge_stop_event ?
+; "Fast charge termination criterion" trace
+  2e2d7c:	4813		ldr	r0, =0xa0020	; via 0x2e2dcc
+  2e2d7e:	9000		str	r0, [sp, #0]
+  2e2d80:	a05e		add	r0, pc, #376	; 0x178
+  2e2d82:	2121		mov	r1, #33	; 0x21
+  2e2d84:	2200		mov	r2, #0
+  2e2d86:	43d2		mvn	r2, r2
+  2e2d88:	2305		mov	r3, #5
+  2e2d8a:	f0f7 ff53	bl	0x3dac34
+  2e2d8e:	2032		mov	r0, #50	; 0x32
+  2e2d90:	6831		ldr	r1, [r6, #0]
+  2e2d92:	5c40		ldrb	r0, [r0, r1]
+  2e2d94:	2800		cmp	r0, #0
+  2e2d96:	d13a		bne	0x2e2e0e
+  2e2d98:	2001		mov	r0, #1
+  2e2d9a:	213c		mov	r1, #60	; 0x3c
+  2e2d9c:	2201		mov	r2, #1
+  2e2d9e:	f066 fa35	bl	0x34920c
+  2e2da2:	e045		b	0x2e2e30
+  2e2da4:	4e70		ldr	r6, =0x10ae	; via 0x2e2f68
+  2e2da6:	0177		lsl	r7, r6, #5
+; counter <= 30
+  2e2da8:	2048		mov	r0, #72	; 0x48
+  2e2daa:	5c40		ldrb	r0, [r0, r1]
+  2e2dac:	2801		cmp	r0, #1
+  2e2dae:	d137		bne	0x2e2e20
+  2e2db0:	2400		mov	r4, #0
+  2e2db2:	4874		ldr	r0, =0x17749b8	; via 0x2e2f84
+  2e2db4:	7801		ldrb	r1, [r0, #0]
+  2e2db6:	2900		cmp	r1, #0
+  2e2db8:	d005		beq	0x2e2dc6
+  2e2dba:	7004		strb	r4, [r0, #0]
+  2e2dbc:	f0b2 f848	bl	0x394e50
+  2e2dc0:	2064		mov	r0, #100	; 0x64
+  2e2dc2:	f0b2 f8ba	bl	0x394f3a
+  2e2dc6:	486e		ldr	r0, =0x17749c2	; via 0x2e2f80
+  2e2dc8:	8004		strh	r4, [r0, #0]
+  2e2dca:	e029		b	0x2e2e20
+; Ichg hasn't fallen low enough
+; zero the Ichg low counter
+  2e2dd0:	4a6b		ldr	r2, =0x17749c2	; via 0x2e2f80
+  2e2dd2:	2000		mov	r0, #0
+  2e2dd4:	8010		strh	r0, [r2, #0]
+; another Vbat check
+  2e2dd6:	88a8		ldrh	r0, [r5, #4]
+  2e2dd8:	4a63		ldr	r2, =0x10ae	; via 0x2e2f68
+  2e2dda:	4290		cmp	r0, r2
+  2e2ddc:	dd1a		ble	0x2e2e14
+; Vbat > 4270
+  2e2dde:	4866		ldr	r0, =0x17749c6	; via 0x2e2f78
+  2e2de0:	8800		ldrh	r0, [r0, #0]
+  2e2de2:	4a64		ldr	r2, =0x17749ca	; via 0x2e2f74
+  2e2de4:	8812		ldrh	r2, [r2, #0]
+  2e2de6:	1a80		sub	r0, r0, r2
+  2e2de8:	2832		cmp	r0, #50	; 0x32
+  2e2dea:	dd13		ble	0x2e2e14
+; overvoltage handling
+  2e2dec:	f7ff fa7f	bl	0x2e22ee
+  2e2df0:	2009		mov	r0, #9
+  2e2df2:	43c0		mvn	r0, r0
+  2e2df4:	8028		strh	r0, [r5, #0]
+  2e2df6:	4865		ldr	r0, =0xa0020	; via 0x2e2f8c
+  2e2df8:	9000		str	r0, [sp, #0]
+  2e2dfa:	a049		add	r0, pc, #292	; 0x124
+  2e2dfc:	210e		mov	r1, #14	; 0xe
+  2e2dfe:	2200		mov	r2, #0
+  2e2e00:	43d2		mvn	r2, r2
+  2e2e02:	2302		mov	r3, #2
+  2e2e04:	f0f7 ff16	bl	0x3dac34
+  2e2e08:	2003		mov	r0, #3
+  2e2e0a:	f0b2 f85a	bl	0x394ec2
+  2e2e0e:	f0d0 fed0	bl	0x3b3bb2
+  2e2e12:	e00d		b	0x2e2e30
+; overcurrent check
+  2e2e14:	2033		mov	r0, #51	; 0x33
+  2e2e16:	0100		lsl	r0, r0, #4
+  2e2e18:	8909		ldrh	r1, [r1, #8]
+  2e2e1a:	1840		add	r0, r0, r1
+  2e2e1c:	4284		cmp	r4, r0
+  2e2e1e:	dc05		bgt	0x2e2e2c
+; TIMER2 reset
+  2e2e20:	2002		mov	r0, #2
+  2e2e22:	4959		ldr	r1, =0x363	; via 0x2e2f88
+  2e2e24:	2200		mov	r2, #0
+  2e2e26:	f048 f827	bl	0x32ae78
+  2e2e2a:	e001		b	0x2e2e30
+  2e2e2c:	f7ff fad1	bl	0x2e23d2
+  2e2e30:	b002		add	sp, #8
+  2e2e32:	bc0f		pop	{r0, r1, r2, r3}
+  2e2e34:	4680		mov	r8, r0
+  2e2e36:	4689		mov	r9, r1
+  2e2e38:	4692		mov	r10, r2
+  2e2e3a:	469b		mov	r11, r3
+  2e2e3c:	bdf0		pop	{r4, r5, r6, r7, pc}
+
 $l1_abb_power_on:
   31c036:	b510		push	{r4, lr}
   31c038:	b084		sub	sp, #16	; 0x10
@@ -5311,8 +5731,10 @@
 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
+		this var seems to hold the initial value
 0x17749c8:	16-bit var, init to 0 in pwr_start_CV_charging()
 0x17749ca:	16-bit var, initial CV DAC value gets written here
+		this var gets decremented as the DAC is adjusted down
 
 0x1774b78:	16-bit var, gets -4 written into it if the battery T
 		is too high, or -5 if it is too low
@@ -5320,7 +5742,7 @@
 		set to 1 when starting CV charging
 0x1774b7c:	16-bit var battery voltage in mV
 0x1774b7e:	16-bit var zeroed in pwr_stop_charging()
-		Ichg in mA gets written here in CI process
+		Ichg in mA gets written here in CI and CV processes
 0x1774b80:	16-bit var zeroed in pwr_stop_charging()
 0x1774b82:	16-bit var gets i2v offset (raw ADC) written into it