FreeCalypso > hg > freecalypso-reveng
diff pirelli/fw-disasm @ 255:0f5a24acde3a
pirelli/fw-disasm: found what seems to be the charging time limit function
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 25 Dec 2017 23:54:05 +0000 |
parents | f3f9dd04567e |
children | dbcfb097ffe1 |
line wrap: on
line diff
--- a/pirelli/fw-disasm Mon Dec 25 23:32:08 2017 +0000 +++ b/pirelli/fw-disasm Mon Dec 25 23:54:05 2017 +0000 @@ -1137,6 +1137,69 @@ 32e0a0: b002 add sp, #8 32e0a2: bd10 pop {r4, pc} +; 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. + 32e294: b510 push {r4, lr} + 32e296: b082 sub sp, #8 + 32e298: 4871 ldr r0, =0x1774e70 ; via 0x32e460 + 32e29a: 6800 ldr r0, [r0, #0] + 32e29c: 2148 mov r1, #72 ; 0x48 + 32e29e: 5c09 ldrb r1, [r1, r0] + 32e2a0: 2901 cmp r1, #1 + 32e2a2: d101 bne 0x32e2a8 + 32e2a4: 2400 mov r4, #0 + 32e2a6: e034 b 0x32e312 + 32e2a8: 8f81 ldrh r1, [r0, #60] ; 0x3c + 32e2aa: 8f40 ldrh r0, [r0, #58] ; 0x3a + 32e2ac: 4281 cmp r1, r0 + 32e2ae: ddf9 ble 0x32e2a4 + 32e2b0: 486c ldr r0, =0xa0020 ; via 0x32e464 + 32e2b2: 9000 str r0, [sp, #0] + 32e2b4: a05e add r0, pc, #376 ; 0x178 + 32e2b6: 211a mov r1, #26 ; 0x1a + 32e2b8: 2200 mov r2, #0 + 32e2ba: 43d2 mvn r2, r2 + 32e2bc: 2302 mov r3, #2 + 32e2be: f0ac fcb9 bl 0x3dac34 + 32e2c2: 2001 mov r0, #1 + 32e2c4: 2138 mov r1, #56 ; 0x38 + 32e2c6: 2201 mov r2, #1 + 32e2c8: f01a ffa0 bl 0x34920c + 32e2cc: 4812 ldr r0, =0x1774b78 ; via 0x32e318 + 32e2ce: 2105 mov r1, #5 + 32e2d0: 43c9 mvn r1, r1 + 32e2d2: 8001 strh r1, [r0, #0] + 32e2d4: 8880 ldrh r0, [r0, #4] + 32e2d6: 4961 ldr r1, =0xf3c ; via 0x32e45c + 32e2d8: 4288 cmp r0, r1 + 32e2da: dc07 bgt 0x32e2ec + 32e2dc: 4860 ldr r0, =0x1774e70 ; via 0x32e460 + 32e2de: 6800 ldr r0, [r0, #0] + 32e2e0: 2101 mov r1, #1 + 32e2e2: 6341 str r1, [r0, #52] ; 0x34 + 32e2e4: 2003 mov r0, #3 + 32e2e6: f066 fdec bl 0x394ec2 + 32e2ea: e001 b 0x32e2f0 + 32e2ec: f066 fdb0 bl 0x394e50 + 32e2f0: f7b3 fffd bl 0x2e22ee + 32e2f4: 2401 mov r4, #1 + 32e2f6: 2132 mov r1, #50 ; 0x32 + 32e2f8: 4857 ldr r0, =0x1774e38 ; via 0x32e458 + 32e2fa: 6800 ldr r0, [r0, #0] + 32e2fc: 5c08 ldrb r0, [r1, r0] + 32e2fe: 2800 cmp r0, #0 + 32e300: d105 bne 0x32e30e + 32e302: 2001 mov r0, #1 + 32e304: 213c mov r1, #60 ; 0x3c + 32e306: 2201 mov r2, #1 + 32e308: f01a ff80 bl 0x34920c + 32e30c: e001 b 0x32e312 + 32e30e: f085 fc50 bl 0x3b3bb2 + 32e312: 1c20 add r0, r4, #0 + 32e314: b002 add sp, #8 + 32e316: bd10 pop {r4, pc} + ; The following function seems to compute the system's current draw. ; It starts with the display backlight's current draw from 0x1775138, ; converts it from ADC units to mA per the fixed *855/1000 formula,