Files
DiLight/firmware/Debug/DiLight.list

18243 lines
666 KiB
Plaintext

DiLight.elf: file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn
0 .isr_vector 000000bc 08000000 08000000 00010000 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .text 000066e8 080000c0 080000c0 000100c0 2**3
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .rodata 000000d4 080067a8 080067a8 000167a8 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .ARM.extab 00000000 0800687c 0800687c 00020098 2**0
CONTENTS
4 .ARM 00000000 0800687c 0800687c 00020098 2**0
CONTENTS
5 .preinit_array 00000000 0800687c 0800687c 00020098 2**0
CONTENTS, ALLOC, LOAD, DATA
6 .init_array 00000004 0800687c 0800687c 0001687c 2**2
CONTENTS, ALLOC, LOAD, DATA
7 .fini_array 00000004 08006880 08006880 00016880 2**2
CONTENTS, ALLOC, LOAD, DATA
8 .data 00000098 20000000 08006884 00020000 2**2
CONTENTS, ALLOC, LOAD, CODE
9 .bss 000001cc 20000098 0800691c 00020098 2**3
ALLOC
10 ._user_heap_stack 00000604 20000264 0800691c 00020264 2**0
ALLOC
11 .ARM.attributes 00000028 00000000 00000000 00020098 2**0
CONTENTS, READONLY
12 .debug_info 0001128d 00000000 00000000 000200c0 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
13 .debug_abbrev 00002b70 00000000 00000000 0003134d 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
14 .debug_aranges 00001130 00000000 00000000 00033ec0 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
15 .debug_ranges 00000ff8 00000000 00000000 00034ff0 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
16 .debug_macro 00017358 00000000 00000000 00035fe8 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
17 .debug_line 00013e44 00000000 00000000 0004d340 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
18 .debug_str 00092472 00000000 00000000 00061184 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
19 .comment 00000050 00000000 00000000 000f35f6 2**0
CONTENTS, READONLY
20 .debug_frame 0000401c 00000000 00000000 000f3648 2**2
CONTENTS, READONLY, DEBUGGING, OCTETS
Disassembly of section .text:
080000c0 <__do_global_dtors_aux>:
80000c0: b510 push {r4, lr}
80000c2: 4c06 ldr r4, [pc, #24] ; (80000dc <__do_global_dtors_aux+0x1c>)
80000c4: 7823 ldrb r3, [r4, #0]
80000c6: 2b00 cmp r3, #0
80000c8: d107 bne.n 80000da <__do_global_dtors_aux+0x1a>
80000ca: 4b05 ldr r3, [pc, #20] ; (80000e0 <__do_global_dtors_aux+0x20>)
80000cc: 2b00 cmp r3, #0
80000ce: d002 beq.n 80000d6 <__do_global_dtors_aux+0x16>
80000d0: 4804 ldr r0, [pc, #16] ; (80000e4 <__do_global_dtors_aux+0x24>)
80000d2: e000 b.n 80000d6 <__do_global_dtors_aux+0x16>
80000d4: bf00 nop
80000d6: 2301 movs r3, #1
80000d8: 7023 strb r3, [r4, #0]
80000da: bd10 pop {r4, pc}
80000dc: 20000098 .word 0x20000098
80000e0: 00000000 .word 0x00000000
80000e4: 08006780 .word 0x08006780
080000e8 <frame_dummy>:
80000e8: 4b04 ldr r3, [pc, #16] ; (80000fc <frame_dummy+0x14>)
80000ea: b510 push {r4, lr}
80000ec: 2b00 cmp r3, #0
80000ee: d003 beq.n 80000f8 <frame_dummy+0x10>
80000f0: 4903 ldr r1, [pc, #12] ; (8000100 <frame_dummy+0x18>)
80000f2: 4804 ldr r0, [pc, #16] ; (8000104 <frame_dummy+0x1c>)
80000f4: e000 b.n 80000f8 <frame_dummy+0x10>
80000f6: bf00 nop
80000f8: bd10 pop {r4, pc}
80000fa: 46c0 nop ; (mov r8, r8)
80000fc: 00000000 .word 0x00000000
8000100: 2000009c .word 0x2000009c
8000104: 08006780 .word 0x08006780
08000108 <__udivsi3>:
8000108: 2200 movs r2, #0
800010a: 0843 lsrs r3, r0, #1
800010c: 428b cmp r3, r1
800010e: d374 bcc.n 80001fa <__udivsi3+0xf2>
8000110: 0903 lsrs r3, r0, #4
8000112: 428b cmp r3, r1
8000114: d35f bcc.n 80001d6 <__udivsi3+0xce>
8000116: 0a03 lsrs r3, r0, #8
8000118: 428b cmp r3, r1
800011a: d344 bcc.n 80001a6 <__udivsi3+0x9e>
800011c: 0b03 lsrs r3, r0, #12
800011e: 428b cmp r3, r1
8000120: d328 bcc.n 8000174 <__udivsi3+0x6c>
8000122: 0c03 lsrs r3, r0, #16
8000124: 428b cmp r3, r1
8000126: d30d bcc.n 8000144 <__udivsi3+0x3c>
8000128: 22ff movs r2, #255 ; 0xff
800012a: 0209 lsls r1, r1, #8
800012c: ba12 rev r2, r2
800012e: 0c03 lsrs r3, r0, #16
8000130: 428b cmp r3, r1
8000132: d302 bcc.n 800013a <__udivsi3+0x32>
8000134: 1212 asrs r2, r2, #8
8000136: 0209 lsls r1, r1, #8
8000138: d065 beq.n 8000206 <__udivsi3+0xfe>
800013a: 0b03 lsrs r3, r0, #12
800013c: 428b cmp r3, r1
800013e: d319 bcc.n 8000174 <__udivsi3+0x6c>
8000140: e000 b.n 8000144 <__udivsi3+0x3c>
8000142: 0a09 lsrs r1, r1, #8
8000144: 0bc3 lsrs r3, r0, #15
8000146: 428b cmp r3, r1
8000148: d301 bcc.n 800014e <__udivsi3+0x46>
800014a: 03cb lsls r3, r1, #15
800014c: 1ac0 subs r0, r0, r3
800014e: 4152 adcs r2, r2
8000150: 0b83 lsrs r3, r0, #14
8000152: 428b cmp r3, r1
8000154: d301 bcc.n 800015a <__udivsi3+0x52>
8000156: 038b lsls r3, r1, #14
8000158: 1ac0 subs r0, r0, r3
800015a: 4152 adcs r2, r2
800015c: 0b43 lsrs r3, r0, #13
800015e: 428b cmp r3, r1
8000160: d301 bcc.n 8000166 <__udivsi3+0x5e>
8000162: 034b lsls r3, r1, #13
8000164: 1ac0 subs r0, r0, r3
8000166: 4152 adcs r2, r2
8000168: 0b03 lsrs r3, r0, #12
800016a: 428b cmp r3, r1
800016c: d301 bcc.n 8000172 <__udivsi3+0x6a>
800016e: 030b lsls r3, r1, #12
8000170: 1ac0 subs r0, r0, r3
8000172: 4152 adcs r2, r2
8000174: 0ac3 lsrs r3, r0, #11
8000176: 428b cmp r3, r1
8000178: d301 bcc.n 800017e <__udivsi3+0x76>
800017a: 02cb lsls r3, r1, #11
800017c: 1ac0 subs r0, r0, r3
800017e: 4152 adcs r2, r2
8000180: 0a83 lsrs r3, r0, #10
8000182: 428b cmp r3, r1
8000184: d301 bcc.n 800018a <__udivsi3+0x82>
8000186: 028b lsls r3, r1, #10
8000188: 1ac0 subs r0, r0, r3
800018a: 4152 adcs r2, r2
800018c: 0a43 lsrs r3, r0, #9
800018e: 428b cmp r3, r1
8000190: d301 bcc.n 8000196 <__udivsi3+0x8e>
8000192: 024b lsls r3, r1, #9
8000194: 1ac0 subs r0, r0, r3
8000196: 4152 adcs r2, r2
8000198: 0a03 lsrs r3, r0, #8
800019a: 428b cmp r3, r1
800019c: d301 bcc.n 80001a2 <__udivsi3+0x9a>
800019e: 020b lsls r3, r1, #8
80001a0: 1ac0 subs r0, r0, r3
80001a2: 4152 adcs r2, r2
80001a4: d2cd bcs.n 8000142 <__udivsi3+0x3a>
80001a6: 09c3 lsrs r3, r0, #7
80001a8: 428b cmp r3, r1
80001aa: d301 bcc.n 80001b0 <__udivsi3+0xa8>
80001ac: 01cb lsls r3, r1, #7
80001ae: 1ac0 subs r0, r0, r3
80001b0: 4152 adcs r2, r2
80001b2: 0983 lsrs r3, r0, #6
80001b4: 428b cmp r3, r1
80001b6: d301 bcc.n 80001bc <__udivsi3+0xb4>
80001b8: 018b lsls r3, r1, #6
80001ba: 1ac0 subs r0, r0, r3
80001bc: 4152 adcs r2, r2
80001be: 0943 lsrs r3, r0, #5
80001c0: 428b cmp r3, r1
80001c2: d301 bcc.n 80001c8 <__udivsi3+0xc0>
80001c4: 014b lsls r3, r1, #5
80001c6: 1ac0 subs r0, r0, r3
80001c8: 4152 adcs r2, r2
80001ca: 0903 lsrs r3, r0, #4
80001cc: 428b cmp r3, r1
80001ce: d301 bcc.n 80001d4 <__udivsi3+0xcc>
80001d0: 010b lsls r3, r1, #4
80001d2: 1ac0 subs r0, r0, r3
80001d4: 4152 adcs r2, r2
80001d6: 08c3 lsrs r3, r0, #3
80001d8: 428b cmp r3, r1
80001da: d301 bcc.n 80001e0 <__udivsi3+0xd8>
80001dc: 00cb lsls r3, r1, #3
80001de: 1ac0 subs r0, r0, r3
80001e0: 4152 adcs r2, r2
80001e2: 0883 lsrs r3, r0, #2
80001e4: 428b cmp r3, r1
80001e6: d301 bcc.n 80001ec <__udivsi3+0xe4>
80001e8: 008b lsls r3, r1, #2
80001ea: 1ac0 subs r0, r0, r3
80001ec: 4152 adcs r2, r2
80001ee: 0843 lsrs r3, r0, #1
80001f0: 428b cmp r3, r1
80001f2: d301 bcc.n 80001f8 <__udivsi3+0xf0>
80001f4: 004b lsls r3, r1, #1
80001f6: 1ac0 subs r0, r0, r3
80001f8: 4152 adcs r2, r2
80001fa: 1a41 subs r1, r0, r1
80001fc: d200 bcs.n 8000200 <__udivsi3+0xf8>
80001fe: 4601 mov r1, r0
8000200: 4152 adcs r2, r2
8000202: 4610 mov r0, r2
8000204: 4770 bx lr
8000206: e7ff b.n 8000208 <__udivsi3+0x100>
8000208: b501 push {r0, lr}
800020a: 2000 movs r0, #0
800020c: f000 f8f0 bl 80003f0 <__aeabi_idiv0>
8000210: bd02 pop {r1, pc}
8000212: 46c0 nop ; (mov r8, r8)
08000214 <__aeabi_uidivmod>:
8000214: 2900 cmp r1, #0
8000216: d0f7 beq.n 8000208 <__udivsi3+0x100>
8000218: e776 b.n 8000108 <__udivsi3>
800021a: 4770 bx lr
0800021c <__divsi3>:
800021c: 4603 mov r3, r0
800021e: 430b orrs r3, r1
8000220: d47f bmi.n 8000322 <__divsi3+0x106>
8000222: 2200 movs r2, #0
8000224: 0843 lsrs r3, r0, #1
8000226: 428b cmp r3, r1
8000228: d374 bcc.n 8000314 <__divsi3+0xf8>
800022a: 0903 lsrs r3, r0, #4
800022c: 428b cmp r3, r1
800022e: d35f bcc.n 80002f0 <__divsi3+0xd4>
8000230: 0a03 lsrs r3, r0, #8
8000232: 428b cmp r3, r1
8000234: d344 bcc.n 80002c0 <__divsi3+0xa4>
8000236: 0b03 lsrs r3, r0, #12
8000238: 428b cmp r3, r1
800023a: d328 bcc.n 800028e <__divsi3+0x72>
800023c: 0c03 lsrs r3, r0, #16
800023e: 428b cmp r3, r1
8000240: d30d bcc.n 800025e <__divsi3+0x42>
8000242: 22ff movs r2, #255 ; 0xff
8000244: 0209 lsls r1, r1, #8
8000246: ba12 rev r2, r2
8000248: 0c03 lsrs r3, r0, #16
800024a: 428b cmp r3, r1
800024c: d302 bcc.n 8000254 <__divsi3+0x38>
800024e: 1212 asrs r2, r2, #8
8000250: 0209 lsls r1, r1, #8
8000252: d065 beq.n 8000320 <__divsi3+0x104>
8000254: 0b03 lsrs r3, r0, #12
8000256: 428b cmp r3, r1
8000258: d319 bcc.n 800028e <__divsi3+0x72>
800025a: e000 b.n 800025e <__divsi3+0x42>
800025c: 0a09 lsrs r1, r1, #8
800025e: 0bc3 lsrs r3, r0, #15
8000260: 428b cmp r3, r1
8000262: d301 bcc.n 8000268 <__divsi3+0x4c>
8000264: 03cb lsls r3, r1, #15
8000266: 1ac0 subs r0, r0, r3
8000268: 4152 adcs r2, r2
800026a: 0b83 lsrs r3, r0, #14
800026c: 428b cmp r3, r1
800026e: d301 bcc.n 8000274 <__divsi3+0x58>
8000270: 038b lsls r3, r1, #14
8000272: 1ac0 subs r0, r0, r3
8000274: 4152 adcs r2, r2
8000276: 0b43 lsrs r3, r0, #13
8000278: 428b cmp r3, r1
800027a: d301 bcc.n 8000280 <__divsi3+0x64>
800027c: 034b lsls r3, r1, #13
800027e: 1ac0 subs r0, r0, r3
8000280: 4152 adcs r2, r2
8000282: 0b03 lsrs r3, r0, #12
8000284: 428b cmp r3, r1
8000286: d301 bcc.n 800028c <__divsi3+0x70>
8000288: 030b lsls r3, r1, #12
800028a: 1ac0 subs r0, r0, r3
800028c: 4152 adcs r2, r2
800028e: 0ac3 lsrs r3, r0, #11
8000290: 428b cmp r3, r1
8000292: d301 bcc.n 8000298 <__divsi3+0x7c>
8000294: 02cb lsls r3, r1, #11
8000296: 1ac0 subs r0, r0, r3
8000298: 4152 adcs r2, r2
800029a: 0a83 lsrs r3, r0, #10
800029c: 428b cmp r3, r1
800029e: d301 bcc.n 80002a4 <__divsi3+0x88>
80002a0: 028b lsls r3, r1, #10
80002a2: 1ac0 subs r0, r0, r3
80002a4: 4152 adcs r2, r2
80002a6: 0a43 lsrs r3, r0, #9
80002a8: 428b cmp r3, r1
80002aa: d301 bcc.n 80002b0 <__divsi3+0x94>
80002ac: 024b lsls r3, r1, #9
80002ae: 1ac0 subs r0, r0, r3
80002b0: 4152 adcs r2, r2
80002b2: 0a03 lsrs r3, r0, #8
80002b4: 428b cmp r3, r1
80002b6: d301 bcc.n 80002bc <__divsi3+0xa0>
80002b8: 020b lsls r3, r1, #8
80002ba: 1ac0 subs r0, r0, r3
80002bc: 4152 adcs r2, r2
80002be: d2cd bcs.n 800025c <__divsi3+0x40>
80002c0: 09c3 lsrs r3, r0, #7
80002c2: 428b cmp r3, r1
80002c4: d301 bcc.n 80002ca <__divsi3+0xae>
80002c6: 01cb lsls r3, r1, #7
80002c8: 1ac0 subs r0, r0, r3
80002ca: 4152 adcs r2, r2
80002cc: 0983 lsrs r3, r0, #6
80002ce: 428b cmp r3, r1
80002d0: d301 bcc.n 80002d6 <__divsi3+0xba>
80002d2: 018b lsls r3, r1, #6
80002d4: 1ac0 subs r0, r0, r3
80002d6: 4152 adcs r2, r2
80002d8: 0943 lsrs r3, r0, #5
80002da: 428b cmp r3, r1
80002dc: d301 bcc.n 80002e2 <__divsi3+0xc6>
80002de: 014b lsls r3, r1, #5
80002e0: 1ac0 subs r0, r0, r3
80002e2: 4152 adcs r2, r2
80002e4: 0903 lsrs r3, r0, #4
80002e6: 428b cmp r3, r1
80002e8: d301 bcc.n 80002ee <__divsi3+0xd2>
80002ea: 010b lsls r3, r1, #4
80002ec: 1ac0 subs r0, r0, r3
80002ee: 4152 adcs r2, r2
80002f0: 08c3 lsrs r3, r0, #3
80002f2: 428b cmp r3, r1
80002f4: d301 bcc.n 80002fa <__divsi3+0xde>
80002f6: 00cb lsls r3, r1, #3
80002f8: 1ac0 subs r0, r0, r3
80002fa: 4152 adcs r2, r2
80002fc: 0883 lsrs r3, r0, #2
80002fe: 428b cmp r3, r1
8000300: d301 bcc.n 8000306 <__divsi3+0xea>
8000302: 008b lsls r3, r1, #2
8000304: 1ac0 subs r0, r0, r3
8000306: 4152 adcs r2, r2
8000308: 0843 lsrs r3, r0, #1
800030a: 428b cmp r3, r1
800030c: d301 bcc.n 8000312 <__divsi3+0xf6>
800030e: 004b lsls r3, r1, #1
8000310: 1ac0 subs r0, r0, r3
8000312: 4152 adcs r2, r2
8000314: 1a41 subs r1, r0, r1
8000316: d200 bcs.n 800031a <__divsi3+0xfe>
8000318: 4601 mov r1, r0
800031a: 4152 adcs r2, r2
800031c: 4610 mov r0, r2
800031e: 4770 bx lr
8000320: e05d b.n 80003de <__divsi3+0x1c2>
8000322: 0fca lsrs r2, r1, #31
8000324: d000 beq.n 8000328 <__divsi3+0x10c>
8000326: 4249 negs r1, r1
8000328: 1003 asrs r3, r0, #32
800032a: d300 bcc.n 800032e <__divsi3+0x112>
800032c: 4240 negs r0, r0
800032e: 4053 eors r3, r2
8000330: 2200 movs r2, #0
8000332: 469c mov ip, r3
8000334: 0903 lsrs r3, r0, #4
8000336: 428b cmp r3, r1
8000338: d32d bcc.n 8000396 <__divsi3+0x17a>
800033a: 0a03 lsrs r3, r0, #8
800033c: 428b cmp r3, r1
800033e: d312 bcc.n 8000366 <__divsi3+0x14a>
8000340: 22fc movs r2, #252 ; 0xfc
8000342: 0189 lsls r1, r1, #6
8000344: ba12 rev r2, r2
8000346: 0a03 lsrs r3, r0, #8
8000348: 428b cmp r3, r1
800034a: d30c bcc.n 8000366 <__divsi3+0x14a>
800034c: 0189 lsls r1, r1, #6
800034e: 1192 asrs r2, r2, #6
8000350: 428b cmp r3, r1
8000352: d308 bcc.n 8000366 <__divsi3+0x14a>
8000354: 0189 lsls r1, r1, #6
8000356: 1192 asrs r2, r2, #6
8000358: 428b cmp r3, r1
800035a: d304 bcc.n 8000366 <__divsi3+0x14a>
800035c: 0189 lsls r1, r1, #6
800035e: d03a beq.n 80003d6 <__divsi3+0x1ba>
8000360: 1192 asrs r2, r2, #6
8000362: e000 b.n 8000366 <__divsi3+0x14a>
8000364: 0989 lsrs r1, r1, #6
8000366: 09c3 lsrs r3, r0, #7
8000368: 428b cmp r3, r1
800036a: d301 bcc.n 8000370 <__divsi3+0x154>
800036c: 01cb lsls r3, r1, #7
800036e: 1ac0 subs r0, r0, r3
8000370: 4152 adcs r2, r2
8000372: 0983 lsrs r3, r0, #6
8000374: 428b cmp r3, r1
8000376: d301 bcc.n 800037c <__divsi3+0x160>
8000378: 018b lsls r3, r1, #6
800037a: 1ac0 subs r0, r0, r3
800037c: 4152 adcs r2, r2
800037e: 0943 lsrs r3, r0, #5
8000380: 428b cmp r3, r1
8000382: d301 bcc.n 8000388 <__divsi3+0x16c>
8000384: 014b lsls r3, r1, #5
8000386: 1ac0 subs r0, r0, r3
8000388: 4152 adcs r2, r2
800038a: 0903 lsrs r3, r0, #4
800038c: 428b cmp r3, r1
800038e: d301 bcc.n 8000394 <__divsi3+0x178>
8000390: 010b lsls r3, r1, #4
8000392: 1ac0 subs r0, r0, r3
8000394: 4152 adcs r2, r2
8000396: 08c3 lsrs r3, r0, #3
8000398: 428b cmp r3, r1
800039a: d301 bcc.n 80003a0 <__divsi3+0x184>
800039c: 00cb lsls r3, r1, #3
800039e: 1ac0 subs r0, r0, r3
80003a0: 4152 adcs r2, r2
80003a2: 0883 lsrs r3, r0, #2
80003a4: 428b cmp r3, r1
80003a6: d301 bcc.n 80003ac <__divsi3+0x190>
80003a8: 008b lsls r3, r1, #2
80003aa: 1ac0 subs r0, r0, r3
80003ac: 4152 adcs r2, r2
80003ae: d2d9 bcs.n 8000364 <__divsi3+0x148>
80003b0: 0843 lsrs r3, r0, #1
80003b2: 428b cmp r3, r1
80003b4: d301 bcc.n 80003ba <__divsi3+0x19e>
80003b6: 004b lsls r3, r1, #1
80003b8: 1ac0 subs r0, r0, r3
80003ba: 4152 adcs r2, r2
80003bc: 1a41 subs r1, r0, r1
80003be: d200 bcs.n 80003c2 <__divsi3+0x1a6>
80003c0: 4601 mov r1, r0
80003c2: 4663 mov r3, ip
80003c4: 4152 adcs r2, r2
80003c6: 105b asrs r3, r3, #1
80003c8: 4610 mov r0, r2
80003ca: d301 bcc.n 80003d0 <__divsi3+0x1b4>
80003cc: 4240 negs r0, r0
80003ce: 2b00 cmp r3, #0
80003d0: d500 bpl.n 80003d4 <__divsi3+0x1b8>
80003d2: 4249 negs r1, r1
80003d4: 4770 bx lr
80003d6: 4663 mov r3, ip
80003d8: 105b asrs r3, r3, #1
80003da: d300 bcc.n 80003de <__divsi3+0x1c2>
80003dc: 4240 negs r0, r0
80003de: b501 push {r0, lr}
80003e0: 2000 movs r0, #0
80003e2: f000 f805 bl 80003f0 <__aeabi_idiv0>
80003e6: bd02 pop {r1, pc}
080003e8 <__aeabi_idivmod>:
80003e8: 2900 cmp r1, #0
80003ea: d0f8 beq.n 80003de <__divsi3+0x1c2>
80003ec: e716 b.n 800021c <__divsi3>
80003ee: 4770 bx lr
080003f0 <__aeabi_idiv0>:
80003f0: 4770 bx lr
80003f2: 46c0 nop ; (mov r8, r8)
080003f4 <__aeabi_cdrcmple>:
80003f4: 4684 mov ip, r0
80003f6: 0010 movs r0, r2
80003f8: 4662 mov r2, ip
80003fa: 468c mov ip, r1
80003fc: 0019 movs r1, r3
80003fe: 4663 mov r3, ip
8000400: e000 b.n 8000404 <__aeabi_cdcmpeq>
8000402: 46c0 nop ; (mov r8, r8)
08000404 <__aeabi_cdcmpeq>:
8000404: b51f push {r0, r1, r2, r3, r4, lr}
8000406: f000 fcd1 bl 8000dac <__ledf2>
800040a: 2800 cmp r0, #0
800040c: d401 bmi.n 8000412 <__aeabi_cdcmpeq+0xe>
800040e: 2100 movs r1, #0
8000410: 42c8 cmn r0, r1
8000412: bd1f pop {r0, r1, r2, r3, r4, pc}
08000414 <__aeabi_dcmpeq>:
8000414: b510 push {r4, lr}
8000416: f000 fc21 bl 8000c5c <__eqdf2>
800041a: 4240 negs r0, r0
800041c: 3001 adds r0, #1
800041e: bd10 pop {r4, pc}
08000420 <__aeabi_dcmplt>:
8000420: b510 push {r4, lr}
8000422: f000 fcc3 bl 8000dac <__ledf2>
8000426: 2800 cmp r0, #0
8000428: db01 blt.n 800042e <__aeabi_dcmplt+0xe>
800042a: 2000 movs r0, #0
800042c: bd10 pop {r4, pc}
800042e: 2001 movs r0, #1
8000430: bd10 pop {r4, pc}
8000432: 46c0 nop ; (mov r8, r8)
08000434 <__aeabi_dcmple>:
8000434: b510 push {r4, lr}
8000436: f000 fcb9 bl 8000dac <__ledf2>
800043a: 2800 cmp r0, #0
800043c: dd01 ble.n 8000442 <__aeabi_dcmple+0xe>
800043e: 2000 movs r0, #0
8000440: bd10 pop {r4, pc}
8000442: 2001 movs r0, #1
8000444: bd10 pop {r4, pc}
8000446: 46c0 nop ; (mov r8, r8)
08000448 <__aeabi_dcmpgt>:
8000448: b510 push {r4, lr}
800044a: f000 fc49 bl 8000ce0 <__gedf2>
800044e: 2800 cmp r0, #0
8000450: dc01 bgt.n 8000456 <__aeabi_dcmpgt+0xe>
8000452: 2000 movs r0, #0
8000454: bd10 pop {r4, pc}
8000456: 2001 movs r0, #1
8000458: bd10 pop {r4, pc}
800045a: 46c0 nop ; (mov r8, r8)
0800045c <__aeabi_dcmpge>:
800045c: b510 push {r4, lr}
800045e: f000 fc3f bl 8000ce0 <__gedf2>
8000462: 2800 cmp r0, #0
8000464: da01 bge.n 800046a <__aeabi_dcmpge+0xe>
8000466: 2000 movs r0, #0
8000468: bd10 pop {r4, pc}
800046a: 2001 movs r0, #1
800046c: bd10 pop {r4, pc}
800046e: 46c0 nop ; (mov r8, r8)
08000470 <__aeabi_cfrcmple>:
8000470: 4684 mov ip, r0
8000472: 0008 movs r0, r1
8000474: 4661 mov r1, ip
8000476: e7ff b.n 8000478 <__aeabi_cfcmpeq>
08000478 <__aeabi_cfcmpeq>:
8000478: b51f push {r0, r1, r2, r3, r4, lr}
800047a: f000 f8b7 bl 80005ec <__lesf2>
800047e: 2800 cmp r0, #0
8000480: d401 bmi.n 8000486 <__aeabi_cfcmpeq+0xe>
8000482: 2100 movs r1, #0
8000484: 42c8 cmn r0, r1
8000486: bd1f pop {r0, r1, r2, r3, r4, pc}
08000488 <__aeabi_fcmpeq>:
8000488: b510 push {r4, lr}
800048a: f000 f843 bl 8000514 <__eqsf2>
800048e: 4240 negs r0, r0
8000490: 3001 adds r0, #1
8000492: bd10 pop {r4, pc}
08000494 <__aeabi_fcmplt>:
8000494: b510 push {r4, lr}
8000496: f000 f8a9 bl 80005ec <__lesf2>
800049a: 2800 cmp r0, #0
800049c: db01 blt.n 80004a2 <__aeabi_fcmplt+0xe>
800049e: 2000 movs r0, #0
80004a0: bd10 pop {r4, pc}
80004a2: 2001 movs r0, #1
80004a4: bd10 pop {r4, pc}
80004a6: 46c0 nop ; (mov r8, r8)
080004a8 <__aeabi_fcmple>:
80004a8: b510 push {r4, lr}
80004aa: f000 f89f bl 80005ec <__lesf2>
80004ae: 2800 cmp r0, #0
80004b0: dd01 ble.n 80004b6 <__aeabi_fcmple+0xe>
80004b2: 2000 movs r0, #0
80004b4: bd10 pop {r4, pc}
80004b6: 2001 movs r0, #1
80004b8: bd10 pop {r4, pc}
80004ba: 46c0 nop ; (mov r8, r8)
080004bc <__aeabi_fcmpgt>:
80004bc: b510 push {r4, lr}
80004be: f000 f84f bl 8000560 <__gesf2>
80004c2: 2800 cmp r0, #0
80004c4: dc01 bgt.n 80004ca <__aeabi_fcmpgt+0xe>
80004c6: 2000 movs r0, #0
80004c8: bd10 pop {r4, pc}
80004ca: 2001 movs r0, #1
80004cc: bd10 pop {r4, pc}
80004ce: 46c0 nop ; (mov r8, r8)
080004d0 <__aeabi_fcmpge>:
80004d0: b510 push {r4, lr}
80004d2: f000 f845 bl 8000560 <__gesf2>
80004d6: 2800 cmp r0, #0
80004d8: da01 bge.n 80004de <__aeabi_fcmpge+0xe>
80004da: 2000 movs r0, #0
80004dc: bd10 pop {r4, pc}
80004de: 2001 movs r0, #1
80004e0: bd10 pop {r4, pc}
80004e2: 46c0 nop ; (mov r8, r8)
080004e4 <__aeabi_f2uiz>:
80004e4: 219e movs r1, #158 ; 0x9e
80004e6: b510 push {r4, lr}
80004e8: 05c9 lsls r1, r1, #23
80004ea: 1c04 adds r4, r0, #0
80004ec: f7ff fff0 bl 80004d0 <__aeabi_fcmpge>
80004f0: 2800 cmp r0, #0
80004f2: d103 bne.n 80004fc <__aeabi_f2uiz+0x18>
80004f4: 1c20 adds r0, r4, #0
80004f6: f000 fb91 bl 8000c1c <__aeabi_f2iz>
80004fa: bd10 pop {r4, pc}
80004fc: 219e movs r1, #158 ; 0x9e
80004fe: 1c20 adds r0, r4, #0
8000500: 05c9 lsls r1, r1, #23
8000502: f000 f9dd bl 80008c0 <__aeabi_fsub>
8000506: f000 fb89 bl 8000c1c <__aeabi_f2iz>
800050a: 2380 movs r3, #128 ; 0x80
800050c: 061b lsls r3, r3, #24
800050e: 469c mov ip, r3
8000510: 4460 add r0, ip
8000512: e7f2 b.n 80004fa <__aeabi_f2uiz+0x16>
08000514 <__eqsf2>:
8000514: b570 push {r4, r5, r6, lr}
8000516: 0042 lsls r2, r0, #1
8000518: 0245 lsls r5, r0, #9
800051a: 024e lsls r6, r1, #9
800051c: 004c lsls r4, r1, #1
800051e: 0fc3 lsrs r3, r0, #31
8000520: 0a6d lsrs r5, r5, #9
8000522: 2001 movs r0, #1
8000524: 0e12 lsrs r2, r2, #24
8000526: 0a76 lsrs r6, r6, #9
8000528: 0e24 lsrs r4, r4, #24
800052a: 0fc9 lsrs r1, r1, #31
800052c: 2aff cmp r2, #255 ; 0xff
800052e: d006 beq.n 800053e <__eqsf2+0x2a>
8000530: 2cff cmp r4, #255 ; 0xff
8000532: d003 beq.n 800053c <__eqsf2+0x28>
8000534: 42a2 cmp r2, r4
8000536: d101 bne.n 800053c <__eqsf2+0x28>
8000538: 42b5 cmp r5, r6
800053a: d006 beq.n 800054a <__eqsf2+0x36>
800053c: bd70 pop {r4, r5, r6, pc}
800053e: 2d00 cmp r5, #0
8000540: d1fc bne.n 800053c <__eqsf2+0x28>
8000542: 2cff cmp r4, #255 ; 0xff
8000544: d1fa bne.n 800053c <__eqsf2+0x28>
8000546: 2e00 cmp r6, #0
8000548: d1f8 bne.n 800053c <__eqsf2+0x28>
800054a: 428b cmp r3, r1
800054c: d006 beq.n 800055c <__eqsf2+0x48>
800054e: 2001 movs r0, #1
8000550: 2a00 cmp r2, #0
8000552: d1f3 bne.n 800053c <__eqsf2+0x28>
8000554: 0028 movs r0, r5
8000556: 1e43 subs r3, r0, #1
8000558: 4198 sbcs r0, r3
800055a: e7ef b.n 800053c <__eqsf2+0x28>
800055c: 2000 movs r0, #0
800055e: e7ed b.n 800053c <__eqsf2+0x28>
08000560 <__gesf2>:
8000560: b570 push {r4, r5, r6, lr}
8000562: 0042 lsls r2, r0, #1
8000564: 0245 lsls r5, r0, #9
8000566: 024e lsls r6, r1, #9
8000568: 004c lsls r4, r1, #1
800056a: 0fc3 lsrs r3, r0, #31
800056c: 0a6d lsrs r5, r5, #9
800056e: 0e12 lsrs r2, r2, #24
8000570: 0a76 lsrs r6, r6, #9
8000572: 0e24 lsrs r4, r4, #24
8000574: 0fc8 lsrs r0, r1, #31
8000576: 2aff cmp r2, #255 ; 0xff
8000578: d01b beq.n 80005b2 <__gesf2+0x52>
800057a: 2cff cmp r4, #255 ; 0xff
800057c: d00e beq.n 800059c <__gesf2+0x3c>
800057e: 2a00 cmp r2, #0
8000580: d11b bne.n 80005ba <__gesf2+0x5a>
8000582: 2c00 cmp r4, #0
8000584: d101 bne.n 800058a <__gesf2+0x2a>
8000586: 2e00 cmp r6, #0
8000588: d01c beq.n 80005c4 <__gesf2+0x64>
800058a: 2d00 cmp r5, #0
800058c: d00c beq.n 80005a8 <__gesf2+0x48>
800058e: 4283 cmp r3, r0
8000590: d01c beq.n 80005cc <__gesf2+0x6c>
8000592: 2102 movs r1, #2
8000594: 1e58 subs r0, r3, #1
8000596: 4008 ands r0, r1
8000598: 3801 subs r0, #1
800059a: bd70 pop {r4, r5, r6, pc}
800059c: 2e00 cmp r6, #0
800059e: d122 bne.n 80005e6 <__gesf2+0x86>
80005a0: 2a00 cmp r2, #0
80005a2: d1f4 bne.n 800058e <__gesf2+0x2e>
80005a4: 2d00 cmp r5, #0
80005a6: d1f2 bne.n 800058e <__gesf2+0x2e>
80005a8: 2800 cmp r0, #0
80005aa: d1f6 bne.n 800059a <__gesf2+0x3a>
80005ac: 2001 movs r0, #1
80005ae: 4240 negs r0, r0
80005b0: e7f3 b.n 800059a <__gesf2+0x3a>
80005b2: 2d00 cmp r5, #0
80005b4: d117 bne.n 80005e6 <__gesf2+0x86>
80005b6: 2cff cmp r4, #255 ; 0xff
80005b8: d0f0 beq.n 800059c <__gesf2+0x3c>
80005ba: 2c00 cmp r4, #0
80005bc: d1e7 bne.n 800058e <__gesf2+0x2e>
80005be: 2e00 cmp r6, #0
80005c0: d1e5 bne.n 800058e <__gesf2+0x2e>
80005c2: e7e6 b.n 8000592 <__gesf2+0x32>
80005c4: 2000 movs r0, #0
80005c6: 2d00 cmp r5, #0
80005c8: d0e7 beq.n 800059a <__gesf2+0x3a>
80005ca: e7e2 b.n 8000592 <__gesf2+0x32>
80005cc: 42a2 cmp r2, r4
80005ce: dc05 bgt.n 80005dc <__gesf2+0x7c>
80005d0: dbea blt.n 80005a8 <__gesf2+0x48>
80005d2: 42b5 cmp r5, r6
80005d4: d802 bhi.n 80005dc <__gesf2+0x7c>
80005d6: d3e7 bcc.n 80005a8 <__gesf2+0x48>
80005d8: 2000 movs r0, #0
80005da: e7de b.n 800059a <__gesf2+0x3a>
80005dc: 4243 negs r3, r0
80005de: 4158 adcs r0, r3
80005e0: 0040 lsls r0, r0, #1
80005e2: 3801 subs r0, #1
80005e4: e7d9 b.n 800059a <__gesf2+0x3a>
80005e6: 2002 movs r0, #2
80005e8: 4240 negs r0, r0
80005ea: e7d6 b.n 800059a <__gesf2+0x3a>
080005ec <__lesf2>:
80005ec: b570 push {r4, r5, r6, lr}
80005ee: 0042 lsls r2, r0, #1
80005f0: 0245 lsls r5, r0, #9
80005f2: 024e lsls r6, r1, #9
80005f4: 004c lsls r4, r1, #1
80005f6: 0fc3 lsrs r3, r0, #31
80005f8: 0a6d lsrs r5, r5, #9
80005fa: 0e12 lsrs r2, r2, #24
80005fc: 0a76 lsrs r6, r6, #9
80005fe: 0e24 lsrs r4, r4, #24
8000600: 0fc8 lsrs r0, r1, #31
8000602: 2aff cmp r2, #255 ; 0xff
8000604: d00b beq.n 800061e <__lesf2+0x32>
8000606: 2cff cmp r4, #255 ; 0xff
8000608: d00d beq.n 8000626 <__lesf2+0x3a>
800060a: 2a00 cmp r2, #0
800060c: d11f bne.n 800064e <__lesf2+0x62>
800060e: 2c00 cmp r4, #0
8000610: d116 bne.n 8000640 <__lesf2+0x54>
8000612: 2e00 cmp r6, #0
8000614: d114 bne.n 8000640 <__lesf2+0x54>
8000616: 2000 movs r0, #0
8000618: 2d00 cmp r5, #0
800061a: d010 beq.n 800063e <__lesf2+0x52>
800061c: e009 b.n 8000632 <__lesf2+0x46>
800061e: 2d00 cmp r5, #0
8000620: d10c bne.n 800063c <__lesf2+0x50>
8000622: 2cff cmp r4, #255 ; 0xff
8000624: d113 bne.n 800064e <__lesf2+0x62>
8000626: 2e00 cmp r6, #0
8000628: d108 bne.n 800063c <__lesf2+0x50>
800062a: 2a00 cmp r2, #0
800062c: d008 beq.n 8000640 <__lesf2+0x54>
800062e: 4283 cmp r3, r0
8000630: d012 beq.n 8000658 <__lesf2+0x6c>
8000632: 2102 movs r1, #2
8000634: 1e58 subs r0, r3, #1
8000636: 4008 ands r0, r1
8000638: 3801 subs r0, #1
800063a: e000 b.n 800063e <__lesf2+0x52>
800063c: 2002 movs r0, #2
800063e: bd70 pop {r4, r5, r6, pc}
8000640: 2d00 cmp r5, #0
8000642: d1f4 bne.n 800062e <__lesf2+0x42>
8000644: 2800 cmp r0, #0
8000646: d1fa bne.n 800063e <__lesf2+0x52>
8000648: 2001 movs r0, #1
800064a: 4240 negs r0, r0
800064c: e7f7 b.n 800063e <__lesf2+0x52>
800064e: 2c00 cmp r4, #0
8000650: d1ed bne.n 800062e <__lesf2+0x42>
8000652: 2e00 cmp r6, #0
8000654: d1eb bne.n 800062e <__lesf2+0x42>
8000656: e7ec b.n 8000632 <__lesf2+0x46>
8000658: 42a2 cmp r2, r4
800065a: dc05 bgt.n 8000668 <__lesf2+0x7c>
800065c: dbf2 blt.n 8000644 <__lesf2+0x58>
800065e: 42b5 cmp r5, r6
8000660: d802 bhi.n 8000668 <__lesf2+0x7c>
8000662: d3ef bcc.n 8000644 <__lesf2+0x58>
8000664: 2000 movs r0, #0
8000666: e7ea b.n 800063e <__lesf2+0x52>
8000668: 4243 negs r3, r0
800066a: 4158 adcs r0, r3
800066c: 0040 lsls r0, r0, #1
800066e: 3801 subs r0, #1
8000670: e7e5 b.n 800063e <__lesf2+0x52>
8000672: 46c0 nop ; (mov r8, r8)
08000674 <__aeabi_fmul>:
8000674: b5f0 push {r4, r5, r6, r7, lr}
8000676: 464f mov r7, r9
8000678: 4646 mov r6, r8
800067a: 46d6 mov lr, sl
800067c: 0244 lsls r4, r0, #9
800067e: 0045 lsls r5, r0, #1
8000680: b5c0 push {r6, r7, lr}
8000682: 0a64 lsrs r4, r4, #9
8000684: 1c0f adds r7, r1, #0
8000686: 0e2d lsrs r5, r5, #24
8000688: 0fc6 lsrs r6, r0, #31
800068a: 2d00 cmp r5, #0
800068c: d100 bne.n 8000690 <__aeabi_fmul+0x1c>
800068e: e08d b.n 80007ac <__aeabi_fmul+0x138>
8000690: 2dff cmp r5, #255 ; 0xff
8000692: d100 bne.n 8000696 <__aeabi_fmul+0x22>
8000694: e092 b.n 80007bc <__aeabi_fmul+0x148>
8000696: 2300 movs r3, #0
8000698: 2080 movs r0, #128 ; 0x80
800069a: 4699 mov r9, r3
800069c: 469a mov sl, r3
800069e: 00e4 lsls r4, r4, #3
80006a0: 04c0 lsls r0, r0, #19
80006a2: 4304 orrs r4, r0
80006a4: 3d7f subs r5, #127 ; 0x7f
80006a6: 0278 lsls r0, r7, #9
80006a8: 0a43 lsrs r3, r0, #9
80006aa: 4698 mov r8, r3
80006ac: 007b lsls r3, r7, #1
80006ae: 0e1b lsrs r3, r3, #24
80006b0: 0fff lsrs r7, r7, #31
80006b2: 2b00 cmp r3, #0
80006b4: d100 bne.n 80006b8 <__aeabi_fmul+0x44>
80006b6: e070 b.n 800079a <__aeabi_fmul+0x126>
80006b8: 2bff cmp r3, #255 ; 0xff
80006ba: d100 bne.n 80006be <__aeabi_fmul+0x4a>
80006bc: e086 b.n 80007cc <__aeabi_fmul+0x158>
80006be: 4642 mov r2, r8
80006c0: 00d0 lsls r0, r2, #3
80006c2: 2280 movs r2, #128 ; 0x80
80006c4: 3b7f subs r3, #127 ; 0x7f
80006c6: 18ed adds r5, r5, r3
80006c8: 2300 movs r3, #0
80006ca: 04d2 lsls r2, r2, #19
80006cc: 4302 orrs r2, r0
80006ce: 4690 mov r8, r2
80006d0: 469c mov ip, r3
80006d2: 0031 movs r1, r6
80006d4: 464b mov r3, r9
80006d6: 4079 eors r1, r7
80006d8: 1c68 adds r0, r5, #1
80006da: 2b0f cmp r3, #15
80006dc: d81c bhi.n 8000718 <__aeabi_fmul+0xa4>
80006de: 4a76 ldr r2, [pc, #472] ; (80008b8 <__aeabi_fmul+0x244>)
80006e0: 009b lsls r3, r3, #2
80006e2: 58d3 ldr r3, [r2, r3]
80006e4: 469f mov pc, r3
80006e6: 0039 movs r1, r7
80006e8: 4644 mov r4, r8
80006ea: 46e2 mov sl, ip
80006ec: 4653 mov r3, sl
80006ee: 2b02 cmp r3, #2
80006f0: d00f beq.n 8000712 <__aeabi_fmul+0x9e>
80006f2: 2b03 cmp r3, #3
80006f4: d100 bne.n 80006f8 <__aeabi_fmul+0x84>
80006f6: e0d7 b.n 80008a8 <__aeabi_fmul+0x234>
80006f8: 2b01 cmp r3, #1
80006fa: d137 bne.n 800076c <__aeabi_fmul+0xf8>
80006fc: 2000 movs r0, #0
80006fe: 2400 movs r4, #0
8000700: 05c0 lsls r0, r0, #23
8000702: 4320 orrs r0, r4
8000704: 07c9 lsls r1, r1, #31
8000706: 4308 orrs r0, r1
8000708: bce0 pop {r5, r6, r7}
800070a: 46ba mov sl, r7
800070c: 46b1 mov r9, r6
800070e: 46a8 mov r8, r5
8000710: bdf0 pop {r4, r5, r6, r7, pc}
8000712: 20ff movs r0, #255 ; 0xff
8000714: 2400 movs r4, #0
8000716: e7f3 b.n 8000700 <__aeabi_fmul+0x8c>
8000718: 0c26 lsrs r6, r4, #16
800071a: 0424 lsls r4, r4, #16
800071c: 0c22 lsrs r2, r4, #16
800071e: 4644 mov r4, r8
8000720: 0424 lsls r4, r4, #16
8000722: 0c24 lsrs r4, r4, #16
8000724: 4643 mov r3, r8
8000726: 0027 movs r7, r4
8000728: 0c1b lsrs r3, r3, #16
800072a: 4357 muls r7, r2
800072c: 4374 muls r4, r6
800072e: 435a muls r2, r3
8000730: 435e muls r6, r3
8000732: 1912 adds r2, r2, r4
8000734: 0c3b lsrs r3, r7, #16
8000736: 189b adds r3, r3, r2
8000738: 429c cmp r4, r3
800073a: d903 bls.n 8000744 <__aeabi_fmul+0xd0>
800073c: 2280 movs r2, #128 ; 0x80
800073e: 0252 lsls r2, r2, #9
8000740: 4694 mov ip, r2
8000742: 4466 add r6, ip
8000744: 043f lsls r7, r7, #16
8000746: 041a lsls r2, r3, #16
8000748: 0c3f lsrs r7, r7, #16
800074a: 19d2 adds r2, r2, r7
800074c: 0194 lsls r4, r2, #6
800074e: 1e67 subs r7, r4, #1
8000750: 41bc sbcs r4, r7
8000752: 0c1b lsrs r3, r3, #16
8000754: 0e92 lsrs r2, r2, #26
8000756: 199b adds r3, r3, r6
8000758: 4314 orrs r4, r2
800075a: 019b lsls r3, r3, #6
800075c: 431c orrs r4, r3
800075e: 011b lsls r3, r3, #4
8000760: d400 bmi.n 8000764 <__aeabi_fmul+0xf0>
8000762: e09b b.n 800089c <__aeabi_fmul+0x228>
8000764: 2301 movs r3, #1
8000766: 0862 lsrs r2, r4, #1
8000768: 401c ands r4, r3
800076a: 4314 orrs r4, r2
800076c: 0002 movs r2, r0
800076e: 327f adds r2, #127 ; 0x7f
8000770: 2a00 cmp r2, #0
8000772: dd64 ble.n 800083e <__aeabi_fmul+0x1ca>
8000774: 0763 lsls r3, r4, #29
8000776: d004 beq.n 8000782 <__aeabi_fmul+0x10e>
8000778: 230f movs r3, #15
800077a: 4023 ands r3, r4
800077c: 2b04 cmp r3, #4
800077e: d000 beq.n 8000782 <__aeabi_fmul+0x10e>
8000780: 3404 adds r4, #4
8000782: 0123 lsls r3, r4, #4
8000784: d503 bpl.n 800078e <__aeabi_fmul+0x11a>
8000786: 0002 movs r2, r0
8000788: 4b4c ldr r3, [pc, #304] ; (80008bc <__aeabi_fmul+0x248>)
800078a: 3280 adds r2, #128 ; 0x80
800078c: 401c ands r4, r3
800078e: 2afe cmp r2, #254 ; 0xfe
8000790: dcbf bgt.n 8000712 <__aeabi_fmul+0x9e>
8000792: 01a4 lsls r4, r4, #6
8000794: 0a64 lsrs r4, r4, #9
8000796: b2d0 uxtb r0, r2
8000798: e7b2 b.n 8000700 <__aeabi_fmul+0x8c>
800079a: 4643 mov r3, r8
800079c: 2b00 cmp r3, #0
800079e: d13d bne.n 800081c <__aeabi_fmul+0x1a8>
80007a0: 464a mov r2, r9
80007a2: 3301 adds r3, #1
80007a4: 431a orrs r2, r3
80007a6: 4691 mov r9, r2
80007a8: 469c mov ip, r3
80007aa: e792 b.n 80006d2 <__aeabi_fmul+0x5e>
80007ac: 2c00 cmp r4, #0
80007ae: d129 bne.n 8000804 <__aeabi_fmul+0x190>
80007b0: 2304 movs r3, #4
80007b2: 4699 mov r9, r3
80007b4: 3b03 subs r3, #3
80007b6: 2500 movs r5, #0
80007b8: 469a mov sl, r3
80007ba: e774 b.n 80006a6 <__aeabi_fmul+0x32>
80007bc: 2c00 cmp r4, #0
80007be: d11b bne.n 80007f8 <__aeabi_fmul+0x184>
80007c0: 2308 movs r3, #8
80007c2: 4699 mov r9, r3
80007c4: 3b06 subs r3, #6
80007c6: 25ff movs r5, #255 ; 0xff
80007c8: 469a mov sl, r3
80007ca: e76c b.n 80006a6 <__aeabi_fmul+0x32>
80007cc: 4643 mov r3, r8
80007ce: 35ff adds r5, #255 ; 0xff
80007d0: 2b00 cmp r3, #0
80007d2: d10b bne.n 80007ec <__aeabi_fmul+0x178>
80007d4: 2302 movs r3, #2
80007d6: 464a mov r2, r9
80007d8: 431a orrs r2, r3
80007da: 4691 mov r9, r2
80007dc: 469c mov ip, r3
80007de: e778 b.n 80006d2 <__aeabi_fmul+0x5e>
80007e0: 4653 mov r3, sl
80007e2: 0031 movs r1, r6
80007e4: 2b02 cmp r3, #2
80007e6: d000 beq.n 80007ea <__aeabi_fmul+0x176>
80007e8: e783 b.n 80006f2 <__aeabi_fmul+0x7e>
80007ea: e792 b.n 8000712 <__aeabi_fmul+0x9e>
80007ec: 2303 movs r3, #3
80007ee: 464a mov r2, r9
80007f0: 431a orrs r2, r3
80007f2: 4691 mov r9, r2
80007f4: 469c mov ip, r3
80007f6: e76c b.n 80006d2 <__aeabi_fmul+0x5e>
80007f8: 230c movs r3, #12
80007fa: 4699 mov r9, r3
80007fc: 3b09 subs r3, #9
80007fe: 25ff movs r5, #255 ; 0xff
8000800: 469a mov sl, r3
8000802: e750 b.n 80006a6 <__aeabi_fmul+0x32>
8000804: 0020 movs r0, r4
8000806: f000 fb7d bl 8000f04 <__clzsi2>
800080a: 2576 movs r5, #118 ; 0x76
800080c: 1f43 subs r3, r0, #5
800080e: 409c lsls r4, r3
8000810: 2300 movs r3, #0
8000812: 426d negs r5, r5
8000814: 4699 mov r9, r3
8000816: 469a mov sl, r3
8000818: 1a2d subs r5, r5, r0
800081a: e744 b.n 80006a6 <__aeabi_fmul+0x32>
800081c: 4640 mov r0, r8
800081e: f000 fb71 bl 8000f04 <__clzsi2>
8000822: 4642 mov r2, r8
8000824: 1f43 subs r3, r0, #5
8000826: 409a lsls r2, r3
8000828: 2300 movs r3, #0
800082a: 1a2d subs r5, r5, r0
800082c: 4690 mov r8, r2
800082e: 469c mov ip, r3
8000830: 3d76 subs r5, #118 ; 0x76
8000832: e74e b.n 80006d2 <__aeabi_fmul+0x5e>
8000834: 2480 movs r4, #128 ; 0x80
8000836: 2100 movs r1, #0
8000838: 20ff movs r0, #255 ; 0xff
800083a: 03e4 lsls r4, r4, #15
800083c: e760 b.n 8000700 <__aeabi_fmul+0x8c>
800083e: 2301 movs r3, #1
8000840: 1a9b subs r3, r3, r2
8000842: 2b1b cmp r3, #27
8000844: dd00 ble.n 8000848 <__aeabi_fmul+0x1d4>
8000846: e759 b.n 80006fc <__aeabi_fmul+0x88>
8000848: 0022 movs r2, r4
800084a: 309e adds r0, #158 ; 0x9e
800084c: 40da lsrs r2, r3
800084e: 4084 lsls r4, r0
8000850: 0013 movs r3, r2
8000852: 1e62 subs r2, r4, #1
8000854: 4194 sbcs r4, r2
8000856: 431c orrs r4, r3
8000858: 0763 lsls r3, r4, #29
800085a: d004 beq.n 8000866 <__aeabi_fmul+0x1f2>
800085c: 230f movs r3, #15
800085e: 4023 ands r3, r4
8000860: 2b04 cmp r3, #4
8000862: d000 beq.n 8000866 <__aeabi_fmul+0x1f2>
8000864: 3404 adds r4, #4
8000866: 0163 lsls r3, r4, #5
8000868: d51a bpl.n 80008a0 <__aeabi_fmul+0x22c>
800086a: 2001 movs r0, #1
800086c: 2400 movs r4, #0
800086e: e747 b.n 8000700 <__aeabi_fmul+0x8c>
8000870: 2080 movs r0, #128 ; 0x80
8000872: 03c0 lsls r0, r0, #15
8000874: 4204 tst r4, r0
8000876: d009 beq.n 800088c <__aeabi_fmul+0x218>
8000878: 4643 mov r3, r8
800087a: 4203 tst r3, r0
800087c: d106 bne.n 800088c <__aeabi_fmul+0x218>
800087e: 4644 mov r4, r8
8000880: 4304 orrs r4, r0
8000882: 0264 lsls r4, r4, #9
8000884: 0039 movs r1, r7
8000886: 20ff movs r0, #255 ; 0xff
8000888: 0a64 lsrs r4, r4, #9
800088a: e739 b.n 8000700 <__aeabi_fmul+0x8c>
800088c: 2080 movs r0, #128 ; 0x80
800088e: 03c0 lsls r0, r0, #15
8000890: 4304 orrs r4, r0
8000892: 0264 lsls r4, r4, #9
8000894: 0031 movs r1, r6
8000896: 20ff movs r0, #255 ; 0xff
8000898: 0a64 lsrs r4, r4, #9
800089a: e731 b.n 8000700 <__aeabi_fmul+0x8c>
800089c: 0028 movs r0, r5
800089e: e765 b.n 800076c <__aeabi_fmul+0xf8>
80008a0: 01a4 lsls r4, r4, #6
80008a2: 2000 movs r0, #0
80008a4: 0a64 lsrs r4, r4, #9
80008a6: e72b b.n 8000700 <__aeabi_fmul+0x8c>
80008a8: 2080 movs r0, #128 ; 0x80
80008aa: 03c0 lsls r0, r0, #15
80008ac: 4304 orrs r4, r0
80008ae: 0264 lsls r4, r4, #9
80008b0: 20ff movs r0, #255 ; 0xff
80008b2: 0a64 lsrs r4, r4, #9
80008b4: e724 b.n 8000700 <__aeabi_fmul+0x8c>
80008b6: 46c0 nop ; (mov r8, r8)
80008b8: 080067a8 .word 0x080067a8
80008bc: f7ffffff .word 0xf7ffffff
080008c0 <__aeabi_fsub>:
80008c0: b5f8 push {r3, r4, r5, r6, r7, lr}
80008c2: 46ce mov lr, r9
80008c4: 4647 mov r7, r8
80008c6: 0243 lsls r3, r0, #9
80008c8: 0a5b lsrs r3, r3, #9
80008ca: 024e lsls r6, r1, #9
80008cc: 00da lsls r2, r3, #3
80008ce: 4694 mov ip, r2
80008d0: 0a72 lsrs r2, r6, #9
80008d2: 4691 mov r9, r2
80008d4: 0045 lsls r5, r0, #1
80008d6: 004a lsls r2, r1, #1
80008d8: b580 push {r7, lr}
80008da: 0e2d lsrs r5, r5, #24
80008dc: 001f movs r7, r3
80008de: 0fc4 lsrs r4, r0, #31
80008e0: 0e12 lsrs r2, r2, #24
80008e2: 0fc9 lsrs r1, r1, #31
80008e4: 09b6 lsrs r6, r6, #6
80008e6: 2aff cmp r2, #255 ; 0xff
80008e8: d05b beq.n 80009a2 <__aeabi_fsub+0xe2>
80008ea: 2001 movs r0, #1
80008ec: 4041 eors r1, r0
80008ee: 428c cmp r4, r1
80008f0: d039 beq.n 8000966 <__aeabi_fsub+0xa6>
80008f2: 1aa8 subs r0, r5, r2
80008f4: 2800 cmp r0, #0
80008f6: dd5a ble.n 80009ae <__aeabi_fsub+0xee>
80008f8: 2a00 cmp r2, #0
80008fa: d06a beq.n 80009d2 <__aeabi_fsub+0x112>
80008fc: 2dff cmp r5, #255 ; 0xff
80008fe: d100 bne.n 8000902 <__aeabi_fsub+0x42>
8000900: e0d9 b.n 8000ab6 <__aeabi_fsub+0x1f6>
8000902: 2280 movs r2, #128 ; 0x80
8000904: 04d2 lsls r2, r2, #19
8000906: 4316 orrs r6, r2
8000908: 281b cmp r0, #27
800090a: dc00 bgt.n 800090e <__aeabi_fsub+0x4e>
800090c: e0e9 b.n 8000ae2 <__aeabi_fsub+0x222>
800090e: 2001 movs r0, #1
8000910: 4663 mov r3, ip
8000912: 1a18 subs r0, r3, r0
8000914: 0143 lsls r3, r0, #5
8000916: d400 bmi.n 800091a <__aeabi_fsub+0x5a>
8000918: e0b4 b.n 8000a84 <__aeabi_fsub+0x1c4>
800091a: 0180 lsls r0, r0, #6
800091c: 0987 lsrs r7, r0, #6
800091e: 0038 movs r0, r7
8000920: f000 faf0 bl 8000f04 <__clzsi2>
8000924: 3805 subs r0, #5
8000926: 4087 lsls r7, r0
8000928: 4285 cmp r5, r0
800092a: dc00 bgt.n 800092e <__aeabi_fsub+0x6e>
800092c: e0cc b.n 8000ac8 <__aeabi_fsub+0x208>
800092e: 1a2d subs r5, r5, r0
8000930: 48b5 ldr r0, [pc, #724] ; (8000c08 <__aeabi_fsub+0x348>)
8000932: 4038 ands r0, r7
8000934: 0743 lsls r3, r0, #29
8000936: d004 beq.n 8000942 <__aeabi_fsub+0x82>
8000938: 230f movs r3, #15
800093a: 4003 ands r3, r0
800093c: 2b04 cmp r3, #4
800093e: d000 beq.n 8000942 <__aeabi_fsub+0x82>
8000940: 3004 adds r0, #4
8000942: 0143 lsls r3, r0, #5
8000944: d400 bmi.n 8000948 <__aeabi_fsub+0x88>
8000946: e0a0 b.n 8000a8a <__aeabi_fsub+0x1ca>
8000948: 1c6a adds r2, r5, #1
800094a: 2dfe cmp r5, #254 ; 0xfe
800094c: d100 bne.n 8000950 <__aeabi_fsub+0x90>
800094e: e08d b.n 8000a6c <__aeabi_fsub+0x1ac>
8000950: 0180 lsls r0, r0, #6
8000952: 0a47 lsrs r7, r0, #9
8000954: b2d2 uxtb r2, r2
8000956: 05d0 lsls r0, r2, #23
8000958: 4338 orrs r0, r7
800095a: 07e4 lsls r4, r4, #31
800095c: 4320 orrs r0, r4
800095e: bcc0 pop {r6, r7}
8000960: 46b9 mov r9, r7
8000962: 46b0 mov r8, r6
8000964: bdf8 pop {r3, r4, r5, r6, r7, pc}
8000966: 1aa8 subs r0, r5, r2
8000968: 4680 mov r8, r0
800096a: 2800 cmp r0, #0
800096c: dd45 ble.n 80009fa <__aeabi_fsub+0x13a>
800096e: 2a00 cmp r2, #0
8000970: d070 beq.n 8000a54 <__aeabi_fsub+0x194>
8000972: 2dff cmp r5, #255 ; 0xff
8000974: d100 bne.n 8000978 <__aeabi_fsub+0xb8>
8000976: e09e b.n 8000ab6 <__aeabi_fsub+0x1f6>
8000978: 2380 movs r3, #128 ; 0x80
800097a: 04db lsls r3, r3, #19
800097c: 431e orrs r6, r3
800097e: 4643 mov r3, r8
8000980: 2b1b cmp r3, #27
8000982: dc00 bgt.n 8000986 <__aeabi_fsub+0xc6>
8000984: e0d2 b.n 8000b2c <__aeabi_fsub+0x26c>
8000986: 2001 movs r0, #1
8000988: 4460 add r0, ip
800098a: 0143 lsls r3, r0, #5
800098c: d57a bpl.n 8000a84 <__aeabi_fsub+0x1c4>
800098e: 3501 adds r5, #1
8000990: 2dff cmp r5, #255 ; 0xff
8000992: d06b beq.n 8000a6c <__aeabi_fsub+0x1ac>
8000994: 2301 movs r3, #1
8000996: 4a9d ldr r2, [pc, #628] ; (8000c0c <__aeabi_fsub+0x34c>)
8000998: 4003 ands r3, r0
800099a: 0840 lsrs r0, r0, #1
800099c: 4010 ands r0, r2
800099e: 4318 orrs r0, r3
80009a0: e7c8 b.n 8000934 <__aeabi_fsub+0x74>
80009a2: 2e00 cmp r6, #0
80009a4: d020 beq.n 80009e8 <__aeabi_fsub+0x128>
80009a6: 428c cmp r4, r1
80009a8: d023 beq.n 80009f2 <__aeabi_fsub+0x132>
80009aa: 0028 movs r0, r5
80009ac: 38ff subs r0, #255 ; 0xff
80009ae: 2800 cmp r0, #0
80009b0: d039 beq.n 8000a26 <__aeabi_fsub+0x166>
80009b2: 1b57 subs r7, r2, r5
80009b4: 2d00 cmp r5, #0
80009b6: d000 beq.n 80009ba <__aeabi_fsub+0xfa>
80009b8: e09d b.n 8000af6 <__aeabi_fsub+0x236>
80009ba: 4663 mov r3, ip
80009bc: 2b00 cmp r3, #0
80009be: d100 bne.n 80009c2 <__aeabi_fsub+0x102>
80009c0: e0db b.n 8000b7a <__aeabi_fsub+0x2ba>
80009c2: 1e7b subs r3, r7, #1
80009c4: 2f01 cmp r7, #1
80009c6: d100 bne.n 80009ca <__aeabi_fsub+0x10a>
80009c8: e10d b.n 8000be6 <__aeabi_fsub+0x326>
80009ca: 2fff cmp r7, #255 ; 0xff
80009cc: d071 beq.n 8000ab2 <__aeabi_fsub+0x1f2>
80009ce: 001f movs r7, r3
80009d0: e098 b.n 8000b04 <__aeabi_fsub+0x244>
80009d2: 2e00 cmp r6, #0
80009d4: d100 bne.n 80009d8 <__aeabi_fsub+0x118>
80009d6: e0a7 b.n 8000b28 <__aeabi_fsub+0x268>
80009d8: 1e42 subs r2, r0, #1
80009da: 2801 cmp r0, #1
80009dc: d100 bne.n 80009e0 <__aeabi_fsub+0x120>
80009de: e0e6 b.n 8000bae <__aeabi_fsub+0x2ee>
80009e0: 28ff cmp r0, #255 ; 0xff
80009e2: d068 beq.n 8000ab6 <__aeabi_fsub+0x1f6>
80009e4: 0010 movs r0, r2
80009e6: e78f b.n 8000908 <__aeabi_fsub+0x48>
80009e8: 2001 movs r0, #1
80009ea: 4041 eors r1, r0
80009ec: 42a1 cmp r1, r4
80009ee: d000 beq.n 80009f2 <__aeabi_fsub+0x132>
80009f0: e77f b.n 80008f2 <__aeabi_fsub+0x32>
80009f2: 20ff movs r0, #255 ; 0xff
80009f4: 4240 negs r0, r0
80009f6: 4680 mov r8, r0
80009f8: 44a8 add r8, r5
80009fa: 4640 mov r0, r8
80009fc: 2800 cmp r0, #0
80009fe: d038 beq.n 8000a72 <__aeabi_fsub+0x1b2>
8000a00: 1b51 subs r1, r2, r5
8000a02: 2d00 cmp r5, #0
8000a04: d100 bne.n 8000a08 <__aeabi_fsub+0x148>
8000a06: e0ae b.n 8000b66 <__aeabi_fsub+0x2a6>
8000a08: 2aff cmp r2, #255 ; 0xff
8000a0a: d100 bne.n 8000a0e <__aeabi_fsub+0x14e>
8000a0c: e0df b.n 8000bce <__aeabi_fsub+0x30e>
8000a0e: 2380 movs r3, #128 ; 0x80
8000a10: 4660 mov r0, ip
8000a12: 04db lsls r3, r3, #19
8000a14: 4318 orrs r0, r3
8000a16: 4684 mov ip, r0
8000a18: 291b cmp r1, #27
8000a1a: dc00 bgt.n 8000a1e <__aeabi_fsub+0x15e>
8000a1c: e0d9 b.n 8000bd2 <__aeabi_fsub+0x312>
8000a1e: 2001 movs r0, #1
8000a20: 0015 movs r5, r2
8000a22: 1980 adds r0, r0, r6
8000a24: e7b1 b.n 800098a <__aeabi_fsub+0xca>
8000a26: 20fe movs r0, #254 ; 0xfe
8000a28: 1c6a adds r2, r5, #1
8000a2a: 4210 tst r0, r2
8000a2c: d171 bne.n 8000b12 <__aeabi_fsub+0x252>
8000a2e: 2d00 cmp r5, #0
8000a30: d000 beq.n 8000a34 <__aeabi_fsub+0x174>
8000a32: e0a6 b.n 8000b82 <__aeabi_fsub+0x2c2>
8000a34: 4663 mov r3, ip
8000a36: 2b00 cmp r3, #0
8000a38: d100 bne.n 8000a3c <__aeabi_fsub+0x17c>
8000a3a: e0d9 b.n 8000bf0 <__aeabi_fsub+0x330>
8000a3c: 2200 movs r2, #0
8000a3e: 2e00 cmp r6, #0
8000a40: d100 bne.n 8000a44 <__aeabi_fsub+0x184>
8000a42: e788 b.n 8000956 <__aeabi_fsub+0x96>
8000a44: 1b98 subs r0, r3, r6
8000a46: 0143 lsls r3, r0, #5
8000a48: d400 bmi.n 8000a4c <__aeabi_fsub+0x18c>
8000a4a: e0e1 b.n 8000c10 <__aeabi_fsub+0x350>
8000a4c: 4663 mov r3, ip
8000a4e: 000c movs r4, r1
8000a50: 1af0 subs r0, r6, r3
8000a52: e76f b.n 8000934 <__aeabi_fsub+0x74>
8000a54: 2e00 cmp r6, #0
8000a56: d100 bne.n 8000a5a <__aeabi_fsub+0x19a>
8000a58: e0b7 b.n 8000bca <__aeabi_fsub+0x30a>
8000a5a: 0002 movs r2, r0
8000a5c: 3a01 subs r2, #1
8000a5e: 2801 cmp r0, #1
8000a60: d100 bne.n 8000a64 <__aeabi_fsub+0x1a4>
8000a62: e09c b.n 8000b9e <__aeabi_fsub+0x2de>
8000a64: 28ff cmp r0, #255 ; 0xff
8000a66: d026 beq.n 8000ab6 <__aeabi_fsub+0x1f6>
8000a68: 4690 mov r8, r2
8000a6a: e788 b.n 800097e <__aeabi_fsub+0xbe>
8000a6c: 22ff movs r2, #255 ; 0xff
8000a6e: 2700 movs r7, #0
8000a70: e771 b.n 8000956 <__aeabi_fsub+0x96>
8000a72: 20fe movs r0, #254 ; 0xfe
8000a74: 1c6a adds r2, r5, #1
8000a76: 4210 tst r0, r2
8000a78: d064 beq.n 8000b44 <__aeabi_fsub+0x284>
8000a7a: 2aff cmp r2, #255 ; 0xff
8000a7c: d0f6 beq.n 8000a6c <__aeabi_fsub+0x1ac>
8000a7e: 0015 movs r5, r2
8000a80: 4466 add r6, ip
8000a82: 0870 lsrs r0, r6, #1
8000a84: 0743 lsls r3, r0, #29
8000a86: d000 beq.n 8000a8a <__aeabi_fsub+0x1ca>
8000a88: e756 b.n 8000938 <__aeabi_fsub+0x78>
8000a8a: 08c3 lsrs r3, r0, #3
8000a8c: 2dff cmp r5, #255 ; 0xff
8000a8e: d012 beq.n 8000ab6 <__aeabi_fsub+0x1f6>
8000a90: 025b lsls r3, r3, #9
8000a92: 0a5f lsrs r7, r3, #9
8000a94: b2ea uxtb r2, r5
8000a96: e75e b.n 8000956 <__aeabi_fsub+0x96>
8000a98: 4662 mov r2, ip
8000a9a: 2a00 cmp r2, #0
8000a9c: d100 bne.n 8000aa0 <__aeabi_fsub+0x1e0>
8000a9e: e096 b.n 8000bce <__aeabi_fsub+0x30e>
8000aa0: 2e00 cmp r6, #0
8000aa2: d008 beq.n 8000ab6 <__aeabi_fsub+0x1f6>
8000aa4: 2280 movs r2, #128 ; 0x80
8000aa6: 03d2 lsls r2, r2, #15
8000aa8: 4213 tst r3, r2
8000aaa: d004 beq.n 8000ab6 <__aeabi_fsub+0x1f6>
8000aac: 4648 mov r0, r9
8000aae: 4210 tst r0, r2
8000ab0: d101 bne.n 8000ab6 <__aeabi_fsub+0x1f6>
8000ab2: 000c movs r4, r1
8000ab4: 464b mov r3, r9
8000ab6: 2b00 cmp r3, #0
8000ab8: d0d8 beq.n 8000a6c <__aeabi_fsub+0x1ac>
8000aba: 2780 movs r7, #128 ; 0x80
8000abc: 03ff lsls r7, r7, #15
8000abe: 431f orrs r7, r3
8000ac0: 027f lsls r7, r7, #9
8000ac2: 22ff movs r2, #255 ; 0xff
8000ac4: 0a7f lsrs r7, r7, #9
8000ac6: e746 b.n 8000956 <__aeabi_fsub+0x96>
8000ac8: 2320 movs r3, #32
8000aca: 003a movs r2, r7
8000acc: 1b45 subs r5, r0, r5
8000ace: 0038 movs r0, r7
8000ad0: 3501 adds r5, #1
8000ad2: 40ea lsrs r2, r5
8000ad4: 1b5d subs r5, r3, r5
8000ad6: 40a8 lsls r0, r5
8000ad8: 1e43 subs r3, r0, #1
8000ada: 4198 sbcs r0, r3
8000adc: 2500 movs r5, #0
8000ade: 4310 orrs r0, r2
8000ae0: e728 b.n 8000934 <__aeabi_fsub+0x74>
8000ae2: 2320 movs r3, #32
8000ae4: 1a1b subs r3, r3, r0
8000ae6: 0032 movs r2, r6
8000ae8: 409e lsls r6, r3
8000aea: 40c2 lsrs r2, r0
8000aec: 0030 movs r0, r6
8000aee: 1e43 subs r3, r0, #1
8000af0: 4198 sbcs r0, r3
8000af2: 4310 orrs r0, r2
8000af4: e70c b.n 8000910 <__aeabi_fsub+0x50>
8000af6: 2aff cmp r2, #255 ; 0xff
8000af8: d0db beq.n 8000ab2 <__aeabi_fsub+0x1f2>
8000afa: 2380 movs r3, #128 ; 0x80
8000afc: 4660 mov r0, ip
8000afe: 04db lsls r3, r3, #19
8000b00: 4318 orrs r0, r3
8000b02: 4684 mov ip, r0
8000b04: 2f1b cmp r7, #27
8000b06: dd56 ble.n 8000bb6 <__aeabi_fsub+0x2f6>
8000b08: 2001 movs r0, #1
8000b0a: 000c movs r4, r1
8000b0c: 0015 movs r5, r2
8000b0e: 1a30 subs r0, r6, r0
8000b10: e700 b.n 8000914 <__aeabi_fsub+0x54>
8000b12: 4663 mov r3, ip
8000b14: 1b9f subs r7, r3, r6
8000b16: 017b lsls r3, r7, #5
8000b18: d43d bmi.n 8000b96 <__aeabi_fsub+0x2d6>
8000b1a: 2f00 cmp r7, #0
8000b1c: d000 beq.n 8000b20 <__aeabi_fsub+0x260>
8000b1e: e6fe b.n 800091e <__aeabi_fsub+0x5e>
8000b20: 2400 movs r4, #0
8000b22: 2200 movs r2, #0
8000b24: 2700 movs r7, #0
8000b26: e716 b.n 8000956 <__aeabi_fsub+0x96>
8000b28: 0005 movs r5, r0
8000b2a: e7af b.n 8000a8c <__aeabi_fsub+0x1cc>
8000b2c: 0032 movs r2, r6
8000b2e: 4643 mov r3, r8
8000b30: 4641 mov r1, r8
8000b32: 40da lsrs r2, r3
8000b34: 2320 movs r3, #32
8000b36: 1a5b subs r3, r3, r1
8000b38: 409e lsls r6, r3
8000b3a: 0030 movs r0, r6
8000b3c: 1e43 subs r3, r0, #1
8000b3e: 4198 sbcs r0, r3
8000b40: 4310 orrs r0, r2
8000b42: e721 b.n 8000988 <__aeabi_fsub+0xc8>
8000b44: 2d00 cmp r5, #0
8000b46: d1a7 bne.n 8000a98 <__aeabi_fsub+0x1d8>
8000b48: 4663 mov r3, ip
8000b4a: 2b00 cmp r3, #0
8000b4c: d059 beq.n 8000c02 <__aeabi_fsub+0x342>
8000b4e: 2200 movs r2, #0
8000b50: 2e00 cmp r6, #0
8000b52: d100 bne.n 8000b56 <__aeabi_fsub+0x296>
8000b54: e6ff b.n 8000956 <__aeabi_fsub+0x96>
8000b56: 0030 movs r0, r6
8000b58: 4460 add r0, ip
8000b5a: 0143 lsls r3, r0, #5
8000b5c: d592 bpl.n 8000a84 <__aeabi_fsub+0x1c4>
8000b5e: 4b2a ldr r3, [pc, #168] ; (8000c08 <__aeabi_fsub+0x348>)
8000b60: 3501 adds r5, #1
8000b62: 4018 ands r0, r3
8000b64: e78e b.n 8000a84 <__aeabi_fsub+0x1c4>
8000b66: 4663 mov r3, ip
8000b68: 2b00 cmp r3, #0
8000b6a: d047 beq.n 8000bfc <__aeabi_fsub+0x33c>
8000b6c: 1e4b subs r3, r1, #1
8000b6e: 2901 cmp r1, #1
8000b70: d015 beq.n 8000b9e <__aeabi_fsub+0x2de>
8000b72: 29ff cmp r1, #255 ; 0xff
8000b74: d02b beq.n 8000bce <__aeabi_fsub+0x30e>
8000b76: 0019 movs r1, r3
8000b78: e74e b.n 8000a18 <__aeabi_fsub+0x158>
8000b7a: 000c movs r4, r1
8000b7c: 464b mov r3, r9
8000b7e: 003d movs r5, r7
8000b80: e784 b.n 8000a8c <__aeabi_fsub+0x1cc>
8000b82: 4662 mov r2, ip
8000b84: 2a00 cmp r2, #0
8000b86: d18b bne.n 8000aa0 <__aeabi_fsub+0x1e0>
8000b88: 2e00 cmp r6, #0
8000b8a: d192 bne.n 8000ab2 <__aeabi_fsub+0x1f2>
8000b8c: 2780 movs r7, #128 ; 0x80
8000b8e: 2400 movs r4, #0
8000b90: 22ff movs r2, #255 ; 0xff
8000b92: 03ff lsls r7, r7, #15
8000b94: e6df b.n 8000956 <__aeabi_fsub+0x96>
8000b96: 4663 mov r3, ip
8000b98: 000c movs r4, r1
8000b9a: 1af7 subs r7, r6, r3
8000b9c: e6bf b.n 800091e <__aeabi_fsub+0x5e>
8000b9e: 0030 movs r0, r6
8000ba0: 4460 add r0, ip
8000ba2: 2501 movs r5, #1
8000ba4: 0143 lsls r3, r0, #5
8000ba6: d400 bmi.n 8000baa <__aeabi_fsub+0x2ea>
8000ba8: e76c b.n 8000a84 <__aeabi_fsub+0x1c4>
8000baa: 2502 movs r5, #2
8000bac: e6f2 b.n 8000994 <__aeabi_fsub+0xd4>
8000bae: 4663 mov r3, ip
8000bb0: 2501 movs r5, #1
8000bb2: 1b98 subs r0, r3, r6
8000bb4: e6ae b.n 8000914 <__aeabi_fsub+0x54>
8000bb6: 2320 movs r3, #32
8000bb8: 4664 mov r4, ip
8000bba: 4660 mov r0, ip
8000bbc: 40fc lsrs r4, r7
8000bbe: 1bdf subs r7, r3, r7
8000bc0: 40b8 lsls r0, r7
8000bc2: 1e43 subs r3, r0, #1
8000bc4: 4198 sbcs r0, r3
8000bc6: 4320 orrs r0, r4
8000bc8: e79f b.n 8000b0a <__aeabi_fsub+0x24a>
8000bca: 0005 movs r5, r0
8000bcc: e75e b.n 8000a8c <__aeabi_fsub+0x1cc>
8000bce: 464b mov r3, r9
8000bd0: e771 b.n 8000ab6 <__aeabi_fsub+0x1f6>
8000bd2: 2320 movs r3, #32
8000bd4: 4665 mov r5, ip
8000bd6: 4660 mov r0, ip
8000bd8: 40cd lsrs r5, r1
8000bda: 1a59 subs r1, r3, r1
8000bdc: 4088 lsls r0, r1
8000bde: 1e43 subs r3, r0, #1
8000be0: 4198 sbcs r0, r3
8000be2: 4328 orrs r0, r5
8000be4: e71c b.n 8000a20 <__aeabi_fsub+0x160>
8000be6: 4663 mov r3, ip
8000be8: 000c movs r4, r1
8000bea: 2501 movs r5, #1
8000bec: 1af0 subs r0, r6, r3
8000bee: e691 b.n 8000914 <__aeabi_fsub+0x54>
8000bf0: 2e00 cmp r6, #0
8000bf2: d095 beq.n 8000b20 <__aeabi_fsub+0x260>
8000bf4: 000c movs r4, r1
8000bf6: 464f mov r7, r9
8000bf8: 2200 movs r2, #0
8000bfa: e6ac b.n 8000956 <__aeabi_fsub+0x96>
8000bfc: 464b mov r3, r9
8000bfe: 000d movs r5, r1
8000c00: e744 b.n 8000a8c <__aeabi_fsub+0x1cc>
8000c02: 464f mov r7, r9
8000c04: 2200 movs r2, #0
8000c06: e6a6 b.n 8000956 <__aeabi_fsub+0x96>
8000c08: fbffffff .word 0xfbffffff
8000c0c: 7dffffff .word 0x7dffffff
8000c10: 2800 cmp r0, #0
8000c12: d000 beq.n 8000c16 <__aeabi_fsub+0x356>
8000c14: e736 b.n 8000a84 <__aeabi_fsub+0x1c4>
8000c16: 2400 movs r4, #0
8000c18: 2700 movs r7, #0
8000c1a: e69c b.n 8000956 <__aeabi_fsub+0x96>
08000c1c <__aeabi_f2iz>:
8000c1c: 0241 lsls r1, r0, #9
8000c1e: 0042 lsls r2, r0, #1
8000c20: 0fc3 lsrs r3, r0, #31
8000c22: 0a49 lsrs r1, r1, #9
8000c24: 2000 movs r0, #0
8000c26: 0e12 lsrs r2, r2, #24
8000c28: 2a7e cmp r2, #126 ; 0x7e
8000c2a: dd03 ble.n 8000c34 <__aeabi_f2iz+0x18>
8000c2c: 2a9d cmp r2, #157 ; 0x9d
8000c2e: dd02 ble.n 8000c36 <__aeabi_f2iz+0x1a>
8000c30: 4a09 ldr r2, [pc, #36] ; (8000c58 <__aeabi_f2iz+0x3c>)
8000c32: 1898 adds r0, r3, r2
8000c34: 4770 bx lr
8000c36: 2080 movs r0, #128 ; 0x80
8000c38: 0400 lsls r0, r0, #16
8000c3a: 4301 orrs r1, r0
8000c3c: 2a95 cmp r2, #149 ; 0x95
8000c3e: dc07 bgt.n 8000c50 <__aeabi_f2iz+0x34>
8000c40: 2096 movs r0, #150 ; 0x96
8000c42: 1a82 subs r2, r0, r2
8000c44: 40d1 lsrs r1, r2
8000c46: 4248 negs r0, r1
8000c48: 2b00 cmp r3, #0
8000c4a: d1f3 bne.n 8000c34 <__aeabi_f2iz+0x18>
8000c4c: 0008 movs r0, r1
8000c4e: e7f1 b.n 8000c34 <__aeabi_f2iz+0x18>
8000c50: 3a96 subs r2, #150 ; 0x96
8000c52: 4091 lsls r1, r2
8000c54: e7f7 b.n 8000c46 <__aeabi_f2iz+0x2a>
8000c56: 46c0 nop ; (mov r8, r8)
8000c58: 7fffffff .word 0x7fffffff
08000c5c <__eqdf2>:
8000c5c: b5f0 push {r4, r5, r6, r7, lr}
8000c5e: 464e mov r6, r9
8000c60: 4645 mov r5, r8
8000c62: 46de mov lr, fp
8000c64: 4657 mov r7, sl
8000c66: 4690 mov r8, r2
8000c68: b5e0 push {r5, r6, r7, lr}
8000c6a: 0017 movs r7, r2
8000c6c: 031a lsls r2, r3, #12
8000c6e: 0b12 lsrs r2, r2, #12
8000c70: 0005 movs r5, r0
8000c72: 4684 mov ip, r0
8000c74: 4819 ldr r0, [pc, #100] ; (8000cdc <__eqdf2+0x80>)
8000c76: 030e lsls r6, r1, #12
8000c78: 004c lsls r4, r1, #1
8000c7a: 4691 mov r9, r2
8000c7c: 005a lsls r2, r3, #1
8000c7e: 0fdb lsrs r3, r3, #31
8000c80: 469b mov fp, r3
8000c82: 0b36 lsrs r6, r6, #12
8000c84: 0d64 lsrs r4, r4, #21
8000c86: 0fc9 lsrs r1, r1, #31
8000c88: 0d52 lsrs r2, r2, #21
8000c8a: 4284 cmp r4, r0
8000c8c: d019 beq.n 8000cc2 <__eqdf2+0x66>
8000c8e: 4282 cmp r2, r0
8000c90: d010 beq.n 8000cb4 <__eqdf2+0x58>
8000c92: 2001 movs r0, #1
8000c94: 4294 cmp r4, r2
8000c96: d10e bne.n 8000cb6 <__eqdf2+0x5a>
8000c98: 454e cmp r6, r9
8000c9a: d10c bne.n 8000cb6 <__eqdf2+0x5a>
8000c9c: 2001 movs r0, #1
8000c9e: 45c4 cmp ip, r8
8000ca0: d109 bne.n 8000cb6 <__eqdf2+0x5a>
8000ca2: 4559 cmp r1, fp
8000ca4: d017 beq.n 8000cd6 <__eqdf2+0x7a>
8000ca6: 2c00 cmp r4, #0
8000ca8: d105 bne.n 8000cb6 <__eqdf2+0x5a>
8000caa: 0030 movs r0, r6
8000cac: 4328 orrs r0, r5
8000cae: 1e43 subs r3, r0, #1
8000cb0: 4198 sbcs r0, r3
8000cb2: e000 b.n 8000cb6 <__eqdf2+0x5a>
8000cb4: 2001 movs r0, #1
8000cb6: bcf0 pop {r4, r5, r6, r7}
8000cb8: 46bb mov fp, r7
8000cba: 46b2 mov sl, r6
8000cbc: 46a9 mov r9, r5
8000cbe: 46a0 mov r8, r4
8000cc0: bdf0 pop {r4, r5, r6, r7, pc}
8000cc2: 0033 movs r3, r6
8000cc4: 2001 movs r0, #1
8000cc6: 432b orrs r3, r5
8000cc8: d1f5 bne.n 8000cb6 <__eqdf2+0x5a>
8000cca: 42a2 cmp r2, r4
8000ccc: d1f3 bne.n 8000cb6 <__eqdf2+0x5a>
8000cce: 464b mov r3, r9
8000cd0: 433b orrs r3, r7
8000cd2: d1f0 bne.n 8000cb6 <__eqdf2+0x5a>
8000cd4: e7e2 b.n 8000c9c <__eqdf2+0x40>
8000cd6: 2000 movs r0, #0
8000cd8: e7ed b.n 8000cb6 <__eqdf2+0x5a>
8000cda: 46c0 nop ; (mov r8, r8)
8000cdc: 000007ff .word 0x000007ff
08000ce0 <__gedf2>:
8000ce0: b5f0 push {r4, r5, r6, r7, lr}
8000ce2: 4647 mov r7, r8
8000ce4: 46ce mov lr, r9
8000ce6: 0004 movs r4, r0
8000ce8: 0018 movs r0, r3
8000cea: 0016 movs r6, r2
8000cec: 031b lsls r3, r3, #12
8000cee: 0b1b lsrs r3, r3, #12
8000cf0: 4d2d ldr r5, [pc, #180] ; (8000da8 <__gedf2+0xc8>)
8000cf2: 004a lsls r2, r1, #1
8000cf4: 4699 mov r9, r3
8000cf6: b580 push {r7, lr}
8000cf8: 0043 lsls r3, r0, #1
8000cfa: 030f lsls r7, r1, #12
8000cfc: 46a4 mov ip, r4
8000cfe: 46b0 mov r8, r6
8000d00: 0b3f lsrs r7, r7, #12
8000d02: 0d52 lsrs r2, r2, #21
8000d04: 0fc9 lsrs r1, r1, #31
8000d06: 0d5b lsrs r3, r3, #21
8000d08: 0fc0 lsrs r0, r0, #31
8000d0a: 42aa cmp r2, r5
8000d0c: d021 beq.n 8000d52 <__gedf2+0x72>
8000d0e: 42ab cmp r3, r5
8000d10: d013 beq.n 8000d3a <__gedf2+0x5a>
8000d12: 2a00 cmp r2, #0
8000d14: d122 bne.n 8000d5c <__gedf2+0x7c>
8000d16: 433c orrs r4, r7
8000d18: 2b00 cmp r3, #0
8000d1a: d102 bne.n 8000d22 <__gedf2+0x42>
8000d1c: 464d mov r5, r9
8000d1e: 432e orrs r6, r5
8000d20: d022 beq.n 8000d68 <__gedf2+0x88>
8000d22: 2c00 cmp r4, #0
8000d24: d010 beq.n 8000d48 <__gedf2+0x68>
8000d26: 4281 cmp r1, r0
8000d28: d022 beq.n 8000d70 <__gedf2+0x90>
8000d2a: 2002 movs r0, #2
8000d2c: 3901 subs r1, #1
8000d2e: 4008 ands r0, r1
8000d30: 3801 subs r0, #1
8000d32: bcc0 pop {r6, r7}
8000d34: 46b9 mov r9, r7
8000d36: 46b0 mov r8, r6
8000d38: bdf0 pop {r4, r5, r6, r7, pc}
8000d3a: 464d mov r5, r9
8000d3c: 432e orrs r6, r5
8000d3e: d129 bne.n 8000d94 <__gedf2+0xb4>
8000d40: 2a00 cmp r2, #0
8000d42: d1f0 bne.n 8000d26 <__gedf2+0x46>
8000d44: 433c orrs r4, r7
8000d46: d1ee bne.n 8000d26 <__gedf2+0x46>
8000d48: 2800 cmp r0, #0
8000d4a: d1f2 bne.n 8000d32 <__gedf2+0x52>
8000d4c: 2001 movs r0, #1
8000d4e: 4240 negs r0, r0
8000d50: e7ef b.n 8000d32 <__gedf2+0x52>
8000d52: 003d movs r5, r7
8000d54: 4325 orrs r5, r4
8000d56: d11d bne.n 8000d94 <__gedf2+0xb4>
8000d58: 4293 cmp r3, r2
8000d5a: d0ee beq.n 8000d3a <__gedf2+0x5a>
8000d5c: 2b00 cmp r3, #0
8000d5e: d1e2 bne.n 8000d26 <__gedf2+0x46>
8000d60: 464c mov r4, r9
8000d62: 4326 orrs r6, r4
8000d64: d1df bne.n 8000d26 <__gedf2+0x46>
8000d66: e7e0 b.n 8000d2a <__gedf2+0x4a>
8000d68: 2000 movs r0, #0
8000d6a: 2c00 cmp r4, #0
8000d6c: d0e1 beq.n 8000d32 <__gedf2+0x52>
8000d6e: e7dc b.n 8000d2a <__gedf2+0x4a>
8000d70: 429a cmp r2, r3
8000d72: dc0a bgt.n 8000d8a <__gedf2+0xaa>
8000d74: dbe8 blt.n 8000d48 <__gedf2+0x68>
8000d76: 454f cmp r7, r9
8000d78: d8d7 bhi.n 8000d2a <__gedf2+0x4a>
8000d7a: d00e beq.n 8000d9a <__gedf2+0xba>
8000d7c: 2000 movs r0, #0
8000d7e: 454f cmp r7, r9
8000d80: d2d7 bcs.n 8000d32 <__gedf2+0x52>
8000d82: 2900 cmp r1, #0
8000d84: d0e2 beq.n 8000d4c <__gedf2+0x6c>
8000d86: 0008 movs r0, r1
8000d88: e7d3 b.n 8000d32 <__gedf2+0x52>
8000d8a: 4243 negs r3, r0
8000d8c: 4158 adcs r0, r3
8000d8e: 0040 lsls r0, r0, #1
8000d90: 3801 subs r0, #1
8000d92: e7ce b.n 8000d32 <__gedf2+0x52>
8000d94: 2002 movs r0, #2
8000d96: 4240 negs r0, r0
8000d98: e7cb b.n 8000d32 <__gedf2+0x52>
8000d9a: 45c4 cmp ip, r8
8000d9c: d8c5 bhi.n 8000d2a <__gedf2+0x4a>
8000d9e: 2000 movs r0, #0
8000da0: 45c4 cmp ip, r8
8000da2: d2c6 bcs.n 8000d32 <__gedf2+0x52>
8000da4: e7ed b.n 8000d82 <__gedf2+0xa2>
8000da6: 46c0 nop ; (mov r8, r8)
8000da8: 000007ff .word 0x000007ff
08000dac <__ledf2>:
8000dac: b5f0 push {r4, r5, r6, r7, lr}
8000dae: 4647 mov r7, r8
8000db0: 46ce mov lr, r9
8000db2: 0004 movs r4, r0
8000db4: 0018 movs r0, r3
8000db6: 0016 movs r6, r2
8000db8: 031b lsls r3, r3, #12
8000dba: 0b1b lsrs r3, r3, #12
8000dbc: 4d2c ldr r5, [pc, #176] ; (8000e70 <__ledf2+0xc4>)
8000dbe: 004a lsls r2, r1, #1
8000dc0: 4699 mov r9, r3
8000dc2: b580 push {r7, lr}
8000dc4: 0043 lsls r3, r0, #1
8000dc6: 030f lsls r7, r1, #12
8000dc8: 46a4 mov ip, r4
8000dca: 46b0 mov r8, r6
8000dcc: 0b3f lsrs r7, r7, #12
8000dce: 0d52 lsrs r2, r2, #21
8000dd0: 0fc9 lsrs r1, r1, #31
8000dd2: 0d5b lsrs r3, r3, #21
8000dd4: 0fc0 lsrs r0, r0, #31
8000dd6: 42aa cmp r2, r5
8000dd8: d00d beq.n 8000df6 <__ledf2+0x4a>
8000dda: 42ab cmp r3, r5
8000ddc: d010 beq.n 8000e00 <__ledf2+0x54>
8000dde: 2a00 cmp r2, #0
8000de0: d127 bne.n 8000e32 <__ledf2+0x86>
8000de2: 433c orrs r4, r7
8000de4: 2b00 cmp r3, #0
8000de6: d111 bne.n 8000e0c <__ledf2+0x60>
8000de8: 464d mov r5, r9
8000dea: 432e orrs r6, r5
8000dec: d10e bne.n 8000e0c <__ledf2+0x60>
8000dee: 2000 movs r0, #0
8000df0: 2c00 cmp r4, #0
8000df2: d015 beq.n 8000e20 <__ledf2+0x74>
8000df4: e00e b.n 8000e14 <__ledf2+0x68>
8000df6: 003d movs r5, r7
8000df8: 4325 orrs r5, r4
8000dfa: d110 bne.n 8000e1e <__ledf2+0x72>
8000dfc: 4293 cmp r3, r2
8000dfe: d118 bne.n 8000e32 <__ledf2+0x86>
8000e00: 464d mov r5, r9
8000e02: 432e orrs r6, r5
8000e04: d10b bne.n 8000e1e <__ledf2+0x72>
8000e06: 2a00 cmp r2, #0
8000e08: d102 bne.n 8000e10 <__ledf2+0x64>
8000e0a: 433c orrs r4, r7
8000e0c: 2c00 cmp r4, #0
8000e0e: d00b beq.n 8000e28 <__ledf2+0x7c>
8000e10: 4281 cmp r1, r0
8000e12: d014 beq.n 8000e3e <__ledf2+0x92>
8000e14: 2002 movs r0, #2
8000e16: 3901 subs r1, #1
8000e18: 4008 ands r0, r1
8000e1a: 3801 subs r0, #1
8000e1c: e000 b.n 8000e20 <__ledf2+0x74>
8000e1e: 2002 movs r0, #2
8000e20: bcc0 pop {r6, r7}
8000e22: 46b9 mov r9, r7
8000e24: 46b0 mov r8, r6
8000e26: bdf0 pop {r4, r5, r6, r7, pc}
8000e28: 2800 cmp r0, #0
8000e2a: d1f9 bne.n 8000e20 <__ledf2+0x74>
8000e2c: 2001 movs r0, #1
8000e2e: 4240 negs r0, r0
8000e30: e7f6 b.n 8000e20 <__ledf2+0x74>
8000e32: 2b00 cmp r3, #0
8000e34: d1ec bne.n 8000e10 <__ledf2+0x64>
8000e36: 464c mov r4, r9
8000e38: 4326 orrs r6, r4
8000e3a: d1e9 bne.n 8000e10 <__ledf2+0x64>
8000e3c: e7ea b.n 8000e14 <__ledf2+0x68>
8000e3e: 429a cmp r2, r3
8000e40: dd04 ble.n 8000e4c <__ledf2+0xa0>
8000e42: 4243 negs r3, r0
8000e44: 4158 adcs r0, r3
8000e46: 0040 lsls r0, r0, #1
8000e48: 3801 subs r0, #1
8000e4a: e7e9 b.n 8000e20 <__ledf2+0x74>
8000e4c: 429a cmp r2, r3
8000e4e: dbeb blt.n 8000e28 <__ledf2+0x7c>
8000e50: 454f cmp r7, r9
8000e52: d8df bhi.n 8000e14 <__ledf2+0x68>
8000e54: d006 beq.n 8000e64 <__ledf2+0xb8>
8000e56: 2000 movs r0, #0
8000e58: 454f cmp r7, r9
8000e5a: d2e1 bcs.n 8000e20 <__ledf2+0x74>
8000e5c: 2900 cmp r1, #0
8000e5e: d0e5 beq.n 8000e2c <__ledf2+0x80>
8000e60: 0008 movs r0, r1
8000e62: e7dd b.n 8000e20 <__ledf2+0x74>
8000e64: 45c4 cmp ip, r8
8000e66: d8d5 bhi.n 8000e14 <__ledf2+0x68>
8000e68: 2000 movs r0, #0
8000e6a: 45c4 cmp ip, r8
8000e6c: d2d8 bcs.n 8000e20 <__ledf2+0x74>
8000e6e: e7f5 b.n 8000e5c <__ledf2+0xb0>
8000e70: 000007ff .word 0x000007ff
08000e74 <__aeabi_f2d>:
8000e74: b570 push {r4, r5, r6, lr}
8000e76: 0043 lsls r3, r0, #1
8000e78: 0246 lsls r6, r0, #9
8000e7a: 0fc4 lsrs r4, r0, #31
8000e7c: 20fe movs r0, #254 ; 0xfe
8000e7e: 0e1b lsrs r3, r3, #24
8000e80: 1c59 adds r1, r3, #1
8000e82: 0a75 lsrs r5, r6, #9
8000e84: 4208 tst r0, r1
8000e86: d00c beq.n 8000ea2 <__aeabi_f2d+0x2e>
8000e88: 22e0 movs r2, #224 ; 0xe0
8000e8a: 0092 lsls r2, r2, #2
8000e8c: 4694 mov ip, r2
8000e8e: 076d lsls r5, r5, #29
8000e90: 0b36 lsrs r6, r6, #12
8000e92: 4463 add r3, ip
8000e94: 051b lsls r3, r3, #20
8000e96: 4333 orrs r3, r6
8000e98: 07e4 lsls r4, r4, #31
8000e9a: 4323 orrs r3, r4
8000e9c: 0028 movs r0, r5
8000e9e: 0019 movs r1, r3
8000ea0: bd70 pop {r4, r5, r6, pc}
8000ea2: 2b00 cmp r3, #0
8000ea4: d114 bne.n 8000ed0 <__aeabi_f2d+0x5c>
8000ea6: 2d00 cmp r5, #0
8000ea8: d01b beq.n 8000ee2 <__aeabi_f2d+0x6e>
8000eaa: 0028 movs r0, r5
8000eac: f000 f82a bl 8000f04 <__clzsi2>
8000eb0: 280a cmp r0, #10
8000eb2: dc1c bgt.n 8000eee <__aeabi_f2d+0x7a>
8000eb4: 230b movs r3, #11
8000eb6: 002e movs r6, r5
8000eb8: 1a1b subs r3, r3, r0
8000eba: 40de lsrs r6, r3
8000ebc: 0003 movs r3, r0
8000ebe: 3315 adds r3, #21
8000ec0: 409d lsls r5, r3
8000ec2: 4a0e ldr r2, [pc, #56] ; (8000efc <__aeabi_f2d+0x88>)
8000ec4: 0336 lsls r6, r6, #12
8000ec6: 1a12 subs r2, r2, r0
8000ec8: 0552 lsls r2, r2, #21
8000eca: 0b36 lsrs r6, r6, #12
8000ecc: 0d53 lsrs r3, r2, #21
8000ece: e7e1 b.n 8000e94 <__aeabi_f2d+0x20>
8000ed0: 2d00 cmp r5, #0
8000ed2: d009 beq.n 8000ee8 <__aeabi_f2d+0x74>
8000ed4: 2280 movs r2, #128 ; 0x80
8000ed6: 0b36 lsrs r6, r6, #12
8000ed8: 0312 lsls r2, r2, #12
8000eda: 4b09 ldr r3, [pc, #36] ; (8000f00 <__aeabi_f2d+0x8c>)
8000edc: 076d lsls r5, r5, #29
8000ede: 4316 orrs r6, r2
8000ee0: e7d8 b.n 8000e94 <__aeabi_f2d+0x20>
8000ee2: 2300 movs r3, #0
8000ee4: 2600 movs r6, #0
8000ee6: e7d5 b.n 8000e94 <__aeabi_f2d+0x20>
8000ee8: 2600 movs r6, #0
8000eea: 4b05 ldr r3, [pc, #20] ; (8000f00 <__aeabi_f2d+0x8c>)
8000eec: e7d2 b.n 8000e94 <__aeabi_f2d+0x20>
8000eee: 0003 movs r3, r0
8000ef0: 3b0b subs r3, #11
8000ef2: 409d lsls r5, r3
8000ef4: 002e movs r6, r5
8000ef6: 2500 movs r5, #0
8000ef8: e7e3 b.n 8000ec2 <__aeabi_f2d+0x4e>
8000efa: 46c0 nop ; (mov r8, r8)
8000efc: 00000389 .word 0x00000389
8000f00: 000007ff .word 0x000007ff
08000f04 <__clzsi2>:
8000f04: 211c movs r1, #28
8000f06: 2301 movs r3, #1
8000f08: 041b lsls r3, r3, #16
8000f0a: 4298 cmp r0, r3
8000f0c: d301 bcc.n 8000f12 <__clzsi2+0xe>
8000f0e: 0c00 lsrs r0, r0, #16
8000f10: 3910 subs r1, #16
8000f12: 0a1b lsrs r3, r3, #8
8000f14: 4298 cmp r0, r3
8000f16: d301 bcc.n 8000f1c <__clzsi2+0x18>
8000f18: 0a00 lsrs r0, r0, #8
8000f1a: 3908 subs r1, #8
8000f1c: 091b lsrs r3, r3, #4
8000f1e: 4298 cmp r0, r3
8000f20: d301 bcc.n 8000f26 <__clzsi2+0x22>
8000f22: 0900 lsrs r0, r0, #4
8000f24: 3904 subs r1, #4
8000f26: a202 add r2, pc, #8 ; (adr r2, 8000f30 <__clzsi2+0x2c>)
8000f28: 5c10 ldrb r0, [r2, r0]
8000f2a: 1840 adds r0, r0, r1
8000f2c: 4770 bx lr
8000f2e: 46c0 nop ; (mov r8, r8)
8000f30: 02020304 .word 0x02020304
8000f34: 01010101 .word 0x01010101
...
08000f40 <loadConfig>:
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
//load configuration from FLASH
volatile void loadConfig(void) {
8000f40: b580 push {r7, lr}
8000f42: b082 sub sp, #8
8000f44: af00 add r7, sp, #0
uint32_t l_Address = CONF_FLASH_ADDR;
8000f46: 4b18 ldr r3, [pc, #96] ; (8000fa8 <loadConfig+0x68>)
8000f48: 607b str r3, [r7, #4]
uint32_t l_Index = 0;
8000f4a: 2300 movs r3, #0
8000f4c: 603b str r3, [r7, #0]
//Reading from FLASH
while (l_Address < (CONF_FLASH_ADDR + FLASH_CONF_SIZE)) {
8000f4e: e00e b.n 8000f6e <loadConfig+0x2e>
configuration.data64[l_Index] = *(__IO uint64_t *)l_Address;
8000f50: 687b ldr r3, [r7, #4]
8000f52: 681a ldr r2, [r3, #0]
8000f54: 685b ldr r3, [r3, #4]
8000f56: 4815 ldr r0, [pc, #84] ; (8000fac <loadConfig+0x6c>)
8000f58: 6839 ldr r1, [r7, #0]
8000f5a: 00c9 lsls r1, r1, #3
8000f5c: 1841 adds r1, r0, r1
8000f5e: 600a str r2, [r1, #0]
8000f60: 604b str r3, [r1, #4]
l_Index += 1;
8000f62: 683b ldr r3, [r7, #0]
8000f64: 3301 adds r3, #1
8000f66: 603b str r3, [r7, #0]
l_Address += 8;
8000f68: 687b ldr r3, [r7, #4]
8000f6a: 3308 adds r3, #8
8000f6c: 607b str r3, [r7, #4]
while (l_Address < (CONF_FLASH_ADDR + FLASH_CONF_SIZE)) {
8000f6e: 687b ldr r3, [r7, #4]
8000f70: 4a0f ldr r2, [pc, #60] ; (8000fb0 <loadConfig+0x70>)
8000f72: 4293 cmp r3, r2
8000f74: d9ec bls.n 8000f50 <loadConfig+0x10>
}
//Calculate a hash from the configuration
if (HAL_CRC_Calculate(&hcrc, configuration.data32, 2) != configuration.sector.checksum
8000f76: 490d ldr r1, [pc, #52] ; (8000fac <loadConfig+0x6c>)
8000f78: 4b0e ldr r3, [pc, #56] ; (8000fb4 <loadConfig+0x74>)
8000f7a: 2202 movs r2, #2
8000f7c: 0018 movs r0, r3
8000f7e: f001 f877 bl 8002070 <HAL_CRC_Calculate>
8000f82: 0002 movs r2, r0
8000f84: 4b09 ldr r3, [pc, #36] ; (8000fac <loadConfig+0x6c>)
8000f86: 68db ldr r3, [r3, #12]
8000f88: 429a cmp r2, r3
8000f8a: d104 bne.n 8000f96 <loadConfig+0x56>
|| configuration.config.token != CONF_TOKEN) {
8000f8c: 4b07 ldr r3, [pc, #28] ; (8000fac <loadConfig+0x6c>)
8000f8e: 681b ldr r3, [r3, #0]
8000f90: 4a09 ldr r2, [pc, #36] ; (8000fb8 <loadConfig+0x78>)
8000f92: 4293 cmp r3, r2
8000f94: d001 beq.n 8000f9a <loadConfig+0x5a>
//First start or configuration is corrupted
saveConfig(); //Save dafault config
8000f96: f000 f813 bl 8000fc0 <saveConfig>
} // else successfully read the configuration
needConfig = 0;
8000f9a: 4b08 ldr r3, [pc, #32] ; (8000fbc <loadConfig+0x7c>)
8000f9c: 2200 movs r2, #0
8000f9e: 701a strb r2, [r3, #0]
}
8000fa0: 46c0 nop ; (mov r8, r8)
8000fa2: 46bd mov sp, r7
8000fa4: b002 add sp, #8
8000fa6: bd80 pop {r7, pc}
8000fa8: 0800f800 .word 0x0800f800
8000fac: 20000210 .word 0x20000210
8000fb0: 0800f80f .word 0x0800f80f
8000fb4: 200000b4 .word 0x200000b4
8000fb8: 000a0200 .word 0x000a0200
8000fbc: 20000000 .word 0x20000000
08000fc0 <saveConfig>:
//save configuration to FLASH
volatile void saveConfig(void) {
8000fc0: b580 push {r7, lr}
8000fc2: b084 sub sp, #16
8000fc4: af00 add r7, sp, #0
static FLASH_EraseInitTypeDef EraseInitStruct;
uint32_t l_Address = CONF_FLASH_ADDR;
8000fc6: 4b39 ldr r3, [pc, #228] ; (80010ac <saveConfig+0xec>)
8000fc8: 60fb str r3, [r7, #12]
uint32_t l_Index = 0;
8000fca: 2300 movs r3, #0
8000fcc: 60bb str r3, [r7, #8]
uint32_t l_Error = 0;
8000fce: 2300 movs r3, #0
8000fd0: 607b str r3, [r7, #4]
//We need it to erase a page
EraseInitStruct.TypeErase = FLASH_TYPEERASE_PAGES;
8000fd2: 4b37 ldr r3, [pc, #220] ; (80010b0 <saveConfig+0xf0>)
8000fd4: 2202 movs r2, #2
8000fd6: 601a str r2, [r3, #0]
EraseInitStruct.Page = CONF_FLASH_PAGE;
8000fd8: 4b35 ldr r3, [pc, #212] ; (80010b0 <saveConfig+0xf0>)
8000fda: 221f movs r2, #31
8000fdc: 609a str r2, [r3, #8]
EraseInitStruct.NbPages = 1;
8000fde: 4b34 ldr r3, [pc, #208] ; (80010b0 <saveConfig+0xf0>)
8000fe0: 2201 movs r2, #1
8000fe2: 60da str r2, [r3, #12]
if (configuration.config.token != CONF_TOKEN) {
8000fe4: 4b33 ldr r3, [pc, #204] ; (80010b4 <saveConfig+0xf4>)
8000fe6: 681b ldr r3, [r3, #0]
8000fe8: 4a33 ldr r2, [pc, #204] ; (80010b8 <saveConfig+0xf8>)
8000fea: 4293 cmp r3, r2
8000fec: d013 beq.n 8001016 <saveConfig+0x56>
//first start
//Nullify the struct
memset(configuration.data64, 0, sizeof(configuration.data64));
8000fee: 4b31 ldr r3, [pc, #196] ; (80010b4 <saveConfig+0xf4>)
8000ff0: 2210 movs r2, #16
8000ff2: 2100 movs r1, #0
8000ff4: 0018 movs r0, r3
8000ff6: f005 fbbb bl 8006770 <memset>
//set default values
configuration.config.token = CONF_TOKEN;
8000ffa: 4b2e ldr r3, [pc, #184] ; (80010b4 <saveConfig+0xf4>)
8000ffc: 4a2e ldr r2, [pc, #184] ; (80010b8 <saveConfig+0xf8>)
8000ffe: 601a str r2, [r3, #0]
configuration.config.dist_on = DEFAULT_DIST_ON;
8001000: 4b2c ldr r3, [pc, #176] ; (80010b4 <saveConfig+0xf4>)
8001002: 22fa movs r2, #250 ; 0xfa
8001004: 0052 lsls r2, r2, #1
8001006: 809a strh r2, [r3, #4]
configuration.config.dist_off = DEFAULT_DIST_OFF;
8001008: 4b2a ldr r3, [pc, #168] ; (80010b4 <saveConfig+0xf4>)
800100a: 22fa movs r2, #250 ; 0xfa
800100c: 0092 lsls r2, r2, #2
800100e: 80da strh r2, [r3, #6]
configuration.sector.counter = 0;
8001010: 4b28 ldr r3, [pc, #160] ; (80010b4 <saveConfig+0xf4>)
8001012: 2200 movs r2, #0
8001014: 609a str r2, [r3, #8]
}
if (configuration.config.dist_off > 1400) configuration.config.dist_off = 1400;
8001016: 4b27 ldr r3, [pc, #156] ; (80010b4 <saveConfig+0xf4>)
8001018: 88da ldrh r2, [r3, #6]
800101a: 23af movs r3, #175 ; 0xaf
800101c: 00db lsls r3, r3, #3
800101e: 429a cmp r2, r3
8001020: d903 bls.n 800102a <saveConfig+0x6a>
8001022: 4b24 ldr r3, [pc, #144] ; (80010b4 <saveConfig+0xf4>)
8001024: 22af movs r2, #175 ; 0xaf
8001026: 00d2 lsls r2, r2, #3
8001028: 80da strh r2, [r3, #6]
if (configuration.config.dist_on > configuration.config.dist_off) configuration.config.dist_on = configuration.config.dist_off;
800102a: 4b22 ldr r3, [pc, #136] ; (80010b4 <saveConfig+0xf4>)
800102c: 889a ldrh r2, [r3, #4]
800102e: 4b21 ldr r3, [pc, #132] ; (80010b4 <saveConfig+0xf4>)
8001030: 88db ldrh r3, [r3, #6]
8001032: 429a cmp r2, r3
8001034: d903 bls.n 800103e <saveConfig+0x7e>
8001036: 4b1f ldr r3, [pc, #124] ; (80010b4 <saveConfig+0xf4>)
8001038: 88da ldrh r2, [r3, #6]
800103a: 4b1e ldr r3, [pc, #120] ; (80010b4 <saveConfig+0xf4>)
800103c: 809a strh r2, [r3, #4]
configuration.sector.counter += 1;
800103e: 4b1d ldr r3, [pc, #116] ; (80010b4 <saveConfig+0xf4>)
8001040: 689b ldr r3, [r3, #8]
8001042: 1c5a adds r2, r3, #1
8001044: 4b1b ldr r3, [pc, #108] ; (80010b4 <saveConfig+0xf4>)
8001046: 609a str r2, [r3, #8]
configuration.sector.checksum = HAL_CRC_Calculate(&hcrc, configuration.data32, 2);
8001048: 491a ldr r1, [pc, #104] ; (80010b4 <saveConfig+0xf4>)
800104a: 4b1c ldr r3, [pc, #112] ; (80010bc <saveConfig+0xfc>)
800104c: 2202 movs r2, #2
800104e: 0018 movs r0, r3
8001050: f001 f80e bl 8002070 <HAL_CRC_Calculate>
8001054: 0002 movs r2, r0
8001056: 4b17 ldr r3, [pc, #92] ; (80010b4 <saveConfig+0xf4>)
8001058: 60da str r2, [r3, #12]
HAL_FLASH_Unlock(); //Unlock the FLASH
800105a: f001 f9db bl 8002414 <HAL_FLASH_Unlock>
HAL_FLASHEx_Erase(&EraseInitStruct, &l_Error); //Erase the page
800105e: 1d3a adds r2, r7, #4
8001060: 4b13 ldr r3, [pc, #76] ; (80010b0 <saveConfig+0xf0>)
8001062: 0011 movs r1, r2
8001064: 0018 movs r0, r3
8001066: f001 fa83 bl 8002570 <HAL_FLASHEx_Erase>
// Programming the config
while (l_Address < (CONF_FLASH_ADDR + FLASH_CONF_SIZE)) {
800106a: e011 b.n 8001090 <saveConfig+0xd0>
if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, l_Address, configuration.data64[l_Index]) == HAL_OK) {
800106c: 4a11 ldr r2, [pc, #68] ; (80010b4 <saveConfig+0xf4>)
800106e: 68bb ldr r3, [r7, #8]
8001070: 00db lsls r3, r3, #3
8001072: 18d3 adds r3, r2, r3
8001074: 681a ldr r2, [r3, #0]
8001076: 685b ldr r3, [r3, #4]
8001078: 68f9 ldr r1, [r7, #12]
800107a: 2001 movs r0, #1
800107c: f001 f97c bl 8002378 <HAL_FLASH_Program>
8001080: 1e03 subs r3, r0, #0
8001082: d105 bne.n 8001090 <saveConfig+0xd0>
l_Index += 1;
8001084: 68bb ldr r3, [r7, #8]
8001086: 3301 adds r3, #1
8001088: 60bb str r3, [r7, #8]
l_Address += 8;
800108a: 68fb ldr r3, [r7, #12]
800108c: 3308 adds r3, #8
800108e: 60fb str r3, [r7, #12]
while (l_Address < (CONF_FLASH_ADDR + FLASH_CONF_SIZE)) {
8001090: 68fb ldr r3, [r7, #12]
8001092: 4a0b ldr r2, [pc, #44] ; (80010c0 <saveConfig+0x100>)
8001094: 4293 cmp r3, r2
8001096: d9e9 bls.n 800106c <saveConfig+0xac>
}
}
HAL_FLASH_Lock();
8001098: f001 f9e0 bl 800245c <HAL_FLASH_Lock>
HAL_Delay(50);
800109c: 2032 movs r0, #50 ; 0x32
800109e: f000 fe7f bl 8001da0 <HAL_Delay>
}
80010a2: 46c0 nop ; (mov r8, r8)
80010a4: 46bd mov sp, r7
80010a6: b004 add sp, #16
80010a8: bd80 pop {r7, pc}
80010aa: 46c0 nop ; (mov r8, r8)
80010ac: 0800f800 .word 0x0800f800
80010b0: 20000228 .word 0x20000228
80010b4: 20000210 .word 0x20000210
80010b8: 000a0200 .word 0x000a0200
80010bc: 200000b4 .word 0x200000b4
80010c0: 0800f80f .word 0x0800f80f
080010c4 <configure>:
void configure(void) {
80010c4: b580 push {r7, lr}
80010c6: b082 sub sp, #8
80010c8: af00 add r7, sp, #0
uint8_t i;
startConfig = 0;
80010ca: 4b5b ldr r3, [pc, #364] ; (8001238 <configure+0x174>)
80010cc: 2200 movs r2, #0
80010ce: 701a strb r2, [r3, #0]
//Fast blink 3 times
needConfig = 1;
80010d0: 4b5a ldr r3, [pc, #360] ; (800123c <configure+0x178>)
80010d2: 2201 movs r2, #1
80010d4: 701a strb r2, [r3, #0]
setLightLevel(0);
80010d6: 2000 movs r0, #0
80010d8: f000 fb06 bl 80016e8 <setLightLevel>
for (i = 0; i < 3; i++) {
80010dc: 1dfb adds r3, r7, #7
80010de: 2200 movs r2, #0
80010e0: 701a strb r2, [r3, #0]
80010e2: e010 b.n 8001106 <configure+0x42>
setLightLevel(99);
80010e4: 2063 movs r0, #99 ; 0x63
80010e6: f000 faff bl 80016e8 <setLightLevel>
HAL_Delay(80);
80010ea: 2050 movs r0, #80 ; 0x50
80010ec: f000 fe58 bl 8001da0 <HAL_Delay>
setLightLevel(0);
80010f0: 2000 movs r0, #0
80010f2: f000 faf9 bl 80016e8 <setLightLevel>
HAL_Delay(80);
80010f6: 2050 movs r0, #80 ; 0x50
80010f8: f000 fe52 bl 8001da0 <HAL_Delay>
for (i = 0; i < 3; i++) {
80010fc: 1dfb adds r3, r7, #7
80010fe: 781a ldrb r2, [r3, #0]
8001100: 1dfb adds r3, r7, #7
8001102: 3201 adds r2, #1
8001104: 701a strb r2, [r3, #0]
8001106: 1dfb adds r3, r7, #7
8001108: 781b ldrb r3, [r3, #0]
800110a: 2b02 cmp r3, #2
800110c: d9ea bls.n 80010e4 <configure+0x20>
}
//Configure ON distance
needConfig = 1;
800110e: 4b4b ldr r3, [pc, #300] ; (800123c <configure+0x178>)
8001110: 2201 movs r2, #1
8001112: 701a strb r2, [r3, #0]
while (needConfig) {
8001114: e01a b.n 800114c <configure+0x88>
HAL_Delay(250);
8001116: 20fa movs r0, #250 ; 0xfa
8001118: f000 fe42 bl 8001da0 <HAL_Delay>
if (curDist > 1400) setLightLevel(0);
800111c: 4b48 ldr r3, [pc, #288] ; (8001240 <configure+0x17c>)
800111e: 881a ldrh r2, [r3, #0]
8001120: 23af movs r3, #175 ; 0xaf
8001122: 00db lsls r3, r3, #3
8001124: 429a cmp r2, r3
8001126: d903 bls.n 8001130 <configure+0x6c>
8001128: 2000 movs r0, #0
800112a: f000 fadd bl 80016e8 <setLightLevel>
800112e: e00d b.n 800114c <configure+0x88>
// (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min
// (x - 0) * (50 - 0) / (1400 - 0) + 0
// x * 50 / 1400
// (99 - curDist * 99 / 2000) //old version
else setLightLevel((uint8_t)(50 - curDist * 50 / 1400));
8001130: 4b43 ldr r3, [pc, #268] ; (8001240 <configure+0x17c>)
8001132: 881b ldrh r3, [r3, #0]
8001134: 211c movs r1, #28
8001136: 0018 movs r0, r3
8001138: f7ff f870 bl 800021c <__divsi3>
800113c: 0003 movs r3, r0
800113e: b2db uxtb r3, r3
8001140: 2232 movs r2, #50 ; 0x32
8001142: 1ad3 subs r3, r2, r3
8001144: b2db uxtb r3, r3
8001146: 0018 movs r0, r3
8001148: f000 face bl 80016e8 <setLightLevel>
while (needConfig) {
800114c: 4b3b ldr r3, [pc, #236] ; (800123c <configure+0x178>)
800114e: 781b ldrb r3, [r3, #0]
8001150: 2b00 cmp r3, #0
8001152: d1e0 bne.n 8001116 <configure+0x52>
}
configuration.config.dist_on = curDist;
8001154: 4b3a ldr r3, [pc, #232] ; (8001240 <configure+0x17c>)
8001156: 881a ldrh r2, [r3, #0]
8001158: 4b3a ldr r3, [pc, #232] ; (8001244 <configure+0x180>)
800115a: 809a strh r2, [r3, #4]
//Fast blink 2 times
needConfig = 1;
800115c: 4b37 ldr r3, [pc, #220] ; (800123c <configure+0x178>)
800115e: 2201 movs r2, #1
8001160: 701a strb r2, [r3, #0]
setLightLevel(0);
8001162: 2000 movs r0, #0
8001164: f000 fac0 bl 80016e8 <setLightLevel>
for (i = 0; i < 2; i++) {
8001168: 1dfb adds r3, r7, #7
800116a: 2200 movs r2, #0
800116c: 701a strb r2, [r3, #0]
800116e: e010 b.n 8001192 <configure+0xce>
setLightLevel(99);
8001170: 2063 movs r0, #99 ; 0x63
8001172: f000 fab9 bl 80016e8 <setLightLevel>
HAL_Delay(80);
8001176: 2050 movs r0, #80 ; 0x50
8001178: f000 fe12 bl 8001da0 <HAL_Delay>
setLightLevel(0);
800117c: 2000 movs r0, #0
800117e: f000 fab3 bl 80016e8 <setLightLevel>
HAL_Delay(80);
8001182: 2050 movs r0, #80 ; 0x50
8001184: f000 fe0c bl 8001da0 <HAL_Delay>
for (i = 0; i < 2; i++) {
8001188: 1dfb adds r3, r7, #7
800118a: 781a ldrb r2, [r3, #0]
800118c: 1dfb adds r3, r7, #7
800118e: 3201 adds r2, #1
8001190: 701a strb r2, [r3, #0]
8001192: 1dfb adds r3, r7, #7
8001194: 781b ldrb r3, [r3, #0]
8001196: 2b01 cmp r3, #1
8001198: d9ea bls.n 8001170 <configure+0xac>
}
//Configure OFF distance
needConfig = 1;
800119a: 4b28 ldr r3, [pc, #160] ; (800123c <configure+0x178>)
800119c: 2201 movs r2, #1
800119e: 701a strb r2, [r3, #0]
while (needConfig) {
80011a0: e01a b.n 80011d8 <configure+0x114>
HAL_Delay(250);
80011a2: 20fa movs r0, #250 ; 0xfa
80011a4: f000 fdfc bl 8001da0 <HAL_Delay>
if (curDist > 1400) setLightLevel(0);
80011a8: 4b25 ldr r3, [pc, #148] ; (8001240 <configure+0x17c>)
80011aa: 881a ldrh r2, [r3, #0]
80011ac: 23af movs r3, #175 ; 0xaf
80011ae: 00db lsls r3, r3, #3
80011b0: 429a cmp r2, r3
80011b2: d903 bls.n 80011bc <configure+0xf8>
80011b4: 2000 movs r0, #0
80011b6: f000 fa97 bl 80016e8 <setLightLevel>
80011ba: e00d b.n 80011d8 <configure+0x114>
else setLightLevel((uint8_t)(50 - curDist * 50 / 1400));
80011bc: 4b20 ldr r3, [pc, #128] ; (8001240 <configure+0x17c>)
80011be: 881b ldrh r3, [r3, #0]
80011c0: 211c movs r1, #28
80011c2: 0018 movs r0, r3
80011c4: f7ff f82a bl 800021c <__divsi3>
80011c8: 0003 movs r3, r0
80011ca: b2db uxtb r3, r3
80011cc: 2232 movs r2, #50 ; 0x32
80011ce: 1ad3 subs r3, r2, r3
80011d0: b2db uxtb r3, r3
80011d2: 0018 movs r0, r3
80011d4: f000 fa88 bl 80016e8 <setLightLevel>
while (needConfig) {
80011d8: 4b18 ldr r3, [pc, #96] ; (800123c <configure+0x178>)
80011da: 781b ldrb r3, [r3, #0]
80011dc: 2b00 cmp r3, #0
80011de: d1e0 bne.n 80011a2 <configure+0xde>
}
configuration.config.dist_off = curDist;
80011e0: 4b17 ldr r3, [pc, #92] ; (8001240 <configure+0x17c>)
80011e2: 881a ldrh r2, [r3, #0]
80011e4: 4b17 ldr r3, [pc, #92] ; (8001244 <configure+0x180>)
80011e6: 80da strh r2, [r3, #6]
saveConfig();
80011e8: f7ff feea bl 8000fc0 <saveConfig>
//Fast blink 5 times
needConfig = 1;
80011ec: 4b13 ldr r3, [pc, #76] ; (800123c <configure+0x178>)
80011ee: 2201 movs r2, #1
80011f0: 701a strb r2, [r3, #0]
setLightLevel(0);
80011f2: 2000 movs r0, #0
80011f4: f000 fa78 bl 80016e8 <setLightLevel>
for (i = 0; i < 5; i++) {
80011f8: 1dfb adds r3, r7, #7
80011fa: 2200 movs r2, #0
80011fc: 701a strb r2, [r3, #0]
80011fe: e010 b.n 8001222 <configure+0x15e>
setLightLevel(99);
8001200: 2063 movs r0, #99 ; 0x63
8001202: f000 fa71 bl 80016e8 <setLightLevel>
HAL_Delay(80);
8001206: 2050 movs r0, #80 ; 0x50
8001208: f000 fdca bl 8001da0 <HAL_Delay>
setLightLevel(0);
800120c: 2000 movs r0, #0
800120e: f000 fa6b bl 80016e8 <setLightLevel>
HAL_Delay(80);
8001212: 2050 movs r0, #80 ; 0x50
8001214: f000 fdc4 bl 8001da0 <HAL_Delay>
for (i = 0; i < 5; i++) {
8001218: 1dfb adds r3, r7, #7
800121a: 781a ldrb r2, [r3, #0]
800121c: 1dfb adds r3, r7, #7
800121e: 3201 adds r2, #1
8001220: 701a strb r2, [r3, #0]
8001222: 1dfb adds r3, r7, #7
8001224: 781b ldrb r3, [r3, #0]
8001226: 2b04 cmp r3, #4
8001228: d9ea bls.n 8001200 <configure+0x13c>
}
needConfig = 0;
800122a: 4b04 ldr r3, [pc, #16] ; (800123c <configure+0x178>)
800122c: 2200 movs r2, #0
800122e: 701a strb r2, [r3, #0]
}
8001230: 46c0 nop ; (mov r8, r8)
8001232: 46bd mov sp, r7
8001234: b002 add sp, #8
8001236: bd80 pop {r7, pc}
8001238: 20000226 .word 0x20000226
800123c: 20000000 .word 0x20000000
8001240: 20000222 .word 0x20000222
8001244: 20000210 .word 0x20000210
08001248 <main>:
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
8001248: b580 push {r7, lr}
800124a: af00 add r7, sp, #0
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
800124c: f000 fd22 bl 8001c94 <HAL_Init>
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
8001250: f000 f834 bl 80012bc <SystemClock_Config>
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
8001254: f000 f9c6 bl 80015e4 <MX_GPIO_Init>
MX_I2C1_Init();
8001258: f000 f8b2 bl 80013c0 <MX_I2C1_Init>
MX_TIM3_Init();
800125c: f000 f8f0 bl 8001440 <MX_TIM3_Init>
MX_TIM17_Init();
8001260: f000 f996 bl 8001590 <MX_TIM17_Init>
MX_CRC_Init();
8001264: f000 f888 bl 8001378 <MX_CRC_Init>
MX_TIM16_Init();
8001268: f000 f968 bl 800153c <MX_TIM16_Init>
// TIM3 - PWM timer
// TIM16 - ticks timer (10Hz - 100ms)
// TIM17 - timer for light fading
loadConfig();
800126c: f7ff fe68 bl 8000f40 <loadConfig>
initVL53L0X(1);
8001270: 2001 movs r0, #1
8001272: f004 fb53 bl 800591c <initVL53L0X>
// lower the return signal rate limit (default is 0.25 MCPS)
// setSignalRateLimit(0.1);
// increase laser pulse periods (defaults are 14 and 10 PCLKs)
// setVcselPulsePeriod(VcselPeriodPreRange, 18);
// setVcselPulsePeriod(VcselPeriodFinalRange, 14);
TOF_Ready = 1;
8001276: 4b0d ldr r3, [pc, #52] ; (80012ac <main+0x64>)
8001278: 2201 movs r2, #1
800127a: 701a strb r2, [r3, #0]
setMeasurementTimingBudget( 500 * 1000UL ); // integrate over 500 ms per measurement
800127c: 4b0c ldr r3, [pc, #48] ; (80012b0 <main+0x68>)
800127e: 0018 movs r0, r3
8001280: f004 fde0 bl 8005e44 <setMeasurementTimingBudget>
// Start measurements every second
startContinuous(1000);
8001284: 23fa movs r3, #250 ; 0xfa
8001286: 009b lsls r3, r3, #2
8001288: 0018 movs r0, r3
800128a: f004 ff55 bl 8006138 <startContinuous>
HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1);
800128e: 4b09 ldr r3, [pc, #36] ; (80012b4 <main+0x6c>)
8001290: 2100 movs r1, #0
8001292: 0018 movs r0, r3
8001294: f003 f9c0 bl 8004618 <HAL_TIM_PWM_Start>
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
if (startConfig) {
8001298: 4b07 ldr r3, [pc, #28] ; (80012b8 <main+0x70>)
800129a: 781b ldrb r3, [r3, #0]
800129c: 2b00 cmp r3, #0
800129e: d001 beq.n 80012a4 <main+0x5c>
configure();
80012a0: f7ff ff10 bl 80010c4 <configure>
}
HAL_Delay(100);
80012a4: 2064 movs r0, #100 ; 0x64
80012a6: f000 fd7b bl 8001da0 <HAL_Delay>
if (startConfig) {
80012aa: e7f5 b.n 8001298 <main+0x50>
80012ac: 20000220 .word 0x20000220
80012b0: 0007a120 .word 0x0007a120
80012b4: 2000012c .word 0x2000012c
80012b8: 20000226 .word 0x20000226
080012bc <SystemClock_Config>:
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
80012bc: b590 push {r4, r7, lr}
80012be: b093 sub sp, #76 ; 0x4c
80012c0: af00 add r7, sp, #0
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
80012c2: 2410 movs r4, #16
80012c4: 193b adds r3, r7, r4
80012c6: 0018 movs r0, r3
80012c8: 2338 movs r3, #56 ; 0x38
80012ca: 001a movs r2, r3
80012cc: 2100 movs r1, #0
80012ce: f005 fa4f bl 8006770 <memset>
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
80012d2: 003b movs r3, r7
80012d4: 0018 movs r0, r3
80012d6: 2310 movs r3, #16
80012d8: 001a movs r2, r3
80012da: 2100 movs r1, #0
80012dc: f005 fa48 bl 8006770 <memset>
/** Configure the main internal regulator output voltage
*/
HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1);
80012e0: 2380 movs r3, #128 ; 0x80
80012e2: 009b lsls r3, r3, #2
80012e4: 0018 movs r0, r3
80012e6: f002 f9ff bl 80036e8 <HAL_PWREx_ControlVoltageScaling>
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
80012ea: 193b adds r3, r7, r4
80012ec: 2202 movs r2, #2
80012ee: 601a str r2, [r3, #0]
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
80012f0: 193b adds r3, r7, r4
80012f2: 2280 movs r2, #128 ; 0x80
80012f4: 0052 lsls r2, r2, #1
80012f6: 60da str r2, [r3, #12]
RCC_OscInitStruct.HSIDiv = RCC_HSI_DIV1;
80012f8: 0021 movs r1, r4
80012fa: 187b adds r3, r7, r1
80012fc: 2200 movs r2, #0
80012fe: 611a str r2, [r3, #16]
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
8001300: 187b adds r3, r7, r1
8001302: 2240 movs r2, #64 ; 0x40
8001304: 615a str r2, [r3, #20]
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
8001306: 187b adds r3, r7, r1
8001308: 2202 movs r2, #2
800130a: 61da str r2, [r3, #28]
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
800130c: 187b adds r3, r7, r1
800130e: 2202 movs r2, #2
8001310: 621a str r2, [r3, #32]
RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV1;
8001312: 187b adds r3, r7, r1
8001314: 2200 movs r2, #0
8001316: 625a str r2, [r3, #36] ; 0x24
RCC_OscInitStruct.PLL.PLLN = 8;
8001318: 187b adds r3, r7, r1
800131a: 2208 movs r2, #8
800131c: 629a str r2, [r3, #40] ; 0x28
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
800131e: 187b adds r3, r7, r1
8001320: 2280 movs r2, #128 ; 0x80
8001322: 0292 lsls r2, r2, #10
8001324: 62da str r2, [r3, #44] ; 0x2c
RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;
8001326: 187b adds r3, r7, r1
8001328: 2280 movs r2, #128 ; 0x80
800132a: 0492 lsls r2, r2, #18
800132c: 631a str r2, [r3, #48] ; 0x30
RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;
800132e: 187b adds r3, r7, r1
8001330: 2280 movs r2, #128 ; 0x80
8001332: 0592 lsls r2, r2, #22
8001334: 635a str r2, [r3, #52] ; 0x34
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
8001336: 187b adds r3, r7, r1
8001338: 0018 movs r0, r3
800133a: f002 fa15 bl 8003768 <HAL_RCC_OscConfig>
800133e: 1e03 subs r3, r0, #0
8001340: d001 beq.n 8001346 <SystemClock_Config+0x8a>
{
Error_Handler();
8001342: f000 faf3 bl 800192c <Error_Handler>
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
8001346: 003b movs r3, r7
8001348: 2207 movs r2, #7
800134a: 601a str r2, [r3, #0]
|RCC_CLOCKTYPE_PCLK1;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
800134c: 003b movs r3, r7
800134e: 2202 movs r2, #2
8001350: 605a str r2, [r3, #4]
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
8001352: 003b movs r3, r7
8001354: 2200 movs r2, #0
8001356: 609a str r2, [r3, #8]
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
8001358: 003b movs r3, r7
800135a: 2200 movs r2, #0
800135c: 60da str r2, [r3, #12]
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
800135e: 003b movs r3, r7
8001360: 2102 movs r1, #2
8001362: 0018 movs r0, r3
8001364: f002 fd1a bl 8003d9c <HAL_RCC_ClockConfig>
8001368: 1e03 subs r3, r0, #0
800136a: d001 beq.n 8001370 <SystemClock_Config+0xb4>
{
Error_Handler();
800136c: f000 fade bl 800192c <Error_Handler>
}
}
8001370: 46c0 nop ; (mov r8, r8)
8001372: 46bd mov sp, r7
8001374: b013 add sp, #76 ; 0x4c
8001376: bd90 pop {r4, r7, pc}
08001378 <MX_CRC_Init>:
* @brief CRC Initialization Function
* @param None
* @retval None
*/
static void MX_CRC_Init(void)
{
8001378: b580 push {r7, lr}
800137a: af00 add r7, sp, #0
/* USER CODE END CRC_Init 0 */
/* USER CODE BEGIN CRC_Init 1 */
/* USER CODE END CRC_Init 1 */
hcrc.Instance = CRC;
800137c: 4b0e ldr r3, [pc, #56] ; (80013b8 <MX_CRC_Init+0x40>)
800137e: 4a0f ldr r2, [pc, #60] ; (80013bc <MX_CRC_Init+0x44>)
8001380: 601a str r2, [r3, #0]
hcrc.Init.DefaultPolynomialUse = DEFAULT_POLYNOMIAL_ENABLE;
8001382: 4b0d ldr r3, [pc, #52] ; (80013b8 <MX_CRC_Init+0x40>)
8001384: 2200 movs r2, #0
8001386: 711a strb r2, [r3, #4]
hcrc.Init.DefaultInitValueUse = DEFAULT_INIT_VALUE_ENABLE;
8001388: 4b0b ldr r3, [pc, #44] ; (80013b8 <MX_CRC_Init+0x40>)
800138a: 2200 movs r2, #0
800138c: 715a strb r2, [r3, #5]
hcrc.Init.InputDataInversionMode = CRC_INPUTDATA_INVERSION_NONE;
800138e: 4b0a ldr r3, [pc, #40] ; (80013b8 <MX_CRC_Init+0x40>)
8001390: 2200 movs r2, #0
8001392: 615a str r2, [r3, #20]
hcrc.Init.OutputDataInversionMode = CRC_OUTPUTDATA_INVERSION_DISABLE;
8001394: 4b08 ldr r3, [pc, #32] ; (80013b8 <MX_CRC_Init+0x40>)
8001396: 2200 movs r2, #0
8001398: 619a str r2, [r3, #24]
hcrc.InputDataFormat = CRC_INPUTDATA_FORMAT_BYTES;
800139a: 4b07 ldr r3, [pc, #28] ; (80013b8 <MX_CRC_Init+0x40>)
800139c: 2201 movs r2, #1
800139e: 621a str r2, [r3, #32]
if (HAL_CRC_Init(&hcrc) != HAL_OK)
80013a0: 4b05 ldr r3, [pc, #20] ; (80013b8 <MX_CRC_Init+0x40>)
80013a2: 0018 movs r0, r3
80013a4: f000 fdfe bl 8001fa4 <HAL_CRC_Init>
80013a8: 1e03 subs r3, r0, #0
80013aa: d001 beq.n 80013b0 <MX_CRC_Init+0x38>
{
Error_Handler();
80013ac: f000 fabe bl 800192c <Error_Handler>
}
/* USER CODE BEGIN CRC_Init 2 */
/* USER CODE END CRC_Init 2 */
}
80013b0: 46c0 nop ; (mov r8, r8)
80013b2: 46bd mov sp, r7
80013b4: bd80 pop {r7, pc}
80013b6: 46c0 nop ; (mov r8, r8)
80013b8: 200000b4 .word 0x200000b4
80013bc: 40023000 .word 0x40023000
080013c0 <MX_I2C1_Init>:
* @brief I2C1 Initialization Function
* @param None
* @retval None
*/
static void MX_I2C1_Init(void)
{
80013c0: b580 push {r7, lr}
80013c2: af00 add r7, sp, #0
/* USER CODE END I2C1_Init 0 */
/* USER CODE BEGIN I2C1_Init 1 */
/* USER CODE END I2C1_Init 1 */
hi2c1.Instance = I2C1;
80013c4: 4b1b ldr r3, [pc, #108] ; (8001434 <MX_I2C1_Init+0x74>)
80013c6: 4a1c ldr r2, [pc, #112] ; (8001438 <MX_I2C1_Init+0x78>)
80013c8: 601a str r2, [r3, #0]
hi2c1.Init.Timing = 0x10707DBC;
80013ca: 4b1a ldr r3, [pc, #104] ; (8001434 <MX_I2C1_Init+0x74>)
80013cc: 4a1b ldr r2, [pc, #108] ; (800143c <MX_I2C1_Init+0x7c>)
80013ce: 605a str r2, [r3, #4]
hi2c1.Init.OwnAddress1 = 0;
80013d0: 4b18 ldr r3, [pc, #96] ; (8001434 <MX_I2C1_Init+0x74>)
80013d2: 2200 movs r2, #0
80013d4: 609a str r2, [r3, #8]
hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
80013d6: 4b17 ldr r3, [pc, #92] ; (8001434 <MX_I2C1_Init+0x74>)
80013d8: 2201 movs r2, #1
80013da: 60da str r2, [r3, #12]
hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
80013dc: 4b15 ldr r3, [pc, #84] ; (8001434 <MX_I2C1_Init+0x74>)
80013de: 2200 movs r2, #0
80013e0: 611a str r2, [r3, #16]
hi2c1.Init.OwnAddress2 = 0;
80013e2: 4b14 ldr r3, [pc, #80] ; (8001434 <MX_I2C1_Init+0x74>)
80013e4: 2200 movs r2, #0
80013e6: 615a str r2, [r3, #20]
hi2c1.Init.OwnAddress2Masks = I2C_OA2_NOMASK;
80013e8: 4b12 ldr r3, [pc, #72] ; (8001434 <MX_I2C1_Init+0x74>)
80013ea: 2200 movs r2, #0
80013ec: 619a str r2, [r3, #24]
hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
80013ee: 4b11 ldr r3, [pc, #68] ; (8001434 <MX_I2C1_Init+0x74>)
80013f0: 2200 movs r2, #0
80013f2: 61da str r2, [r3, #28]
hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
80013f4: 4b0f ldr r3, [pc, #60] ; (8001434 <MX_I2C1_Init+0x74>)
80013f6: 2200 movs r2, #0
80013f8: 621a str r2, [r3, #32]
if (HAL_I2C_Init(&hi2c1) != HAL_OK)
80013fa: 4b0e ldr r3, [pc, #56] ; (8001434 <MX_I2C1_Init+0x74>)
80013fc: 0018 movs r0, r3
80013fe: f001 fb07 bl 8002a10 <HAL_I2C_Init>
8001402: 1e03 subs r3, r0, #0
8001404: d001 beq.n 800140a <MX_I2C1_Init+0x4a>
{
Error_Handler();
8001406: f000 fa91 bl 800192c <Error_Handler>
}
/** Configure Analogue filter
*/
if (HAL_I2CEx_ConfigAnalogFilter(&hi2c1, I2C_ANALOGFILTER_ENABLE) != HAL_OK)
800140a: 4b0a ldr r3, [pc, #40] ; (8001434 <MX_I2C1_Init+0x74>)
800140c: 2100 movs r1, #0
800140e: 0018 movs r0, r3
8001410: f002 f8d2 bl 80035b8 <HAL_I2CEx_ConfigAnalogFilter>
8001414: 1e03 subs r3, r0, #0
8001416: d001 beq.n 800141c <MX_I2C1_Init+0x5c>
{
Error_Handler();
8001418: f000 fa88 bl 800192c <Error_Handler>
}
/** Configure Digital filter
*/
if (HAL_I2CEx_ConfigDigitalFilter(&hi2c1, 0) != HAL_OK)
800141c: 4b05 ldr r3, [pc, #20] ; (8001434 <MX_I2C1_Init+0x74>)
800141e: 2100 movs r1, #0
8001420: 0018 movs r0, r3
8001422: f002 f915 bl 8003650 <HAL_I2CEx_ConfigDigitalFilter>
8001426: 1e03 subs r3, r0, #0
8001428: d001 beq.n 800142e <MX_I2C1_Init+0x6e>
{
Error_Handler();
800142a: f000 fa7f bl 800192c <Error_Handler>
}
/* USER CODE BEGIN I2C1_Init 2 */
/* USER CODE END I2C1_Init 2 */
}
800142e: 46c0 nop ; (mov r8, r8)
8001430: 46bd mov sp, r7
8001432: bd80 pop {r7, pc}
8001434: 200000d8 .word 0x200000d8
8001438: 40005400 .word 0x40005400
800143c: 10707dbc .word 0x10707dbc
08001440 <MX_TIM3_Init>:
* @brief TIM3 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM3_Init(void)
{
8001440: b580 push {r7, lr}
8001442: b08e sub sp, #56 ; 0x38
8001444: af00 add r7, sp, #0
/* USER CODE BEGIN TIM3_Init 0 */
/* USER CODE END TIM3_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
8001446: 2328 movs r3, #40 ; 0x28
8001448: 18fb adds r3, r7, r3
800144a: 0018 movs r0, r3
800144c: 2310 movs r3, #16
800144e: 001a movs r2, r3
8001450: 2100 movs r1, #0
8001452: f005 f98d bl 8006770 <memset>
TIM_MasterConfigTypeDef sMasterConfig = {0};
8001456: 231c movs r3, #28
8001458: 18fb adds r3, r7, r3
800145a: 0018 movs r0, r3
800145c: 230c movs r3, #12
800145e: 001a movs r2, r3
8001460: 2100 movs r1, #0
8001462: f005 f985 bl 8006770 <memset>
TIM_OC_InitTypeDef sConfigOC = {0};
8001466: 003b movs r3, r7
8001468: 0018 movs r0, r3
800146a: 231c movs r3, #28
800146c: 001a movs r2, r3
800146e: 2100 movs r1, #0
8001470: f005 f97e bl 8006770 <memset>
/* USER CODE BEGIN TIM3_Init 1 */
/* USER CODE END TIM3_Init 1 */
htim3.Instance = TIM3;
8001474: 4b2f ldr r3, [pc, #188] ; (8001534 <MX_TIM3_Init+0xf4>)
8001476: 4a30 ldr r2, [pc, #192] ; (8001538 <MX_TIM3_Init+0xf8>)
8001478: 601a str r2, [r3, #0]
htim3.Init.Prescaler = 20-1;
800147a: 4b2e ldr r3, [pc, #184] ; (8001534 <MX_TIM3_Init+0xf4>)
800147c: 2213 movs r2, #19
800147e: 605a str r2, [r3, #4]
htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
8001480: 4b2c ldr r3, [pc, #176] ; (8001534 <MX_TIM3_Init+0xf4>)
8001482: 2200 movs r2, #0
8001484: 609a str r2, [r3, #8]
htim3.Init.Period = 100-1;
8001486: 4b2b ldr r3, [pc, #172] ; (8001534 <MX_TIM3_Init+0xf4>)
8001488: 2263 movs r2, #99 ; 0x63
800148a: 60da str r2, [r3, #12]
htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
800148c: 4b29 ldr r3, [pc, #164] ; (8001534 <MX_TIM3_Init+0xf4>)
800148e: 2200 movs r2, #0
8001490: 611a str r2, [r3, #16]
htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
8001492: 4b28 ldr r3, [pc, #160] ; (8001534 <MX_TIM3_Init+0xf4>)
8001494: 2200 movs r2, #0
8001496: 619a str r2, [r3, #24]
if (HAL_TIM_Base_Init(&htim3) != HAL_OK)
8001498: 4b26 ldr r3, [pc, #152] ; (8001534 <MX_TIM3_Init+0xf4>)
800149a: 0018 movs r0, r3
800149c: f002 ff82 bl 80043a4 <HAL_TIM_Base_Init>
80014a0: 1e03 subs r3, r0, #0
80014a2: d001 beq.n 80014a8 <MX_TIM3_Init+0x68>
{
Error_Handler();
80014a4: f000 fa42 bl 800192c <Error_Handler>
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
80014a8: 2128 movs r1, #40 ; 0x28
80014aa: 187b adds r3, r7, r1
80014ac: 2280 movs r2, #128 ; 0x80
80014ae: 0152 lsls r2, r2, #5
80014b0: 601a str r2, [r3, #0]
if (HAL_TIM_ConfigClockSource(&htim3, &sClockSourceConfig) != HAL_OK)
80014b2: 187a adds r2, r7, r1
80014b4: 4b1f ldr r3, [pc, #124] ; (8001534 <MX_TIM3_Init+0xf4>)
80014b6: 0011 movs r1, r2
80014b8: 0018 movs r0, r3
80014ba: f003 fbbd bl 8004c38 <HAL_TIM_ConfigClockSource>
80014be: 1e03 subs r3, r0, #0
80014c0: d001 beq.n 80014c6 <MX_TIM3_Init+0x86>
{
Error_Handler();
80014c2: f000 fa33 bl 800192c <Error_Handler>
}
if (HAL_TIM_PWM_Init(&htim3) != HAL_OK)
80014c6: 4b1b ldr r3, [pc, #108] ; (8001534 <MX_TIM3_Init+0xf4>)
80014c8: 0018 movs r0, r3
80014ca: f003 f845 bl 8004558 <HAL_TIM_PWM_Init>
80014ce: 1e03 subs r3, r0, #0
80014d0: d001 beq.n 80014d6 <MX_TIM3_Init+0x96>
{
Error_Handler();
80014d2: f000 fa2b bl 800192c <Error_Handler>
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
80014d6: 211c movs r1, #28
80014d8: 187b adds r3, r7, r1
80014da: 2200 movs r2, #0
80014dc: 601a str r2, [r3, #0]
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
80014de: 187b adds r3, r7, r1
80014e0: 2200 movs r2, #0
80014e2: 609a str r2, [r3, #8]
if (HAL_TIMEx_MasterConfigSynchronization(&htim3, &sMasterConfig) != HAL_OK)
80014e4: 187a adds r2, r7, r1
80014e6: 4b13 ldr r3, [pc, #76] ; (8001534 <MX_TIM3_Init+0xf4>)
80014e8: 0011 movs r1, r2
80014ea: 0018 movs r0, r3
80014ec: f004 f86c bl 80055c8 <HAL_TIMEx_MasterConfigSynchronization>
80014f0: 1e03 subs r3, r0, #0
80014f2: d001 beq.n 80014f8 <MX_TIM3_Init+0xb8>
{
Error_Handler();
80014f4: f000 fa1a bl 800192c <Error_Handler>
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
80014f8: 003b movs r3, r7
80014fa: 2260 movs r2, #96 ; 0x60
80014fc: 601a str r2, [r3, #0]
sConfigOC.Pulse = 0;
80014fe: 003b movs r3, r7
8001500: 2200 movs r2, #0
8001502: 605a str r2, [r3, #4]
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
8001504: 003b movs r3, r7
8001506: 2200 movs r2, #0
8001508: 609a str r2, [r3, #8]
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
800150a: 003b movs r3, r7
800150c: 2200 movs r2, #0
800150e: 611a str r2, [r3, #16]
if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
8001510: 0039 movs r1, r7
8001512: 4b08 ldr r3, [pc, #32] ; (8001534 <MX_TIM3_Init+0xf4>)
8001514: 2200 movs r2, #0
8001516: 0018 movs r0, r3
8001518: f003 fa8e bl 8004a38 <HAL_TIM_PWM_ConfigChannel>
800151c: 1e03 subs r3, r0, #0
800151e: d001 beq.n 8001524 <MX_TIM3_Init+0xe4>
{
Error_Handler();
8001520: f000 fa04 bl 800192c <Error_Handler>
}
/* USER CODE BEGIN TIM3_Init 2 */
/* USER CODE END TIM3_Init 2 */
HAL_TIM_MspPostInit(&htim3);
8001524: 4b03 ldr r3, [pc, #12] ; (8001534 <MX_TIM3_Init+0xf4>)
8001526: 0018 movs r0, r3
8001528: f000 fb06 bl 8001b38 <HAL_TIM_MspPostInit>
}
800152c: 46c0 nop ; (mov r8, r8)
800152e: 46bd mov sp, r7
8001530: b00e add sp, #56 ; 0x38
8001532: bd80 pop {r7, pc}
8001534: 2000012c .word 0x2000012c
8001538: 40000400 .word 0x40000400
0800153c <MX_TIM16_Init>:
* @brief TIM16 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM16_Init(void)
{
800153c: b580 push {r7, lr}
800153e: af00 add r7, sp, #0
/* USER CODE END TIM16_Init 0 */
/* USER CODE BEGIN TIM16_Init 1 */
/* USER CODE END TIM16_Init 1 */
htim16.Instance = TIM16;
8001540: 4b0f ldr r3, [pc, #60] ; (8001580 <MX_TIM16_Init+0x44>)
8001542: 4a10 ldr r2, [pc, #64] ; (8001584 <MX_TIM16_Init+0x48>)
8001544: 601a str r2, [r3, #0]
htim16.Init.Prescaler = 640-1;
8001546: 4b0e ldr r3, [pc, #56] ; (8001580 <MX_TIM16_Init+0x44>)
8001548: 4a0f ldr r2, [pc, #60] ; (8001588 <MX_TIM16_Init+0x4c>)
800154a: 605a str r2, [r3, #4]
htim16.Init.CounterMode = TIM_COUNTERMODE_UP;
800154c: 4b0c ldr r3, [pc, #48] ; (8001580 <MX_TIM16_Init+0x44>)
800154e: 2200 movs r2, #0
8001550: 609a str r2, [r3, #8]
htim16.Init.Period = 10000-1;
8001552: 4b0b ldr r3, [pc, #44] ; (8001580 <MX_TIM16_Init+0x44>)
8001554: 4a0d ldr r2, [pc, #52] ; (800158c <MX_TIM16_Init+0x50>)
8001556: 60da str r2, [r3, #12]
htim16.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
8001558: 4b09 ldr r3, [pc, #36] ; (8001580 <MX_TIM16_Init+0x44>)
800155a: 2200 movs r2, #0
800155c: 611a str r2, [r3, #16]
htim16.Init.RepetitionCounter = 0;
800155e: 4b08 ldr r3, [pc, #32] ; (8001580 <MX_TIM16_Init+0x44>)
8001560: 2200 movs r2, #0
8001562: 615a str r2, [r3, #20]
htim16.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
8001564: 4b06 ldr r3, [pc, #24] ; (8001580 <MX_TIM16_Init+0x44>)
8001566: 2200 movs r2, #0
8001568: 619a str r2, [r3, #24]
if (HAL_TIM_Base_Init(&htim16) != HAL_OK)
800156a: 4b05 ldr r3, [pc, #20] ; (8001580 <MX_TIM16_Init+0x44>)
800156c: 0018 movs r0, r3
800156e: f002 ff19 bl 80043a4 <HAL_TIM_Base_Init>
8001572: 1e03 subs r3, r0, #0
8001574: d001 beq.n 800157a <MX_TIM16_Init+0x3e>
{
Error_Handler();
8001576: f000 f9d9 bl 800192c <Error_Handler>
}
/* USER CODE BEGIN TIM16_Init 2 */
/* USER CODE END TIM16_Init 2 */
}
800157a: 46c0 nop ; (mov r8, r8)
800157c: 46bd mov sp, r7
800157e: bd80 pop {r7, pc}
8001580: 20000178 .word 0x20000178
8001584: 40014400 .word 0x40014400
8001588: 0000027f .word 0x0000027f
800158c: 0000270f .word 0x0000270f
08001590 <MX_TIM17_Init>:
* @brief TIM17 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM17_Init(void)
{
8001590: b580 push {r7, lr}
8001592: af00 add r7, sp, #0
/* USER CODE END TIM17_Init 0 */
/* USER CODE BEGIN TIM17_Init 1 */
/* USER CODE END TIM17_Init 1 */
htim17.Instance = TIM17;
8001594: 4b10 ldr r3, [pc, #64] ; (80015d8 <MX_TIM17_Init+0x48>)
8001596: 4a11 ldr r2, [pc, #68] ; (80015dc <MX_TIM17_Init+0x4c>)
8001598: 601a str r2, [r3, #0]
htim17.Init.Prescaler = 320-1;
800159a: 4b0f ldr r3, [pc, #60] ; (80015d8 <MX_TIM17_Init+0x48>)
800159c: 2240 movs r2, #64 ; 0x40
800159e: 32ff adds r2, #255 ; 0xff
80015a0: 605a str r2, [r3, #4]
htim17.Init.CounterMode = TIM_COUNTERMODE_UP;
80015a2: 4b0d ldr r3, [pc, #52] ; (80015d8 <MX_TIM17_Init+0x48>)
80015a4: 2200 movs r2, #0
80015a6: 609a str r2, [r3, #8]
htim17.Init.Period = 3000-1;
80015a8: 4b0b ldr r3, [pc, #44] ; (80015d8 <MX_TIM17_Init+0x48>)
80015aa: 4a0d ldr r2, [pc, #52] ; (80015e0 <MX_TIM17_Init+0x50>)
80015ac: 60da str r2, [r3, #12]
htim17.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
80015ae: 4b0a ldr r3, [pc, #40] ; (80015d8 <MX_TIM17_Init+0x48>)
80015b0: 2200 movs r2, #0
80015b2: 611a str r2, [r3, #16]
htim17.Init.RepetitionCounter = 0;
80015b4: 4b08 ldr r3, [pc, #32] ; (80015d8 <MX_TIM17_Init+0x48>)
80015b6: 2200 movs r2, #0
80015b8: 615a str r2, [r3, #20]
htim17.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
80015ba: 4b07 ldr r3, [pc, #28] ; (80015d8 <MX_TIM17_Init+0x48>)
80015bc: 2280 movs r2, #128 ; 0x80
80015be: 619a str r2, [r3, #24]
if (HAL_TIM_Base_Init(&htim17) != HAL_OK)
80015c0: 4b05 ldr r3, [pc, #20] ; (80015d8 <MX_TIM17_Init+0x48>)
80015c2: 0018 movs r0, r3
80015c4: f002 feee bl 80043a4 <HAL_TIM_Base_Init>
80015c8: 1e03 subs r3, r0, #0
80015ca: d001 beq.n 80015d0 <MX_TIM17_Init+0x40>
{
Error_Handler();
80015cc: f000 f9ae bl 800192c <Error_Handler>
}
/* USER CODE BEGIN TIM17_Init 2 */
/* USER CODE END TIM17_Init 2 */
}
80015d0: 46c0 nop ; (mov r8, r8)
80015d2: 46bd mov sp, r7
80015d4: bd80 pop {r7, pc}
80015d6: 46c0 nop ; (mov r8, r8)
80015d8: 200001c4 .word 0x200001c4
80015dc: 40014800 .word 0x40014800
80015e0: 00000bb7 .word 0x00000bb7
080015e4 <MX_GPIO_Init>:
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
80015e4: b590 push {r4, r7, lr}
80015e6: b089 sub sp, #36 ; 0x24
80015e8: af00 add r7, sp, #0
GPIO_InitTypeDef GPIO_InitStruct = {0};
80015ea: 240c movs r4, #12
80015ec: 193b adds r3, r7, r4
80015ee: 0018 movs r0, r3
80015f0: 2314 movs r3, #20
80015f2: 001a movs r2, r3
80015f4: 2100 movs r1, #0
80015f6: f005 f8bb bl 8006770 <memset>
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOA_CLK_ENABLE();
80015fa: 4b39 ldr r3, [pc, #228] ; (80016e0 <MX_GPIO_Init+0xfc>)
80015fc: 6b5a ldr r2, [r3, #52] ; 0x34
80015fe: 4b38 ldr r3, [pc, #224] ; (80016e0 <MX_GPIO_Init+0xfc>)
8001600: 2101 movs r1, #1
8001602: 430a orrs r2, r1
8001604: 635a str r2, [r3, #52] ; 0x34
8001606: 4b36 ldr r3, [pc, #216] ; (80016e0 <MX_GPIO_Init+0xfc>)
8001608: 6b5b ldr r3, [r3, #52] ; 0x34
800160a: 2201 movs r2, #1
800160c: 4013 ands r3, r2
800160e: 60bb str r3, [r7, #8]
8001610: 68bb ldr r3, [r7, #8]
__HAL_RCC_GPIOC_CLK_ENABLE();
8001612: 4b33 ldr r3, [pc, #204] ; (80016e0 <MX_GPIO_Init+0xfc>)
8001614: 6b5a ldr r2, [r3, #52] ; 0x34
8001616: 4b32 ldr r3, [pc, #200] ; (80016e0 <MX_GPIO_Init+0xfc>)
8001618: 2104 movs r1, #4
800161a: 430a orrs r2, r1
800161c: 635a str r2, [r3, #52] ; 0x34
800161e: 4b30 ldr r3, [pc, #192] ; (80016e0 <MX_GPIO_Init+0xfc>)
8001620: 6b5b ldr r3, [r3, #52] ; 0x34
8001622: 2204 movs r2, #4
8001624: 4013 ands r3, r2
8001626: 607b str r3, [r7, #4]
8001628: 687b ldr r3, [r7, #4]
__HAL_RCC_GPIOB_CLK_ENABLE();
800162a: 4b2d ldr r3, [pc, #180] ; (80016e0 <MX_GPIO_Init+0xfc>)
800162c: 6b5a ldr r2, [r3, #52] ; 0x34
800162e: 4b2c ldr r3, [pc, #176] ; (80016e0 <MX_GPIO_Init+0xfc>)
8001630: 2102 movs r1, #2
8001632: 430a orrs r2, r1
8001634: 635a str r2, [r3, #52] ; 0x34
8001636: 4b2a ldr r3, [pc, #168] ; (80016e0 <MX_GPIO_Init+0xfc>)
8001638: 6b5b ldr r3, [r3, #52] ; 0x34
800163a: 2202 movs r2, #2
800163c: 4013 ands r3, r2
800163e: 603b str r3, [r7, #0]
8001640: 683b ldr r3, [r7, #0]
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(Sens_SHUT_GPIO_Port, Sens_SHUT_Pin, GPIO_PIN_SET);
8001642: 4b28 ldr r3, [pc, #160] ; (80016e4 <MX_GPIO_Init+0x100>)
8001644: 2201 movs r2, #1
8001646: 2110 movs r1, #16
8001648: 0018 movs r0, r3
800164a: f001 f999 bl 8002980 <HAL_GPIO_WritePin>
/*Configure GPIO pin : Btn_INT_Pin */
GPIO_InitStruct.Pin = Btn_INT_Pin;
800164e: 193b adds r3, r7, r4
8001650: 2201 movs r2, #1
8001652: 601a str r2, [r3, #0]
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING_FALLING;
8001654: 193b adds r3, r7, r4
8001656: 22c4 movs r2, #196 ; 0xc4
8001658: 0392 lsls r2, r2, #14
800165a: 605a str r2, [r3, #4]
GPIO_InitStruct.Pull = GPIO_NOPULL;
800165c: 193b adds r3, r7, r4
800165e: 2200 movs r2, #0
8001660: 609a str r2, [r3, #8]
HAL_GPIO_Init(Btn_INT_GPIO_Port, &GPIO_InitStruct);
8001662: 193a adds r2, r7, r4
8001664: 23a0 movs r3, #160 ; 0xa0
8001666: 05db lsls r3, r3, #23
8001668: 0011 movs r1, r2
800166a: 0018 movs r0, r3
800166c: f001 f824 bl 80026b8 <HAL_GPIO_Init>
/*Configure GPIO pin : Sens_SHUT_Pin */
GPIO_InitStruct.Pin = Sens_SHUT_Pin;
8001670: 193b adds r3, r7, r4
8001672: 2210 movs r2, #16
8001674: 601a str r2, [r3, #0]
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
8001676: 193b adds r3, r7, r4
8001678: 2201 movs r2, #1
800167a: 605a str r2, [r3, #4]
GPIO_InitStruct.Pull = GPIO_PULLUP;
800167c: 193b adds r3, r7, r4
800167e: 2201 movs r2, #1
8001680: 609a str r2, [r3, #8]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
8001682: 193b adds r3, r7, r4
8001684: 2202 movs r2, #2
8001686: 60da str r2, [r3, #12]
HAL_GPIO_Init(Sens_SHUT_GPIO_Port, &GPIO_InitStruct);
8001688: 193b adds r3, r7, r4
800168a: 4a16 ldr r2, [pc, #88] ; (80016e4 <MX_GPIO_Init+0x100>)
800168c: 0019 movs r1, r3
800168e: 0010 movs r0, r2
8001690: f001 f812 bl 80026b8 <HAL_GPIO_Init>
/*Configure GPIO pin : Sens_INT_Pin */
GPIO_InitStruct.Pin = Sens_INT_Pin;
8001694: 0021 movs r1, r4
8001696: 187b adds r3, r7, r1
8001698: 2220 movs r2, #32
800169a: 601a str r2, [r3, #0]
GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
800169c: 187b adds r3, r7, r1
800169e: 2284 movs r2, #132 ; 0x84
80016a0: 0392 lsls r2, r2, #14
80016a2: 605a str r2, [r3, #4]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80016a4: 187b adds r3, r7, r1
80016a6: 2200 movs r2, #0
80016a8: 609a str r2, [r3, #8]
HAL_GPIO_Init(Sens_INT_GPIO_Port, &GPIO_InitStruct);
80016aa: 187b adds r3, r7, r1
80016ac: 4a0d ldr r2, [pc, #52] ; (80016e4 <MX_GPIO_Init+0x100>)
80016ae: 0019 movs r1, r3
80016b0: 0010 movs r0, r2
80016b2: f001 f801 bl 80026b8 <HAL_GPIO_Init>
/* EXTI interrupt init*/
HAL_NVIC_SetPriority(EXTI0_1_IRQn, 0, 0);
80016b6: 2200 movs r2, #0
80016b8: 2100 movs r1, #0
80016ba: 2005 movs r0, #5
80016bc: f000 fc40 bl 8001f40 <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(EXTI0_1_IRQn);
80016c0: 2005 movs r0, #5
80016c2: f000 fc52 bl 8001f6a <HAL_NVIC_EnableIRQ>
HAL_NVIC_SetPriority(EXTI4_15_IRQn, 0, 0);
80016c6: 2200 movs r2, #0
80016c8: 2100 movs r1, #0
80016ca: 2007 movs r0, #7
80016cc: f000 fc38 bl 8001f40 <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(EXTI4_15_IRQn);
80016d0: 2007 movs r0, #7
80016d2: f000 fc4a bl 8001f6a <HAL_NVIC_EnableIRQ>
}
80016d6: 46c0 nop ; (mov r8, r8)
80016d8: 46bd mov sp, r7
80016da: b009 add sp, #36 ; 0x24
80016dc: bd90 pop {r4, r7, pc}
80016de: 46c0 nop ; (mov r8, r8)
80016e0: 40021000 .word 0x40021000
80016e4: 50000400 .word 0x50000400
080016e8 <setLightLevel>:
/* USER CODE BEGIN 4 */
void setLightLevel(uint8_t level) {
80016e8: b580 push {r7, lr}
80016ea: b082 sub sp, #8
80016ec: af00 add r7, sp, #0
80016ee: 0002 movs r2, r0
80016f0: 1dfb adds r3, r7, #7
80016f2: 701a strb r2, [r3, #0]
if (level > 99) level = 99;
80016f4: 1dfb adds r3, r7, #7
80016f6: 781b ldrb r3, [r3, #0]
80016f8: 2b63 cmp r3, #99 ; 0x63
80016fa: d902 bls.n 8001702 <setLightLevel+0x1a>
80016fc: 1dfb adds r3, r7, #7
80016fe: 2263 movs r2, #99 ; 0x63
8001700: 701a strb r2, [r3, #0]
curLightLevel = level;
8001702: 4b06 ldr r3, [pc, #24] ; (800171c <setLightLevel+0x34>)
8001704: 1dfa adds r2, r7, #7
8001706: 7812 ldrb r2, [r2, #0]
8001708: 701a strb r2, [r3, #0]
TIM3->CCR1 = curLightLevel;
800170a: 4b04 ldr r3, [pc, #16] ; (800171c <setLightLevel+0x34>)
800170c: 781a ldrb r2, [r3, #0]
800170e: 4b04 ldr r3, [pc, #16] ; (8001720 <setLightLevel+0x38>)
8001710: 635a str r2, [r3, #52] ; 0x34
}
8001712: 46c0 nop ; (mov r8, r8)
8001714: 46bd mov sp, r7
8001716: b002 add sp, #8
8001718: bd80 pop {r7, pc}
800171a: 46c0 nop ; (mov r8, r8)
800171c: 20000221 .word 0x20000221
8001720: 40000400 .word 0x40000400
08001724 <HAL_GPIO_EXTI_Rising_Callback>:
void HAL_GPIO_EXTI_Rising_Callback(uint16_t GPIO_Pin) {
8001724: b580 push {r7, lr}
8001726: b082 sub sp, #8
8001728: af00 add r7, sp, #0
800172a: 0002 movs r2, r0
800172c: 1dbb adds r3, r7, #6
800172e: 801a strh r2, [r3, #0]
// Start counting "ticks" when the sense-button is pressed
if (GPIO_Pin == Btn_INT_Pin) {
8001730: 1dbb adds r3, r7, #6
8001732: 881b ldrh r3, [r3, #0]
8001734: 2b01 cmp r3, #1
8001736: d106 bne.n 8001746 <HAL_GPIO_EXTI_Rising_Callback+0x22>
btn_ticks = 0;
8001738: 4b05 ldr r3, [pc, #20] ; (8001750 <HAL_GPIO_EXTI_Rising_Callback+0x2c>)
800173a: 2200 movs r2, #0
800173c: 801a strh r2, [r3, #0]
HAL_TIM_Base_Start_IT(&htim16);
800173e: 4b05 ldr r3, [pc, #20] ; (8001754 <HAL_GPIO_EXTI_Rising_Callback+0x30>)
8001740: 0018 movs r0, r3
8001742: f002 fe87 bl 8004454 <HAL_TIM_Base_Start_IT>
}
}
8001746: 46c0 nop ; (mov r8, r8)
8001748: 46bd mov sp, r7
800174a: b002 add sp, #8
800174c: bd80 pop {r7, pc}
800174e: 46c0 nop ; (mov r8, r8)
8001750: 20000224 .word 0x20000224
8001754: 20000178 .word 0x20000178
08001758 <HAL_GPIO_EXTI_Falling_Callback>:
void HAL_GPIO_EXTI_Falling_Callback(uint16_t GPIO_Pin) {
8001758: b5b0 push {r4, r5, r7, lr}
800175a: b084 sub sp, #16
800175c: af00 add r7, sp, #0
800175e: 0002 movs r2, r0
8001760: 1dbb adds r3, r7, #6
8001762: 801a strh r2, [r3, #0]
uint16_t dist;
// Range sensor interrupt (measurement is done)
if (TOF_Ready && GPIO_Pin == Sens_INT_Pin) {
8001764: 4b3f ldr r3, [pc, #252] ; (8001864 <HAL_GPIO_EXTI_Falling_Callback+0x10c>)
8001766: 781b ldrb r3, [r3, #0]
8001768: 2b00 cmp r3, #0
800176a: d044 beq.n 80017f6 <HAL_GPIO_EXTI_Falling_Callback+0x9e>
800176c: 1dbb adds r3, r7, #6
800176e: 881b ldrh r3, [r3, #0]
8001770: 2b20 cmp r3, #32
8001772: d140 bne.n 80017f6 <HAL_GPIO_EXTI_Falling_Callback+0x9e>
dist = readRangeContinuousMillimeters(0);
8001774: 250e movs r5, #14
8001776: 197c adds r4, r7, r5
8001778: 2000 movs r0, #0
800177a: f004 fd27 bl 80061cc <readRangeContinuousMillimeters>
800177e: 0003 movs r3, r0
8001780: 8023 strh r3, [r4, #0]
if (dist < 1400) curDist = dist;
8001782: 0029 movs r1, r5
8001784: 187b adds r3, r7, r1
8001786: 881a ldrh r2, [r3, #0]
8001788: 23af movs r3, #175 ; 0xaf
800178a: 00db lsls r3, r3, #3
800178c: 429a cmp r2, r3
800178e: d204 bcs.n 800179a <HAL_GPIO_EXTI_Falling_Callback+0x42>
8001790: 4b35 ldr r3, [pc, #212] ; (8001868 <HAL_GPIO_EXTI_Falling_Callback+0x110>)
8001792: 187a adds r2, r7, r1
8001794: 8812 ldrh r2, [r2, #0]
8001796: 801a strh r2, [r3, #0]
8001798: e003 b.n 80017a2 <HAL_GPIO_EXTI_Falling_Callback+0x4a>
else curDist = 1400;
800179a: 4b33 ldr r3, [pc, #204] ; (8001868 <HAL_GPIO_EXTI_Falling_Callback+0x110>)
800179c: 22af movs r2, #175 ; 0xaf
800179e: 00d2 lsls r2, r2, #3
80017a0: 801a strh r2, [r3, #0]
if (!needConfig && !manualOn) {
80017a2: 4b32 ldr r3, [pc, #200] ; (800186c <HAL_GPIO_EXTI_Falling_Callback+0x114>)
80017a4: 781b ldrb r3, [r3, #0]
80017a6: 2b00 cmp r3, #0
80017a8: d125 bne.n 80017f6 <HAL_GPIO_EXTI_Falling_Callback+0x9e>
80017aa: 4b31 ldr r3, [pc, #196] ; (8001870 <HAL_GPIO_EXTI_Falling_Callback+0x118>)
80017ac: 781b ldrb r3, [r3, #0]
80017ae: 2b00 cmp r3, #0
80017b0: d121 bne.n 80017f6 <HAL_GPIO_EXTI_Falling_Callback+0x9e>
if (curDist <= configuration.config.dist_on && curLightLevel < 90) {
80017b2: 4b30 ldr r3, [pc, #192] ; (8001874 <HAL_GPIO_EXTI_Falling_Callback+0x11c>)
80017b4: 889a ldrh r2, [r3, #4]
80017b6: 4b2c ldr r3, [pc, #176] ; (8001868 <HAL_GPIO_EXTI_Falling_Callback+0x110>)
80017b8: 881b ldrh r3, [r3, #0]
80017ba: 429a cmp r2, r3
80017bc: d30a bcc.n 80017d4 <HAL_GPIO_EXTI_Falling_Callback+0x7c>
80017be: 4b2e ldr r3, [pc, #184] ; (8001878 <HAL_GPIO_EXTI_Falling_Callback+0x120>)
80017c0: 781b ldrb r3, [r3, #0]
80017c2: 2b59 cmp r3, #89 ; 0x59
80017c4: d806 bhi.n 80017d4 <HAL_GPIO_EXTI_Falling_Callback+0x7c>
//Turn on the lights
dLevel = 2;
80017c6: 4b2d ldr r3, [pc, #180] ; (800187c <HAL_GPIO_EXTI_Falling_Callback+0x124>)
80017c8: 2202 movs r2, #2
80017ca: 701a strb r2, [r3, #0]
HAL_TIM_Base_Start_IT(&htim17);
80017cc: 4b2c ldr r3, [pc, #176] ; (8001880 <HAL_GPIO_EXTI_Falling_Callback+0x128>)
80017ce: 0018 movs r0, r3
80017d0: f002 fe40 bl 8004454 <HAL_TIM_Base_Start_IT>
}
if (curDist >= configuration.config.dist_off && curLightLevel == 99) {
80017d4: 4b27 ldr r3, [pc, #156] ; (8001874 <HAL_GPIO_EXTI_Falling_Callback+0x11c>)
80017d6: 88da ldrh r2, [r3, #6]
80017d8: 4b23 ldr r3, [pc, #140] ; (8001868 <HAL_GPIO_EXTI_Falling_Callback+0x110>)
80017da: 881b ldrh r3, [r3, #0]
80017dc: 429a cmp r2, r3
80017de: d80a bhi.n 80017f6 <HAL_GPIO_EXTI_Falling_Callback+0x9e>
80017e0: 4b25 ldr r3, [pc, #148] ; (8001878 <HAL_GPIO_EXTI_Falling_Callback+0x120>)
80017e2: 781b ldrb r3, [r3, #0]
80017e4: 2b63 cmp r3, #99 ; 0x63
80017e6: d106 bne.n 80017f6 <HAL_GPIO_EXTI_Falling_Callback+0x9e>
//Turn off the lights
dLevel = -1;
80017e8: 4b24 ldr r3, [pc, #144] ; (800187c <HAL_GPIO_EXTI_Falling_Callback+0x124>)
80017ea: 22ff movs r2, #255 ; 0xff
80017ec: 701a strb r2, [r3, #0]
HAL_TIM_Base_Start_IT(&htim17);
80017ee: 4b24 ldr r3, [pc, #144] ; (8001880 <HAL_GPIO_EXTI_Falling_Callback+0x128>)
80017f0: 0018 movs r0, r3
80017f2: f002 fe2f bl 8004454 <HAL_TIM_Base_Start_IT>
}
}
}
// The sense-button is released
if (GPIO_Pin == Btn_INT_Pin) {
80017f6: 1dbb adds r3, r7, #6
80017f8: 881b ldrh r3, [r3, #0]
80017fa: 2b01 cmp r3, #1
80017fc: d12d bne.n 800185a <HAL_GPIO_EXTI_Falling_Callback+0x102>
HAL_TIM_Base_Stop_IT(&htim16);
80017fe: 4b21 ldr r3, [pc, #132] ; (8001884 <HAL_GPIO_EXTI_Falling_Callback+0x12c>)
8001800: 0018 movs r0, r3
8001802: f002 fe7b bl 80044fc <HAL_TIM_Base_Stop_IT>
if (btn_ticks < 60) {
8001806: 4b20 ldr r3, [pc, #128] ; (8001888 <HAL_GPIO_EXTI_Falling_Callback+0x130>)
8001808: 881b ldrh r3, [r3, #0]
800180a: 2b3b cmp r3, #59 ; 0x3b
800180c: d825 bhi.n 800185a <HAL_GPIO_EXTI_Falling_Callback+0x102>
// Button was not held for more than 6 seconds
if (needConfig) {
800180e: 4b17 ldr r3, [pc, #92] ; (800186c <HAL_GPIO_EXTI_Falling_Callback+0x114>)
8001810: 781b ldrb r3, [r3, #0]
8001812: 2b00 cmp r3, #0
8001814: d003 beq.n 800181e <HAL_GPIO_EXTI_Falling_Callback+0xc6>
needConfig = 0;
8001816: 4b15 ldr r3, [pc, #84] ; (800186c <HAL_GPIO_EXTI_Falling_Callback+0x114>)
8001818: 2200 movs r2, #0
800181a: 701a strb r2, [r3, #0]
}
setLightLevel(curLightLevel);
}
}
}
}
800181c: e01d b.n 800185a <HAL_GPIO_EXTI_Falling_Callback+0x102>
if (curLightLevel < 90){
800181e: 4b16 ldr r3, [pc, #88] ; (8001878 <HAL_GPIO_EXTI_Falling_Callback+0x120>)
8001820: 781b ldrb r3, [r3, #0]
8001822: 2b59 cmp r3, #89 ; 0x59
8001824: d80a bhi.n 800183c <HAL_GPIO_EXTI_Falling_Callback+0xe4>
manualOn = 1;
8001826: 4b12 ldr r3, [pc, #72] ; (8001870 <HAL_GPIO_EXTI_Falling_Callback+0x118>)
8001828: 2201 movs r2, #1
800182a: 701a strb r2, [r3, #0]
dLevel = 2;
800182c: 4b13 ldr r3, [pc, #76] ; (800187c <HAL_GPIO_EXTI_Falling_Callback+0x124>)
800182e: 2202 movs r2, #2
8001830: 701a strb r2, [r3, #0]
HAL_TIM_Base_Start_IT(&htim17);
8001832: 4b13 ldr r3, [pc, #76] ; (8001880 <HAL_GPIO_EXTI_Falling_Callback+0x128>)
8001834: 0018 movs r0, r3
8001836: f002 fe0d bl 8004454 <HAL_TIM_Base_Start_IT>
800183a: e009 b.n 8001850 <HAL_GPIO_EXTI_Falling_Callback+0xf8>
manualOn = 0;
800183c: 4b0c ldr r3, [pc, #48] ; (8001870 <HAL_GPIO_EXTI_Falling_Callback+0x118>)
800183e: 2200 movs r2, #0
8001840: 701a strb r2, [r3, #0]
dLevel = -1;
8001842: 4b0e ldr r3, [pc, #56] ; (800187c <HAL_GPIO_EXTI_Falling_Callback+0x124>)
8001844: 22ff movs r2, #255 ; 0xff
8001846: 701a strb r2, [r3, #0]
HAL_TIM_Base_Start_IT(&htim17);
8001848: 4b0d ldr r3, [pc, #52] ; (8001880 <HAL_GPIO_EXTI_Falling_Callback+0x128>)
800184a: 0018 movs r0, r3
800184c: f002 fe02 bl 8004454 <HAL_TIM_Base_Start_IT>
setLightLevel(curLightLevel);
8001850: 4b09 ldr r3, [pc, #36] ; (8001878 <HAL_GPIO_EXTI_Falling_Callback+0x120>)
8001852: 781b ldrb r3, [r3, #0]
8001854: 0018 movs r0, r3
8001856: f7ff ff47 bl 80016e8 <setLightLevel>
}
800185a: 46c0 nop ; (mov r8, r8)
800185c: 46bd mov sp, r7
800185e: b004 add sp, #16
8001860: bdb0 pop {r4, r5, r7, pc}
8001862: 46c0 nop ; (mov r8, r8)
8001864: 20000220 .word 0x20000220
8001868: 20000222 .word 0x20000222
800186c: 20000000 .word 0x20000000
8001870: 20000227 .word 0x20000227
8001874: 20000210 .word 0x20000210
8001878: 20000221 .word 0x20000221
800187c: 20000001 .word 0x20000001
8001880: 200001c4 .word 0x200001c4
8001884: 20000178 .word 0x20000178
8001888: 20000224 .word 0x20000224
0800188c <HAL_TIM_PeriodElapsedCallback>:
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) {
800188c: b580 push {r7, lr}
800188e: b082 sub sp, #8
8001890: af00 add r7, sp, #0
8001892: 6078 str r0, [r7, #4]
if(htim->Instance == TIM16) { //check if the interrupt comes from TIM16
8001894: 687b ldr r3, [r7, #4]
8001896: 681b ldr r3, [r3, #0]
8001898: 4a1c ldr r2, [pc, #112] ; (800190c <HAL_TIM_PeriodElapsedCallback+0x80>)
800189a: 4293 cmp r3, r2
800189c: d111 bne.n 80018c2 <HAL_TIM_PeriodElapsedCallback+0x36>
if (btn_ticks < 60) {
800189e: 4b1c ldr r3, [pc, #112] ; (8001910 <HAL_TIM_PeriodElapsedCallback+0x84>)
80018a0: 881b ldrh r3, [r3, #0]
80018a2: 2b3b cmp r3, #59 ; 0x3b
80018a4: d806 bhi.n 80018b4 <HAL_TIM_PeriodElapsedCallback+0x28>
btn_ticks++;
80018a6: 4b1a ldr r3, [pc, #104] ; (8001910 <HAL_TIM_PeriodElapsedCallback+0x84>)
80018a8: 881b ldrh r3, [r3, #0]
80018aa: 3301 adds r3, #1
80018ac: b29a uxth r2, r3
80018ae: 4b18 ldr r3, [pc, #96] ; (8001910 <HAL_TIM_PeriodElapsedCallback+0x84>)
80018b0: 801a strh r2, [r3, #0]
80018b2: e006 b.n 80018c2 <HAL_TIM_PeriodElapsedCallback+0x36>
} else { // the button is held for more than 6 seconds
HAL_TIM_Base_Stop_IT(&htim16);
80018b4: 4b17 ldr r3, [pc, #92] ; (8001914 <HAL_TIM_PeriodElapsedCallback+0x88>)
80018b6: 0018 movs r0, r3
80018b8: f002 fe20 bl 80044fc <HAL_TIM_Base_Stop_IT>
startConfig = 1;
80018bc: 4b16 ldr r3, [pc, #88] ; (8001918 <HAL_TIM_PeriodElapsedCallback+0x8c>)
80018be: 2201 movs r2, #1
80018c0: 701a strb r2, [r3, #0]
}
}
// Fade-in / fade-out animation
if(htim->Instance == TIM17) { //check if the interrupt comes from TIM17
80018c2: 687b ldr r3, [r7, #4]
80018c4: 681b ldr r3, [r3, #0]
80018c6: 4a15 ldr r2, [pc, #84] ; (800191c <HAL_TIM_PeriodElapsedCallback+0x90>)
80018c8: 4293 cmp r3, r2
80018ca: d11a bne.n 8001902 <HAL_TIM_PeriodElapsedCallback+0x76>
curLightLevel += dLevel;
80018cc: 4b14 ldr r3, [pc, #80] ; (8001920 <HAL_TIM_PeriodElapsedCallback+0x94>)
80018ce: 781a ldrb r2, [r3, #0]
80018d0: 4b14 ldr r3, [pc, #80] ; (8001924 <HAL_TIM_PeriodElapsedCallback+0x98>)
80018d2: 781b ldrb r3, [r3, #0]
80018d4: b25b sxtb r3, r3
80018d6: b2db uxtb r3, r3
80018d8: 18d3 adds r3, r2, r3
80018da: b2da uxtb r2, r3
80018dc: 4b10 ldr r3, [pc, #64] ; (8001920 <HAL_TIM_PeriodElapsedCallback+0x94>)
80018de: 701a strb r2, [r3, #0]
setLightLevel(curLightLevel);
80018e0: 4b0f ldr r3, [pc, #60] ; (8001920 <HAL_TIM_PeriodElapsedCallback+0x94>)
80018e2: 781b ldrb r3, [r3, #0]
80018e4: 0018 movs r0, r3
80018e6: f7ff feff bl 80016e8 <setLightLevel>
if (curLightLevel >= 99 || curLightLevel <= 0) {
80018ea: 4b0d ldr r3, [pc, #52] ; (8001920 <HAL_TIM_PeriodElapsedCallback+0x94>)
80018ec: 781b ldrb r3, [r3, #0]
80018ee: 2b62 cmp r3, #98 ; 0x62
80018f0: d803 bhi.n 80018fa <HAL_TIM_PeriodElapsedCallback+0x6e>
80018f2: 4b0b ldr r3, [pc, #44] ; (8001920 <HAL_TIM_PeriodElapsedCallback+0x94>)
80018f4: 781b ldrb r3, [r3, #0]
80018f6: 2b00 cmp r3, #0
80018f8: d103 bne.n 8001902 <HAL_TIM_PeriodElapsedCallback+0x76>
HAL_TIM_Base_Stop_IT(&htim17);
80018fa: 4b0b ldr r3, [pc, #44] ; (8001928 <HAL_TIM_PeriodElapsedCallback+0x9c>)
80018fc: 0018 movs r0, r3
80018fe: f002 fdfd bl 80044fc <HAL_TIM_Base_Stop_IT>
}
}
}
8001902: 46c0 nop ; (mov r8, r8)
8001904: 46bd mov sp, r7
8001906: b002 add sp, #8
8001908: bd80 pop {r7, pc}
800190a: 46c0 nop ; (mov r8, r8)
800190c: 40014400 .word 0x40014400
8001910: 20000224 .word 0x20000224
8001914: 20000178 .word 0x20000178
8001918: 20000226 .word 0x20000226
800191c: 40014800 .word 0x40014800
8001920: 20000221 .word 0x20000221
8001924: 20000001 .word 0x20000001
8001928: 200001c4 .word 0x200001c4
0800192c <Error_Handler>:
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
800192c: b580 push {r7, lr}
800192e: af00 add r7, sp, #0
\details Disables IRQ interrupts by setting the I-bit in the CPSR.
Can only be executed in Privileged modes.
*/
__STATIC_FORCEINLINE void __disable_irq(void)
{
__ASM volatile ("cpsid i" : : : "memory");
8001930: b672 cpsid i
}
8001932: 46c0 nop ; (mov r8, r8)
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
8001934: e7fe b.n 8001934 <Error_Handler+0x8>
...
08001938 <HAL_MspInit>:
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void)
{
8001938: b580 push {r7, lr}
800193a: b082 sub sp, #8
800193c: af00 add r7, sp, #0
/* USER CODE BEGIN MspInit 0 */
/* USER CODE END MspInit 0 */
__HAL_RCC_SYSCFG_CLK_ENABLE();
800193e: 4b0f ldr r3, [pc, #60] ; (800197c <HAL_MspInit+0x44>)
8001940: 6c1a ldr r2, [r3, #64] ; 0x40
8001942: 4b0e ldr r3, [pc, #56] ; (800197c <HAL_MspInit+0x44>)
8001944: 2101 movs r1, #1
8001946: 430a orrs r2, r1
8001948: 641a str r2, [r3, #64] ; 0x40
800194a: 4b0c ldr r3, [pc, #48] ; (800197c <HAL_MspInit+0x44>)
800194c: 6c1b ldr r3, [r3, #64] ; 0x40
800194e: 2201 movs r2, #1
8001950: 4013 ands r3, r2
8001952: 607b str r3, [r7, #4]
8001954: 687b ldr r3, [r7, #4]
__HAL_RCC_PWR_CLK_ENABLE();
8001956: 4b09 ldr r3, [pc, #36] ; (800197c <HAL_MspInit+0x44>)
8001958: 6bda ldr r2, [r3, #60] ; 0x3c
800195a: 4b08 ldr r3, [pc, #32] ; (800197c <HAL_MspInit+0x44>)
800195c: 2180 movs r1, #128 ; 0x80
800195e: 0549 lsls r1, r1, #21
8001960: 430a orrs r2, r1
8001962: 63da str r2, [r3, #60] ; 0x3c
8001964: 4b05 ldr r3, [pc, #20] ; (800197c <HAL_MspInit+0x44>)
8001966: 6bda ldr r2, [r3, #60] ; 0x3c
8001968: 2380 movs r3, #128 ; 0x80
800196a: 055b lsls r3, r3, #21
800196c: 4013 ands r3, r2
800196e: 603b str r3, [r7, #0]
8001970: 683b ldr r3, [r7, #0]
/* System interrupt init*/
/* USER CODE BEGIN MspInit 1 */
/* USER CODE END MspInit 1 */
}
8001972: 46c0 nop ; (mov r8, r8)
8001974: 46bd mov sp, r7
8001976: b002 add sp, #8
8001978: bd80 pop {r7, pc}
800197a: 46c0 nop ; (mov r8, r8)
800197c: 40021000 .word 0x40021000
08001980 <HAL_CRC_MspInit>:
* This function configures the hardware resources used in this example
* @param hcrc: CRC handle pointer
* @retval None
*/
void HAL_CRC_MspInit(CRC_HandleTypeDef* hcrc)
{
8001980: b580 push {r7, lr}
8001982: b084 sub sp, #16
8001984: af00 add r7, sp, #0
8001986: 6078 str r0, [r7, #4]
if(hcrc->Instance==CRC)
8001988: 687b ldr r3, [r7, #4]
800198a: 681b ldr r3, [r3, #0]
800198c: 4a0a ldr r2, [pc, #40] ; (80019b8 <HAL_CRC_MspInit+0x38>)
800198e: 4293 cmp r3, r2
8001990: d10d bne.n 80019ae <HAL_CRC_MspInit+0x2e>
{
/* USER CODE BEGIN CRC_MspInit 0 */
/* USER CODE END CRC_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_CRC_CLK_ENABLE();
8001992: 4b0a ldr r3, [pc, #40] ; (80019bc <HAL_CRC_MspInit+0x3c>)
8001994: 6b9a ldr r2, [r3, #56] ; 0x38
8001996: 4b09 ldr r3, [pc, #36] ; (80019bc <HAL_CRC_MspInit+0x3c>)
8001998: 2180 movs r1, #128 ; 0x80
800199a: 0149 lsls r1, r1, #5
800199c: 430a orrs r2, r1
800199e: 639a str r2, [r3, #56] ; 0x38
80019a0: 4b06 ldr r3, [pc, #24] ; (80019bc <HAL_CRC_MspInit+0x3c>)
80019a2: 6b9a ldr r2, [r3, #56] ; 0x38
80019a4: 2380 movs r3, #128 ; 0x80
80019a6: 015b lsls r3, r3, #5
80019a8: 4013 ands r3, r2
80019aa: 60fb str r3, [r7, #12]
80019ac: 68fb ldr r3, [r7, #12]
/* USER CODE BEGIN CRC_MspInit 1 */
/* USER CODE END CRC_MspInit 1 */
}
}
80019ae: 46c0 nop ; (mov r8, r8)
80019b0: 46bd mov sp, r7
80019b2: b004 add sp, #16
80019b4: bd80 pop {r7, pc}
80019b6: 46c0 nop ; (mov r8, r8)
80019b8: 40023000 .word 0x40023000
80019bc: 40021000 .word 0x40021000
080019c0 <HAL_I2C_MspInit>:
* This function configures the hardware resources used in this example
* @param hi2c: I2C handle pointer
* @retval None
*/
void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c)
{
80019c0: b590 push {r4, r7, lr}
80019c2: b095 sub sp, #84 ; 0x54
80019c4: af00 add r7, sp, #0
80019c6: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
80019c8: 233c movs r3, #60 ; 0x3c
80019ca: 18fb adds r3, r7, r3
80019cc: 0018 movs r0, r3
80019ce: 2314 movs r3, #20
80019d0: 001a movs r2, r3
80019d2: 2100 movs r1, #0
80019d4: f004 fecc bl 8006770 <memset>
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
80019d8: 2414 movs r4, #20
80019da: 193b adds r3, r7, r4
80019dc: 0018 movs r0, r3
80019de: 2328 movs r3, #40 ; 0x28
80019e0: 001a movs r2, r3
80019e2: 2100 movs r1, #0
80019e4: f004 fec4 bl 8006770 <memset>
if(hi2c->Instance==I2C1)
80019e8: 687b ldr r3, [r7, #4]
80019ea: 681b ldr r3, [r3, #0]
80019ec: 4a22 ldr r2, [pc, #136] ; (8001a78 <HAL_I2C_MspInit+0xb8>)
80019ee: 4293 cmp r3, r2
80019f0: d13d bne.n 8001a6e <HAL_I2C_MspInit+0xae>
/* USER CODE END I2C1_MspInit 0 */
/** Initializes the peripherals clocks
*/
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_I2C1;
80019f2: 193b adds r3, r7, r4
80019f4: 2220 movs r2, #32
80019f6: 601a str r2, [r3, #0]
PeriphClkInit.I2c1ClockSelection = RCC_I2C1CLKSOURCE_PCLK1;
80019f8: 193b adds r3, r7, r4
80019fa: 2200 movs r2, #0
80019fc: 60da str r2, [r3, #12]
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
80019fe: 193b adds r3, r7, r4
8001a00: 0018 movs r0, r3
8001a02: f002 fb55 bl 80040b0 <HAL_RCCEx_PeriphCLKConfig>
8001a06: 1e03 subs r3, r0, #0
8001a08: d001 beq.n 8001a0e <HAL_I2C_MspInit+0x4e>
{
Error_Handler();
8001a0a: f7ff ff8f bl 800192c <Error_Handler>
}
__HAL_RCC_GPIOB_CLK_ENABLE();
8001a0e: 4b1b ldr r3, [pc, #108] ; (8001a7c <HAL_I2C_MspInit+0xbc>)
8001a10: 6b5a ldr r2, [r3, #52] ; 0x34
8001a12: 4b1a ldr r3, [pc, #104] ; (8001a7c <HAL_I2C_MspInit+0xbc>)
8001a14: 2102 movs r1, #2
8001a16: 430a orrs r2, r1
8001a18: 635a str r2, [r3, #52] ; 0x34
8001a1a: 4b18 ldr r3, [pc, #96] ; (8001a7c <HAL_I2C_MspInit+0xbc>)
8001a1c: 6b5b ldr r3, [r3, #52] ; 0x34
8001a1e: 2202 movs r2, #2
8001a20: 4013 ands r3, r2
8001a22: 613b str r3, [r7, #16]
8001a24: 693b ldr r3, [r7, #16]
/**I2C1 GPIO Configuration
PB6 ------> I2C1_SCL
PB7 ------> I2C1_SDA
*/
GPIO_InitStruct.Pin = Sens_SCL_Pin|Sens_SDA_Pin;
8001a26: 213c movs r1, #60 ; 0x3c
8001a28: 187b adds r3, r7, r1
8001a2a: 22c0 movs r2, #192 ; 0xc0
8001a2c: 601a str r2, [r3, #0]
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
8001a2e: 187b adds r3, r7, r1
8001a30: 2212 movs r2, #18
8001a32: 605a str r2, [r3, #4]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001a34: 187b adds r3, r7, r1
8001a36: 2200 movs r2, #0
8001a38: 609a str r2, [r3, #8]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8001a3a: 187b adds r3, r7, r1
8001a3c: 2200 movs r2, #0
8001a3e: 60da str r2, [r3, #12]
GPIO_InitStruct.Alternate = GPIO_AF6_I2C1;
8001a40: 187b adds r3, r7, r1
8001a42: 2206 movs r2, #6
8001a44: 611a str r2, [r3, #16]
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
8001a46: 187b adds r3, r7, r1
8001a48: 4a0d ldr r2, [pc, #52] ; (8001a80 <HAL_I2C_MspInit+0xc0>)
8001a4a: 0019 movs r1, r3
8001a4c: 0010 movs r0, r2
8001a4e: f000 fe33 bl 80026b8 <HAL_GPIO_Init>
/* Peripheral clock enable */
__HAL_RCC_I2C1_CLK_ENABLE();
8001a52: 4b0a ldr r3, [pc, #40] ; (8001a7c <HAL_I2C_MspInit+0xbc>)
8001a54: 6bda ldr r2, [r3, #60] ; 0x3c
8001a56: 4b09 ldr r3, [pc, #36] ; (8001a7c <HAL_I2C_MspInit+0xbc>)
8001a58: 2180 movs r1, #128 ; 0x80
8001a5a: 0389 lsls r1, r1, #14
8001a5c: 430a orrs r2, r1
8001a5e: 63da str r2, [r3, #60] ; 0x3c
8001a60: 4b06 ldr r3, [pc, #24] ; (8001a7c <HAL_I2C_MspInit+0xbc>)
8001a62: 6bda ldr r2, [r3, #60] ; 0x3c
8001a64: 2380 movs r3, #128 ; 0x80
8001a66: 039b lsls r3, r3, #14
8001a68: 4013 ands r3, r2
8001a6a: 60fb str r3, [r7, #12]
8001a6c: 68fb ldr r3, [r7, #12]
/* USER CODE BEGIN I2C1_MspInit 1 */
/* USER CODE END I2C1_MspInit 1 */
}
}
8001a6e: 46c0 nop ; (mov r8, r8)
8001a70: 46bd mov sp, r7
8001a72: b015 add sp, #84 ; 0x54
8001a74: bd90 pop {r4, r7, pc}
8001a76: 46c0 nop ; (mov r8, r8)
8001a78: 40005400 .word 0x40005400
8001a7c: 40021000 .word 0x40021000
8001a80: 50000400 .word 0x50000400
08001a84 <HAL_TIM_Base_MspInit>:
* This function configures the hardware resources used in this example
* @param htim_base: TIM_Base handle pointer
* @retval None
*/
void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
{
8001a84: b580 push {r7, lr}
8001a86: b086 sub sp, #24
8001a88: af00 add r7, sp, #0
8001a8a: 6078 str r0, [r7, #4]
if(htim_base->Instance==TIM3)
8001a8c: 687b ldr r3, [r7, #4]
8001a8e: 681b ldr r3, [r3, #0]
8001a90: 4a25 ldr r2, [pc, #148] ; (8001b28 <HAL_TIM_Base_MspInit+0xa4>)
8001a92: 4293 cmp r3, r2
8001a94: d10c bne.n 8001ab0 <HAL_TIM_Base_MspInit+0x2c>
{
/* USER CODE BEGIN TIM3_MspInit 0 */
/* USER CODE END TIM3_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_TIM3_CLK_ENABLE();
8001a96: 4b25 ldr r3, [pc, #148] ; (8001b2c <HAL_TIM_Base_MspInit+0xa8>)
8001a98: 6bda ldr r2, [r3, #60] ; 0x3c
8001a9a: 4b24 ldr r3, [pc, #144] ; (8001b2c <HAL_TIM_Base_MspInit+0xa8>)
8001a9c: 2102 movs r1, #2
8001a9e: 430a orrs r2, r1
8001aa0: 63da str r2, [r3, #60] ; 0x3c
8001aa2: 4b22 ldr r3, [pc, #136] ; (8001b2c <HAL_TIM_Base_MspInit+0xa8>)
8001aa4: 6bdb ldr r3, [r3, #60] ; 0x3c
8001aa6: 2202 movs r2, #2
8001aa8: 4013 ands r3, r2
8001aaa: 617b str r3, [r7, #20]
8001aac: 697b ldr r3, [r7, #20]
/* USER CODE BEGIN TIM17_MspInit 1 */
/* USER CODE END TIM17_MspInit 1 */
}
}
8001aae: e036 b.n 8001b1e <HAL_TIM_Base_MspInit+0x9a>
else if(htim_base->Instance==TIM16)
8001ab0: 687b ldr r3, [r7, #4]
8001ab2: 681b ldr r3, [r3, #0]
8001ab4: 4a1e ldr r2, [pc, #120] ; (8001b30 <HAL_TIM_Base_MspInit+0xac>)
8001ab6: 4293 cmp r3, r2
8001ab8: d116 bne.n 8001ae8 <HAL_TIM_Base_MspInit+0x64>
__HAL_RCC_TIM16_CLK_ENABLE();
8001aba: 4b1c ldr r3, [pc, #112] ; (8001b2c <HAL_TIM_Base_MspInit+0xa8>)
8001abc: 6c1a ldr r2, [r3, #64] ; 0x40
8001abe: 4b1b ldr r3, [pc, #108] ; (8001b2c <HAL_TIM_Base_MspInit+0xa8>)
8001ac0: 2180 movs r1, #128 ; 0x80
8001ac2: 0289 lsls r1, r1, #10
8001ac4: 430a orrs r2, r1
8001ac6: 641a str r2, [r3, #64] ; 0x40
8001ac8: 4b18 ldr r3, [pc, #96] ; (8001b2c <HAL_TIM_Base_MspInit+0xa8>)
8001aca: 6c1a ldr r2, [r3, #64] ; 0x40
8001acc: 2380 movs r3, #128 ; 0x80
8001ace: 029b lsls r3, r3, #10
8001ad0: 4013 ands r3, r2
8001ad2: 613b str r3, [r7, #16]
8001ad4: 693b ldr r3, [r7, #16]
HAL_NVIC_SetPriority(TIM16_IRQn, 0, 0);
8001ad6: 2200 movs r2, #0
8001ad8: 2100 movs r1, #0
8001ada: 2015 movs r0, #21
8001adc: f000 fa30 bl 8001f40 <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(TIM16_IRQn);
8001ae0: 2015 movs r0, #21
8001ae2: f000 fa42 bl 8001f6a <HAL_NVIC_EnableIRQ>
}
8001ae6: e01a b.n 8001b1e <HAL_TIM_Base_MspInit+0x9a>
else if(htim_base->Instance==TIM17)
8001ae8: 687b ldr r3, [r7, #4]
8001aea: 681b ldr r3, [r3, #0]
8001aec: 4a11 ldr r2, [pc, #68] ; (8001b34 <HAL_TIM_Base_MspInit+0xb0>)
8001aee: 4293 cmp r3, r2
8001af0: d115 bne.n 8001b1e <HAL_TIM_Base_MspInit+0x9a>
__HAL_RCC_TIM17_CLK_ENABLE();
8001af2: 4b0e ldr r3, [pc, #56] ; (8001b2c <HAL_TIM_Base_MspInit+0xa8>)
8001af4: 6c1a ldr r2, [r3, #64] ; 0x40
8001af6: 4b0d ldr r3, [pc, #52] ; (8001b2c <HAL_TIM_Base_MspInit+0xa8>)
8001af8: 2180 movs r1, #128 ; 0x80
8001afa: 02c9 lsls r1, r1, #11
8001afc: 430a orrs r2, r1
8001afe: 641a str r2, [r3, #64] ; 0x40
8001b00: 4b0a ldr r3, [pc, #40] ; (8001b2c <HAL_TIM_Base_MspInit+0xa8>)
8001b02: 6c1a ldr r2, [r3, #64] ; 0x40
8001b04: 2380 movs r3, #128 ; 0x80
8001b06: 02db lsls r3, r3, #11
8001b08: 4013 ands r3, r2
8001b0a: 60fb str r3, [r7, #12]
8001b0c: 68fb ldr r3, [r7, #12]
HAL_NVIC_SetPriority(TIM17_IRQn, 0, 0);
8001b0e: 2200 movs r2, #0
8001b10: 2100 movs r1, #0
8001b12: 2016 movs r0, #22
8001b14: f000 fa14 bl 8001f40 <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(TIM17_IRQn);
8001b18: 2016 movs r0, #22
8001b1a: f000 fa26 bl 8001f6a <HAL_NVIC_EnableIRQ>
}
8001b1e: 46c0 nop ; (mov r8, r8)
8001b20: 46bd mov sp, r7
8001b22: b006 add sp, #24
8001b24: bd80 pop {r7, pc}
8001b26: 46c0 nop ; (mov r8, r8)
8001b28: 40000400 .word 0x40000400
8001b2c: 40021000 .word 0x40021000
8001b30: 40014400 .word 0x40014400
8001b34: 40014800 .word 0x40014800
08001b38 <HAL_TIM_MspPostInit>:
void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
{
8001b38: b590 push {r4, r7, lr}
8001b3a: b089 sub sp, #36 ; 0x24
8001b3c: af00 add r7, sp, #0
8001b3e: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
8001b40: 240c movs r4, #12
8001b42: 193b adds r3, r7, r4
8001b44: 0018 movs r0, r3
8001b46: 2314 movs r3, #20
8001b48: 001a movs r2, r3
8001b4a: 2100 movs r1, #0
8001b4c: f004 fe10 bl 8006770 <memset>
if(htim->Instance==TIM3)
8001b50: 687b ldr r3, [r7, #4]
8001b52: 681b ldr r3, [r3, #0]
8001b54: 4a14 ldr r2, [pc, #80] ; (8001ba8 <HAL_TIM_MspPostInit+0x70>)
8001b56: 4293 cmp r3, r2
8001b58: d121 bne.n 8001b9e <HAL_TIM_MspPostInit+0x66>
{
/* USER CODE BEGIN TIM3_MspPostInit 0 */
/* USER CODE END TIM3_MspPostInit 0 */
__HAL_RCC_GPIOC_CLK_ENABLE();
8001b5a: 4b14 ldr r3, [pc, #80] ; (8001bac <HAL_TIM_MspPostInit+0x74>)
8001b5c: 6b5a ldr r2, [r3, #52] ; 0x34
8001b5e: 4b13 ldr r3, [pc, #76] ; (8001bac <HAL_TIM_MspPostInit+0x74>)
8001b60: 2104 movs r1, #4
8001b62: 430a orrs r2, r1
8001b64: 635a str r2, [r3, #52] ; 0x34
8001b66: 4b11 ldr r3, [pc, #68] ; (8001bac <HAL_TIM_MspPostInit+0x74>)
8001b68: 6b5b ldr r3, [r3, #52] ; 0x34
8001b6a: 2204 movs r2, #4
8001b6c: 4013 ands r3, r2
8001b6e: 60bb str r3, [r7, #8]
8001b70: 68bb ldr r3, [r7, #8]
/**TIM3 GPIO Configuration
PC6 ------> TIM3_CH1
*/
GPIO_InitStruct.Pin = GPIO_PIN_6;
8001b72: 0021 movs r1, r4
8001b74: 187b adds r3, r7, r1
8001b76: 2240 movs r2, #64 ; 0x40
8001b78: 601a str r2, [r3, #0]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8001b7a: 187b adds r3, r7, r1
8001b7c: 2202 movs r2, #2
8001b7e: 605a str r2, [r3, #4]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001b80: 187b adds r3, r7, r1
8001b82: 2200 movs r2, #0
8001b84: 609a str r2, [r3, #8]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8001b86: 187b adds r3, r7, r1
8001b88: 2200 movs r2, #0
8001b8a: 60da str r2, [r3, #12]
GPIO_InitStruct.Alternate = GPIO_AF1_TIM3;
8001b8c: 187b adds r3, r7, r1
8001b8e: 2201 movs r2, #1
8001b90: 611a str r2, [r3, #16]
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
8001b92: 187b adds r3, r7, r1
8001b94: 4a06 ldr r2, [pc, #24] ; (8001bb0 <HAL_TIM_MspPostInit+0x78>)
8001b96: 0019 movs r1, r3
8001b98: 0010 movs r0, r2
8001b9a: f000 fd8d bl 80026b8 <HAL_GPIO_Init>
/* USER CODE BEGIN TIM3_MspPostInit 1 */
/* USER CODE END TIM3_MspPostInit 1 */
}
}
8001b9e: 46c0 nop ; (mov r8, r8)
8001ba0: 46bd mov sp, r7
8001ba2: b009 add sp, #36 ; 0x24
8001ba4: bd90 pop {r4, r7, pc}
8001ba6: 46c0 nop ; (mov r8, r8)
8001ba8: 40000400 .word 0x40000400
8001bac: 40021000 .word 0x40021000
8001bb0: 50000800 .word 0x50000800
08001bb4 <NMI_Handler>:
/******************************************************************************/
/**
* @brief This function handles Non maskable interrupt.
*/
void NMI_Handler(void)
{
8001bb4: b580 push {r7, lr}
8001bb6: af00 add r7, sp, #0
/* USER CODE BEGIN NonMaskableInt_IRQn 0 */
/* USER CODE END NonMaskableInt_IRQn 0 */
/* USER CODE BEGIN NonMaskableInt_IRQn 1 */
while (1)
8001bb8: e7fe b.n 8001bb8 <NMI_Handler+0x4>
08001bba <HardFault_Handler>:
/**
* @brief This function handles Hard fault interrupt.
*/
void HardFault_Handler(void)
{
8001bba: b580 push {r7, lr}
8001bbc: af00 add r7, sp, #0
/* USER CODE BEGIN HardFault_IRQn 0 */
/* USER CODE END HardFault_IRQn 0 */
while (1)
8001bbe: e7fe b.n 8001bbe <HardFault_Handler+0x4>
08001bc0 <SVC_Handler>:
/**
* @brief This function handles System service call via SWI instruction.
*/
void SVC_Handler(void)
{
8001bc0: b580 push {r7, lr}
8001bc2: af00 add r7, sp, #0
/* USER CODE END SVC_IRQn 0 */
/* USER CODE BEGIN SVC_IRQn 1 */
/* USER CODE END SVC_IRQn 1 */
}
8001bc4: 46c0 nop ; (mov r8, r8)
8001bc6: 46bd mov sp, r7
8001bc8: bd80 pop {r7, pc}
08001bca <PendSV_Handler>:
/**
* @brief This function handles Pendable request for system service.
*/
void PendSV_Handler(void)
{
8001bca: b580 push {r7, lr}
8001bcc: af00 add r7, sp, #0
/* USER CODE END PendSV_IRQn 0 */
/* USER CODE BEGIN PendSV_IRQn 1 */
/* USER CODE END PendSV_IRQn 1 */
}
8001bce: 46c0 nop ; (mov r8, r8)
8001bd0: 46bd mov sp, r7
8001bd2: bd80 pop {r7, pc}
08001bd4 <SysTick_Handler>:
/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
8001bd4: b580 push {r7, lr}
8001bd6: af00 add r7, sp, #0
/* USER CODE BEGIN SysTick_IRQn 0 */
/* USER CODE END SysTick_IRQn 0 */
HAL_IncTick();
8001bd8: f000 f8c6 bl 8001d68 <HAL_IncTick>
/* USER CODE BEGIN SysTick_IRQn 1 */
/* USER CODE END SysTick_IRQn 1 */
}
8001bdc: 46c0 nop ; (mov r8, r8)
8001bde: 46bd mov sp, r7
8001be0: bd80 pop {r7, pc}
08001be2 <EXTI0_1_IRQHandler>:
/**
* @brief This function handles EXTI line 0 and line 1 interrupts.
*/
void EXTI0_1_IRQHandler(void)
{
8001be2: b580 push {r7, lr}
8001be4: af00 add r7, sp, #0
/* USER CODE BEGIN EXTI0_1_IRQn 0 */
/* USER CODE END EXTI0_1_IRQn 0 */
HAL_GPIO_EXTI_IRQHandler(Btn_INT_Pin);
8001be6: 2001 movs r0, #1
8001be8: f000 fee8 bl 80029bc <HAL_GPIO_EXTI_IRQHandler>
/* USER CODE BEGIN EXTI0_1_IRQn 1 */
/* USER CODE END EXTI0_1_IRQn 1 */
}
8001bec: 46c0 nop ; (mov r8, r8)
8001bee: 46bd mov sp, r7
8001bf0: bd80 pop {r7, pc}
08001bf2 <EXTI4_15_IRQHandler>:
/**
* @brief This function handles EXTI line 4 to 15 interrupts.
*/
void EXTI4_15_IRQHandler(void)
{
8001bf2: b580 push {r7, lr}
8001bf4: af00 add r7, sp, #0
/* USER CODE BEGIN EXTI4_15_IRQn 0 */
/* USER CODE END EXTI4_15_IRQn 0 */
HAL_GPIO_EXTI_IRQHandler(Sens_INT_Pin);
8001bf6: 2020 movs r0, #32
8001bf8: f000 fee0 bl 80029bc <HAL_GPIO_EXTI_IRQHandler>
/* USER CODE BEGIN EXTI4_15_IRQn 1 */
/* USER CODE END EXTI4_15_IRQn 1 */
}
8001bfc: 46c0 nop ; (mov r8, r8)
8001bfe: 46bd mov sp, r7
8001c00: bd80 pop {r7, pc}
...
08001c04 <TIM16_IRQHandler>:
/**
* @brief This function handles TIM16 global interrupt.
*/
void TIM16_IRQHandler(void)
{
8001c04: b580 push {r7, lr}
8001c06: af00 add r7, sp, #0
/* USER CODE BEGIN TIM16_IRQn 0 */
/* USER CODE END TIM16_IRQn 0 */
HAL_TIM_IRQHandler(&htim16);
8001c08: 4b03 ldr r3, [pc, #12] ; (8001c18 <TIM16_IRQHandler+0x14>)
8001c0a: 0018 movs r0, r3
8001c0c: f002 fde2 bl 80047d4 <HAL_TIM_IRQHandler>
/* USER CODE BEGIN TIM16_IRQn 1 */
/* USER CODE END TIM16_IRQn 1 */
}
8001c10: 46c0 nop ; (mov r8, r8)
8001c12: 46bd mov sp, r7
8001c14: bd80 pop {r7, pc}
8001c16: 46c0 nop ; (mov r8, r8)
8001c18: 20000178 .word 0x20000178
08001c1c <TIM17_IRQHandler>:
/**
* @brief This function handles TIM17 global interrupt.
*/
void TIM17_IRQHandler(void)
{
8001c1c: b580 push {r7, lr}
8001c1e: af00 add r7, sp, #0
/* USER CODE BEGIN TIM17_IRQn 0 */
/* USER CODE END TIM17_IRQn 0 */
HAL_TIM_IRQHandler(&htim17);
8001c20: 4b03 ldr r3, [pc, #12] ; (8001c30 <TIM17_IRQHandler+0x14>)
8001c22: 0018 movs r0, r3
8001c24: f002 fdd6 bl 80047d4 <HAL_TIM_IRQHandler>
/* USER CODE BEGIN TIM17_IRQn 1 */
/* USER CODE END TIM17_IRQn 1 */
}
8001c28: 46c0 nop ; (mov r8, r8)
8001c2a: 46bd mov sp, r7
8001c2c: bd80 pop {r7, pc}
8001c2e: 46c0 nop ; (mov r8, r8)
8001c30: 200001c4 .word 0x200001c4
08001c34 <SystemInit>:
* @brief Setup the microcontroller system.
* @param None
* @retval None
*/
void SystemInit(void)
{
8001c34: b580 push {r7, lr}
8001c36: af00 add r7, sp, #0
/* Configure the Vector Table location -------------------------------------*/
#if defined(USER_VECT_TAB_ADDRESS)
SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation */
#endif /* USER_VECT_TAB_ADDRESS */
}
8001c38: 46c0 nop ; (mov r8, r8)
8001c3a: 46bd mov sp, r7
8001c3c: bd80 pop {r7, pc}
...
08001c40 <Reset_Handler>:
.section .text.Reset_Handler
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
ldr r0, =_estack
8001c40: 480d ldr r0, [pc, #52] ; (8001c78 <LoopForever+0x2>)
mov sp, r0 /* set stack pointer */
8001c42: 4685 mov sp, r0
/* Call the clock system initialization function.*/
bl SystemInit
8001c44: f7ff fff6 bl 8001c34 <SystemInit>
/* Copy the data segment initializers from flash to SRAM */
ldr r0, =_sdata
8001c48: 480c ldr r0, [pc, #48] ; (8001c7c <LoopForever+0x6>)
ldr r1, =_edata
8001c4a: 490d ldr r1, [pc, #52] ; (8001c80 <LoopForever+0xa>)
ldr r2, =_sidata
8001c4c: 4a0d ldr r2, [pc, #52] ; (8001c84 <LoopForever+0xe>)
movs r3, #0
8001c4e: 2300 movs r3, #0
b LoopCopyDataInit
8001c50: e002 b.n 8001c58 <LoopCopyDataInit>
08001c52 <CopyDataInit>:
CopyDataInit:
ldr r4, [r2, r3]
8001c52: 58d4 ldr r4, [r2, r3]
str r4, [r0, r3]
8001c54: 50c4 str r4, [r0, r3]
adds r3, r3, #4
8001c56: 3304 adds r3, #4
08001c58 <LoopCopyDataInit>:
LoopCopyDataInit:
adds r4, r0, r3
8001c58: 18c4 adds r4, r0, r3
cmp r4, r1
8001c5a: 428c cmp r4, r1
bcc CopyDataInit
8001c5c: d3f9 bcc.n 8001c52 <CopyDataInit>
/* Zero fill the bss segment. */
ldr r2, =_sbss
8001c5e: 4a0a ldr r2, [pc, #40] ; (8001c88 <LoopForever+0x12>)
ldr r4, =_ebss
8001c60: 4c0a ldr r4, [pc, #40] ; (8001c8c <LoopForever+0x16>)
movs r3, #0
8001c62: 2300 movs r3, #0
b LoopFillZerobss
8001c64: e001 b.n 8001c6a <LoopFillZerobss>
08001c66 <FillZerobss>:
FillZerobss:
str r3, [r2]
8001c66: 6013 str r3, [r2, #0]
adds r2, r2, #4
8001c68: 3204 adds r2, #4
08001c6a <LoopFillZerobss>:
LoopFillZerobss:
cmp r2, r4
8001c6a: 42a2 cmp r2, r4
bcc FillZerobss
8001c6c: d3fb bcc.n 8001c66 <FillZerobss>
/* Call static constructors */
bl __libc_init_array
8001c6e: f004 fd5b bl 8006728 <__libc_init_array>
/* Call the application s entry point.*/
bl main
8001c72: f7ff fae9 bl 8001248 <main>
08001c76 <LoopForever>:
LoopForever:
b LoopForever
8001c76: e7fe b.n 8001c76 <LoopForever>
ldr r0, =_estack
8001c78: 20002000 .word 0x20002000
ldr r0, =_sdata
8001c7c: 20000000 .word 0x20000000
ldr r1, =_edata
8001c80: 20000098 .word 0x20000098
ldr r2, =_sidata
8001c84: 08006884 .word 0x08006884
ldr r2, =_sbss
8001c88: 20000098 .word 0x20000098
ldr r4, =_ebss
8001c8c: 20000264 .word 0x20000264
08001c90 <ADC1_IRQHandler>:
* @retval None
*/
.section .text.Default_Handler,"ax",%progbits
Default_Handler:
Infinite_Loop:
b Infinite_Loop
8001c90: e7fe b.n 8001c90 <ADC1_IRQHandler>
...
08001c94 <HAL_Init>:
* each 1ms in the SysTick_Handler() interrupt handler.
*
* @retval HAL status
*/
HAL_StatusTypeDef HAL_Init(void)
{
8001c94: b580 push {r7, lr}
8001c96: b082 sub sp, #8
8001c98: af00 add r7, sp, #0
HAL_StatusTypeDef status = HAL_OK;
8001c9a: 1dfb adds r3, r7, #7
8001c9c: 2200 movs r2, #0
8001c9e: 701a strb r2, [r3, #0]
#if (INSTRUCTION_CACHE_ENABLE == 0U)
__HAL_FLASH_INSTRUCTION_CACHE_DISABLE();
#endif /* INSTRUCTION_CACHE_ENABLE */
#if (PREFETCH_ENABLE != 0U)
__HAL_FLASH_PREFETCH_BUFFER_ENABLE();
8001ca0: 4b0b ldr r3, [pc, #44] ; (8001cd0 <HAL_Init+0x3c>)
8001ca2: 681a ldr r2, [r3, #0]
8001ca4: 4b0a ldr r3, [pc, #40] ; (8001cd0 <HAL_Init+0x3c>)
8001ca6: 2180 movs r1, #128 ; 0x80
8001ca8: 0049 lsls r1, r1, #1
8001caa: 430a orrs r2, r1
8001cac: 601a str r2, [r3, #0]
#endif /* PREFETCH_ENABLE */
/* Use SysTick as time base source and configure 1ms tick (default clock after Reset is HSI) */
if (HAL_InitTick(TICK_INT_PRIORITY) != HAL_OK)
8001cae: 2003 movs r0, #3
8001cb0: f000 f810 bl 8001cd4 <HAL_InitTick>
8001cb4: 1e03 subs r3, r0, #0
8001cb6: d003 beq.n 8001cc0 <HAL_Init+0x2c>
{
status = HAL_ERROR;
8001cb8: 1dfb adds r3, r7, #7
8001cba: 2201 movs r2, #1
8001cbc: 701a strb r2, [r3, #0]
8001cbe: e001 b.n 8001cc4 <HAL_Init+0x30>
}
else
{
/* Init the low level hardware */
HAL_MspInit();
8001cc0: f7ff fe3a bl 8001938 <HAL_MspInit>
}
/* Return function status */
return status;
8001cc4: 1dfb adds r3, r7, #7
8001cc6: 781b ldrb r3, [r3, #0]
}
8001cc8: 0018 movs r0, r3
8001cca: 46bd mov sp, r7
8001ccc: b002 add sp, #8
8001cce: bd80 pop {r7, pc}
8001cd0: 40022000 .word 0x40022000
08001cd4 <HAL_InitTick>:
* implementation in user file.
* @param TickPriority Tick interrupt priority.
* @retval HAL status
*/
__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
8001cd4: b590 push {r4, r7, lr}
8001cd6: b085 sub sp, #20
8001cd8: af00 add r7, sp, #0
8001cda: 6078 str r0, [r7, #4]
HAL_StatusTypeDef status = HAL_OK;
8001cdc: 230f movs r3, #15
8001cde: 18fb adds r3, r7, r3
8001ce0: 2200 movs r2, #0
8001ce2: 701a strb r2, [r3, #0]
/* Check uwTickFreq for MisraC 2012 (even if uwTickFreq is a enum type that doesn't take the value zero)*/
if ((uint32_t)uwTickFreq != 0U)
8001ce4: 4b1d ldr r3, [pc, #116] ; (8001d5c <HAL_InitTick+0x88>)
8001ce6: 781b ldrb r3, [r3, #0]
8001ce8: 2b00 cmp r3, #0
8001cea: d02b beq.n 8001d44 <HAL_InitTick+0x70>
{
/*Configure the SysTick to have interrupt in 1ms time basis*/
if (HAL_SYSTICK_Config(SystemCoreClock / (1000U /(uint32_t)uwTickFreq)) == 0U)
8001cec: 4b1c ldr r3, [pc, #112] ; (8001d60 <HAL_InitTick+0x8c>)
8001cee: 681c ldr r4, [r3, #0]
8001cf0: 4b1a ldr r3, [pc, #104] ; (8001d5c <HAL_InitTick+0x88>)
8001cf2: 781b ldrb r3, [r3, #0]
8001cf4: 0019 movs r1, r3
8001cf6: 23fa movs r3, #250 ; 0xfa
8001cf8: 0098 lsls r0, r3, #2
8001cfa: f7fe fa05 bl 8000108 <__udivsi3>
8001cfe: 0003 movs r3, r0
8001d00: 0019 movs r1, r3
8001d02: 0020 movs r0, r4
8001d04: f7fe fa00 bl 8000108 <__udivsi3>
8001d08: 0003 movs r3, r0
8001d0a: 0018 movs r0, r3
8001d0c: f000 f93d bl 8001f8a <HAL_SYSTICK_Config>
8001d10: 1e03 subs r3, r0, #0
8001d12: d112 bne.n 8001d3a <HAL_InitTick+0x66>
{
/* Configure the SysTick IRQ priority */
if (TickPriority < (1UL << __NVIC_PRIO_BITS))
8001d14: 687b ldr r3, [r7, #4]
8001d16: 2b03 cmp r3, #3
8001d18: d80a bhi.n 8001d30 <HAL_InitTick+0x5c>
{
HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
8001d1a: 6879 ldr r1, [r7, #4]
8001d1c: 2301 movs r3, #1
8001d1e: 425b negs r3, r3
8001d20: 2200 movs r2, #0
8001d22: 0018 movs r0, r3
8001d24: f000 f90c bl 8001f40 <HAL_NVIC_SetPriority>
uwTickPrio = TickPriority;
8001d28: 4b0e ldr r3, [pc, #56] ; (8001d64 <HAL_InitTick+0x90>)
8001d2a: 687a ldr r2, [r7, #4]
8001d2c: 601a str r2, [r3, #0]
8001d2e: e00d b.n 8001d4c <HAL_InitTick+0x78>
}
else
{
status = HAL_ERROR;
8001d30: 230f movs r3, #15
8001d32: 18fb adds r3, r7, r3
8001d34: 2201 movs r2, #1
8001d36: 701a strb r2, [r3, #0]
8001d38: e008 b.n 8001d4c <HAL_InitTick+0x78>
}
}
else
{
status = HAL_ERROR;
8001d3a: 230f movs r3, #15
8001d3c: 18fb adds r3, r7, r3
8001d3e: 2201 movs r2, #1
8001d40: 701a strb r2, [r3, #0]
8001d42: e003 b.n 8001d4c <HAL_InitTick+0x78>
}
}
else
{
status = HAL_ERROR;
8001d44: 230f movs r3, #15
8001d46: 18fb adds r3, r7, r3
8001d48: 2201 movs r2, #1
8001d4a: 701a strb r2, [r3, #0]
}
/* Return function status */
return status;
8001d4c: 230f movs r3, #15
8001d4e: 18fb adds r3, r7, r3
8001d50: 781b ldrb r3, [r3, #0]
}
8001d52: 0018 movs r0, r3
8001d54: 46bd mov sp, r7
8001d56: b005 add sp, #20
8001d58: bd90 pop {r4, r7, pc}
8001d5a: 46c0 nop ; (mov r8, r8)
8001d5c: 2000000c .word 0x2000000c
8001d60: 20000004 .word 0x20000004
8001d64: 20000008 .word 0x20000008
08001d68 <HAL_IncTick>:
* @note This function is declared as __weak to be overwritten in case of other
* implementations in user file.
* @retval None
*/
__weak void HAL_IncTick(void)
{
8001d68: b580 push {r7, lr}
8001d6a: af00 add r7, sp, #0
uwTick += (uint32_t)uwTickFreq;
8001d6c: 4b05 ldr r3, [pc, #20] ; (8001d84 <HAL_IncTick+0x1c>)
8001d6e: 781b ldrb r3, [r3, #0]
8001d70: 001a movs r2, r3
8001d72: 4b05 ldr r3, [pc, #20] ; (8001d88 <HAL_IncTick+0x20>)
8001d74: 681b ldr r3, [r3, #0]
8001d76: 18d2 adds r2, r2, r3
8001d78: 4b03 ldr r3, [pc, #12] ; (8001d88 <HAL_IncTick+0x20>)
8001d7a: 601a str r2, [r3, #0]
}
8001d7c: 46c0 nop ; (mov r8, r8)
8001d7e: 46bd mov sp, r7
8001d80: bd80 pop {r7, pc}
8001d82: 46c0 nop ; (mov r8, r8)
8001d84: 2000000c .word 0x2000000c
8001d88: 20000238 .word 0x20000238
08001d8c <HAL_GetTick>:
* @note This function is declared as __weak to be overwritten in case of other
* implementations in user file.
* @retval tick value
*/
__weak uint32_t HAL_GetTick(void)
{
8001d8c: b580 push {r7, lr}
8001d8e: af00 add r7, sp, #0
return uwTick;
8001d90: 4b02 ldr r3, [pc, #8] ; (8001d9c <HAL_GetTick+0x10>)
8001d92: 681b ldr r3, [r3, #0]
}
8001d94: 0018 movs r0, r3
8001d96: 46bd mov sp, r7
8001d98: bd80 pop {r7, pc}
8001d9a: 46c0 nop ; (mov r8, r8)
8001d9c: 20000238 .word 0x20000238
08001da0 <HAL_Delay>:
* implementations in user file.
* @param Delay specifies the delay time length, in milliseconds.
* @retval None
*/
__weak void HAL_Delay(uint32_t Delay)
{
8001da0: b580 push {r7, lr}
8001da2: b084 sub sp, #16
8001da4: af00 add r7, sp, #0
8001da6: 6078 str r0, [r7, #4]
uint32_t tickstart = HAL_GetTick();
8001da8: f7ff fff0 bl 8001d8c <HAL_GetTick>
8001dac: 0003 movs r3, r0
8001dae: 60bb str r3, [r7, #8]
uint32_t wait = Delay;
8001db0: 687b ldr r3, [r7, #4]
8001db2: 60fb str r3, [r7, #12]
/* Add a freq to guarantee minimum wait */
if (wait < HAL_MAX_DELAY)
8001db4: 68fb ldr r3, [r7, #12]
8001db6: 3301 adds r3, #1
8001db8: d005 beq.n 8001dc6 <HAL_Delay+0x26>
{
wait += (uint32_t)(uwTickFreq);
8001dba: 4b0a ldr r3, [pc, #40] ; (8001de4 <HAL_Delay+0x44>)
8001dbc: 781b ldrb r3, [r3, #0]
8001dbe: 001a movs r2, r3
8001dc0: 68fb ldr r3, [r7, #12]
8001dc2: 189b adds r3, r3, r2
8001dc4: 60fb str r3, [r7, #12]
}
while ((HAL_GetTick() - tickstart) < wait)
8001dc6: 46c0 nop ; (mov r8, r8)
8001dc8: f7ff ffe0 bl 8001d8c <HAL_GetTick>
8001dcc: 0002 movs r2, r0
8001dce: 68bb ldr r3, [r7, #8]
8001dd0: 1ad3 subs r3, r2, r3
8001dd2: 68fa ldr r2, [r7, #12]
8001dd4: 429a cmp r2, r3
8001dd6: d8f7 bhi.n 8001dc8 <HAL_Delay+0x28>
{
}
}
8001dd8: 46c0 nop ; (mov r8, r8)
8001dda: 46c0 nop ; (mov r8, r8)
8001ddc: 46bd mov sp, r7
8001dde: b004 add sp, #16
8001de0: bd80 pop {r7, pc}
8001de2: 46c0 nop ; (mov r8, r8)
8001de4: 2000000c .word 0x2000000c
08001de8 <__NVIC_EnableIRQ>:
\details Enables a device specific interrupt in the NVIC interrupt controller.
\param [in] IRQn Device specific interrupt number.
\note IRQn must not be negative.
*/
__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
{
8001de8: b580 push {r7, lr}
8001dea: b082 sub sp, #8
8001dec: af00 add r7, sp, #0
8001dee: 0002 movs r2, r0
8001df0: 1dfb adds r3, r7, #7
8001df2: 701a strb r2, [r3, #0]
if ((int32_t)(IRQn) >= 0)
8001df4: 1dfb adds r3, r7, #7
8001df6: 781b ldrb r3, [r3, #0]
8001df8: 2b7f cmp r3, #127 ; 0x7f
8001dfa: d809 bhi.n 8001e10 <__NVIC_EnableIRQ+0x28>
{
__COMPILER_BARRIER();
NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
8001dfc: 1dfb adds r3, r7, #7
8001dfe: 781b ldrb r3, [r3, #0]
8001e00: 001a movs r2, r3
8001e02: 231f movs r3, #31
8001e04: 401a ands r2, r3
8001e06: 4b04 ldr r3, [pc, #16] ; (8001e18 <__NVIC_EnableIRQ+0x30>)
8001e08: 2101 movs r1, #1
8001e0a: 4091 lsls r1, r2
8001e0c: 000a movs r2, r1
8001e0e: 601a str r2, [r3, #0]
__COMPILER_BARRIER();
}
}
8001e10: 46c0 nop ; (mov r8, r8)
8001e12: 46bd mov sp, r7
8001e14: b002 add sp, #8
8001e16: bd80 pop {r7, pc}
8001e18: e000e100 .word 0xe000e100
08001e1c <__NVIC_SetPriority>:
\param [in] IRQn Interrupt number.
\param [in] priority Priority to set.
\note The priority cannot be set for every processor exception.
*/
__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
{
8001e1c: b590 push {r4, r7, lr}
8001e1e: b083 sub sp, #12
8001e20: af00 add r7, sp, #0
8001e22: 0002 movs r2, r0
8001e24: 6039 str r1, [r7, #0]
8001e26: 1dfb adds r3, r7, #7
8001e28: 701a strb r2, [r3, #0]
if ((int32_t)(IRQn) >= 0)
8001e2a: 1dfb adds r3, r7, #7
8001e2c: 781b ldrb r3, [r3, #0]
8001e2e: 2b7f cmp r3, #127 ; 0x7f
8001e30: d828 bhi.n 8001e84 <__NVIC_SetPriority+0x68>
{
NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
8001e32: 4a2f ldr r2, [pc, #188] ; (8001ef0 <__NVIC_SetPriority+0xd4>)
8001e34: 1dfb adds r3, r7, #7
8001e36: 781b ldrb r3, [r3, #0]
8001e38: b25b sxtb r3, r3
8001e3a: 089b lsrs r3, r3, #2
8001e3c: 33c0 adds r3, #192 ; 0xc0
8001e3e: 009b lsls r3, r3, #2
8001e40: 589b ldr r3, [r3, r2]
8001e42: 1dfa adds r2, r7, #7
8001e44: 7812 ldrb r2, [r2, #0]
8001e46: 0011 movs r1, r2
8001e48: 2203 movs r2, #3
8001e4a: 400a ands r2, r1
8001e4c: 00d2 lsls r2, r2, #3
8001e4e: 21ff movs r1, #255 ; 0xff
8001e50: 4091 lsls r1, r2
8001e52: 000a movs r2, r1
8001e54: 43d2 mvns r2, r2
8001e56: 401a ands r2, r3
8001e58: 0011 movs r1, r2
(((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn)));
8001e5a: 683b ldr r3, [r7, #0]
8001e5c: 019b lsls r3, r3, #6
8001e5e: 22ff movs r2, #255 ; 0xff
8001e60: 401a ands r2, r3
8001e62: 1dfb adds r3, r7, #7
8001e64: 781b ldrb r3, [r3, #0]
8001e66: 0018 movs r0, r3
8001e68: 2303 movs r3, #3
8001e6a: 4003 ands r3, r0
8001e6c: 00db lsls r3, r3, #3
8001e6e: 409a lsls r2, r3
NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
8001e70: 481f ldr r0, [pc, #124] ; (8001ef0 <__NVIC_SetPriority+0xd4>)
8001e72: 1dfb adds r3, r7, #7
8001e74: 781b ldrb r3, [r3, #0]
8001e76: b25b sxtb r3, r3
8001e78: 089b lsrs r3, r3, #2
8001e7a: 430a orrs r2, r1
8001e7c: 33c0 adds r3, #192 ; 0xc0
8001e7e: 009b lsls r3, r3, #2
8001e80: 501a str r2, [r3, r0]
else
{
SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
(((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn)));
}
}
8001e82: e031 b.n 8001ee8 <__NVIC_SetPriority+0xcc>
SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
8001e84: 4a1b ldr r2, [pc, #108] ; (8001ef4 <__NVIC_SetPriority+0xd8>)
8001e86: 1dfb adds r3, r7, #7
8001e88: 781b ldrb r3, [r3, #0]
8001e8a: 0019 movs r1, r3
8001e8c: 230f movs r3, #15
8001e8e: 400b ands r3, r1
8001e90: 3b08 subs r3, #8
8001e92: 089b lsrs r3, r3, #2
8001e94: 3306 adds r3, #6
8001e96: 009b lsls r3, r3, #2
8001e98: 18d3 adds r3, r2, r3
8001e9a: 3304 adds r3, #4
8001e9c: 681b ldr r3, [r3, #0]
8001e9e: 1dfa adds r2, r7, #7
8001ea0: 7812 ldrb r2, [r2, #0]
8001ea2: 0011 movs r1, r2
8001ea4: 2203 movs r2, #3
8001ea6: 400a ands r2, r1
8001ea8: 00d2 lsls r2, r2, #3
8001eaa: 21ff movs r1, #255 ; 0xff
8001eac: 4091 lsls r1, r2
8001eae: 000a movs r2, r1
8001eb0: 43d2 mvns r2, r2
8001eb2: 401a ands r2, r3
8001eb4: 0011 movs r1, r2
(((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn)));
8001eb6: 683b ldr r3, [r7, #0]
8001eb8: 019b lsls r3, r3, #6
8001eba: 22ff movs r2, #255 ; 0xff
8001ebc: 401a ands r2, r3
8001ebe: 1dfb adds r3, r7, #7
8001ec0: 781b ldrb r3, [r3, #0]
8001ec2: 0018 movs r0, r3
8001ec4: 2303 movs r3, #3
8001ec6: 4003 ands r3, r0
8001ec8: 00db lsls r3, r3, #3
8001eca: 409a lsls r2, r3
SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
8001ecc: 4809 ldr r0, [pc, #36] ; (8001ef4 <__NVIC_SetPriority+0xd8>)
8001ece: 1dfb adds r3, r7, #7
8001ed0: 781b ldrb r3, [r3, #0]
8001ed2: 001c movs r4, r3
8001ed4: 230f movs r3, #15
8001ed6: 4023 ands r3, r4
8001ed8: 3b08 subs r3, #8
8001eda: 089b lsrs r3, r3, #2
8001edc: 430a orrs r2, r1
8001ede: 3306 adds r3, #6
8001ee0: 009b lsls r3, r3, #2
8001ee2: 18c3 adds r3, r0, r3
8001ee4: 3304 adds r3, #4
8001ee6: 601a str r2, [r3, #0]
}
8001ee8: 46c0 nop ; (mov r8, r8)
8001eea: 46bd mov sp, r7
8001eec: b003 add sp, #12
8001eee: bd90 pop {r4, r7, pc}
8001ef0: e000e100 .word 0xe000e100
8001ef4: e000ed00 .word 0xe000ed00
08001ef8 <SysTick_Config>:
\note When the variable <b>__Vendor_SysTickConfig</b> is set to 1, then the
function <b>SysTick_Config</b> is not included. In this case, the file <b><i>device</i>.h</b>
must contain a vendor-specific implementation of this function.
*/
__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
{
8001ef8: b580 push {r7, lr}
8001efa: b082 sub sp, #8
8001efc: af00 add r7, sp, #0
8001efe: 6078 str r0, [r7, #4]
if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
8001f00: 687b ldr r3, [r7, #4]
8001f02: 1e5a subs r2, r3, #1
8001f04: 2380 movs r3, #128 ; 0x80
8001f06: 045b lsls r3, r3, #17
8001f08: 429a cmp r2, r3
8001f0a: d301 bcc.n 8001f10 <SysTick_Config+0x18>
{
return (1UL); /* Reload value impossible */
8001f0c: 2301 movs r3, #1
8001f0e: e010 b.n 8001f32 <SysTick_Config+0x3a>
}
SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
8001f10: 4b0a ldr r3, [pc, #40] ; (8001f3c <SysTick_Config+0x44>)
8001f12: 687a ldr r2, [r7, #4]
8001f14: 3a01 subs r2, #1
8001f16: 605a str r2, [r3, #4]
NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
8001f18: 2301 movs r3, #1
8001f1a: 425b negs r3, r3
8001f1c: 2103 movs r1, #3
8001f1e: 0018 movs r0, r3
8001f20: f7ff ff7c bl 8001e1c <__NVIC_SetPriority>
SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
8001f24: 4b05 ldr r3, [pc, #20] ; (8001f3c <SysTick_Config+0x44>)
8001f26: 2200 movs r2, #0
8001f28: 609a str r2, [r3, #8]
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
8001f2a: 4b04 ldr r3, [pc, #16] ; (8001f3c <SysTick_Config+0x44>)
8001f2c: 2207 movs r2, #7
8001f2e: 601a str r2, [r3, #0]
SysTick_CTRL_TICKINT_Msk |
SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
return (0UL); /* Function successful */
8001f30: 2300 movs r3, #0
}
8001f32: 0018 movs r0, r3
8001f34: 46bd mov sp, r7
8001f36: b002 add sp, #8
8001f38: bd80 pop {r7, pc}
8001f3a: 46c0 nop ; (mov r8, r8)
8001f3c: e000e010 .word 0xe000e010
08001f40 <HAL_NVIC_SetPriority>:
* with stm32g0xx devices, this parameter is a dummy value and it is ignored, because
* no subpriority supported in Cortex M0+ based products.
* @retval None
*/
void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
{
8001f40: b580 push {r7, lr}
8001f42: b084 sub sp, #16
8001f44: af00 add r7, sp, #0
8001f46: 60b9 str r1, [r7, #8]
8001f48: 607a str r2, [r7, #4]
8001f4a: 210f movs r1, #15
8001f4c: 187b adds r3, r7, r1
8001f4e: 1c02 adds r2, r0, #0
8001f50: 701a strb r2, [r3, #0]
/* Prevent unused argument(s) compilation warning */
UNUSED(SubPriority);
/* Check the parameters */
assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority));
NVIC_SetPriority(IRQn, PreemptPriority);
8001f52: 68ba ldr r2, [r7, #8]
8001f54: 187b adds r3, r7, r1
8001f56: 781b ldrb r3, [r3, #0]
8001f58: b25b sxtb r3, r3
8001f5a: 0011 movs r1, r2
8001f5c: 0018 movs r0, r3
8001f5e: f7ff ff5d bl 8001e1c <__NVIC_SetPriority>
}
8001f62: 46c0 nop ; (mov r8, r8)
8001f64: 46bd mov sp, r7
8001f66: b004 add sp, #16
8001f68: bd80 pop {r7, pc}
08001f6a <HAL_NVIC_EnableIRQ>:
* This parameter can be an enumerator of IRQn_Type enumeration
* (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32g0xxxx.h))
* @retval None
*/
void HAL_NVIC_EnableIRQ(IRQn_Type IRQn)
{
8001f6a: b580 push {r7, lr}
8001f6c: b082 sub sp, #8
8001f6e: af00 add r7, sp, #0
8001f70: 0002 movs r2, r0
8001f72: 1dfb adds r3, r7, #7
8001f74: 701a strb r2, [r3, #0]
/* Check the parameters */
assert_param(IS_NVIC_DEVICE_IRQ(IRQn));
/* Enable interrupt */
NVIC_EnableIRQ(IRQn);
8001f76: 1dfb adds r3, r7, #7
8001f78: 781b ldrb r3, [r3, #0]
8001f7a: b25b sxtb r3, r3
8001f7c: 0018 movs r0, r3
8001f7e: f7ff ff33 bl 8001de8 <__NVIC_EnableIRQ>
}
8001f82: 46c0 nop ; (mov r8, r8)
8001f84: 46bd mov sp, r7
8001f86: b002 add sp, #8
8001f88: bd80 pop {r7, pc}
08001f8a <HAL_SYSTICK_Config>:
* @param TicksNumb Specifies the ticks Number of ticks between two interrupts.
* @retval status: - 0 Function succeeded.
* - 1 Function failed.
*/
uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb)
{
8001f8a: b580 push {r7, lr}
8001f8c: b082 sub sp, #8
8001f8e: af00 add r7, sp, #0
8001f90: 6078 str r0, [r7, #4]
return SysTick_Config(TicksNumb);
8001f92: 687b ldr r3, [r7, #4]
8001f94: 0018 movs r0, r3
8001f96: f7ff ffaf bl 8001ef8 <SysTick_Config>
8001f9a: 0003 movs r3, r0
}
8001f9c: 0018 movs r0, r3
8001f9e: 46bd mov sp, r7
8001fa0: b002 add sp, #8
8001fa2: bd80 pop {r7, pc}
08001fa4 <HAL_CRC_Init>:
* parameters in the CRC_InitTypeDef and create the associated handle.
* @param hcrc CRC handle
* @retval HAL status
*/
HAL_StatusTypeDef HAL_CRC_Init(CRC_HandleTypeDef *hcrc)
{
8001fa4: b580 push {r7, lr}
8001fa6: b082 sub sp, #8
8001fa8: af00 add r7, sp, #0
8001faa: 6078 str r0, [r7, #4]
/* Check the CRC handle allocation */
if (hcrc == NULL)
8001fac: 687b ldr r3, [r7, #4]
8001fae: 2b00 cmp r3, #0
8001fb0: d101 bne.n 8001fb6 <HAL_CRC_Init+0x12>
{
return HAL_ERROR;
8001fb2: 2301 movs r3, #1
8001fb4: e056 b.n 8002064 <HAL_CRC_Init+0xc0>
}
/* Check the parameters */
assert_param(IS_CRC_ALL_INSTANCE(hcrc->Instance));
if (hcrc->State == HAL_CRC_STATE_RESET)
8001fb6: 687b ldr r3, [r7, #4]
8001fb8: 7f5b ldrb r3, [r3, #29]
8001fba: b2db uxtb r3, r3
8001fbc: 2b00 cmp r3, #0
8001fbe: d106 bne.n 8001fce <HAL_CRC_Init+0x2a>
{
/* Allocate lock resource and initialize it */
hcrc->Lock = HAL_UNLOCKED;
8001fc0: 687b ldr r3, [r7, #4]
8001fc2: 2200 movs r2, #0
8001fc4: 771a strb r2, [r3, #28]
/* Init the low level hardware */
HAL_CRC_MspInit(hcrc);
8001fc6: 687b ldr r3, [r7, #4]
8001fc8: 0018 movs r0, r3
8001fca: f7ff fcd9 bl 8001980 <HAL_CRC_MspInit>
}
hcrc->State = HAL_CRC_STATE_BUSY;
8001fce: 687b ldr r3, [r7, #4]
8001fd0: 2202 movs r2, #2
8001fd2: 775a strb r2, [r3, #29]
/* check whether or not non-default generating polynomial has been
* picked up by user */
assert_param(IS_DEFAULT_POLYNOMIAL(hcrc->Init.DefaultPolynomialUse));
if (hcrc->Init.DefaultPolynomialUse == DEFAULT_POLYNOMIAL_ENABLE)
8001fd4: 687b ldr r3, [r7, #4]
8001fd6: 791b ldrb r3, [r3, #4]
8001fd8: 2b00 cmp r3, #0
8001fda: d10c bne.n 8001ff6 <HAL_CRC_Init+0x52>
{
/* initialize peripheral with default generating polynomial */
WRITE_REG(hcrc->Instance->POL, DEFAULT_CRC32_POLY);
8001fdc: 687b ldr r3, [r7, #4]
8001fde: 681b ldr r3, [r3, #0]
8001fe0: 4a22 ldr r2, [pc, #136] ; (800206c <HAL_CRC_Init+0xc8>)
8001fe2: 615a str r2, [r3, #20]
MODIFY_REG(hcrc->Instance->CR, CRC_CR_POLYSIZE, CRC_POLYLENGTH_32B);
8001fe4: 687b ldr r3, [r7, #4]
8001fe6: 681b ldr r3, [r3, #0]
8001fe8: 689a ldr r2, [r3, #8]
8001fea: 687b ldr r3, [r7, #4]
8001fec: 681b ldr r3, [r3, #0]
8001fee: 2118 movs r1, #24
8001ff0: 438a bics r2, r1
8001ff2: 609a str r2, [r3, #8]
8001ff4: e00b b.n 800200e <HAL_CRC_Init+0x6a>
}
else
{
/* initialize CRC peripheral with generating polynomial defined by user */
if (HAL_CRCEx_Polynomial_Set(hcrc, hcrc->Init.GeneratingPolynomial, hcrc->Init.CRCLength) != HAL_OK)
8001ff6: 687b ldr r3, [r7, #4]
8001ff8: 6899 ldr r1, [r3, #8]
8001ffa: 687b ldr r3, [r7, #4]
8001ffc: 68da ldr r2, [r3, #12]
8001ffe: 687b ldr r3, [r7, #4]
8002000: 0018 movs r0, r3
8002002: f000 f94c bl 800229e <HAL_CRCEx_Polynomial_Set>
8002006: 1e03 subs r3, r0, #0
8002008: d001 beq.n 800200e <HAL_CRC_Init+0x6a>
{
return HAL_ERROR;
800200a: 2301 movs r3, #1
800200c: e02a b.n 8002064 <HAL_CRC_Init+0xc0>
}
/* check whether or not non-default CRC initial value has been
* picked up by user */
assert_param(IS_DEFAULT_INIT_VALUE(hcrc->Init.DefaultInitValueUse));
if (hcrc->Init.DefaultInitValueUse == DEFAULT_INIT_VALUE_ENABLE)
800200e: 687b ldr r3, [r7, #4]
8002010: 795b ldrb r3, [r3, #5]
8002012: 2b00 cmp r3, #0
8002014: d105 bne.n 8002022 <HAL_CRC_Init+0x7e>
{
WRITE_REG(hcrc->Instance->INIT, DEFAULT_CRC_INITVALUE);
8002016: 687b ldr r3, [r7, #4]
8002018: 681b ldr r3, [r3, #0]
800201a: 2201 movs r2, #1
800201c: 4252 negs r2, r2
800201e: 611a str r2, [r3, #16]
8002020: e004 b.n 800202c <HAL_CRC_Init+0x88>
}
else
{
WRITE_REG(hcrc->Instance->INIT, hcrc->Init.InitValue);
8002022: 687b ldr r3, [r7, #4]
8002024: 681b ldr r3, [r3, #0]
8002026: 687a ldr r2, [r7, #4]
8002028: 6912 ldr r2, [r2, #16]
800202a: 611a str r2, [r3, #16]
}
/* set input data inversion mode */
assert_param(IS_CRC_INPUTDATA_INVERSION_MODE(hcrc->Init.InputDataInversionMode));
MODIFY_REG(hcrc->Instance->CR, CRC_CR_REV_IN, hcrc->Init.InputDataInversionMode);
800202c: 687b ldr r3, [r7, #4]
800202e: 681b ldr r3, [r3, #0]
8002030: 689b ldr r3, [r3, #8]
8002032: 2260 movs r2, #96 ; 0x60
8002034: 4393 bics r3, r2
8002036: 0019 movs r1, r3
8002038: 687b ldr r3, [r7, #4]
800203a: 695a ldr r2, [r3, #20]
800203c: 687b ldr r3, [r7, #4]
800203e: 681b ldr r3, [r3, #0]
8002040: 430a orrs r2, r1
8002042: 609a str r2, [r3, #8]
/* set output data inversion mode */
assert_param(IS_CRC_OUTPUTDATA_INVERSION_MODE(hcrc->Init.OutputDataInversionMode));
MODIFY_REG(hcrc->Instance->CR, CRC_CR_REV_OUT, hcrc->Init.OutputDataInversionMode);
8002044: 687b ldr r3, [r7, #4]
8002046: 681b ldr r3, [r3, #0]
8002048: 689b ldr r3, [r3, #8]
800204a: 2280 movs r2, #128 ; 0x80
800204c: 4393 bics r3, r2
800204e: 0019 movs r1, r3
8002050: 687b ldr r3, [r7, #4]
8002052: 699a ldr r2, [r3, #24]
8002054: 687b ldr r3, [r7, #4]
8002056: 681b ldr r3, [r3, #0]
8002058: 430a orrs r2, r1
800205a: 609a str r2, [r3, #8]
/* makes sure the input data format (bytes, halfwords or words stream)
* is properly specified by user */
assert_param(IS_CRC_INPUTDATA_FORMAT(hcrc->InputDataFormat));
/* Change CRC peripheral state */
hcrc->State = HAL_CRC_STATE_READY;
800205c: 687b ldr r3, [r7, #4]
800205e: 2201 movs r2, #1
8002060: 775a strb r2, [r3, #29]
/* Return function status */
return HAL_OK;
8002062: 2300 movs r3, #0
}
8002064: 0018 movs r0, r3
8002066: 46bd mov sp, r7
8002068: b002 add sp, #8
800206a: bd80 pop {r7, pc}
800206c: 04c11db7 .word 0x04c11db7
08002070 <HAL_CRC_Calculate>:
* and the API will internally adjust its input data processing based on the
* handle field hcrc->InputDataFormat.
* @retval uint32_t CRC (returned value LSBs for CRC shorter than 32 bits)
*/
uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength)
{
8002070: b580 push {r7, lr}
8002072: b086 sub sp, #24
8002074: af00 add r7, sp, #0
8002076: 60f8 str r0, [r7, #12]
8002078: 60b9 str r1, [r7, #8]
800207a: 607a str r2, [r7, #4]
uint32_t index; /* CRC input data buffer index */
uint32_t temp = 0U; /* CRC output (read from hcrc->Instance->DR register) */
800207c: 2300 movs r3, #0
800207e: 613b str r3, [r7, #16]
/* Change CRC peripheral state */
hcrc->State = HAL_CRC_STATE_BUSY;
8002080: 68fb ldr r3, [r7, #12]
8002082: 2202 movs r2, #2
8002084: 775a strb r2, [r3, #29]
/* Reset CRC Calculation Unit (hcrc->Instance->INIT is
* written in hcrc->Instance->DR) */
__HAL_CRC_DR_RESET(hcrc);
8002086: 68fb ldr r3, [r7, #12]
8002088: 681b ldr r3, [r3, #0]
800208a: 689a ldr r2, [r3, #8]
800208c: 68fb ldr r3, [r7, #12]
800208e: 681b ldr r3, [r3, #0]
8002090: 2101 movs r1, #1
8002092: 430a orrs r2, r1
8002094: 609a str r2, [r3, #8]
switch (hcrc->InputDataFormat)
8002096: 68fb ldr r3, [r7, #12]
8002098: 6a1b ldr r3, [r3, #32]
800209a: 2b03 cmp r3, #3
800209c: d005 beq.n 80020aa <HAL_CRC_Calculate+0x3a>
800209e: d82d bhi.n 80020fc <HAL_CRC_Calculate+0x8c>
80020a0: 2b01 cmp r3, #1
80020a2: d019 beq.n 80020d8 <HAL_CRC_Calculate+0x68>
80020a4: 2b02 cmp r3, #2
80020a6: d020 beq.n 80020ea <HAL_CRC_Calculate+0x7a>
/* Specific 16-bit input data handling */
temp = CRC_Handle_16(hcrc, (uint16_t *)(void *)pBuffer, BufferLength); /* Derogation MisraC2012 R.11.5 */
break;
default:
break;
80020a8: e028 b.n 80020fc <HAL_CRC_Calculate+0x8c>
for (index = 0U; index < BufferLength; index++)
80020aa: 2300 movs r3, #0
80020ac: 617b str r3, [r7, #20]
80020ae: e00a b.n 80020c6 <HAL_CRC_Calculate+0x56>
hcrc->Instance->DR = pBuffer[index];
80020b0: 697b ldr r3, [r7, #20]
80020b2: 009b lsls r3, r3, #2
80020b4: 68ba ldr r2, [r7, #8]
80020b6: 18d2 adds r2, r2, r3
80020b8: 68fb ldr r3, [r7, #12]
80020ba: 681b ldr r3, [r3, #0]
80020bc: 6812 ldr r2, [r2, #0]
80020be: 601a str r2, [r3, #0]
for (index = 0U; index < BufferLength; index++)
80020c0: 697b ldr r3, [r7, #20]
80020c2: 3301 adds r3, #1
80020c4: 617b str r3, [r7, #20]
80020c6: 697a ldr r2, [r7, #20]
80020c8: 687b ldr r3, [r7, #4]
80020ca: 429a cmp r2, r3
80020cc: d3f0 bcc.n 80020b0 <HAL_CRC_Calculate+0x40>
temp = hcrc->Instance->DR;
80020ce: 68fb ldr r3, [r7, #12]
80020d0: 681b ldr r3, [r3, #0]
80020d2: 681b ldr r3, [r3, #0]
80020d4: 613b str r3, [r7, #16]
break;
80020d6: e012 b.n 80020fe <HAL_CRC_Calculate+0x8e>
temp = CRC_Handle_8(hcrc, (uint8_t *)pBuffer, BufferLength);
80020d8: 687a ldr r2, [r7, #4]
80020da: 68b9 ldr r1, [r7, #8]
80020dc: 68fb ldr r3, [r7, #12]
80020de: 0018 movs r0, r3
80020e0: f000 f815 bl 800210e <CRC_Handle_8>
80020e4: 0003 movs r3, r0
80020e6: 613b str r3, [r7, #16]
break;
80020e8: e009 b.n 80020fe <HAL_CRC_Calculate+0x8e>
temp = CRC_Handle_16(hcrc, (uint16_t *)(void *)pBuffer, BufferLength); /* Derogation MisraC2012 R.11.5 */
80020ea: 687a ldr r2, [r7, #4]
80020ec: 68b9 ldr r1, [r7, #8]
80020ee: 68fb ldr r3, [r7, #12]
80020f0: 0018 movs r0, r3
80020f2: f000 f89d bl 8002230 <CRC_Handle_16>
80020f6: 0003 movs r3, r0
80020f8: 613b str r3, [r7, #16]
break;
80020fa: e000 b.n 80020fe <HAL_CRC_Calculate+0x8e>
break;
80020fc: 46c0 nop ; (mov r8, r8)
}
/* Change CRC peripheral state */
hcrc->State = HAL_CRC_STATE_READY;
80020fe: 68fb ldr r3, [r7, #12]
8002100: 2201 movs r2, #1
8002102: 775a strb r2, [r3, #29]
/* Return the CRC computed value */
return temp;
8002104: 693b ldr r3, [r7, #16]
}
8002106: 0018 movs r0, r3
8002108: 46bd mov sp, r7
800210a: b006 add sp, #24
800210c: bd80 pop {r7, pc}
0800210e <CRC_Handle_8>:
* @param pBuffer pointer to the input data buffer
* @param BufferLength input data buffer length
* @retval uint32_t CRC (returned value LSBs for CRC shorter than 32 bits)
*/
static uint32_t CRC_Handle_8(CRC_HandleTypeDef *hcrc, uint8_t pBuffer[], uint32_t BufferLength)
{
800210e: b580 push {r7, lr}
8002110: b088 sub sp, #32
8002112: af00 add r7, sp, #0
8002114: 60f8 str r0, [r7, #12]
8002116: 60b9 str r1, [r7, #8]
8002118: 607a str r2, [r7, #4]
__IO uint16_t *pReg;
/* Processing time optimization: 4 bytes are entered in a row with a single word write,
* last bytes must be carefully fed to the CRC calculator to ensure a correct type
* handling by the peripheral */
for (i = 0U; i < (BufferLength / 4U); i++)
800211a: 2300 movs r3, #0
800211c: 61fb str r3, [r7, #28]
800211e: e023 b.n 8002168 <CRC_Handle_8+0x5a>
{
hcrc->Instance->DR = ((uint32_t)pBuffer[4U * i] << 24U) | \
8002120: 69fb ldr r3, [r7, #28]
8002122: 009b lsls r3, r3, #2
8002124: 68ba ldr r2, [r7, #8]
8002126: 18d3 adds r3, r2, r3
8002128: 781b ldrb r3, [r3, #0]
800212a: 061a lsls r2, r3, #24
((uint32_t)pBuffer[(4U * i) + 1U] << 16U) | \
800212c: 69fb ldr r3, [r7, #28]
800212e: 009b lsls r3, r3, #2
8002130: 3301 adds r3, #1
8002132: 68b9 ldr r1, [r7, #8]
8002134: 18cb adds r3, r1, r3
8002136: 781b ldrb r3, [r3, #0]
8002138: 041b lsls r3, r3, #16
hcrc->Instance->DR = ((uint32_t)pBuffer[4U * i] << 24U) | \
800213a: 431a orrs r2, r3
((uint32_t)pBuffer[(4U * i) + 2U] << 8U) | \
800213c: 69fb ldr r3, [r7, #28]
800213e: 009b lsls r3, r3, #2
8002140: 3302 adds r3, #2
8002142: 68b9 ldr r1, [r7, #8]
8002144: 18cb adds r3, r1, r3
8002146: 781b ldrb r3, [r3, #0]
8002148: 021b lsls r3, r3, #8
((uint32_t)pBuffer[(4U * i) + 1U] << 16U) | \
800214a: 431a orrs r2, r3
(uint32_t)pBuffer[(4U * i) + 3U];
800214c: 69fb ldr r3, [r7, #28]
800214e: 009b lsls r3, r3, #2
8002150: 3303 adds r3, #3
8002152: 68b9 ldr r1, [r7, #8]
8002154: 18cb adds r3, r1, r3
8002156: 781b ldrb r3, [r3, #0]
8002158: 0019 movs r1, r3
hcrc->Instance->DR = ((uint32_t)pBuffer[4U * i] << 24U) | \
800215a: 68fb ldr r3, [r7, #12]
800215c: 681b ldr r3, [r3, #0]
((uint32_t)pBuffer[(4U * i) + 2U] << 8U) | \
800215e: 430a orrs r2, r1
hcrc->Instance->DR = ((uint32_t)pBuffer[4U * i] << 24U) | \
8002160: 601a str r2, [r3, #0]
for (i = 0U; i < (BufferLength / 4U); i++)
8002162: 69fb ldr r3, [r7, #28]
8002164: 3301 adds r3, #1
8002166: 61fb str r3, [r7, #28]
8002168: 687b ldr r3, [r7, #4]
800216a: 089b lsrs r3, r3, #2
800216c: 69fa ldr r2, [r7, #28]
800216e: 429a cmp r2, r3
8002170: d3d6 bcc.n 8002120 <CRC_Handle_8+0x12>
}
/* last bytes specific handling */
if ((BufferLength % 4U) != 0U)
8002172: 687b ldr r3, [r7, #4]
8002174: 2203 movs r2, #3
8002176: 4013 ands r3, r2
8002178: d053 beq.n 8002222 <CRC_Handle_8+0x114>
{
if ((BufferLength % 4U) == 1U)
800217a: 687b ldr r3, [r7, #4]
800217c: 2203 movs r2, #3
800217e: 4013 ands r3, r2
8002180: 2b01 cmp r3, #1
8002182: d107 bne.n 8002194 <CRC_Handle_8+0x86>
{
*(__IO uint8_t *)(__IO void *)(&hcrc->Instance->DR) = pBuffer[4U * i]; /* Derogation MisraC2012 R.11.5 */
8002184: 69fb ldr r3, [r7, #28]
8002186: 009b lsls r3, r3, #2
8002188: 68ba ldr r2, [r7, #8]
800218a: 18d2 adds r2, r2, r3
800218c: 68fb ldr r3, [r7, #12]
800218e: 681b ldr r3, [r3, #0]
8002190: 7812 ldrb r2, [r2, #0]
8002192: 701a strb r2, [r3, #0]
}
if ((BufferLength % 4U) == 2U)
8002194: 687b ldr r3, [r7, #4]
8002196: 2203 movs r2, #3
8002198: 4013 ands r3, r2
800219a: 2b02 cmp r3, #2
800219c: d119 bne.n 80021d2 <CRC_Handle_8+0xc4>
{
data = ((uint16_t)(pBuffer[4U * i]) << 8U) | (uint16_t)pBuffer[(4U * i) + 1U];
800219e: 69fb ldr r3, [r7, #28]
80021a0: 009b lsls r3, r3, #2
80021a2: 68ba ldr r2, [r7, #8]
80021a4: 18d3 adds r3, r2, r3
80021a6: 781b ldrb r3, [r3, #0]
80021a8: 021b lsls r3, r3, #8
80021aa: b21a sxth r2, r3
80021ac: 69fb ldr r3, [r7, #28]
80021ae: 009b lsls r3, r3, #2
80021b0: 3301 adds r3, #1
80021b2: 68b9 ldr r1, [r7, #8]
80021b4: 18cb adds r3, r1, r3
80021b6: 781b ldrb r3, [r3, #0]
80021b8: b21b sxth r3, r3
80021ba: 4313 orrs r3, r2
80021bc: b21a sxth r2, r3
80021be: 211a movs r1, #26
80021c0: 187b adds r3, r7, r1
80021c2: 801a strh r2, [r3, #0]
pReg = (__IO uint16_t *)(__IO void *)(&hcrc->Instance->DR); /* Derogation MisraC2012 R.11.5 */
80021c4: 68fb ldr r3, [r7, #12]
80021c6: 681b ldr r3, [r3, #0]
80021c8: 617b str r3, [r7, #20]
*pReg = data;
80021ca: 697b ldr r3, [r7, #20]
80021cc: 187a adds r2, r7, r1
80021ce: 8812 ldrh r2, [r2, #0]
80021d0: 801a strh r2, [r3, #0]
}
if ((BufferLength % 4U) == 3U)
80021d2: 687b ldr r3, [r7, #4]
80021d4: 2203 movs r2, #3
80021d6: 4013 ands r3, r2
80021d8: 2b03 cmp r3, #3
80021da: d122 bne.n 8002222 <CRC_Handle_8+0x114>
{
data = ((uint16_t)(pBuffer[4U * i]) << 8U) | (uint16_t)pBuffer[(4U * i) + 1U];
80021dc: 69fb ldr r3, [r7, #28]
80021de: 009b lsls r3, r3, #2
80021e0: 68ba ldr r2, [r7, #8]
80021e2: 18d3 adds r3, r2, r3
80021e4: 781b ldrb r3, [r3, #0]
80021e6: 021b lsls r3, r3, #8
80021e8: b21a sxth r2, r3
80021ea: 69fb ldr r3, [r7, #28]
80021ec: 009b lsls r3, r3, #2
80021ee: 3301 adds r3, #1
80021f0: 68b9 ldr r1, [r7, #8]
80021f2: 18cb adds r3, r1, r3
80021f4: 781b ldrb r3, [r3, #0]
80021f6: b21b sxth r3, r3
80021f8: 4313 orrs r3, r2
80021fa: b21a sxth r2, r3
80021fc: 211a movs r1, #26
80021fe: 187b adds r3, r7, r1
8002200: 801a strh r2, [r3, #0]
pReg = (__IO uint16_t *)(__IO void *)(&hcrc->Instance->DR); /* Derogation MisraC2012 R.11.5 */
8002202: 68fb ldr r3, [r7, #12]
8002204: 681b ldr r3, [r3, #0]
8002206: 617b str r3, [r7, #20]
*pReg = data;
8002208: 697b ldr r3, [r7, #20]
800220a: 187a adds r2, r7, r1
800220c: 8812 ldrh r2, [r2, #0]
800220e: 801a strh r2, [r3, #0]
*(__IO uint8_t *)(__IO void *)(&hcrc->Instance->DR) = pBuffer[(4U * i) + 2U]; /* Derogation MisraC2012 R.11.5 */
8002210: 69fb ldr r3, [r7, #28]
8002212: 009b lsls r3, r3, #2
8002214: 3302 adds r3, #2
8002216: 68ba ldr r2, [r7, #8]
8002218: 18d2 adds r2, r2, r3
800221a: 68fb ldr r3, [r7, #12]
800221c: 681b ldr r3, [r3, #0]
800221e: 7812 ldrb r2, [r2, #0]
8002220: 701a strb r2, [r3, #0]
}
}
/* Return the CRC computed value */
return hcrc->Instance->DR;
8002222: 68fb ldr r3, [r7, #12]
8002224: 681b ldr r3, [r3, #0]
8002226: 681b ldr r3, [r3, #0]
}
8002228: 0018 movs r0, r3
800222a: 46bd mov sp, r7
800222c: b008 add sp, #32
800222e: bd80 pop {r7, pc}
08002230 <CRC_Handle_16>:
* @param pBuffer pointer to the input data buffer
* @param BufferLength input data buffer length
* @retval uint32_t CRC (returned value LSBs for CRC shorter than 32 bits)
*/
static uint32_t CRC_Handle_16(CRC_HandleTypeDef *hcrc, uint16_t pBuffer[], uint32_t BufferLength)
{
8002230: b580 push {r7, lr}
8002232: b086 sub sp, #24
8002234: af00 add r7, sp, #0
8002236: 60f8 str r0, [r7, #12]
8002238: 60b9 str r1, [r7, #8]
800223a: 607a str r2, [r7, #4]
__IO uint16_t *pReg;
/* Processing time optimization: 2 HalfWords are entered in a row with a single word write,
* in case of odd length, last HalfWord must be carefully fed to the CRC calculator to ensure
* a correct type handling by the peripheral */
for (i = 0U; i < (BufferLength / 2U); i++)
800223c: 2300 movs r3, #0
800223e: 617b str r3, [r7, #20]
8002240: e013 b.n 800226a <CRC_Handle_16+0x3a>
{
hcrc->Instance->DR = ((uint32_t)pBuffer[2U * i] << 16U) | (uint32_t)pBuffer[(2U * i) + 1U];
8002242: 697b ldr r3, [r7, #20]
8002244: 009b lsls r3, r3, #2
8002246: 68ba ldr r2, [r7, #8]
8002248: 18d3 adds r3, r2, r3
800224a: 881b ldrh r3, [r3, #0]
800224c: 041a lsls r2, r3, #16
800224e: 697b ldr r3, [r7, #20]
8002250: 009b lsls r3, r3, #2
8002252: 3302 adds r3, #2
8002254: 68b9 ldr r1, [r7, #8]
8002256: 18cb adds r3, r1, r3
8002258: 881b ldrh r3, [r3, #0]
800225a: 0019 movs r1, r3
800225c: 68fb ldr r3, [r7, #12]
800225e: 681b ldr r3, [r3, #0]
8002260: 430a orrs r2, r1
8002262: 601a str r2, [r3, #0]
for (i = 0U; i < (BufferLength / 2U); i++)
8002264: 697b ldr r3, [r7, #20]
8002266: 3301 adds r3, #1
8002268: 617b str r3, [r7, #20]
800226a: 687b ldr r3, [r7, #4]
800226c: 085b lsrs r3, r3, #1
800226e: 697a ldr r2, [r7, #20]
8002270: 429a cmp r2, r3
8002272: d3e6 bcc.n 8002242 <CRC_Handle_16+0x12>
}
if ((BufferLength % 2U) != 0U)
8002274: 687b ldr r3, [r7, #4]
8002276: 2201 movs r2, #1
8002278: 4013 ands r3, r2
800227a: d009 beq.n 8002290 <CRC_Handle_16+0x60>
{
pReg = (__IO uint16_t *)(__IO void *)(&hcrc->Instance->DR); /* Derogation MisraC2012 R.11.5 */
800227c: 68fb ldr r3, [r7, #12]
800227e: 681b ldr r3, [r3, #0]
8002280: 613b str r3, [r7, #16]
*pReg = pBuffer[2U * i];
8002282: 697b ldr r3, [r7, #20]
8002284: 009b lsls r3, r3, #2
8002286: 68ba ldr r2, [r7, #8]
8002288: 18d3 adds r3, r2, r3
800228a: 881a ldrh r2, [r3, #0]
800228c: 693b ldr r3, [r7, #16]
800228e: 801a strh r2, [r3, #0]
}
/* Return the CRC computed value */
return hcrc->Instance->DR;
8002290: 68fb ldr r3, [r7, #12]
8002292: 681b ldr r3, [r3, #0]
8002294: 681b ldr r3, [r3, #0]
}
8002296: 0018 movs r0, r3
8002298: 46bd mov sp, r7
800229a: b006 add sp, #24
800229c: bd80 pop {r7, pc}
0800229e <HAL_CRCEx_Polynomial_Set>:
* @arg @ref CRC_POLYLENGTH_16B 16-bit long CRC (generating polynomial of degree 16)
* @arg @ref CRC_POLYLENGTH_32B 32-bit long CRC (generating polynomial of degree 32)
* @retval HAL status
*/
HAL_StatusTypeDef HAL_CRCEx_Polynomial_Set(CRC_HandleTypeDef *hcrc, uint32_t Pol, uint32_t PolyLength)
{
800229e: b580 push {r7, lr}
80022a0: b086 sub sp, #24
80022a2: af00 add r7, sp, #0
80022a4: 60f8 str r0, [r7, #12]
80022a6: 60b9 str r1, [r7, #8]
80022a8: 607a str r2, [r7, #4]
HAL_StatusTypeDef status = HAL_OK;
80022aa: 2317 movs r3, #23
80022ac: 18fb adds r3, r7, r3
80022ae: 2200 movs r2, #0
80022b0: 701a strb r2, [r3, #0]
uint32_t msb = 31U; /* polynomial degree is 32 at most, so msb is initialized to max value */
80022b2: 231f movs r3, #31
80022b4: 613b str r3, [r7, #16]
* definition. HAL_ERROR is reported if Pol degree is
* larger than that indicated by PolyLength.
* Look for MSB position: msb will contain the degree of
* the second to the largest polynomial member. E.g., for
* X^7 + X^6 + X^5 + X^2 + 1, msb = 6. */
while ((msb-- > 0U) && ((Pol & ((uint32_t)(0x1U) << (msb & 0x1FU))) == 0U))
80022b6: 46c0 nop ; (mov r8, r8)
80022b8: 693b ldr r3, [r7, #16]
80022ba: 1e5a subs r2, r3, #1
80022bc: 613a str r2, [r7, #16]
80022be: 2b00 cmp r3, #0
80022c0: d008 beq.n 80022d4 <HAL_CRCEx_Polynomial_Set+0x36>
80022c2: 693b ldr r3, [r7, #16]
80022c4: 221f movs r2, #31
80022c6: 4013 ands r3, r2
80022c8: 68ba ldr r2, [r7, #8]
80022ca: 40da lsrs r2, r3
80022cc: 0013 movs r3, r2
80022ce: 2201 movs r2, #1
80022d0: 4013 ands r3, r2
80022d2: d0f1 beq.n 80022b8 <HAL_CRCEx_Polynomial_Set+0x1a>
{
}
switch (PolyLength)
80022d4: 687b ldr r3, [r7, #4]
80022d6: 2b18 cmp r3, #24
80022d8: d00f beq.n 80022fa <HAL_CRCEx_Polynomial_Set+0x5c>
80022da: 687b ldr r3, [r7, #4]
80022dc: 2b18 cmp r3, #24
80022de: d824 bhi.n 800232a <HAL_CRCEx_Polynomial_Set+0x8c>
80022e0: 687b ldr r3, [r7, #4]
80022e2: 2b10 cmp r3, #16
80022e4: d011 beq.n 800230a <HAL_CRCEx_Polynomial_Set+0x6c>
80022e6: 687b ldr r3, [r7, #4]
80022e8: 2b10 cmp r3, #16
80022ea: d81e bhi.n 800232a <HAL_CRCEx_Polynomial_Set+0x8c>
80022ec: 687b ldr r3, [r7, #4]
80022ee: 2b00 cmp r3, #0
80022f0: d020 beq.n 8002334 <HAL_CRCEx_Polynomial_Set+0x96>
80022f2: 687b ldr r3, [r7, #4]
80022f4: 2b08 cmp r3, #8
80022f6: d010 beq.n 800231a <HAL_CRCEx_Polynomial_Set+0x7c>
80022f8: e017 b.n 800232a <HAL_CRCEx_Polynomial_Set+0x8c>
{
case CRC_POLYLENGTH_7B:
if (msb >= HAL_CRC_LENGTH_7B)
80022fa: 693b ldr r3, [r7, #16]
80022fc: 2b06 cmp r3, #6
80022fe: d91b bls.n 8002338 <HAL_CRCEx_Polynomial_Set+0x9a>
{
status = HAL_ERROR;
8002300: 2317 movs r3, #23
8002302: 18fb adds r3, r7, r3
8002304: 2201 movs r2, #1
8002306: 701a strb r2, [r3, #0]
}
break;
8002308: e016 b.n 8002338 <HAL_CRCEx_Polynomial_Set+0x9a>
case CRC_POLYLENGTH_8B:
if (msb >= HAL_CRC_LENGTH_8B)
800230a: 693b ldr r3, [r7, #16]
800230c: 2b07 cmp r3, #7
800230e: d915 bls.n 800233c <HAL_CRCEx_Polynomial_Set+0x9e>
{
status = HAL_ERROR;
8002310: 2317 movs r3, #23
8002312: 18fb adds r3, r7, r3
8002314: 2201 movs r2, #1
8002316: 701a strb r2, [r3, #0]
}
break;
8002318: e010 b.n 800233c <HAL_CRCEx_Polynomial_Set+0x9e>
case CRC_POLYLENGTH_16B:
if (msb >= HAL_CRC_LENGTH_16B)
800231a: 693b ldr r3, [r7, #16]
800231c: 2b0f cmp r3, #15
800231e: d90f bls.n 8002340 <HAL_CRCEx_Polynomial_Set+0xa2>
{
status = HAL_ERROR;
8002320: 2317 movs r3, #23
8002322: 18fb adds r3, r7, r3
8002324: 2201 movs r2, #1
8002326: 701a strb r2, [r3, #0]
}
break;
8002328: e00a b.n 8002340 <HAL_CRCEx_Polynomial_Set+0xa2>
case CRC_POLYLENGTH_32B:
/* no polynomial definition vs. polynomial length issue possible */
break;
default:
status = HAL_ERROR;
800232a: 2317 movs r3, #23
800232c: 18fb adds r3, r7, r3
800232e: 2201 movs r2, #1
8002330: 701a strb r2, [r3, #0]
break;
8002332: e006 b.n 8002342 <HAL_CRCEx_Polynomial_Set+0xa4>
break;
8002334: 46c0 nop ; (mov r8, r8)
8002336: e004 b.n 8002342 <HAL_CRCEx_Polynomial_Set+0xa4>
break;
8002338: 46c0 nop ; (mov r8, r8)
800233a: e002 b.n 8002342 <HAL_CRCEx_Polynomial_Set+0xa4>
break;
800233c: 46c0 nop ; (mov r8, r8)
800233e: e000 b.n 8002342 <HAL_CRCEx_Polynomial_Set+0xa4>
break;
8002340: 46c0 nop ; (mov r8, r8)
}
if (status == HAL_OK)
8002342: 2317 movs r3, #23
8002344: 18fb adds r3, r7, r3
8002346: 781b ldrb r3, [r3, #0]
8002348: 2b00 cmp r3, #0
800234a: d10e bne.n 800236a <HAL_CRCEx_Polynomial_Set+0xcc>
{
/* set generating polynomial */
WRITE_REG(hcrc->Instance->POL, Pol);
800234c: 68fb ldr r3, [r7, #12]
800234e: 681b ldr r3, [r3, #0]
8002350: 68ba ldr r2, [r7, #8]
8002352: 615a str r2, [r3, #20]
/* set generating polynomial size */
MODIFY_REG(hcrc->Instance->CR, CRC_CR_POLYSIZE, PolyLength);
8002354: 68fb ldr r3, [r7, #12]
8002356: 681b ldr r3, [r3, #0]
8002358: 689b ldr r3, [r3, #8]
800235a: 2218 movs r2, #24
800235c: 4393 bics r3, r2
800235e: 0019 movs r1, r3
8002360: 68fb ldr r3, [r7, #12]
8002362: 681b ldr r3, [r3, #0]
8002364: 687a ldr r2, [r7, #4]
8002366: 430a orrs r2, r1
8002368: 609a str r2, [r3, #8]
}
/* Return function status */
return status;
800236a: 2317 movs r3, #23
800236c: 18fb adds r3, r7, r3
800236e: 781b ldrb r3, [r3, #0]
}
8002370: 0018 movs r0, r3
8002372: 46bd mov sp, r7
8002374: b006 add sp, #24
8002376: bd80 pop {r7, pc}
08002378 <HAL_FLASH_Program>:
* TypeProgram = FLASH_TYPEPROGRAM_FAST (32-bit).
*
* @retval HAL_StatusTypeDef HAL Status
*/
HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t Address, uint64_t Data)
{
8002378: b5b0 push {r4, r5, r7, lr}
800237a: b086 sub sp, #24
800237c: af00 add r7, sp, #0
800237e: 60f8 str r0, [r7, #12]
8002380: 60b9 str r1, [r7, #8]
8002382: 603a str r2, [r7, #0]
8002384: 607b str r3, [r7, #4]
/* Check the parameters */
assert_param(IS_FLASH_TYPEPROGRAM(TypeProgram));
/* Process Locked */
__HAL_LOCK(&pFlash);
8002386: 4b21 ldr r3, [pc, #132] ; (800240c <HAL_FLASH_Program+0x94>)
8002388: 781b ldrb r3, [r3, #0]
800238a: 2b01 cmp r3, #1
800238c: d101 bne.n 8002392 <HAL_FLASH_Program+0x1a>
800238e: 2302 movs r3, #2
8002390: e038 b.n 8002404 <HAL_FLASH_Program+0x8c>
8002392: 4b1e ldr r3, [pc, #120] ; (800240c <HAL_FLASH_Program+0x94>)
8002394: 2201 movs r2, #1
8002396: 701a strb r2, [r3, #0]
/* Reset error code */
pFlash.ErrorCode = HAL_FLASH_ERROR_NONE;
8002398: 4b1c ldr r3, [pc, #112] ; (800240c <HAL_FLASH_Program+0x94>)
800239a: 2200 movs r2, #0
800239c: 605a str r2, [r3, #4]
/* Wait for last operation to be completed */
status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE);
800239e: 2517 movs r5, #23
80023a0: 197c adds r4, r7, r5
80023a2: 23fa movs r3, #250 ; 0xfa
80023a4: 009b lsls r3, r3, #2
80023a6: 0018 movs r0, r3
80023a8: f000 f874 bl 8002494 <FLASH_WaitForLastOperation>
80023ac: 0003 movs r3, r0
80023ae: 7023 strb r3, [r4, #0]
if (status == HAL_OK)
80023b0: 197b adds r3, r7, r5
80023b2: 781b ldrb r3, [r3, #0]
80023b4: 2b00 cmp r3, #0
80023b6: d11f bne.n 80023f8 <HAL_FLASH_Program+0x80>
{
if (TypeProgram == FLASH_TYPEPROGRAM_DOUBLEWORD)
80023b8: 68fb ldr r3, [r7, #12]
80023ba: 2b01 cmp r3, #1
80023bc: d106 bne.n 80023cc <HAL_FLASH_Program+0x54>
{
/* Check the parameters */
assert_param(IS_FLASH_PROGRAM_ADDRESS(Address));
/* Program double-word (64-bit) at a specified address */
FLASH_Program_DoubleWord(Address, Data);
80023be: 683a ldr r2, [r7, #0]
80023c0: 687b ldr r3, [r7, #4]
80023c2: 68b9 ldr r1, [r7, #8]
80023c4: 0008 movs r0, r1
80023c6: f000 f8b3 bl 8002530 <FLASH_Program_DoubleWord>
80023ca: e005 b.n 80023d8 <HAL_FLASH_Program+0x60>
{
/* Check the parameters */
assert_param(IS_FLASH_FAST_PROGRAM_ADDRESS(Address));
/* Fast program a 32 row double-word (64-bit) at a specified address */
FLASH_Program_Fast(Address, (uint32_t)Data);
80023cc: 683a ldr r2, [r7, #0]
80023ce: 68bb ldr r3, [r7, #8]
80023d0: 0011 movs r1, r2
80023d2: 0018 movs r0, r3
80023d4: f004 f9e0 bl 8006798 <__FLASH_Program_Fast_veneer>
}
/* Wait for last operation to be completed */
status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE);
80023d8: 2317 movs r3, #23
80023da: 18fc adds r4, r7, r3
80023dc: 23fa movs r3, #250 ; 0xfa
80023de: 009b lsls r3, r3, #2
80023e0: 0018 movs r0, r3
80023e2: f000 f857 bl 8002494 <FLASH_WaitForLastOperation>
80023e6: 0003 movs r3, r0
80023e8: 7023 strb r3, [r4, #0]
/* If the program operation is completed, disable the PG or FSTPG Bit */
CLEAR_BIT(FLASH->CR, TypeProgram);
80023ea: 4b09 ldr r3, [pc, #36] ; (8002410 <HAL_FLASH_Program+0x98>)
80023ec: 695a ldr r2, [r3, #20]
80023ee: 68fb ldr r3, [r7, #12]
80023f0: 43d9 mvns r1, r3
80023f2: 4b07 ldr r3, [pc, #28] ; (8002410 <HAL_FLASH_Program+0x98>)
80023f4: 400a ands r2, r1
80023f6: 615a str r2, [r3, #20]
}
/* Process Unlocked */
__HAL_UNLOCK(&pFlash);
80023f8: 4b04 ldr r3, [pc, #16] ; (800240c <HAL_FLASH_Program+0x94>)
80023fa: 2200 movs r2, #0
80023fc: 701a strb r2, [r3, #0]
/* return status */
return status;
80023fe: 2317 movs r3, #23
8002400: 18fb adds r3, r7, r3
8002402: 781b ldrb r3, [r3, #0]
}
8002404: 0018 movs r0, r3
8002406: 46bd mov sp, r7
8002408: b006 add sp, #24
800240a: bdb0 pop {r4, r5, r7, pc}
800240c: 2000023c .word 0x2000023c
8002410: 40022000 .word 0x40022000
08002414 <HAL_FLASH_Unlock>:
/**
* @brief Unlock the FLASH control register access.
* @retval HAL Status
*/
HAL_StatusTypeDef HAL_FLASH_Unlock(void)
{
8002414: b580 push {r7, lr}
8002416: b082 sub sp, #8
8002418: af00 add r7, sp, #0
HAL_StatusTypeDef status = HAL_OK;
800241a: 1dfb adds r3, r7, #7
800241c: 2200 movs r2, #0
800241e: 701a strb r2, [r3, #0]
if (READ_BIT(FLASH->CR, FLASH_CR_LOCK) != 0x00U)
8002420: 4b0b ldr r3, [pc, #44] ; (8002450 <HAL_FLASH_Unlock+0x3c>)
8002422: 695b ldr r3, [r3, #20]
8002424: 2b00 cmp r3, #0
8002426: da0c bge.n 8002442 <HAL_FLASH_Unlock+0x2e>
{
/* Authorize the FLASH Registers access */
WRITE_REG(FLASH->KEYR, FLASH_KEY1);
8002428: 4b09 ldr r3, [pc, #36] ; (8002450 <HAL_FLASH_Unlock+0x3c>)
800242a: 4a0a ldr r2, [pc, #40] ; (8002454 <HAL_FLASH_Unlock+0x40>)
800242c: 609a str r2, [r3, #8]
WRITE_REG(FLASH->KEYR, FLASH_KEY2);
800242e: 4b08 ldr r3, [pc, #32] ; (8002450 <HAL_FLASH_Unlock+0x3c>)
8002430: 4a09 ldr r2, [pc, #36] ; (8002458 <HAL_FLASH_Unlock+0x44>)
8002432: 609a str r2, [r3, #8]
/* verify Flash is unlock */
if (READ_BIT(FLASH->CR, FLASH_CR_LOCK) != 0x00U)
8002434: 4b06 ldr r3, [pc, #24] ; (8002450 <HAL_FLASH_Unlock+0x3c>)
8002436: 695b ldr r3, [r3, #20]
8002438: 2b00 cmp r3, #0
800243a: da02 bge.n 8002442 <HAL_FLASH_Unlock+0x2e>
{
status = HAL_ERROR;
800243c: 1dfb adds r3, r7, #7
800243e: 2201 movs r2, #1
8002440: 701a strb r2, [r3, #0]
}
}
return status;
8002442: 1dfb adds r3, r7, #7
8002444: 781b ldrb r3, [r3, #0]
}
8002446: 0018 movs r0, r3
8002448: 46bd mov sp, r7
800244a: b002 add sp, #8
800244c: bd80 pop {r7, pc}
800244e: 46c0 nop ; (mov r8, r8)
8002450: 40022000 .word 0x40022000
8002454: 45670123 .word 0x45670123
8002458: cdef89ab .word 0xcdef89ab
0800245c <HAL_FLASH_Lock>:
/**
* @brief Lock the FLASH control register access.
* @retval HAL Status
*/
HAL_StatusTypeDef HAL_FLASH_Lock(void)
{
800245c: b580 push {r7, lr}
800245e: b082 sub sp, #8
8002460: af00 add r7, sp, #0
HAL_StatusTypeDef status = HAL_ERROR;
8002462: 1dfb adds r3, r7, #7
8002464: 2201 movs r2, #1
8002466: 701a strb r2, [r3, #0]
/* Set the LOCK Bit to lock the FLASH Registers access */
SET_BIT(FLASH->CR, FLASH_CR_LOCK);
8002468: 4b09 ldr r3, [pc, #36] ; (8002490 <HAL_FLASH_Lock+0x34>)
800246a: 695a ldr r2, [r3, #20]
800246c: 4b08 ldr r3, [pc, #32] ; (8002490 <HAL_FLASH_Lock+0x34>)
800246e: 2180 movs r1, #128 ; 0x80
8002470: 0609 lsls r1, r1, #24
8002472: 430a orrs r2, r1
8002474: 615a str r2, [r3, #20]
/* verify Flash is locked */
if (READ_BIT(FLASH->CR, FLASH_CR_LOCK) != 0x00u)
8002476: 4b06 ldr r3, [pc, #24] ; (8002490 <HAL_FLASH_Lock+0x34>)
8002478: 695b ldr r3, [r3, #20]
800247a: 2b00 cmp r3, #0
800247c: da02 bge.n 8002484 <HAL_FLASH_Lock+0x28>
{
status = HAL_OK;
800247e: 1dfb adds r3, r7, #7
8002480: 2200 movs r2, #0
8002482: 701a strb r2, [r3, #0]
}
return status;
8002484: 1dfb adds r3, r7, #7
8002486: 781b ldrb r3, [r3, #0]
}
8002488: 0018 movs r0, r3
800248a: 46bd mov sp, r7
800248c: b002 add sp, #8
800248e: bd80 pop {r7, pc}
8002490: 40022000 .word 0x40022000
08002494 <FLASH_WaitForLastOperation>:
* @brief Wait for a FLASH operation to complete.
* @param Timeout maximum flash operation timeout
* @retval HAL_StatusTypeDef HAL Status
*/
HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout)
{
8002494: b580 push {r7, lr}
8002496: b084 sub sp, #16
8002498: af00 add r7, sp, #0
800249a: 6078 str r0, [r7, #4]
uint32_t error;
/* Wait for the FLASH operation to complete by polling on BUSY flag to be reset.
Even if the FLASH operation fails, the BUSY flag will be reset and an error
flag will be set */
uint32_t timeout = HAL_GetTick() + Timeout;
800249c: f7ff fc76 bl 8001d8c <HAL_GetTick>
80024a0: 0002 movs r2, r0
80024a2: 687b ldr r3, [r7, #4]
80024a4: 189b adds r3, r3, r2
80024a6: 60fb str r3, [r7, #12]
/* Wait if any operation is ongoing */
#if defined(FLASH_DBANK_SUPPORT)
error = (FLASH_SR_BSY1 | FLASH_SR_BSY2);
#else
error = FLASH_SR_BSY1;
80024a8: 2380 movs r3, #128 ; 0x80
80024aa: 025b lsls r3, r3, #9
80024ac: 60bb str r3, [r7, #8]
#endif /* FLASH_DBANK_SUPPORT */
while ((FLASH->SR & error) != 0x00U)
80024ae: e007 b.n 80024c0 <FLASH_WaitForLastOperation+0x2c>
{
if (HAL_GetTick() >= timeout)
80024b0: f7ff fc6c bl 8001d8c <HAL_GetTick>
80024b4: 0002 movs r2, r0
80024b6: 68fb ldr r3, [r7, #12]
80024b8: 4293 cmp r3, r2
80024ba: d801 bhi.n 80024c0 <FLASH_WaitForLastOperation+0x2c>
{
return HAL_TIMEOUT;
80024bc: 2303 movs r3, #3
80024be: e02a b.n 8002516 <FLASH_WaitForLastOperation+0x82>
while ((FLASH->SR & error) != 0x00U)
80024c0: 4b17 ldr r3, [pc, #92] ; (8002520 <FLASH_WaitForLastOperation+0x8c>)
80024c2: 691b ldr r3, [r3, #16]
80024c4: 68ba ldr r2, [r7, #8]
80024c6: 4013 ands r3, r2
80024c8: d1f2 bne.n 80024b0 <FLASH_WaitForLastOperation+0x1c>
}
}
/* check flash errors */
error = (FLASH->SR & FLASH_SR_ERRORS);
80024ca: 4b15 ldr r3, [pc, #84] ; (8002520 <FLASH_WaitForLastOperation+0x8c>)
80024cc: 691b ldr r3, [r3, #16]
80024ce: 4a15 ldr r2, [pc, #84] ; (8002524 <FLASH_WaitForLastOperation+0x90>)
80024d0: 4013 ands r3, r2
80024d2: 60bb str r3, [r7, #8]
/* Clear SR register */
FLASH->SR = FLASH_SR_CLEAR;
80024d4: 4b12 ldr r3, [pc, #72] ; (8002520 <FLASH_WaitForLastOperation+0x8c>)
80024d6: 4a14 ldr r2, [pc, #80] ; (8002528 <FLASH_WaitForLastOperation+0x94>)
80024d8: 611a str r2, [r3, #16]
if (error != 0x00U)
80024da: 68bb ldr r3, [r7, #8]
80024dc: 2b00 cmp r3, #0
80024de: d004 beq.n 80024ea <FLASH_WaitForLastOperation+0x56>
{
/*Save the error code*/
pFlash.ErrorCode = error;
80024e0: 4b12 ldr r3, [pc, #72] ; (800252c <FLASH_WaitForLastOperation+0x98>)
80024e2: 68ba ldr r2, [r7, #8]
80024e4: 605a str r2, [r3, #4]
return HAL_ERROR;
80024e6: 2301 movs r3, #1
80024e8: e015 b.n 8002516 <FLASH_WaitForLastOperation+0x82>
}
/* Wait for control register to be written */
timeout = HAL_GetTick() + Timeout;
80024ea: f7ff fc4f bl 8001d8c <HAL_GetTick>
80024ee: 0002 movs r2, r0
80024f0: 687b ldr r3, [r7, #4]
80024f2: 189b adds r3, r3, r2
80024f4: 60fb str r3, [r7, #12]
while ((FLASH->SR & FLASH_SR_CFGBSY) != 0x00U)
80024f6: e007 b.n 8002508 <FLASH_WaitForLastOperation+0x74>
{
if (HAL_GetTick() >= timeout)
80024f8: f7ff fc48 bl 8001d8c <HAL_GetTick>
80024fc: 0002 movs r2, r0
80024fe: 68fb ldr r3, [r7, #12]
8002500: 4293 cmp r3, r2
8002502: d801 bhi.n 8002508 <FLASH_WaitForLastOperation+0x74>
{
return HAL_TIMEOUT;
8002504: 2303 movs r3, #3
8002506: e006 b.n 8002516 <FLASH_WaitForLastOperation+0x82>
while ((FLASH->SR & FLASH_SR_CFGBSY) != 0x00U)
8002508: 4b05 ldr r3, [pc, #20] ; (8002520 <FLASH_WaitForLastOperation+0x8c>)
800250a: 691a ldr r2, [r3, #16]
800250c: 2380 movs r3, #128 ; 0x80
800250e: 02db lsls r3, r3, #11
8002510: 4013 ands r3, r2
8002512: d1f1 bne.n 80024f8 <FLASH_WaitForLastOperation+0x64>
}
}
return HAL_OK;
8002514: 2300 movs r3, #0
}
8002516: 0018 movs r0, r3
8002518: 46bd mov sp, r7
800251a: b004 add sp, #16
800251c: bd80 pop {r7, pc}
800251e: 46c0 nop ; (mov r8, r8)
8002520: 40022000 .word 0x40022000
8002524: 0000c3fa .word 0x0000c3fa
8002528: 0000c3fb .word 0x0000c3fb
800252c: 2000023c .word 0x2000023c
08002530 <FLASH_Program_DoubleWord>:
* @param Address Specifies the address to be programmed.
* @param Data Specifies the data to be programmed.
* @retval None
*/
static void FLASH_Program_DoubleWord(uint32_t Address, uint64_t Data)
{
8002530: b5b0 push {r4, r5, r7, lr}
8002532: b084 sub sp, #16
8002534: af00 add r7, sp, #0
8002536: 60f8 str r0, [r7, #12]
8002538: 603a str r2, [r7, #0]
800253a: 607b str r3, [r7, #4]
/* Set PG bit */
SET_BIT(FLASH->CR, FLASH_CR_PG);
800253c: 4b0b ldr r3, [pc, #44] ; (800256c <FLASH_Program_DoubleWord+0x3c>)
800253e: 695a ldr r2, [r3, #20]
8002540: 4b0a ldr r3, [pc, #40] ; (800256c <FLASH_Program_DoubleWord+0x3c>)
8002542: 2101 movs r1, #1
8002544: 430a orrs r2, r1
8002546: 615a str r2, [r3, #20]
/* Program first word */
*(uint32_t *)Address = (uint32_t)Data;
8002548: 68fb ldr r3, [r7, #12]
800254a: 683a ldr r2, [r7, #0]
800254c: 601a str r2, [r3, #0]
so that all instructions following the ISB are fetched from cache or memory,
after the instruction has been completed.
*/
__STATIC_FORCEINLINE void __ISB(void)
{
__ASM volatile ("isb 0xF":::"memory");
800254e: f3bf 8f6f isb sy
}
8002552: 46c0 nop ; (mov r8, r8)
/* Barrier to ensure programming is performed in 2 steps, in right order
(independently of compiler optimization behavior) */
__ISB();
/* Program second word */
*(uint32_t *)(Address + 4U) = (uint32_t)(Data >> 32U);
8002554: 687b ldr r3, [r7, #4]
8002556: 001c movs r4, r3
8002558: 2300 movs r3, #0
800255a: 001d movs r5, r3
800255c: 68fb ldr r3, [r7, #12]
800255e: 3304 adds r3, #4
8002560: 0022 movs r2, r4
8002562: 601a str r2, [r3, #0]
}
8002564: 46c0 nop ; (mov r8, r8)
8002566: 46bd mov sp, r7
8002568: b004 add sp, #16
800256a: bdb0 pop {r4, r5, r7, pc}
800256c: 40022000 .word 0x40022000
08002570 <HAL_FLASHEx_Erase>:
* information on faulty page in case of error (0xFFFFFFFF means that all
* the pages have been correctly erased)
* @retval HAL Status
*/
HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError)
{
8002570: b5b0 push {r4, r5, r7, lr}
8002572: b084 sub sp, #16
8002574: af00 add r7, sp, #0
8002576: 6078 str r0, [r7, #4]
8002578: 6039 str r1, [r7, #0]
/* Check the parameters */
assert_param(IS_FLASH_TYPEERASE(pEraseInit->TypeErase));
/* Process Locked */
__HAL_LOCK(&pFlash);
800257a: 4b35 ldr r3, [pc, #212] ; (8002650 <HAL_FLASHEx_Erase+0xe0>)
800257c: 781b ldrb r3, [r3, #0]
800257e: 2b01 cmp r3, #1
8002580: d101 bne.n 8002586 <HAL_FLASHEx_Erase+0x16>
8002582: 2302 movs r3, #2
8002584: e05f b.n 8002646 <HAL_FLASHEx_Erase+0xd6>
8002586: 4b32 ldr r3, [pc, #200] ; (8002650 <HAL_FLASHEx_Erase+0xe0>)
8002588: 2201 movs r2, #1
800258a: 701a strb r2, [r3, #0]
/* Reset error code */
pFlash.ErrorCode = HAL_FLASH_ERROR_NONE;
800258c: 4b30 ldr r3, [pc, #192] ; (8002650 <HAL_FLASHEx_Erase+0xe0>)
800258e: 2200 movs r2, #0
8002590: 605a str r2, [r3, #4]
/* Wait for last operation to be completed */
status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE);
8002592: 250f movs r5, #15
8002594: 197c adds r4, r7, r5
8002596: 23fa movs r3, #250 ; 0xfa
8002598: 009b lsls r3, r3, #2
800259a: 0018 movs r0, r3
800259c: f7ff ff7a bl 8002494 <FLASH_WaitForLastOperation>
80025a0: 0003 movs r3, r0
80025a2: 7023 strb r3, [r4, #0]
if (status == HAL_OK)
80025a4: 002c movs r4, r5
80025a6: 193b adds r3, r7, r4
80025a8: 781b ldrb r3, [r3, #0]
80025aa: 2b00 cmp r3, #0
80025ac: d145 bne.n 800263a <HAL_FLASHEx_Erase+0xca>
{
#if !defined(FLASH_DBANK_SUPPORT)
/* For single bank product force Banks to Bank 1 */
pEraseInit->Banks = FLASH_BANK_1;
80025ae: 687b ldr r3, [r7, #4]
80025b0: 2204 movs r2, #4
80025b2: 605a str r2, [r3, #4]
#endif /* FLASH_DBANK_SUPPORT */
if (pEraseInit->TypeErase == FLASH_TYPEERASE_MASS)
80025b4: 687b ldr r3, [r7, #4]
80025b6: 681b ldr r3, [r3, #0]
80025b8: 2b04 cmp r3, #4
80025ba: d10d bne.n 80025d8 <HAL_FLASHEx_Erase+0x68>
{
/* Proceed to Mass Erase */
FLASH_MassErase(pEraseInit->Banks);
80025bc: 687b ldr r3, [r7, #4]
80025be: 685b ldr r3, [r3, #4]
80025c0: 0018 movs r0, r3
80025c2: f000 f849 bl 8002658 <FLASH_MassErase>
/* Wait for last operation to be completed */
status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE);
80025c6: 193c adds r4, r7, r4
80025c8: 23fa movs r3, #250 ; 0xfa
80025ca: 009b lsls r3, r3, #2
80025cc: 0018 movs r0, r3
80025ce: f7ff ff61 bl 8002494 <FLASH_WaitForLastOperation>
80025d2: 0003 movs r3, r0
80025d4: 7023 strb r3, [r4, #0]
80025d6: e030 b.n 800263a <HAL_FLASHEx_Erase+0xca>
}
else
{
/*Initialization of PageError variable*/
*PageError = 0xFFFFFFFFU;
80025d8: 683b ldr r3, [r7, #0]
80025da: 2201 movs r2, #1
80025dc: 4252 negs r2, r2
80025de: 601a str r2, [r3, #0]
for (index = pEraseInit->Page; index < (pEraseInit->Page + pEraseInit->NbPages); index++)
80025e0: 687b ldr r3, [r7, #4]
80025e2: 689b ldr r3, [r3, #8]
80025e4: 60bb str r3, [r7, #8]
80025e6: e01a b.n 800261e <HAL_FLASHEx_Erase+0xae>
{
/* Start erase page */
FLASH_PageErase(pEraseInit->Banks, index);
80025e8: 687b ldr r3, [r7, #4]
80025ea: 685b ldr r3, [r3, #4]
80025ec: 68ba ldr r2, [r7, #8]
80025ee: 0011 movs r1, r2
80025f0: 0018 movs r0, r3
80025f2: f000 f845 bl 8002680 <FLASH_PageErase>
/* Wait for last operation to be completed */
status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE);
80025f6: 250f movs r5, #15
80025f8: 197c adds r4, r7, r5
80025fa: 23fa movs r3, #250 ; 0xfa
80025fc: 009b lsls r3, r3, #2
80025fe: 0018 movs r0, r3
8002600: f7ff ff48 bl 8002494 <FLASH_WaitForLastOperation>
8002604: 0003 movs r3, r0
8002606: 7023 strb r3, [r4, #0]
if (status != HAL_OK)
8002608: 197b adds r3, r7, r5
800260a: 781b ldrb r3, [r3, #0]
800260c: 2b00 cmp r3, #0
800260e: d003 beq.n 8002618 <HAL_FLASHEx_Erase+0xa8>
{
/* In case of error, stop erase procedure and return the faulty address */
*PageError = index;
8002610: 683b ldr r3, [r7, #0]
8002612: 68ba ldr r2, [r7, #8]
8002614: 601a str r2, [r3, #0]
break;
8002616: e00a b.n 800262e <HAL_FLASHEx_Erase+0xbe>
for (index = pEraseInit->Page; index < (pEraseInit->Page + pEraseInit->NbPages); index++)
8002618: 68bb ldr r3, [r7, #8]
800261a: 3301 adds r3, #1
800261c: 60bb str r3, [r7, #8]
800261e: 687b ldr r3, [r7, #4]
8002620: 689a ldr r2, [r3, #8]
8002622: 687b ldr r3, [r7, #4]
8002624: 68db ldr r3, [r3, #12]
8002626: 18d3 adds r3, r2, r3
8002628: 68ba ldr r2, [r7, #8]
800262a: 429a cmp r2, r3
800262c: d3dc bcc.n 80025e8 <HAL_FLASHEx_Erase+0x78>
}
}
/* If operation is completed or interrupted, disable the Page Erase Bit */
CLEAR_BIT(FLASH->CR, FLASH_CR_PER);
800262e: 4b09 ldr r3, [pc, #36] ; (8002654 <HAL_FLASHEx_Erase+0xe4>)
8002630: 695a ldr r2, [r3, #20]
8002632: 4b08 ldr r3, [pc, #32] ; (8002654 <HAL_FLASHEx_Erase+0xe4>)
8002634: 2102 movs r1, #2
8002636: 438a bics r2, r1
8002638: 615a str r2, [r3, #20]
}
}
/* Process Unlocked */
__HAL_UNLOCK(&pFlash);
800263a: 4b05 ldr r3, [pc, #20] ; (8002650 <HAL_FLASHEx_Erase+0xe0>)
800263c: 2200 movs r2, #0
800263e: 701a strb r2, [r3, #0]
/* return status */
return status;
8002640: 230f movs r3, #15
8002642: 18fb adds r3, r7, r3
8002644: 781b ldrb r3, [r3, #0]
}
8002646: 0018 movs r0, r3
8002648: 46bd mov sp, r7
800264a: b004 add sp, #16
800264c: bdb0 pop {r4, r5, r7, pc}
800264e: 46c0 nop ; (mov r8, r8)
8002650: 2000023c .word 0x2000023c
8002654: 40022000 .word 0x40022000
08002658 <FLASH_MassErase>:
* @arg FLASH_BANK_2: Bank2 to be erased*
* @note (*) availability depends on devices
* @retval None
*/
static void FLASH_MassErase(uint32_t Banks)
{
8002658: b580 push {r7, lr}
800265a: b082 sub sp, #8
800265c: af00 add r7, sp, #0
800265e: 6078 str r0, [r7, #4]
/* Check the parameters */
assert_param(IS_FLASH_BANK(Banks));
/* Set the Mass Erase Bit and start bit */
FLASH->CR |= (FLASH_CR_STRT | Banks);
8002660: 4b06 ldr r3, [pc, #24] ; (800267c <FLASH_MassErase+0x24>)
8002662: 695a ldr r2, [r3, #20]
8002664: 687b ldr r3, [r7, #4]
8002666: 431a orrs r2, r3
8002668: 4b04 ldr r3, [pc, #16] ; (800267c <FLASH_MassErase+0x24>)
800266a: 2180 movs r1, #128 ; 0x80
800266c: 0249 lsls r1, r1, #9
800266e: 430a orrs r2, r1
8002670: 615a str r2, [r3, #20]
}
8002672: 46c0 nop ; (mov r8, r8)
8002674: 46bd mov sp, r7
8002676: b002 add sp, #8
8002678: bd80 pop {r7, pc}
800267a: 46c0 nop ; (mov r8, r8)
800267c: 40022000 .word 0x40022000
08002680 <FLASH_PageErase>:
* This parameter must be a value between 0 and (max number of pages in Flash - 1)
* @note (*) availability depends on devices
* @retval None
*/
void FLASH_PageErase(uint32_t Banks, uint32_t Page)
{
8002680: b580 push {r7, lr}
8002682: b084 sub sp, #16
8002684: af00 add r7, sp, #0
8002686: 6078 str r0, [r7, #4]
8002688: 6039 str r1, [r7, #0]
/* Check the parameters */
assert_param(IS_FLASH_BANK(Banks));
assert_param(IS_FLASH_PAGE(Page));
/* Get configuration register, then clear page number */
tmp = (FLASH->CR & ~FLASH_CR_PNB);
800268a: 4b08 ldr r3, [pc, #32] ; (80026ac <FLASH_PageErase+0x2c>)
800268c: 695b ldr r3, [r3, #20]
800268e: 4a08 ldr r2, [pc, #32] ; (80026b0 <FLASH_PageErase+0x30>)
8002690: 4013 ands r3, r2
8002692: 60fb str r3, [r7, #12]
tmp &= ~FLASH_CR_BKER;
}
#endif /* FLASH_DBANK_SUPPORT */
/* Set page number, Page Erase bit & Start bit */
FLASH->CR = (tmp | (FLASH_CR_STRT | (Page << FLASH_CR_PNB_Pos) | FLASH_CR_PER));
8002694: 683b ldr r3, [r7, #0]
8002696: 00da lsls r2, r3, #3
8002698: 68fb ldr r3, [r7, #12]
800269a: 431a orrs r2, r3
800269c: 4b03 ldr r3, [pc, #12] ; (80026ac <FLASH_PageErase+0x2c>)
800269e: 4905 ldr r1, [pc, #20] ; (80026b4 <FLASH_PageErase+0x34>)
80026a0: 430a orrs r2, r1
80026a2: 615a str r2, [r3, #20]
}
80026a4: 46c0 nop ; (mov r8, r8)
80026a6: 46bd mov sp, r7
80026a8: b004 add sp, #16
80026aa: bd80 pop {r7, pc}
80026ac: 40022000 .word 0x40022000
80026b0: ffffe007 .word 0xffffe007
80026b4: 00010002 .word 0x00010002
080026b8 <HAL_GPIO_Init>:
* @param GPIO_Init pointer to a GPIO_InitTypeDef structure that contains
* the configuration information for the specified GPIO peripheral.
* @retval None
*/
void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
{
80026b8: b580 push {r7, lr}
80026ba: b086 sub sp, #24
80026bc: af00 add r7, sp, #0
80026be: 6078 str r0, [r7, #4]
80026c0: 6039 str r1, [r7, #0]
uint32_t position = 0x00u;
80026c2: 2300 movs r3, #0
80026c4: 617b str r3, [r7, #20]
assert_param(IS_GPIO_ALL_INSTANCE(GPIOx));
assert_param(IS_GPIO_PIN(GPIO_Init->Pin));
assert_param(IS_GPIO_MODE(GPIO_Init->Mode));
/* Configure the port pins */
while (((GPIO_Init->Pin) >> position) != 0x00u)
80026c6: e147 b.n 8002958 <HAL_GPIO_Init+0x2a0>
{
/* Get current io position */
iocurrent = (GPIO_Init->Pin) & (1uL << position);
80026c8: 683b ldr r3, [r7, #0]
80026ca: 681b ldr r3, [r3, #0]
80026cc: 2101 movs r1, #1
80026ce: 697a ldr r2, [r7, #20]
80026d0: 4091 lsls r1, r2
80026d2: 000a movs r2, r1
80026d4: 4013 ands r3, r2
80026d6: 60fb str r3, [r7, #12]
if (iocurrent != 0x00u)
80026d8: 68fb ldr r3, [r7, #12]
80026da: 2b00 cmp r3, #0
80026dc: d100 bne.n 80026e0 <HAL_GPIO_Init+0x28>
80026de: e138 b.n 8002952 <HAL_GPIO_Init+0x29a>
{
/*--------------------- GPIO Mode Configuration ------------------------*/
/* In case of Output or Alternate function mode selection */
if (((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF))
80026e0: 683b ldr r3, [r7, #0]
80026e2: 685b ldr r3, [r3, #4]
80026e4: 2203 movs r2, #3
80026e6: 4013 ands r3, r2
80026e8: 2b01 cmp r3, #1
80026ea: d005 beq.n 80026f8 <HAL_GPIO_Init+0x40>
80026ec: 683b ldr r3, [r7, #0]
80026ee: 685b ldr r3, [r3, #4]
80026f0: 2203 movs r2, #3
80026f2: 4013 ands r3, r2
80026f4: 2b02 cmp r3, #2
80026f6: d130 bne.n 800275a <HAL_GPIO_Init+0xa2>
{
/* Check the Speed parameter */
assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
/* Configure the IO Speed */
temp = GPIOx->OSPEEDR;
80026f8: 687b ldr r3, [r7, #4]
80026fa: 689b ldr r3, [r3, #8]
80026fc: 613b str r3, [r7, #16]
temp &= ~(GPIO_OSPEEDR_OSPEED0 << (position * 2u));
80026fe: 697b ldr r3, [r7, #20]
8002700: 005b lsls r3, r3, #1
8002702: 2203 movs r2, #3
8002704: 409a lsls r2, r3
8002706: 0013 movs r3, r2
8002708: 43da mvns r2, r3
800270a: 693b ldr r3, [r7, #16]
800270c: 4013 ands r3, r2
800270e: 613b str r3, [r7, #16]
temp |= (GPIO_Init->Speed << (position * 2u));
8002710: 683b ldr r3, [r7, #0]
8002712: 68da ldr r2, [r3, #12]
8002714: 697b ldr r3, [r7, #20]
8002716: 005b lsls r3, r3, #1
8002718: 409a lsls r2, r3
800271a: 0013 movs r3, r2
800271c: 693a ldr r2, [r7, #16]
800271e: 4313 orrs r3, r2
8002720: 613b str r3, [r7, #16]
GPIOx->OSPEEDR = temp;
8002722: 687b ldr r3, [r7, #4]
8002724: 693a ldr r2, [r7, #16]
8002726: 609a str r2, [r3, #8]
/* Configure the IO Output Type */
temp = GPIOx->OTYPER;
8002728: 687b ldr r3, [r7, #4]
800272a: 685b ldr r3, [r3, #4]
800272c: 613b str r3, [r7, #16]
temp &= ~(GPIO_OTYPER_OT0 << position) ;
800272e: 2201 movs r2, #1
8002730: 697b ldr r3, [r7, #20]
8002732: 409a lsls r2, r3
8002734: 0013 movs r3, r2
8002736: 43da mvns r2, r3
8002738: 693b ldr r3, [r7, #16]
800273a: 4013 ands r3, r2
800273c: 613b str r3, [r7, #16]
temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position);
800273e: 683b ldr r3, [r7, #0]
8002740: 685b ldr r3, [r3, #4]
8002742: 091b lsrs r3, r3, #4
8002744: 2201 movs r2, #1
8002746: 401a ands r2, r3
8002748: 697b ldr r3, [r7, #20]
800274a: 409a lsls r2, r3
800274c: 0013 movs r3, r2
800274e: 693a ldr r2, [r7, #16]
8002750: 4313 orrs r3, r2
8002752: 613b str r3, [r7, #16]
GPIOx->OTYPER = temp;
8002754: 687b ldr r3, [r7, #4]
8002756: 693a ldr r2, [r7, #16]
8002758: 605a str r2, [r3, #4]
}
if ((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG)
800275a: 683b ldr r3, [r7, #0]
800275c: 685b ldr r3, [r3, #4]
800275e: 2203 movs r2, #3
8002760: 4013 ands r3, r2
8002762: 2b03 cmp r3, #3
8002764: d017 beq.n 8002796 <HAL_GPIO_Init+0xde>
{
/* Check the Pull parameter */
assert_param(IS_GPIO_PULL(GPIO_Init->Pull));
/* Activate the Pull-up or Pull down resistor for the current IO */
temp = GPIOx->PUPDR;
8002766: 687b ldr r3, [r7, #4]
8002768: 68db ldr r3, [r3, #12]
800276a: 613b str r3, [r7, #16]
temp &= ~(GPIO_PUPDR_PUPD0 << (position * 2u));
800276c: 697b ldr r3, [r7, #20]
800276e: 005b lsls r3, r3, #1
8002770: 2203 movs r2, #3
8002772: 409a lsls r2, r3
8002774: 0013 movs r3, r2
8002776: 43da mvns r2, r3
8002778: 693b ldr r3, [r7, #16]
800277a: 4013 ands r3, r2
800277c: 613b str r3, [r7, #16]
temp |= ((GPIO_Init->Pull) << (position * 2u));
800277e: 683b ldr r3, [r7, #0]
8002780: 689a ldr r2, [r3, #8]
8002782: 697b ldr r3, [r7, #20]
8002784: 005b lsls r3, r3, #1
8002786: 409a lsls r2, r3
8002788: 0013 movs r3, r2
800278a: 693a ldr r2, [r7, #16]
800278c: 4313 orrs r3, r2
800278e: 613b str r3, [r7, #16]
GPIOx->PUPDR = temp;
8002790: 687b ldr r3, [r7, #4]
8002792: 693a ldr r2, [r7, #16]
8002794: 60da str r2, [r3, #12]
}
/* In case of Alternate function mode selection */
if ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
8002796: 683b ldr r3, [r7, #0]
8002798: 685b ldr r3, [r3, #4]
800279a: 2203 movs r2, #3
800279c: 4013 ands r3, r2
800279e: 2b02 cmp r3, #2
80027a0: d123 bne.n 80027ea <HAL_GPIO_Init+0x132>
/* Check the Alternate function parameters */
assert_param(IS_GPIO_AF_INSTANCE(GPIOx));
assert_param(IS_GPIO_AF(GPIO_Init->Alternate));
/* Configure Alternate function mapped with the current IO */
temp = GPIOx->AFR[position >> 3u];
80027a2: 697b ldr r3, [r7, #20]
80027a4: 08da lsrs r2, r3, #3
80027a6: 687b ldr r3, [r7, #4]
80027a8: 3208 adds r2, #8
80027aa: 0092 lsls r2, r2, #2
80027ac: 58d3 ldr r3, [r2, r3]
80027ae: 613b str r3, [r7, #16]
temp &= ~(0xFu << ((position & 0x07u) * 4u));
80027b0: 697b ldr r3, [r7, #20]
80027b2: 2207 movs r2, #7
80027b4: 4013 ands r3, r2
80027b6: 009b lsls r3, r3, #2
80027b8: 220f movs r2, #15
80027ba: 409a lsls r2, r3
80027bc: 0013 movs r3, r2
80027be: 43da mvns r2, r3
80027c0: 693b ldr r3, [r7, #16]
80027c2: 4013 ands r3, r2
80027c4: 613b str r3, [r7, #16]
temp |= ((GPIO_Init->Alternate) << ((position & 0x07u) * 4u));
80027c6: 683b ldr r3, [r7, #0]
80027c8: 691a ldr r2, [r3, #16]
80027ca: 697b ldr r3, [r7, #20]
80027cc: 2107 movs r1, #7
80027ce: 400b ands r3, r1
80027d0: 009b lsls r3, r3, #2
80027d2: 409a lsls r2, r3
80027d4: 0013 movs r3, r2
80027d6: 693a ldr r2, [r7, #16]
80027d8: 4313 orrs r3, r2
80027da: 613b str r3, [r7, #16]
GPIOx->AFR[position >> 3u] = temp;
80027dc: 697b ldr r3, [r7, #20]
80027de: 08da lsrs r2, r3, #3
80027e0: 687b ldr r3, [r7, #4]
80027e2: 3208 adds r2, #8
80027e4: 0092 lsls r2, r2, #2
80027e6: 6939 ldr r1, [r7, #16]
80027e8: 50d1 str r1, [r2, r3]
}
/* Configure IO Direction mode (Input, Output, Alternate or Analog) */
temp = GPIOx->MODER;
80027ea: 687b ldr r3, [r7, #4]
80027ec: 681b ldr r3, [r3, #0]
80027ee: 613b str r3, [r7, #16]
temp &= ~(GPIO_MODER_MODE0 << (position * 2u));
80027f0: 697b ldr r3, [r7, #20]
80027f2: 005b lsls r3, r3, #1
80027f4: 2203 movs r2, #3
80027f6: 409a lsls r2, r3
80027f8: 0013 movs r3, r2
80027fa: 43da mvns r2, r3
80027fc: 693b ldr r3, [r7, #16]
80027fe: 4013 ands r3, r2
8002800: 613b str r3, [r7, #16]
temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2u));
8002802: 683b ldr r3, [r7, #0]
8002804: 685b ldr r3, [r3, #4]
8002806: 2203 movs r2, #3
8002808: 401a ands r2, r3
800280a: 697b ldr r3, [r7, #20]
800280c: 005b lsls r3, r3, #1
800280e: 409a lsls r2, r3
8002810: 0013 movs r3, r2
8002812: 693a ldr r2, [r7, #16]
8002814: 4313 orrs r3, r2
8002816: 613b str r3, [r7, #16]
GPIOx->MODER = temp;
8002818: 687b ldr r3, [r7, #4]
800281a: 693a ldr r2, [r7, #16]
800281c: 601a str r2, [r3, #0]
/*--------------------- EXTI Mode Configuration ------------------------*/
/* Configure the External Interrupt or event for the current IO */
if ((GPIO_Init->Mode & EXTI_MODE) != 0x00u)
800281e: 683b ldr r3, [r7, #0]
8002820: 685a ldr r2, [r3, #4]
8002822: 23c0 movs r3, #192 ; 0xc0
8002824: 029b lsls r3, r3, #10
8002826: 4013 ands r3, r2
8002828: d100 bne.n 800282c <HAL_GPIO_Init+0x174>
800282a: e092 b.n 8002952 <HAL_GPIO_Init+0x29a>
{
temp = EXTI->EXTICR[position >> 2u];
800282c: 4a50 ldr r2, [pc, #320] ; (8002970 <HAL_GPIO_Init+0x2b8>)
800282e: 697b ldr r3, [r7, #20]
8002830: 089b lsrs r3, r3, #2
8002832: 3318 adds r3, #24
8002834: 009b lsls r3, r3, #2
8002836: 589b ldr r3, [r3, r2]
8002838: 613b str r3, [r7, #16]
temp &= ~(0x0FuL << (8u * (position & 0x03u)));
800283a: 697b ldr r3, [r7, #20]
800283c: 2203 movs r2, #3
800283e: 4013 ands r3, r2
8002840: 00db lsls r3, r3, #3
8002842: 220f movs r2, #15
8002844: 409a lsls r2, r3
8002846: 0013 movs r3, r2
8002848: 43da mvns r2, r3
800284a: 693b ldr r3, [r7, #16]
800284c: 4013 ands r3, r2
800284e: 613b str r3, [r7, #16]
temp |= (GPIO_GET_INDEX(GPIOx) << (8u * (position & 0x03u)));
8002850: 687a ldr r2, [r7, #4]
8002852: 23a0 movs r3, #160 ; 0xa0
8002854: 05db lsls r3, r3, #23
8002856: 429a cmp r2, r3
8002858: d013 beq.n 8002882 <HAL_GPIO_Init+0x1ca>
800285a: 687b ldr r3, [r7, #4]
800285c: 4a45 ldr r2, [pc, #276] ; (8002974 <HAL_GPIO_Init+0x2bc>)
800285e: 4293 cmp r3, r2
8002860: d00d beq.n 800287e <HAL_GPIO_Init+0x1c6>
8002862: 687b ldr r3, [r7, #4]
8002864: 4a44 ldr r2, [pc, #272] ; (8002978 <HAL_GPIO_Init+0x2c0>)
8002866: 4293 cmp r3, r2
8002868: d007 beq.n 800287a <HAL_GPIO_Init+0x1c2>
800286a: 687b ldr r3, [r7, #4]
800286c: 4a43 ldr r2, [pc, #268] ; (800297c <HAL_GPIO_Init+0x2c4>)
800286e: 4293 cmp r3, r2
8002870: d101 bne.n 8002876 <HAL_GPIO_Init+0x1be>
8002872: 2303 movs r3, #3
8002874: e006 b.n 8002884 <HAL_GPIO_Init+0x1cc>
8002876: 2305 movs r3, #5
8002878: e004 b.n 8002884 <HAL_GPIO_Init+0x1cc>
800287a: 2302 movs r3, #2
800287c: e002 b.n 8002884 <HAL_GPIO_Init+0x1cc>
800287e: 2301 movs r3, #1
8002880: e000 b.n 8002884 <HAL_GPIO_Init+0x1cc>
8002882: 2300 movs r3, #0
8002884: 697a ldr r2, [r7, #20]
8002886: 2103 movs r1, #3
8002888: 400a ands r2, r1
800288a: 00d2 lsls r2, r2, #3
800288c: 4093 lsls r3, r2
800288e: 693a ldr r2, [r7, #16]
8002890: 4313 orrs r3, r2
8002892: 613b str r3, [r7, #16]
EXTI->EXTICR[position >> 2u] = temp;
8002894: 4936 ldr r1, [pc, #216] ; (8002970 <HAL_GPIO_Init+0x2b8>)
8002896: 697b ldr r3, [r7, #20]
8002898: 089b lsrs r3, r3, #2
800289a: 3318 adds r3, #24
800289c: 009b lsls r3, r3, #2
800289e: 693a ldr r2, [r7, #16]
80028a0: 505a str r2, [r3, r1]
/* Clear Rising Falling edge configuration */
temp = EXTI->RTSR1;
80028a2: 4b33 ldr r3, [pc, #204] ; (8002970 <HAL_GPIO_Init+0x2b8>)
80028a4: 681b ldr r3, [r3, #0]
80028a6: 613b str r3, [r7, #16]
temp &= ~(iocurrent);
80028a8: 68fb ldr r3, [r7, #12]
80028aa: 43da mvns r2, r3
80028ac: 693b ldr r3, [r7, #16]
80028ae: 4013 ands r3, r2
80028b0: 613b str r3, [r7, #16]
if ((GPIO_Init->Mode & TRIGGER_RISING) != 0x00u)
80028b2: 683b ldr r3, [r7, #0]
80028b4: 685a ldr r2, [r3, #4]
80028b6: 2380 movs r3, #128 ; 0x80
80028b8: 035b lsls r3, r3, #13
80028ba: 4013 ands r3, r2
80028bc: d003 beq.n 80028c6 <HAL_GPIO_Init+0x20e>
{
temp |= iocurrent;
80028be: 693a ldr r2, [r7, #16]
80028c0: 68fb ldr r3, [r7, #12]
80028c2: 4313 orrs r3, r2
80028c4: 613b str r3, [r7, #16]
}
EXTI->RTSR1 = temp;
80028c6: 4b2a ldr r3, [pc, #168] ; (8002970 <HAL_GPIO_Init+0x2b8>)
80028c8: 693a ldr r2, [r7, #16]
80028ca: 601a str r2, [r3, #0]
temp = EXTI->FTSR1;
80028cc: 4b28 ldr r3, [pc, #160] ; (8002970 <HAL_GPIO_Init+0x2b8>)
80028ce: 685b ldr r3, [r3, #4]
80028d0: 613b str r3, [r7, #16]
temp &= ~(iocurrent);
80028d2: 68fb ldr r3, [r7, #12]
80028d4: 43da mvns r2, r3
80028d6: 693b ldr r3, [r7, #16]
80028d8: 4013 ands r3, r2
80028da: 613b str r3, [r7, #16]
if ((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00u)
80028dc: 683b ldr r3, [r7, #0]
80028de: 685a ldr r2, [r3, #4]
80028e0: 2380 movs r3, #128 ; 0x80
80028e2: 039b lsls r3, r3, #14
80028e4: 4013 ands r3, r2
80028e6: d003 beq.n 80028f0 <HAL_GPIO_Init+0x238>
{
temp |= iocurrent;
80028e8: 693a ldr r2, [r7, #16]
80028ea: 68fb ldr r3, [r7, #12]
80028ec: 4313 orrs r3, r2
80028ee: 613b str r3, [r7, #16]
}
EXTI->FTSR1 = temp;
80028f0: 4b1f ldr r3, [pc, #124] ; (8002970 <HAL_GPIO_Init+0x2b8>)
80028f2: 693a ldr r2, [r7, #16]
80028f4: 605a str r2, [r3, #4]
/* Clear EXTI line configuration */
temp = EXTI->EMR1;
80028f6: 4a1e ldr r2, [pc, #120] ; (8002970 <HAL_GPIO_Init+0x2b8>)
80028f8: 2384 movs r3, #132 ; 0x84
80028fa: 58d3 ldr r3, [r2, r3]
80028fc: 613b str r3, [r7, #16]
temp &= ~(iocurrent);
80028fe: 68fb ldr r3, [r7, #12]
8002900: 43da mvns r2, r3
8002902: 693b ldr r3, [r7, #16]
8002904: 4013 ands r3, r2
8002906: 613b str r3, [r7, #16]
if ((GPIO_Init->Mode & EXTI_EVT) != 0x00u)
8002908: 683b ldr r3, [r7, #0]
800290a: 685a ldr r2, [r3, #4]
800290c: 2380 movs r3, #128 ; 0x80
800290e: 029b lsls r3, r3, #10
8002910: 4013 ands r3, r2
8002912: d003 beq.n 800291c <HAL_GPIO_Init+0x264>
{
temp |= iocurrent;
8002914: 693a ldr r2, [r7, #16]
8002916: 68fb ldr r3, [r7, #12]
8002918: 4313 orrs r3, r2
800291a: 613b str r3, [r7, #16]
}
EXTI->EMR1 = temp;
800291c: 4914 ldr r1, [pc, #80] ; (8002970 <HAL_GPIO_Init+0x2b8>)
800291e: 2284 movs r2, #132 ; 0x84
8002920: 693b ldr r3, [r7, #16]
8002922: 508b str r3, [r1, r2]
temp = EXTI->IMR1;
8002924: 4a12 ldr r2, [pc, #72] ; (8002970 <HAL_GPIO_Init+0x2b8>)
8002926: 2380 movs r3, #128 ; 0x80
8002928: 58d3 ldr r3, [r2, r3]
800292a: 613b str r3, [r7, #16]
temp &= ~(iocurrent);
800292c: 68fb ldr r3, [r7, #12]
800292e: 43da mvns r2, r3
8002930: 693b ldr r3, [r7, #16]
8002932: 4013 ands r3, r2
8002934: 613b str r3, [r7, #16]
if ((GPIO_Init->Mode & EXTI_IT) != 0x00u)
8002936: 683b ldr r3, [r7, #0]
8002938: 685a ldr r2, [r3, #4]
800293a: 2380 movs r3, #128 ; 0x80
800293c: 025b lsls r3, r3, #9
800293e: 4013 ands r3, r2
8002940: d003 beq.n 800294a <HAL_GPIO_Init+0x292>
{
temp |= iocurrent;
8002942: 693a ldr r2, [r7, #16]
8002944: 68fb ldr r3, [r7, #12]
8002946: 4313 orrs r3, r2
8002948: 613b str r3, [r7, #16]
}
EXTI->IMR1 = temp;
800294a: 4909 ldr r1, [pc, #36] ; (8002970 <HAL_GPIO_Init+0x2b8>)
800294c: 2280 movs r2, #128 ; 0x80
800294e: 693b ldr r3, [r7, #16]
8002950: 508b str r3, [r1, r2]
}
}
position++;
8002952: 697b ldr r3, [r7, #20]
8002954: 3301 adds r3, #1
8002956: 617b str r3, [r7, #20]
while (((GPIO_Init->Pin) >> position) != 0x00u)
8002958: 683b ldr r3, [r7, #0]
800295a: 681a ldr r2, [r3, #0]
800295c: 697b ldr r3, [r7, #20]
800295e: 40da lsrs r2, r3
8002960: 1e13 subs r3, r2, #0
8002962: d000 beq.n 8002966 <HAL_GPIO_Init+0x2ae>
8002964: e6b0 b.n 80026c8 <HAL_GPIO_Init+0x10>
}
}
8002966: 46c0 nop ; (mov r8, r8)
8002968: 46c0 nop ; (mov r8, r8)
800296a: 46bd mov sp, r7
800296c: b006 add sp, #24
800296e: bd80 pop {r7, pc}
8002970: 40021800 .word 0x40021800
8002974: 50000400 .word 0x50000400
8002978: 50000800 .word 0x50000800
800297c: 50000c00 .word 0x50000c00
08002980 <HAL_GPIO_WritePin>:
* @arg GPIO_PIN_RESET: to clear the port pin
* @arg GPIO_PIN_SET: to set the port pin
* @retval None
*/
void HAL_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState)
{
8002980: b580 push {r7, lr}
8002982: b082 sub sp, #8
8002984: af00 add r7, sp, #0
8002986: 6078 str r0, [r7, #4]
8002988: 0008 movs r0, r1
800298a: 0011 movs r1, r2
800298c: 1cbb adds r3, r7, #2
800298e: 1c02 adds r2, r0, #0
8002990: 801a strh r2, [r3, #0]
8002992: 1c7b adds r3, r7, #1
8002994: 1c0a adds r2, r1, #0
8002996: 701a strb r2, [r3, #0]
/* Check the parameters */
assert_param(IS_GPIO_PIN(GPIO_Pin));
assert_param(IS_GPIO_PIN_ACTION(PinState));
if (PinState != GPIO_PIN_RESET)
8002998: 1c7b adds r3, r7, #1
800299a: 781b ldrb r3, [r3, #0]
800299c: 2b00 cmp r3, #0
800299e: d004 beq.n 80029aa <HAL_GPIO_WritePin+0x2a>
{
GPIOx->BSRR = (uint32_t)GPIO_Pin;
80029a0: 1cbb adds r3, r7, #2
80029a2: 881a ldrh r2, [r3, #0]
80029a4: 687b ldr r3, [r7, #4]
80029a6: 619a str r2, [r3, #24]
}
else
{
GPIOx->BRR = (uint32_t)GPIO_Pin;
}
}
80029a8: e003 b.n 80029b2 <HAL_GPIO_WritePin+0x32>
GPIOx->BRR = (uint32_t)GPIO_Pin;
80029aa: 1cbb adds r3, r7, #2
80029ac: 881a ldrh r2, [r3, #0]
80029ae: 687b ldr r3, [r7, #4]
80029b0: 629a str r2, [r3, #40] ; 0x28
}
80029b2: 46c0 nop ; (mov r8, r8)
80029b4: 46bd mov sp, r7
80029b6: b002 add sp, #8
80029b8: bd80 pop {r7, pc}
...
080029bc <HAL_GPIO_EXTI_IRQHandler>:
* @brief Handle EXTI interrupt request.
* @param GPIO_Pin Specifies the port pin connected to corresponding EXTI line.
* @retval None
*/
void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin)
{
80029bc: b580 push {r7, lr}
80029be: b082 sub sp, #8
80029c0: af00 add r7, sp, #0
80029c2: 0002 movs r2, r0
80029c4: 1dbb adds r3, r7, #6
80029c6: 801a strh r2, [r3, #0]
/* EXTI line interrupt detected */
if (__HAL_GPIO_EXTI_GET_RISING_IT(GPIO_Pin) != 0x00u)
80029c8: 4b10 ldr r3, [pc, #64] ; (8002a0c <HAL_GPIO_EXTI_IRQHandler+0x50>)
80029ca: 68db ldr r3, [r3, #12]
80029cc: 1dba adds r2, r7, #6
80029ce: 8812 ldrh r2, [r2, #0]
80029d0: 4013 ands r3, r2
80029d2: d008 beq.n 80029e6 <HAL_GPIO_EXTI_IRQHandler+0x2a>
{
__HAL_GPIO_EXTI_CLEAR_RISING_IT(GPIO_Pin);
80029d4: 4b0d ldr r3, [pc, #52] ; (8002a0c <HAL_GPIO_EXTI_IRQHandler+0x50>)
80029d6: 1dba adds r2, r7, #6
80029d8: 8812 ldrh r2, [r2, #0]
80029da: 60da str r2, [r3, #12]
HAL_GPIO_EXTI_Rising_Callback(GPIO_Pin);
80029dc: 1dbb adds r3, r7, #6
80029de: 881b ldrh r3, [r3, #0]
80029e0: 0018 movs r0, r3
80029e2: f7fe fe9f bl 8001724 <HAL_GPIO_EXTI_Rising_Callback>
}
if (__HAL_GPIO_EXTI_GET_FALLING_IT(GPIO_Pin) != 0x00u)
80029e6: 4b09 ldr r3, [pc, #36] ; (8002a0c <HAL_GPIO_EXTI_IRQHandler+0x50>)
80029e8: 691b ldr r3, [r3, #16]
80029ea: 1dba adds r2, r7, #6
80029ec: 8812 ldrh r2, [r2, #0]
80029ee: 4013 ands r3, r2
80029f0: d008 beq.n 8002a04 <HAL_GPIO_EXTI_IRQHandler+0x48>
{
__HAL_GPIO_EXTI_CLEAR_FALLING_IT(GPIO_Pin);
80029f2: 4b06 ldr r3, [pc, #24] ; (8002a0c <HAL_GPIO_EXTI_IRQHandler+0x50>)
80029f4: 1dba adds r2, r7, #6
80029f6: 8812 ldrh r2, [r2, #0]
80029f8: 611a str r2, [r3, #16]
HAL_GPIO_EXTI_Falling_Callback(GPIO_Pin);
80029fa: 1dbb adds r3, r7, #6
80029fc: 881b ldrh r3, [r3, #0]
80029fe: 0018 movs r0, r3
8002a00: f7fe feaa bl 8001758 <HAL_GPIO_EXTI_Falling_Callback>
}
}
8002a04: 46c0 nop ; (mov r8, r8)
8002a06: 46bd mov sp, r7
8002a08: b002 add sp, #8
8002a0a: bd80 pop {r7, pc}
8002a0c: 40021800 .word 0x40021800
08002a10 <HAL_I2C_Init>:
* @param hi2c Pointer to a I2C_HandleTypeDef structure that contains
* the configuration information for the specified I2C.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_I2C_Init(I2C_HandleTypeDef *hi2c)
{
8002a10: b580 push {r7, lr}
8002a12: b082 sub sp, #8
8002a14: af00 add r7, sp, #0
8002a16: 6078 str r0, [r7, #4]
/* Check the I2C handle allocation */
if (hi2c == NULL)
8002a18: 687b ldr r3, [r7, #4]
8002a1a: 2b00 cmp r3, #0
8002a1c: d101 bne.n 8002a22 <HAL_I2C_Init+0x12>
{
return HAL_ERROR;
8002a1e: 2301 movs r3, #1
8002a20: e082 b.n 8002b28 <HAL_I2C_Init+0x118>
assert_param(IS_I2C_OWN_ADDRESS2(hi2c->Init.OwnAddress2));
assert_param(IS_I2C_OWN_ADDRESS2_MASK(hi2c->Init.OwnAddress2Masks));
assert_param(IS_I2C_GENERAL_CALL(hi2c->Init.GeneralCallMode));
assert_param(IS_I2C_NO_STRETCH(hi2c->Init.NoStretchMode));
if (hi2c->State == HAL_I2C_STATE_RESET)
8002a22: 687b ldr r3, [r7, #4]
8002a24: 2241 movs r2, #65 ; 0x41
8002a26: 5c9b ldrb r3, [r3, r2]
8002a28: b2db uxtb r3, r3
8002a2a: 2b00 cmp r3, #0
8002a2c: d107 bne.n 8002a3e <HAL_I2C_Init+0x2e>
{
/* Allocate lock resource and initialize it */
hi2c->Lock = HAL_UNLOCKED;
8002a2e: 687b ldr r3, [r7, #4]
8002a30: 2240 movs r2, #64 ; 0x40
8002a32: 2100 movs r1, #0
8002a34: 5499 strb r1, [r3, r2]
/* Init the low level hardware : GPIO, CLOCK, CORTEX...etc */
hi2c->MspInitCallback(hi2c);
#else
/* Init the low level hardware : GPIO, CLOCK, CORTEX...etc */
HAL_I2C_MspInit(hi2c);
8002a36: 687b ldr r3, [r7, #4]
8002a38: 0018 movs r0, r3
8002a3a: f7fe ffc1 bl 80019c0 <HAL_I2C_MspInit>
#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */
}
hi2c->State = HAL_I2C_STATE_BUSY;
8002a3e: 687b ldr r3, [r7, #4]
8002a40: 2241 movs r2, #65 ; 0x41
8002a42: 2124 movs r1, #36 ; 0x24
8002a44: 5499 strb r1, [r3, r2]
/* Disable the selected I2C peripheral */
__HAL_I2C_DISABLE(hi2c);
8002a46: 687b ldr r3, [r7, #4]
8002a48: 681b ldr r3, [r3, #0]
8002a4a: 681a ldr r2, [r3, #0]
8002a4c: 687b ldr r3, [r7, #4]
8002a4e: 681b ldr r3, [r3, #0]
8002a50: 2101 movs r1, #1
8002a52: 438a bics r2, r1
8002a54: 601a str r2, [r3, #0]
/*---------------------------- I2Cx TIMINGR Configuration ------------------*/
/* Configure I2Cx: Frequency range */
hi2c->Instance->TIMINGR = hi2c->Init.Timing & TIMING_CLEAR_MASK;
8002a56: 687b ldr r3, [r7, #4]
8002a58: 685a ldr r2, [r3, #4]
8002a5a: 687b ldr r3, [r7, #4]
8002a5c: 681b ldr r3, [r3, #0]
8002a5e: 4934 ldr r1, [pc, #208] ; (8002b30 <HAL_I2C_Init+0x120>)
8002a60: 400a ands r2, r1
8002a62: 611a str r2, [r3, #16]
/*---------------------------- I2Cx OAR1 Configuration ---------------------*/
/* Disable Own Address1 before set the Own Address1 configuration */
hi2c->Instance->OAR1 &= ~I2C_OAR1_OA1EN;
8002a64: 687b ldr r3, [r7, #4]
8002a66: 681b ldr r3, [r3, #0]
8002a68: 689a ldr r2, [r3, #8]
8002a6a: 687b ldr r3, [r7, #4]
8002a6c: 681b ldr r3, [r3, #0]
8002a6e: 4931 ldr r1, [pc, #196] ; (8002b34 <HAL_I2C_Init+0x124>)
8002a70: 400a ands r2, r1
8002a72: 609a str r2, [r3, #8]
/* Configure I2Cx: Own Address1 and ack own address1 mode */
if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_7BIT)
8002a74: 687b ldr r3, [r7, #4]
8002a76: 68db ldr r3, [r3, #12]
8002a78: 2b01 cmp r3, #1
8002a7a: d108 bne.n 8002a8e <HAL_I2C_Init+0x7e>
{
hi2c->Instance->OAR1 = (I2C_OAR1_OA1EN | hi2c->Init.OwnAddress1);
8002a7c: 687b ldr r3, [r7, #4]
8002a7e: 689a ldr r2, [r3, #8]
8002a80: 687b ldr r3, [r7, #4]
8002a82: 681b ldr r3, [r3, #0]
8002a84: 2180 movs r1, #128 ; 0x80
8002a86: 0209 lsls r1, r1, #8
8002a88: 430a orrs r2, r1
8002a8a: 609a str r2, [r3, #8]
8002a8c: e007 b.n 8002a9e <HAL_I2C_Init+0x8e>
}
else /* I2C_ADDRESSINGMODE_10BIT */
{
hi2c->Instance->OAR1 = (I2C_OAR1_OA1EN | I2C_OAR1_OA1MODE | hi2c->Init.OwnAddress1);
8002a8e: 687b ldr r3, [r7, #4]
8002a90: 689a ldr r2, [r3, #8]
8002a92: 687b ldr r3, [r7, #4]
8002a94: 681b ldr r3, [r3, #0]
8002a96: 2184 movs r1, #132 ; 0x84
8002a98: 0209 lsls r1, r1, #8
8002a9a: 430a orrs r2, r1
8002a9c: 609a str r2, [r3, #8]
}
/*---------------------------- I2Cx CR2 Configuration ----------------------*/
/* Configure I2Cx: Addressing Master mode */
if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_10BIT)
8002a9e: 687b ldr r3, [r7, #4]
8002aa0: 68db ldr r3, [r3, #12]
8002aa2: 2b02 cmp r3, #2
8002aa4: d104 bne.n 8002ab0 <HAL_I2C_Init+0xa0>
{
hi2c->Instance->CR2 = (I2C_CR2_ADD10);
8002aa6: 687b ldr r3, [r7, #4]
8002aa8: 681b ldr r3, [r3, #0]
8002aaa: 2280 movs r2, #128 ; 0x80
8002aac: 0112 lsls r2, r2, #4
8002aae: 605a str r2, [r3, #4]
}
/* Enable the AUTOEND by default, and enable NACK (should be disable only during Slave process */
hi2c->Instance->CR2 |= (I2C_CR2_AUTOEND | I2C_CR2_NACK);
8002ab0: 687b ldr r3, [r7, #4]
8002ab2: 681b ldr r3, [r3, #0]
8002ab4: 685a ldr r2, [r3, #4]
8002ab6: 687b ldr r3, [r7, #4]
8002ab8: 681b ldr r3, [r3, #0]
8002aba: 491f ldr r1, [pc, #124] ; (8002b38 <HAL_I2C_Init+0x128>)
8002abc: 430a orrs r2, r1
8002abe: 605a str r2, [r3, #4]
/*---------------------------- I2Cx OAR2 Configuration ---------------------*/
/* Disable Own Address2 before set the Own Address2 configuration */
hi2c->Instance->OAR2 &= ~I2C_DUALADDRESS_ENABLE;
8002ac0: 687b ldr r3, [r7, #4]
8002ac2: 681b ldr r3, [r3, #0]
8002ac4: 68da ldr r2, [r3, #12]
8002ac6: 687b ldr r3, [r7, #4]
8002ac8: 681b ldr r3, [r3, #0]
8002aca: 491a ldr r1, [pc, #104] ; (8002b34 <HAL_I2C_Init+0x124>)
8002acc: 400a ands r2, r1
8002ace: 60da str r2, [r3, #12]
/* Configure I2Cx: Dual mode and Own Address2 */
hi2c->Instance->OAR2 = (hi2c->Init.DualAddressMode | hi2c->Init.OwnAddress2 | \
8002ad0: 687b ldr r3, [r7, #4]
8002ad2: 691a ldr r2, [r3, #16]
8002ad4: 687b ldr r3, [r7, #4]
8002ad6: 695b ldr r3, [r3, #20]
8002ad8: 431a orrs r2, r3
8002ada: 0011 movs r1, r2
(hi2c->Init.OwnAddress2Masks << 8));
8002adc: 687b ldr r3, [r7, #4]
8002ade: 699b ldr r3, [r3, #24]
8002ae0: 021a lsls r2, r3, #8
hi2c->Instance->OAR2 = (hi2c->Init.DualAddressMode | hi2c->Init.OwnAddress2 | \
8002ae2: 687b ldr r3, [r7, #4]
8002ae4: 681b ldr r3, [r3, #0]
8002ae6: 430a orrs r2, r1
8002ae8: 60da str r2, [r3, #12]
/*---------------------------- I2Cx CR1 Configuration ----------------------*/
/* Configure I2Cx: Generalcall and NoStretch mode */
hi2c->Instance->CR1 = (hi2c->Init.GeneralCallMode | hi2c->Init.NoStretchMode);
8002aea: 687b ldr r3, [r7, #4]
8002aec: 69d9 ldr r1, [r3, #28]
8002aee: 687b ldr r3, [r7, #4]
8002af0: 6a1a ldr r2, [r3, #32]
8002af2: 687b ldr r3, [r7, #4]
8002af4: 681b ldr r3, [r3, #0]
8002af6: 430a orrs r2, r1
8002af8: 601a str r2, [r3, #0]
/* Enable the selected I2C peripheral */
__HAL_I2C_ENABLE(hi2c);
8002afa: 687b ldr r3, [r7, #4]
8002afc: 681b ldr r3, [r3, #0]
8002afe: 681a ldr r2, [r3, #0]
8002b00: 687b ldr r3, [r7, #4]
8002b02: 681b ldr r3, [r3, #0]
8002b04: 2101 movs r1, #1
8002b06: 430a orrs r2, r1
8002b08: 601a str r2, [r3, #0]
hi2c->ErrorCode = HAL_I2C_ERROR_NONE;
8002b0a: 687b ldr r3, [r7, #4]
8002b0c: 2200 movs r2, #0
8002b0e: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
8002b10: 687b ldr r3, [r7, #4]
8002b12: 2241 movs r2, #65 ; 0x41
8002b14: 2120 movs r1, #32
8002b16: 5499 strb r1, [r3, r2]
hi2c->PreviousState = I2C_STATE_NONE;
8002b18: 687b ldr r3, [r7, #4]
8002b1a: 2200 movs r2, #0
8002b1c: 631a str r2, [r3, #48] ; 0x30
hi2c->Mode = HAL_I2C_MODE_NONE;
8002b1e: 687b ldr r3, [r7, #4]
8002b20: 2242 movs r2, #66 ; 0x42
8002b22: 2100 movs r1, #0
8002b24: 5499 strb r1, [r3, r2]
return HAL_OK;
8002b26: 2300 movs r3, #0
}
8002b28: 0018 movs r0, r3
8002b2a: 46bd mov sp, r7
8002b2c: b002 add sp, #8
8002b2e: bd80 pop {r7, pc}
8002b30: f0ffffff .word 0xf0ffffff
8002b34: ffff7fff .word 0xffff7fff
8002b38: 02008000 .word 0x02008000
08002b3c <HAL_I2C_Mem_Write>:
* @param Timeout Timeout duration
* @retval HAL status
*/
HAL_StatusTypeDef HAL_I2C_Mem_Write(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress,
uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout)
{
8002b3c: b590 push {r4, r7, lr}
8002b3e: b089 sub sp, #36 ; 0x24
8002b40: af02 add r7, sp, #8
8002b42: 60f8 str r0, [r7, #12]
8002b44: 000c movs r4, r1
8002b46: 0010 movs r0, r2
8002b48: 0019 movs r1, r3
8002b4a: 230a movs r3, #10
8002b4c: 18fb adds r3, r7, r3
8002b4e: 1c22 adds r2, r4, #0
8002b50: 801a strh r2, [r3, #0]
8002b52: 2308 movs r3, #8
8002b54: 18fb adds r3, r7, r3
8002b56: 1c02 adds r2, r0, #0
8002b58: 801a strh r2, [r3, #0]
8002b5a: 1dbb adds r3, r7, #6
8002b5c: 1c0a adds r2, r1, #0
8002b5e: 801a strh r2, [r3, #0]
uint32_t tickstart;
/* Check the parameters */
assert_param(IS_I2C_MEMADD_SIZE(MemAddSize));
if (hi2c->State == HAL_I2C_STATE_READY)
8002b60: 68fb ldr r3, [r7, #12]
8002b62: 2241 movs r2, #65 ; 0x41
8002b64: 5c9b ldrb r3, [r3, r2]
8002b66: b2db uxtb r3, r3
8002b68: 2b20 cmp r3, #32
8002b6a: d000 beq.n 8002b6e <HAL_I2C_Mem_Write+0x32>
8002b6c: e10c b.n 8002d88 <HAL_I2C_Mem_Write+0x24c>
{
if ((pData == NULL) || (Size == 0U))
8002b6e: 6abb ldr r3, [r7, #40] ; 0x28
8002b70: 2b00 cmp r3, #0
8002b72: d004 beq.n 8002b7e <HAL_I2C_Mem_Write+0x42>
8002b74: 232c movs r3, #44 ; 0x2c
8002b76: 18fb adds r3, r7, r3
8002b78: 881b ldrh r3, [r3, #0]
8002b7a: 2b00 cmp r3, #0
8002b7c: d105 bne.n 8002b8a <HAL_I2C_Mem_Write+0x4e>
{
hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM;
8002b7e: 68fb ldr r3, [r7, #12]
8002b80: 2280 movs r2, #128 ; 0x80
8002b82: 0092 lsls r2, r2, #2
8002b84: 645a str r2, [r3, #68] ; 0x44
return HAL_ERROR;
8002b86: 2301 movs r3, #1
8002b88: e0ff b.n 8002d8a <HAL_I2C_Mem_Write+0x24e>
}
/* Process Locked */
__HAL_LOCK(hi2c);
8002b8a: 68fb ldr r3, [r7, #12]
8002b8c: 2240 movs r2, #64 ; 0x40
8002b8e: 5c9b ldrb r3, [r3, r2]
8002b90: 2b01 cmp r3, #1
8002b92: d101 bne.n 8002b98 <HAL_I2C_Mem_Write+0x5c>
8002b94: 2302 movs r3, #2
8002b96: e0f8 b.n 8002d8a <HAL_I2C_Mem_Write+0x24e>
8002b98: 68fb ldr r3, [r7, #12]
8002b9a: 2240 movs r2, #64 ; 0x40
8002b9c: 2101 movs r1, #1
8002b9e: 5499 strb r1, [r3, r2]
/* Init tickstart for timeout management*/
tickstart = HAL_GetTick();
8002ba0: f7ff f8f4 bl 8001d8c <HAL_GetTick>
8002ba4: 0003 movs r3, r0
8002ba6: 617b str r3, [r7, #20]
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_BUSY, SET, I2C_TIMEOUT_BUSY, tickstart) != HAL_OK)
8002ba8: 2380 movs r3, #128 ; 0x80
8002baa: 0219 lsls r1, r3, #8
8002bac: 68f8 ldr r0, [r7, #12]
8002bae: 697b ldr r3, [r7, #20]
8002bb0: 9300 str r3, [sp, #0]
8002bb2: 2319 movs r3, #25
8002bb4: 2201 movs r2, #1
8002bb6: f000 fb0b bl 80031d0 <I2C_WaitOnFlagUntilTimeout>
8002bba: 1e03 subs r3, r0, #0
8002bbc: d001 beq.n 8002bc2 <HAL_I2C_Mem_Write+0x86>
{
return HAL_ERROR;
8002bbe: 2301 movs r3, #1
8002bc0: e0e3 b.n 8002d8a <HAL_I2C_Mem_Write+0x24e>
}
hi2c->State = HAL_I2C_STATE_BUSY_TX;
8002bc2: 68fb ldr r3, [r7, #12]
8002bc4: 2241 movs r2, #65 ; 0x41
8002bc6: 2121 movs r1, #33 ; 0x21
8002bc8: 5499 strb r1, [r3, r2]
hi2c->Mode = HAL_I2C_MODE_MEM;
8002bca: 68fb ldr r3, [r7, #12]
8002bcc: 2242 movs r2, #66 ; 0x42
8002bce: 2140 movs r1, #64 ; 0x40
8002bd0: 5499 strb r1, [r3, r2]
hi2c->ErrorCode = HAL_I2C_ERROR_NONE;
8002bd2: 68fb ldr r3, [r7, #12]
8002bd4: 2200 movs r2, #0
8002bd6: 645a str r2, [r3, #68] ; 0x44
/* Prepare transfer parameters */
hi2c->pBuffPtr = pData;
8002bd8: 68fb ldr r3, [r7, #12]
8002bda: 6aba ldr r2, [r7, #40] ; 0x28
8002bdc: 625a str r2, [r3, #36] ; 0x24
hi2c->XferCount = Size;
8002bde: 68fb ldr r3, [r7, #12]
8002be0: 222c movs r2, #44 ; 0x2c
8002be2: 18ba adds r2, r7, r2
8002be4: 8812 ldrh r2, [r2, #0]
8002be6: 855a strh r2, [r3, #42] ; 0x2a
hi2c->XferISR = NULL;
8002be8: 68fb ldr r3, [r7, #12]
8002bea: 2200 movs r2, #0
8002bec: 635a str r2, [r3, #52] ; 0x34
/* Send Slave Address and Memory Address */
if (I2C_RequestMemoryWrite(hi2c, DevAddress, MemAddress, MemAddSize, Timeout, tickstart) != HAL_OK)
8002bee: 1dbb adds r3, r7, #6
8002bf0: 881c ldrh r4, [r3, #0]
8002bf2: 2308 movs r3, #8
8002bf4: 18fb adds r3, r7, r3
8002bf6: 881a ldrh r2, [r3, #0]
8002bf8: 230a movs r3, #10
8002bfa: 18fb adds r3, r7, r3
8002bfc: 8819 ldrh r1, [r3, #0]
8002bfe: 68f8 ldr r0, [r7, #12]
8002c00: 697b ldr r3, [r7, #20]
8002c02: 9301 str r3, [sp, #4]
8002c04: 6b3b ldr r3, [r7, #48] ; 0x30
8002c06: 9300 str r3, [sp, #0]
8002c08: 0023 movs r3, r4
8002c0a: f000 f9f9 bl 8003000 <I2C_RequestMemoryWrite>
8002c0e: 1e03 subs r3, r0, #0
8002c10: d005 beq.n 8002c1e <HAL_I2C_Mem_Write+0xe2>
{
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8002c12: 68fb ldr r3, [r7, #12]
8002c14: 2240 movs r2, #64 ; 0x40
8002c16: 2100 movs r1, #0
8002c18: 5499 strb r1, [r3, r2]
return HAL_ERROR;
8002c1a: 2301 movs r3, #1
8002c1c: e0b5 b.n 8002d8a <HAL_I2C_Mem_Write+0x24e>
}
/* Set NBYTES to write and reload if hi2c->XferCount > MAX_NBYTE_SIZE */
if (hi2c->XferCount > MAX_NBYTE_SIZE)
8002c1e: 68fb ldr r3, [r7, #12]
8002c20: 8d5b ldrh r3, [r3, #42] ; 0x2a
8002c22: b29b uxth r3, r3
8002c24: 2bff cmp r3, #255 ; 0xff
8002c26: d911 bls.n 8002c4c <HAL_I2C_Mem_Write+0x110>
{
hi2c->XferSize = MAX_NBYTE_SIZE;
8002c28: 68fb ldr r3, [r7, #12]
8002c2a: 22ff movs r2, #255 ; 0xff
8002c2c: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_RELOAD_MODE, I2C_NO_STARTSTOP);
8002c2e: 68fb ldr r3, [r7, #12]
8002c30: 8d1b ldrh r3, [r3, #40] ; 0x28
8002c32: b2da uxtb r2, r3
8002c34: 2380 movs r3, #128 ; 0x80
8002c36: 045c lsls r4, r3, #17
8002c38: 230a movs r3, #10
8002c3a: 18fb adds r3, r7, r3
8002c3c: 8819 ldrh r1, [r3, #0]
8002c3e: 68f8 ldr r0, [r7, #12]
8002c40: 2300 movs r3, #0
8002c42: 9300 str r3, [sp, #0]
8002c44: 0023 movs r3, r4
8002c46: f000 fc7d bl 8003544 <I2C_TransferConfig>
8002c4a: e012 b.n 8002c72 <HAL_I2C_Mem_Write+0x136>
}
else
{
hi2c->XferSize = hi2c->XferCount;
8002c4c: 68fb ldr r3, [r7, #12]
8002c4e: 8d5b ldrh r3, [r3, #42] ; 0x2a
8002c50: b29a uxth r2, r3
8002c52: 68fb ldr r3, [r7, #12]
8002c54: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, I2C_NO_STARTSTOP);
8002c56: 68fb ldr r3, [r7, #12]
8002c58: 8d1b ldrh r3, [r3, #40] ; 0x28
8002c5a: b2da uxtb r2, r3
8002c5c: 2380 movs r3, #128 ; 0x80
8002c5e: 049c lsls r4, r3, #18
8002c60: 230a movs r3, #10
8002c62: 18fb adds r3, r7, r3
8002c64: 8819 ldrh r1, [r3, #0]
8002c66: 68f8 ldr r0, [r7, #12]
8002c68: 2300 movs r3, #0
8002c6a: 9300 str r3, [sp, #0]
8002c6c: 0023 movs r3, r4
8002c6e: f000 fc69 bl 8003544 <I2C_TransferConfig>
}
do
{
/* Wait until TXIS flag is set */
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK)
8002c72: 697a ldr r2, [r7, #20]
8002c74: 6b39 ldr r1, [r7, #48] ; 0x30
8002c76: 68fb ldr r3, [r7, #12]
8002c78: 0018 movs r0, r3
8002c7a: f000 fae8 bl 800324e <I2C_WaitOnTXISFlagUntilTimeout>
8002c7e: 1e03 subs r3, r0, #0
8002c80: d001 beq.n 8002c86 <HAL_I2C_Mem_Write+0x14a>
{
return HAL_ERROR;
8002c82: 2301 movs r3, #1
8002c84: e081 b.n 8002d8a <HAL_I2C_Mem_Write+0x24e>
}
/* Write data to TXDR */
hi2c->Instance->TXDR = *hi2c->pBuffPtr;
8002c86: 68fb ldr r3, [r7, #12]
8002c88: 6a5b ldr r3, [r3, #36] ; 0x24
8002c8a: 781a ldrb r2, [r3, #0]
8002c8c: 68fb ldr r3, [r7, #12]
8002c8e: 681b ldr r3, [r3, #0]
8002c90: 629a str r2, [r3, #40] ; 0x28
/* Increment Buffer pointer */
hi2c->pBuffPtr++;
8002c92: 68fb ldr r3, [r7, #12]
8002c94: 6a5b ldr r3, [r3, #36] ; 0x24
8002c96: 1c5a adds r2, r3, #1
8002c98: 68fb ldr r3, [r7, #12]
8002c9a: 625a str r2, [r3, #36] ; 0x24
hi2c->XferCount--;
8002c9c: 68fb ldr r3, [r7, #12]
8002c9e: 8d5b ldrh r3, [r3, #42] ; 0x2a
8002ca0: b29b uxth r3, r3
8002ca2: 3b01 subs r3, #1
8002ca4: b29a uxth r2, r3
8002ca6: 68fb ldr r3, [r7, #12]
8002ca8: 855a strh r2, [r3, #42] ; 0x2a
hi2c->XferSize--;
8002caa: 68fb ldr r3, [r7, #12]
8002cac: 8d1b ldrh r3, [r3, #40] ; 0x28
8002cae: 3b01 subs r3, #1
8002cb0: b29a uxth r2, r3
8002cb2: 68fb ldr r3, [r7, #12]
8002cb4: 851a strh r2, [r3, #40] ; 0x28
if ((hi2c->XferCount != 0U) && (hi2c->XferSize == 0U))
8002cb6: 68fb ldr r3, [r7, #12]
8002cb8: 8d5b ldrh r3, [r3, #42] ; 0x2a
8002cba: b29b uxth r3, r3
8002cbc: 2b00 cmp r3, #0
8002cbe: d03a beq.n 8002d36 <HAL_I2C_Mem_Write+0x1fa>
8002cc0: 68fb ldr r3, [r7, #12]
8002cc2: 8d1b ldrh r3, [r3, #40] ; 0x28
8002cc4: 2b00 cmp r3, #0
8002cc6: d136 bne.n 8002d36 <HAL_I2C_Mem_Write+0x1fa>
{
/* Wait until TCR flag is set */
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TCR, RESET, Timeout, tickstart) != HAL_OK)
8002cc8: 6b3a ldr r2, [r7, #48] ; 0x30
8002cca: 68f8 ldr r0, [r7, #12]
8002ccc: 697b ldr r3, [r7, #20]
8002cce: 9300 str r3, [sp, #0]
8002cd0: 0013 movs r3, r2
8002cd2: 2200 movs r2, #0
8002cd4: 2180 movs r1, #128 ; 0x80
8002cd6: f000 fa7b bl 80031d0 <I2C_WaitOnFlagUntilTimeout>
8002cda: 1e03 subs r3, r0, #0
8002cdc: d001 beq.n 8002ce2 <HAL_I2C_Mem_Write+0x1a6>
{
return HAL_ERROR;
8002cde: 2301 movs r3, #1
8002ce0: e053 b.n 8002d8a <HAL_I2C_Mem_Write+0x24e>
}
if (hi2c->XferCount > MAX_NBYTE_SIZE)
8002ce2: 68fb ldr r3, [r7, #12]
8002ce4: 8d5b ldrh r3, [r3, #42] ; 0x2a
8002ce6: b29b uxth r3, r3
8002ce8: 2bff cmp r3, #255 ; 0xff
8002cea: d911 bls.n 8002d10 <HAL_I2C_Mem_Write+0x1d4>
{
hi2c->XferSize = MAX_NBYTE_SIZE;
8002cec: 68fb ldr r3, [r7, #12]
8002cee: 22ff movs r2, #255 ; 0xff
8002cf0: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_RELOAD_MODE,
8002cf2: 68fb ldr r3, [r7, #12]
8002cf4: 8d1b ldrh r3, [r3, #40] ; 0x28
8002cf6: b2da uxtb r2, r3
8002cf8: 2380 movs r3, #128 ; 0x80
8002cfa: 045c lsls r4, r3, #17
8002cfc: 230a movs r3, #10
8002cfe: 18fb adds r3, r7, r3
8002d00: 8819 ldrh r1, [r3, #0]
8002d02: 68f8 ldr r0, [r7, #12]
8002d04: 2300 movs r3, #0
8002d06: 9300 str r3, [sp, #0]
8002d08: 0023 movs r3, r4
8002d0a: f000 fc1b bl 8003544 <I2C_TransferConfig>
8002d0e: e012 b.n 8002d36 <HAL_I2C_Mem_Write+0x1fa>
I2C_NO_STARTSTOP);
}
else
{
hi2c->XferSize = hi2c->XferCount;
8002d10: 68fb ldr r3, [r7, #12]
8002d12: 8d5b ldrh r3, [r3, #42] ; 0x2a
8002d14: b29a uxth r2, r3
8002d16: 68fb ldr r3, [r7, #12]
8002d18: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE,
8002d1a: 68fb ldr r3, [r7, #12]
8002d1c: 8d1b ldrh r3, [r3, #40] ; 0x28
8002d1e: b2da uxtb r2, r3
8002d20: 2380 movs r3, #128 ; 0x80
8002d22: 049c lsls r4, r3, #18
8002d24: 230a movs r3, #10
8002d26: 18fb adds r3, r7, r3
8002d28: 8819 ldrh r1, [r3, #0]
8002d2a: 68f8 ldr r0, [r7, #12]
8002d2c: 2300 movs r3, #0
8002d2e: 9300 str r3, [sp, #0]
8002d30: 0023 movs r3, r4
8002d32: f000 fc07 bl 8003544 <I2C_TransferConfig>
I2C_NO_STARTSTOP);
}
}
} while (hi2c->XferCount > 0U);
8002d36: 68fb ldr r3, [r7, #12]
8002d38: 8d5b ldrh r3, [r3, #42] ; 0x2a
8002d3a: b29b uxth r3, r3
8002d3c: 2b00 cmp r3, #0
8002d3e: d198 bne.n 8002c72 <HAL_I2C_Mem_Write+0x136>
/* No need to Check TC flag, with AUTOEND mode the stop is automatically generated */
/* Wait until STOPF flag is reset */
if (I2C_WaitOnSTOPFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK)
8002d40: 697a ldr r2, [r7, #20]
8002d42: 6b39 ldr r1, [r7, #48] ; 0x30
8002d44: 68fb ldr r3, [r7, #12]
8002d46: 0018 movs r0, r3
8002d48: f000 fac0 bl 80032cc <I2C_WaitOnSTOPFlagUntilTimeout>
8002d4c: 1e03 subs r3, r0, #0
8002d4e: d001 beq.n 8002d54 <HAL_I2C_Mem_Write+0x218>
{
return HAL_ERROR;
8002d50: 2301 movs r3, #1
8002d52: e01a b.n 8002d8a <HAL_I2C_Mem_Write+0x24e>
}
/* Clear STOP Flag */
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF);
8002d54: 68fb ldr r3, [r7, #12]
8002d56: 681b ldr r3, [r3, #0]
8002d58: 2220 movs r2, #32
8002d5a: 61da str r2, [r3, #28]
/* Clear Configuration Register 2 */
I2C_RESET_CR2(hi2c);
8002d5c: 68fb ldr r3, [r7, #12]
8002d5e: 681b ldr r3, [r3, #0]
8002d60: 685a ldr r2, [r3, #4]
8002d62: 68fb ldr r3, [r7, #12]
8002d64: 681b ldr r3, [r3, #0]
8002d66: 490b ldr r1, [pc, #44] ; (8002d94 <HAL_I2C_Mem_Write+0x258>)
8002d68: 400a ands r2, r1
8002d6a: 605a str r2, [r3, #4]
hi2c->State = HAL_I2C_STATE_READY;
8002d6c: 68fb ldr r3, [r7, #12]
8002d6e: 2241 movs r2, #65 ; 0x41
8002d70: 2120 movs r1, #32
8002d72: 5499 strb r1, [r3, r2]
hi2c->Mode = HAL_I2C_MODE_NONE;
8002d74: 68fb ldr r3, [r7, #12]
8002d76: 2242 movs r2, #66 ; 0x42
8002d78: 2100 movs r1, #0
8002d7a: 5499 strb r1, [r3, r2]
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8002d7c: 68fb ldr r3, [r7, #12]
8002d7e: 2240 movs r2, #64 ; 0x40
8002d80: 2100 movs r1, #0
8002d82: 5499 strb r1, [r3, r2]
return HAL_OK;
8002d84: 2300 movs r3, #0
8002d86: e000 b.n 8002d8a <HAL_I2C_Mem_Write+0x24e>
}
else
{
return HAL_BUSY;
8002d88: 2302 movs r3, #2
}
}
8002d8a: 0018 movs r0, r3
8002d8c: 46bd mov sp, r7
8002d8e: b007 add sp, #28
8002d90: bd90 pop {r4, r7, pc}
8002d92: 46c0 nop ; (mov r8, r8)
8002d94: fe00e800 .word 0xfe00e800
08002d98 <HAL_I2C_Mem_Read>:
* @param Timeout Timeout duration
* @retval HAL status
*/
HAL_StatusTypeDef HAL_I2C_Mem_Read(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress,
uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout)
{
8002d98: b590 push {r4, r7, lr}
8002d9a: b089 sub sp, #36 ; 0x24
8002d9c: af02 add r7, sp, #8
8002d9e: 60f8 str r0, [r7, #12]
8002da0: 000c movs r4, r1
8002da2: 0010 movs r0, r2
8002da4: 0019 movs r1, r3
8002da6: 230a movs r3, #10
8002da8: 18fb adds r3, r7, r3
8002daa: 1c22 adds r2, r4, #0
8002dac: 801a strh r2, [r3, #0]
8002dae: 2308 movs r3, #8
8002db0: 18fb adds r3, r7, r3
8002db2: 1c02 adds r2, r0, #0
8002db4: 801a strh r2, [r3, #0]
8002db6: 1dbb adds r3, r7, #6
8002db8: 1c0a adds r2, r1, #0
8002dba: 801a strh r2, [r3, #0]
uint32_t tickstart;
/* Check the parameters */
assert_param(IS_I2C_MEMADD_SIZE(MemAddSize));
if (hi2c->State == HAL_I2C_STATE_READY)
8002dbc: 68fb ldr r3, [r7, #12]
8002dbe: 2241 movs r2, #65 ; 0x41
8002dc0: 5c9b ldrb r3, [r3, r2]
8002dc2: b2db uxtb r3, r3
8002dc4: 2b20 cmp r3, #32
8002dc6: d000 beq.n 8002dca <HAL_I2C_Mem_Read+0x32>
8002dc8: e110 b.n 8002fec <HAL_I2C_Mem_Read+0x254>
{
if ((pData == NULL) || (Size == 0U))
8002dca: 6abb ldr r3, [r7, #40] ; 0x28
8002dcc: 2b00 cmp r3, #0
8002dce: d004 beq.n 8002dda <HAL_I2C_Mem_Read+0x42>
8002dd0: 232c movs r3, #44 ; 0x2c
8002dd2: 18fb adds r3, r7, r3
8002dd4: 881b ldrh r3, [r3, #0]
8002dd6: 2b00 cmp r3, #0
8002dd8: d105 bne.n 8002de6 <HAL_I2C_Mem_Read+0x4e>
{
hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM;
8002dda: 68fb ldr r3, [r7, #12]
8002ddc: 2280 movs r2, #128 ; 0x80
8002dde: 0092 lsls r2, r2, #2
8002de0: 645a str r2, [r3, #68] ; 0x44
return HAL_ERROR;
8002de2: 2301 movs r3, #1
8002de4: e103 b.n 8002fee <HAL_I2C_Mem_Read+0x256>
}
/* Process Locked */
__HAL_LOCK(hi2c);
8002de6: 68fb ldr r3, [r7, #12]
8002de8: 2240 movs r2, #64 ; 0x40
8002dea: 5c9b ldrb r3, [r3, r2]
8002dec: 2b01 cmp r3, #1
8002dee: d101 bne.n 8002df4 <HAL_I2C_Mem_Read+0x5c>
8002df0: 2302 movs r3, #2
8002df2: e0fc b.n 8002fee <HAL_I2C_Mem_Read+0x256>
8002df4: 68fb ldr r3, [r7, #12]
8002df6: 2240 movs r2, #64 ; 0x40
8002df8: 2101 movs r1, #1
8002dfa: 5499 strb r1, [r3, r2]
/* Init tickstart for timeout management*/
tickstart = HAL_GetTick();
8002dfc: f7fe ffc6 bl 8001d8c <HAL_GetTick>
8002e00: 0003 movs r3, r0
8002e02: 617b str r3, [r7, #20]
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_BUSY, SET, I2C_TIMEOUT_BUSY, tickstart) != HAL_OK)
8002e04: 2380 movs r3, #128 ; 0x80
8002e06: 0219 lsls r1, r3, #8
8002e08: 68f8 ldr r0, [r7, #12]
8002e0a: 697b ldr r3, [r7, #20]
8002e0c: 9300 str r3, [sp, #0]
8002e0e: 2319 movs r3, #25
8002e10: 2201 movs r2, #1
8002e12: f000 f9dd bl 80031d0 <I2C_WaitOnFlagUntilTimeout>
8002e16: 1e03 subs r3, r0, #0
8002e18: d001 beq.n 8002e1e <HAL_I2C_Mem_Read+0x86>
{
return HAL_ERROR;
8002e1a: 2301 movs r3, #1
8002e1c: e0e7 b.n 8002fee <HAL_I2C_Mem_Read+0x256>
}
hi2c->State = HAL_I2C_STATE_BUSY_RX;
8002e1e: 68fb ldr r3, [r7, #12]
8002e20: 2241 movs r2, #65 ; 0x41
8002e22: 2122 movs r1, #34 ; 0x22
8002e24: 5499 strb r1, [r3, r2]
hi2c->Mode = HAL_I2C_MODE_MEM;
8002e26: 68fb ldr r3, [r7, #12]
8002e28: 2242 movs r2, #66 ; 0x42
8002e2a: 2140 movs r1, #64 ; 0x40
8002e2c: 5499 strb r1, [r3, r2]
hi2c->ErrorCode = HAL_I2C_ERROR_NONE;
8002e2e: 68fb ldr r3, [r7, #12]
8002e30: 2200 movs r2, #0
8002e32: 645a str r2, [r3, #68] ; 0x44
/* Prepare transfer parameters */
hi2c->pBuffPtr = pData;
8002e34: 68fb ldr r3, [r7, #12]
8002e36: 6aba ldr r2, [r7, #40] ; 0x28
8002e38: 625a str r2, [r3, #36] ; 0x24
hi2c->XferCount = Size;
8002e3a: 68fb ldr r3, [r7, #12]
8002e3c: 222c movs r2, #44 ; 0x2c
8002e3e: 18ba adds r2, r7, r2
8002e40: 8812 ldrh r2, [r2, #0]
8002e42: 855a strh r2, [r3, #42] ; 0x2a
hi2c->XferISR = NULL;
8002e44: 68fb ldr r3, [r7, #12]
8002e46: 2200 movs r2, #0
8002e48: 635a str r2, [r3, #52] ; 0x34
/* Send Slave Address and Memory Address */
if (I2C_RequestMemoryRead(hi2c, DevAddress, MemAddress, MemAddSize, Timeout, tickstart) != HAL_OK)
8002e4a: 1dbb adds r3, r7, #6
8002e4c: 881c ldrh r4, [r3, #0]
8002e4e: 2308 movs r3, #8
8002e50: 18fb adds r3, r7, r3
8002e52: 881a ldrh r2, [r3, #0]
8002e54: 230a movs r3, #10
8002e56: 18fb adds r3, r7, r3
8002e58: 8819 ldrh r1, [r3, #0]
8002e5a: 68f8 ldr r0, [r7, #12]
8002e5c: 697b ldr r3, [r7, #20]
8002e5e: 9301 str r3, [sp, #4]
8002e60: 6b3b ldr r3, [r7, #48] ; 0x30
8002e62: 9300 str r3, [sp, #0]
8002e64: 0023 movs r3, r4
8002e66: f000 f92f bl 80030c8 <I2C_RequestMemoryRead>
8002e6a: 1e03 subs r3, r0, #0
8002e6c: d005 beq.n 8002e7a <HAL_I2C_Mem_Read+0xe2>
{
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8002e6e: 68fb ldr r3, [r7, #12]
8002e70: 2240 movs r2, #64 ; 0x40
8002e72: 2100 movs r1, #0
8002e74: 5499 strb r1, [r3, r2]
return HAL_ERROR;
8002e76: 2301 movs r3, #1
8002e78: e0b9 b.n 8002fee <HAL_I2C_Mem_Read+0x256>
}
/* Send Slave Address */
/* Set NBYTES to write and reload if hi2c->XferCount > MAX_NBYTE_SIZE and generate RESTART */
if (hi2c->XferCount > MAX_NBYTE_SIZE)
8002e7a: 68fb ldr r3, [r7, #12]
8002e7c: 8d5b ldrh r3, [r3, #42] ; 0x2a
8002e7e: b29b uxth r3, r3
8002e80: 2bff cmp r3, #255 ; 0xff
8002e82: d911 bls.n 8002ea8 <HAL_I2C_Mem_Read+0x110>
{
hi2c->XferSize = MAX_NBYTE_SIZE;
8002e84: 68fb ldr r3, [r7, #12]
8002e86: 22ff movs r2, #255 ; 0xff
8002e88: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_RELOAD_MODE,
8002e8a: 68fb ldr r3, [r7, #12]
8002e8c: 8d1b ldrh r3, [r3, #40] ; 0x28
8002e8e: b2da uxtb r2, r3
8002e90: 2380 movs r3, #128 ; 0x80
8002e92: 045c lsls r4, r3, #17
8002e94: 230a movs r3, #10
8002e96: 18fb adds r3, r7, r3
8002e98: 8819 ldrh r1, [r3, #0]
8002e9a: 68f8 ldr r0, [r7, #12]
8002e9c: 4b56 ldr r3, [pc, #344] ; (8002ff8 <HAL_I2C_Mem_Read+0x260>)
8002e9e: 9300 str r3, [sp, #0]
8002ea0: 0023 movs r3, r4
8002ea2: f000 fb4f bl 8003544 <I2C_TransferConfig>
8002ea6: e012 b.n 8002ece <HAL_I2C_Mem_Read+0x136>
I2C_GENERATE_START_READ);
}
else
{
hi2c->XferSize = hi2c->XferCount;
8002ea8: 68fb ldr r3, [r7, #12]
8002eaa: 8d5b ldrh r3, [r3, #42] ; 0x2a
8002eac: b29a uxth r2, r3
8002eae: 68fb ldr r3, [r7, #12]
8002eb0: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE,
8002eb2: 68fb ldr r3, [r7, #12]
8002eb4: 8d1b ldrh r3, [r3, #40] ; 0x28
8002eb6: b2da uxtb r2, r3
8002eb8: 2380 movs r3, #128 ; 0x80
8002eba: 049c lsls r4, r3, #18
8002ebc: 230a movs r3, #10
8002ebe: 18fb adds r3, r7, r3
8002ec0: 8819 ldrh r1, [r3, #0]
8002ec2: 68f8 ldr r0, [r7, #12]
8002ec4: 4b4c ldr r3, [pc, #304] ; (8002ff8 <HAL_I2C_Mem_Read+0x260>)
8002ec6: 9300 str r3, [sp, #0]
8002ec8: 0023 movs r3, r4
8002eca: f000 fb3b bl 8003544 <I2C_TransferConfig>
}
do
{
/* Wait until RXNE flag is set */
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_RXNE, RESET, Timeout, tickstart) != HAL_OK)
8002ece: 6b3a ldr r2, [r7, #48] ; 0x30
8002ed0: 68f8 ldr r0, [r7, #12]
8002ed2: 697b ldr r3, [r7, #20]
8002ed4: 9300 str r3, [sp, #0]
8002ed6: 0013 movs r3, r2
8002ed8: 2200 movs r2, #0
8002eda: 2104 movs r1, #4
8002edc: f000 f978 bl 80031d0 <I2C_WaitOnFlagUntilTimeout>
8002ee0: 1e03 subs r3, r0, #0
8002ee2: d001 beq.n 8002ee8 <HAL_I2C_Mem_Read+0x150>
{
return HAL_ERROR;
8002ee4: 2301 movs r3, #1
8002ee6: e082 b.n 8002fee <HAL_I2C_Mem_Read+0x256>
}
/* Read data from RXDR */
*hi2c->pBuffPtr = (uint8_t)hi2c->Instance->RXDR;
8002ee8: 68fb ldr r3, [r7, #12]
8002eea: 681b ldr r3, [r3, #0]
8002eec: 6a5a ldr r2, [r3, #36] ; 0x24
8002eee: 68fb ldr r3, [r7, #12]
8002ef0: 6a5b ldr r3, [r3, #36] ; 0x24
8002ef2: b2d2 uxtb r2, r2
8002ef4: 701a strb r2, [r3, #0]
/* Increment Buffer pointer */
hi2c->pBuffPtr++;
8002ef6: 68fb ldr r3, [r7, #12]
8002ef8: 6a5b ldr r3, [r3, #36] ; 0x24
8002efa: 1c5a adds r2, r3, #1
8002efc: 68fb ldr r3, [r7, #12]
8002efe: 625a str r2, [r3, #36] ; 0x24
hi2c->XferSize--;
8002f00: 68fb ldr r3, [r7, #12]
8002f02: 8d1b ldrh r3, [r3, #40] ; 0x28
8002f04: 3b01 subs r3, #1
8002f06: b29a uxth r2, r3
8002f08: 68fb ldr r3, [r7, #12]
8002f0a: 851a strh r2, [r3, #40] ; 0x28
hi2c->XferCount--;
8002f0c: 68fb ldr r3, [r7, #12]
8002f0e: 8d5b ldrh r3, [r3, #42] ; 0x2a
8002f10: b29b uxth r3, r3
8002f12: 3b01 subs r3, #1
8002f14: b29a uxth r2, r3
8002f16: 68fb ldr r3, [r7, #12]
8002f18: 855a strh r2, [r3, #42] ; 0x2a
if ((hi2c->XferCount != 0U) && (hi2c->XferSize == 0U))
8002f1a: 68fb ldr r3, [r7, #12]
8002f1c: 8d5b ldrh r3, [r3, #42] ; 0x2a
8002f1e: b29b uxth r3, r3
8002f20: 2b00 cmp r3, #0
8002f22: d03a beq.n 8002f9a <HAL_I2C_Mem_Read+0x202>
8002f24: 68fb ldr r3, [r7, #12]
8002f26: 8d1b ldrh r3, [r3, #40] ; 0x28
8002f28: 2b00 cmp r3, #0
8002f2a: d136 bne.n 8002f9a <HAL_I2C_Mem_Read+0x202>
{
/* Wait until TCR flag is set */
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TCR, RESET, Timeout, tickstart) != HAL_OK)
8002f2c: 6b3a ldr r2, [r7, #48] ; 0x30
8002f2e: 68f8 ldr r0, [r7, #12]
8002f30: 697b ldr r3, [r7, #20]
8002f32: 9300 str r3, [sp, #0]
8002f34: 0013 movs r3, r2
8002f36: 2200 movs r2, #0
8002f38: 2180 movs r1, #128 ; 0x80
8002f3a: f000 f949 bl 80031d0 <I2C_WaitOnFlagUntilTimeout>
8002f3e: 1e03 subs r3, r0, #0
8002f40: d001 beq.n 8002f46 <HAL_I2C_Mem_Read+0x1ae>
{
return HAL_ERROR;
8002f42: 2301 movs r3, #1
8002f44: e053 b.n 8002fee <HAL_I2C_Mem_Read+0x256>
}
if (hi2c->XferCount > MAX_NBYTE_SIZE)
8002f46: 68fb ldr r3, [r7, #12]
8002f48: 8d5b ldrh r3, [r3, #42] ; 0x2a
8002f4a: b29b uxth r3, r3
8002f4c: 2bff cmp r3, #255 ; 0xff
8002f4e: d911 bls.n 8002f74 <HAL_I2C_Mem_Read+0x1dc>
{
hi2c->XferSize = MAX_NBYTE_SIZE;
8002f50: 68fb ldr r3, [r7, #12]
8002f52: 22ff movs r2, #255 ; 0xff
8002f54: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t) hi2c->XferSize, I2C_RELOAD_MODE,
8002f56: 68fb ldr r3, [r7, #12]
8002f58: 8d1b ldrh r3, [r3, #40] ; 0x28
8002f5a: b2da uxtb r2, r3
8002f5c: 2380 movs r3, #128 ; 0x80
8002f5e: 045c lsls r4, r3, #17
8002f60: 230a movs r3, #10
8002f62: 18fb adds r3, r7, r3
8002f64: 8819 ldrh r1, [r3, #0]
8002f66: 68f8 ldr r0, [r7, #12]
8002f68: 2300 movs r3, #0
8002f6a: 9300 str r3, [sp, #0]
8002f6c: 0023 movs r3, r4
8002f6e: f000 fae9 bl 8003544 <I2C_TransferConfig>
8002f72: e012 b.n 8002f9a <HAL_I2C_Mem_Read+0x202>
I2C_NO_STARTSTOP);
}
else
{
hi2c->XferSize = hi2c->XferCount;
8002f74: 68fb ldr r3, [r7, #12]
8002f76: 8d5b ldrh r3, [r3, #42] ; 0x2a
8002f78: b29a uxth r2, r3
8002f7a: 68fb ldr r3, [r7, #12]
8002f7c: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE,
8002f7e: 68fb ldr r3, [r7, #12]
8002f80: 8d1b ldrh r3, [r3, #40] ; 0x28
8002f82: b2da uxtb r2, r3
8002f84: 2380 movs r3, #128 ; 0x80
8002f86: 049c lsls r4, r3, #18
8002f88: 230a movs r3, #10
8002f8a: 18fb adds r3, r7, r3
8002f8c: 8819 ldrh r1, [r3, #0]
8002f8e: 68f8 ldr r0, [r7, #12]
8002f90: 2300 movs r3, #0
8002f92: 9300 str r3, [sp, #0]
8002f94: 0023 movs r3, r4
8002f96: f000 fad5 bl 8003544 <I2C_TransferConfig>
I2C_NO_STARTSTOP);
}
}
} while (hi2c->XferCount > 0U);
8002f9a: 68fb ldr r3, [r7, #12]
8002f9c: 8d5b ldrh r3, [r3, #42] ; 0x2a
8002f9e: b29b uxth r3, r3
8002fa0: 2b00 cmp r3, #0
8002fa2: d194 bne.n 8002ece <HAL_I2C_Mem_Read+0x136>
/* No need to Check TC flag, with AUTOEND mode the stop is automatically generated */
/* Wait until STOPF flag is reset */
if (I2C_WaitOnSTOPFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK)
8002fa4: 697a ldr r2, [r7, #20]
8002fa6: 6b39 ldr r1, [r7, #48] ; 0x30
8002fa8: 68fb ldr r3, [r7, #12]
8002faa: 0018 movs r0, r3
8002fac: f000 f98e bl 80032cc <I2C_WaitOnSTOPFlagUntilTimeout>
8002fb0: 1e03 subs r3, r0, #0
8002fb2: d001 beq.n 8002fb8 <HAL_I2C_Mem_Read+0x220>
{
return HAL_ERROR;
8002fb4: 2301 movs r3, #1
8002fb6: e01a b.n 8002fee <HAL_I2C_Mem_Read+0x256>
}
/* Clear STOP Flag */
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF);
8002fb8: 68fb ldr r3, [r7, #12]
8002fba: 681b ldr r3, [r3, #0]
8002fbc: 2220 movs r2, #32
8002fbe: 61da str r2, [r3, #28]
/* Clear Configuration Register 2 */
I2C_RESET_CR2(hi2c);
8002fc0: 68fb ldr r3, [r7, #12]
8002fc2: 681b ldr r3, [r3, #0]
8002fc4: 685a ldr r2, [r3, #4]
8002fc6: 68fb ldr r3, [r7, #12]
8002fc8: 681b ldr r3, [r3, #0]
8002fca: 490c ldr r1, [pc, #48] ; (8002ffc <HAL_I2C_Mem_Read+0x264>)
8002fcc: 400a ands r2, r1
8002fce: 605a str r2, [r3, #4]
hi2c->State = HAL_I2C_STATE_READY;
8002fd0: 68fb ldr r3, [r7, #12]
8002fd2: 2241 movs r2, #65 ; 0x41
8002fd4: 2120 movs r1, #32
8002fd6: 5499 strb r1, [r3, r2]
hi2c->Mode = HAL_I2C_MODE_NONE;
8002fd8: 68fb ldr r3, [r7, #12]
8002fda: 2242 movs r2, #66 ; 0x42
8002fdc: 2100 movs r1, #0
8002fde: 5499 strb r1, [r3, r2]
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8002fe0: 68fb ldr r3, [r7, #12]
8002fe2: 2240 movs r2, #64 ; 0x40
8002fe4: 2100 movs r1, #0
8002fe6: 5499 strb r1, [r3, r2]
return HAL_OK;
8002fe8: 2300 movs r3, #0
8002fea: e000 b.n 8002fee <HAL_I2C_Mem_Read+0x256>
}
else
{
return HAL_BUSY;
8002fec: 2302 movs r3, #2
}
}
8002fee: 0018 movs r0, r3
8002ff0: 46bd mov sp, r7
8002ff2: b007 add sp, #28
8002ff4: bd90 pop {r4, r7, pc}
8002ff6: 46c0 nop ; (mov r8, r8)
8002ff8: 80002400 .word 0x80002400
8002ffc: fe00e800 .word 0xfe00e800
08003000 <I2C_RequestMemoryWrite>:
* @retval HAL status
*/
static HAL_StatusTypeDef I2C_RequestMemoryWrite(I2C_HandleTypeDef *hi2c, uint16_t DevAddress,
uint16_t MemAddress, uint16_t MemAddSize, uint32_t Timeout,
uint32_t Tickstart)
{
8003000: b5b0 push {r4, r5, r7, lr}
8003002: b086 sub sp, #24
8003004: af02 add r7, sp, #8
8003006: 60f8 str r0, [r7, #12]
8003008: 000c movs r4, r1
800300a: 0010 movs r0, r2
800300c: 0019 movs r1, r3
800300e: 250a movs r5, #10
8003010: 197b adds r3, r7, r5
8003012: 1c22 adds r2, r4, #0
8003014: 801a strh r2, [r3, #0]
8003016: 2308 movs r3, #8
8003018: 18fb adds r3, r7, r3
800301a: 1c02 adds r2, r0, #0
800301c: 801a strh r2, [r3, #0]
800301e: 1dbb adds r3, r7, #6
8003020: 1c0a adds r2, r1, #0
8003022: 801a strh r2, [r3, #0]
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)MemAddSize, I2C_RELOAD_MODE, I2C_GENERATE_START_WRITE);
8003024: 1dbb adds r3, r7, #6
8003026: 881b ldrh r3, [r3, #0]
8003028: b2da uxtb r2, r3
800302a: 2380 movs r3, #128 ; 0x80
800302c: 045c lsls r4, r3, #17
800302e: 197b adds r3, r7, r5
8003030: 8819 ldrh r1, [r3, #0]
8003032: 68f8 ldr r0, [r7, #12]
8003034: 4b23 ldr r3, [pc, #140] ; (80030c4 <I2C_RequestMemoryWrite+0xc4>)
8003036: 9300 str r3, [sp, #0]
8003038: 0023 movs r3, r4
800303a: f000 fa83 bl 8003544 <I2C_TransferConfig>
/* Wait until TXIS flag is set */
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK)
800303e: 6a7a ldr r2, [r7, #36] ; 0x24
8003040: 6a39 ldr r1, [r7, #32]
8003042: 68fb ldr r3, [r7, #12]
8003044: 0018 movs r0, r3
8003046: f000 f902 bl 800324e <I2C_WaitOnTXISFlagUntilTimeout>
800304a: 1e03 subs r3, r0, #0
800304c: d001 beq.n 8003052 <I2C_RequestMemoryWrite+0x52>
{
return HAL_ERROR;
800304e: 2301 movs r3, #1
8003050: e033 b.n 80030ba <I2C_RequestMemoryWrite+0xba>
}
/* If Memory address size is 8Bit */
if (MemAddSize == I2C_MEMADD_SIZE_8BIT)
8003052: 1dbb adds r3, r7, #6
8003054: 881b ldrh r3, [r3, #0]
8003056: 2b01 cmp r3, #1
8003058: d107 bne.n 800306a <I2C_RequestMemoryWrite+0x6a>
{
/* Send Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress);
800305a: 2308 movs r3, #8
800305c: 18fb adds r3, r7, r3
800305e: 881b ldrh r3, [r3, #0]
8003060: b2da uxtb r2, r3
8003062: 68fb ldr r3, [r7, #12]
8003064: 681b ldr r3, [r3, #0]
8003066: 629a str r2, [r3, #40] ; 0x28
8003068: e019 b.n 800309e <I2C_RequestMemoryWrite+0x9e>
}
/* If Memory address size is 16Bit */
else
{
/* Send MSB of Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_MSB(MemAddress);
800306a: 2308 movs r3, #8
800306c: 18fb adds r3, r7, r3
800306e: 881b ldrh r3, [r3, #0]
8003070: 0a1b lsrs r3, r3, #8
8003072: b29b uxth r3, r3
8003074: b2da uxtb r2, r3
8003076: 68fb ldr r3, [r7, #12]
8003078: 681b ldr r3, [r3, #0]
800307a: 629a str r2, [r3, #40] ; 0x28
/* Wait until TXIS flag is set */
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK)
800307c: 6a7a ldr r2, [r7, #36] ; 0x24
800307e: 6a39 ldr r1, [r7, #32]
8003080: 68fb ldr r3, [r7, #12]
8003082: 0018 movs r0, r3
8003084: f000 f8e3 bl 800324e <I2C_WaitOnTXISFlagUntilTimeout>
8003088: 1e03 subs r3, r0, #0
800308a: d001 beq.n 8003090 <I2C_RequestMemoryWrite+0x90>
{
return HAL_ERROR;
800308c: 2301 movs r3, #1
800308e: e014 b.n 80030ba <I2C_RequestMemoryWrite+0xba>
}
/* Send LSB of Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress);
8003090: 2308 movs r3, #8
8003092: 18fb adds r3, r7, r3
8003094: 881b ldrh r3, [r3, #0]
8003096: b2da uxtb r2, r3
8003098: 68fb ldr r3, [r7, #12]
800309a: 681b ldr r3, [r3, #0]
800309c: 629a str r2, [r3, #40] ; 0x28
}
/* Wait until TCR flag is set */
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TCR, RESET, Timeout, Tickstart) != HAL_OK)
800309e: 6a3a ldr r2, [r7, #32]
80030a0: 68f8 ldr r0, [r7, #12]
80030a2: 6a7b ldr r3, [r7, #36] ; 0x24
80030a4: 9300 str r3, [sp, #0]
80030a6: 0013 movs r3, r2
80030a8: 2200 movs r2, #0
80030aa: 2180 movs r1, #128 ; 0x80
80030ac: f000 f890 bl 80031d0 <I2C_WaitOnFlagUntilTimeout>
80030b0: 1e03 subs r3, r0, #0
80030b2: d001 beq.n 80030b8 <I2C_RequestMemoryWrite+0xb8>
{
return HAL_ERROR;
80030b4: 2301 movs r3, #1
80030b6: e000 b.n 80030ba <I2C_RequestMemoryWrite+0xba>
}
return HAL_OK;
80030b8: 2300 movs r3, #0
}
80030ba: 0018 movs r0, r3
80030bc: 46bd mov sp, r7
80030be: b004 add sp, #16
80030c0: bdb0 pop {r4, r5, r7, pc}
80030c2: 46c0 nop ; (mov r8, r8)
80030c4: 80002000 .word 0x80002000
080030c8 <I2C_RequestMemoryRead>:
* @retval HAL status
*/
static HAL_StatusTypeDef I2C_RequestMemoryRead(I2C_HandleTypeDef *hi2c, uint16_t DevAddress,
uint16_t MemAddress, uint16_t MemAddSize, uint32_t Timeout,
uint32_t Tickstart)
{
80030c8: b5b0 push {r4, r5, r7, lr}
80030ca: b086 sub sp, #24
80030cc: af02 add r7, sp, #8
80030ce: 60f8 str r0, [r7, #12]
80030d0: 000c movs r4, r1
80030d2: 0010 movs r0, r2
80030d4: 0019 movs r1, r3
80030d6: 250a movs r5, #10
80030d8: 197b adds r3, r7, r5
80030da: 1c22 adds r2, r4, #0
80030dc: 801a strh r2, [r3, #0]
80030de: 2308 movs r3, #8
80030e0: 18fb adds r3, r7, r3
80030e2: 1c02 adds r2, r0, #0
80030e4: 801a strh r2, [r3, #0]
80030e6: 1dbb adds r3, r7, #6
80030e8: 1c0a adds r2, r1, #0
80030ea: 801a strh r2, [r3, #0]
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)MemAddSize, I2C_SOFTEND_MODE, I2C_GENERATE_START_WRITE);
80030ec: 1dbb adds r3, r7, #6
80030ee: 881b ldrh r3, [r3, #0]
80030f0: b2da uxtb r2, r3
80030f2: 197b adds r3, r7, r5
80030f4: 8819 ldrh r1, [r3, #0]
80030f6: 68f8 ldr r0, [r7, #12]
80030f8: 4b23 ldr r3, [pc, #140] ; (8003188 <I2C_RequestMemoryRead+0xc0>)
80030fa: 9300 str r3, [sp, #0]
80030fc: 2300 movs r3, #0
80030fe: f000 fa21 bl 8003544 <I2C_TransferConfig>
/* Wait until TXIS flag is set */
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK)
8003102: 6a7a ldr r2, [r7, #36] ; 0x24
8003104: 6a39 ldr r1, [r7, #32]
8003106: 68fb ldr r3, [r7, #12]
8003108: 0018 movs r0, r3
800310a: f000 f8a0 bl 800324e <I2C_WaitOnTXISFlagUntilTimeout>
800310e: 1e03 subs r3, r0, #0
8003110: d001 beq.n 8003116 <I2C_RequestMemoryRead+0x4e>
{
return HAL_ERROR;
8003112: 2301 movs r3, #1
8003114: e033 b.n 800317e <I2C_RequestMemoryRead+0xb6>
}
/* If Memory address size is 8Bit */
if (MemAddSize == I2C_MEMADD_SIZE_8BIT)
8003116: 1dbb adds r3, r7, #6
8003118: 881b ldrh r3, [r3, #0]
800311a: 2b01 cmp r3, #1
800311c: d107 bne.n 800312e <I2C_RequestMemoryRead+0x66>
{
/* Send Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress);
800311e: 2308 movs r3, #8
8003120: 18fb adds r3, r7, r3
8003122: 881b ldrh r3, [r3, #0]
8003124: b2da uxtb r2, r3
8003126: 68fb ldr r3, [r7, #12]
8003128: 681b ldr r3, [r3, #0]
800312a: 629a str r2, [r3, #40] ; 0x28
800312c: e019 b.n 8003162 <I2C_RequestMemoryRead+0x9a>
}
/* If Memory address size is 16Bit */
else
{
/* Send MSB of Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_MSB(MemAddress);
800312e: 2308 movs r3, #8
8003130: 18fb adds r3, r7, r3
8003132: 881b ldrh r3, [r3, #0]
8003134: 0a1b lsrs r3, r3, #8
8003136: b29b uxth r3, r3
8003138: b2da uxtb r2, r3
800313a: 68fb ldr r3, [r7, #12]
800313c: 681b ldr r3, [r3, #0]
800313e: 629a str r2, [r3, #40] ; 0x28
/* Wait until TXIS flag is set */
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK)
8003140: 6a7a ldr r2, [r7, #36] ; 0x24
8003142: 6a39 ldr r1, [r7, #32]
8003144: 68fb ldr r3, [r7, #12]
8003146: 0018 movs r0, r3
8003148: f000 f881 bl 800324e <I2C_WaitOnTXISFlagUntilTimeout>
800314c: 1e03 subs r3, r0, #0
800314e: d001 beq.n 8003154 <I2C_RequestMemoryRead+0x8c>
{
return HAL_ERROR;
8003150: 2301 movs r3, #1
8003152: e014 b.n 800317e <I2C_RequestMemoryRead+0xb6>
}
/* Send LSB of Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress);
8003154: 2308 movs r3, #8
8003156: 18fb adds r3, r7, r3
8003158: 881b ldrh r3, [r3, #0]
800315a: b2da uxtb r2, r3
800315c: 68fb ldr r3, [r7, #12]
800315e: 681b ldr r3, [r3, #0]
8003160: 629a str r2, [r3, #40] ; 0x28
}
/* Wait until TC flag is set */
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TC, RESET, Timeout, Tickstart) != HAL_OK)
8003162: 6a3a ldr r2, [r7, #32]
8003164: 68f8 ldr r0, [r7, #12]
8003166: 6a7b ldr r3, [r7, #36] ; 0x24
8003168: 9300 str r3, [sp, #0]
800316a: 0013 movs r3, r2
800316c: 2200 movs r2, #0
800316e: 2140 movs r1, #64 ; 0x40
8003170: f000 f82e bl 80031d0 <I2C_WaitOnFlagUntilTimeout>
8003174: 1e03 subs r3, r0, #0
8003176: d001 beq.n 800317c <I2C_RequestMemoryRead+0xb4>
{
return HAL_ERROR;
8003178: 2301 movs r3, #1
800317a: e000 b.n 800317e <I2C_RequestMemoryRead+0xb6>
}
return HAL_OK;
800317c: 2300 movs r3, #0
}
800317e: 0018 movs r0, r3
8003180: 46bd mov sp, r7
8003182: b004 add sp, #16
8003184: bdb0 pop {r4, r5, r7, pc}
8003186: 46c0 nop ; (mov r8, r8)
8003188: 80002000 .word 0x80002000
0800318c <I2C_Flush_TXDR>:
* @brief I2C Tx data register flush process.
* @param hi2c I2C handle.
* @retval None
*/
static void I2C_Flush_TXDR(I2C_HandleTypeDef *hi2c)
{
800318c: b580 push {r7, lr}
800318e: b082 sub sp, #8
8003190: af00 add r7, sp, #0
8003192: 6078 str r0, [r7, #4]
/* If a pending TXIS flag is set */
/* Write a dummy data in TXDR to clear it */
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXIS) != RESET)
8003194: 687b ldr r3, [r7, #4]
8003196: 681b ldr r3, [r3, #0]
8003198: 699b ldr r3, [r3, #24]
800319a: 2202 movs r2, #2
800319c: 4013 ands r3, r2
800319e: 2b02 cmp r3, #2
80031a0: d103 bne.n 80031aa <I2C_Flush_TXDR+0x1e>
{
hi2c->Instance->TXDR = 0x00U;
80031a2: 687b ldr r3, [r7, #4]
80031a4: 681b ldr r3, [r3, #0]
80031a6: 2200 movs r2, #0
80031a8: 629a str r2, [r3, #40] ; 0x28
}
/* Flush TX register if not empty */
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXE) == RESET)
80031aa: 687b ldr r3, [r7, #4]
80031ac: 681b ldr r3, [r3, #0]
80031ae: 699b ldr r3, [r3, #24]
80031b0: 2201 movs r2, #1
80031b2: 4013 ands r3, r2
80031b4: 2b01 cmp r3, #1
80031b6: d007 beq.n 80031c8 <I2C_Flush_TXDR+0x3c>
{
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_TXE);
80031b8: 687b ldr r3, [r7, #4]
80031ba: 681b ldr r3, [r3, #0]
80031bc: 699a ldr r2, [r3, #24]
80031be: 687b ldr r3, [r7, #4]
80031c0: 681b ldr r3, [r3, #0]
80031c2: 2101 movs r1, #1
80031c4: 430a orrs r2, r1
80031c6: 619a str r2, [r3, #24]
}
}
80031c8: 46c0 nop ; (mov r8, r8)
80031ca: 46bd mov sp, r7
80031cc: b002 add sp, #8
80031ce: bd80 pop {r7, pc}
080031d0 <I2C_WaitOnFlagUntilTimeout>:
* @param Tickstart Tick start value
* @retval HAL status
*/
static HAL_StatusTypeDef I2C_WaitOnFlagUntilTimeout(I2C_HandleTypeDef *hi2c, uint32_t Flag, FlagStatus Status,
uint32_t Timeout, uint32_t Tickstart)
{
80031d0: b580 push {r7, lr}
80031d2: b084 sub sp, #16
80031d4: af00 add r7, sp, #0
80031d6: 60f8 str r0, [r7, #12]
80031d8: 60b9 str r1, [r7, #8]
80031da: 603b str r3, [r7, #0]
80031dc: 1dfb adds r3, r7, #7
80031de: 701a strb r2, [r3, #0]
while (__HAL_I2C_GET_FLAG(hi2c, Flag) == Status)
80031e0: e021 b.n 8003226 <I2C_WaitOnFlagUntilTimeout+0x56>
{
/* Check for the Timeout */
if (Timeout != HAL_MAX_DELAY)
80031e2: 683b ldr r3, [r7, #0]
80031e4: 3301 adds r3, #1
80031e6: d01e beq.n 8003226 <I2C_WaitOnFlagUntilTimeout+0x56>
{
if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
80031e8: f7fe fdd0 bl 8001d8c <HAL_GetTick>
80031ec: 0002 movs r2, r0
80031ee: 69bb ldr r3, [r7, #24]
80031f0: 1ad3 subs r3, r2, r3
80031f2: 683a ldr r2, [r7, #0]
80031f4: 429a cmp r2, r3
80031f6: d302 bcc.n 80031fe <I2C_WaitOnFlagUntilTimeout+0x2e>
80031f8: 683b ldr r3, [r7, #0]
80031fa: 2b00 cmp r3, #0
80031fc: d113 bne.n 8003226 <I2C_WaitOnFlagUntilTimeout+0x56>
{
hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT;
80031fe: 68fb ldr r3, [r7, #12]
8003200: 6c5b ldr r3, [r3, #68] ; 0x44
8003202: 2220 movs r2, #32
8003204: 431a orrs r2, r3
8003206: 68fb ldr r3, [r7, #12]
8003208: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
800320a: 68fb ldr r3, [r7, #12]
800320c: 2241 movs r2, #65 ; 0x41
800320e: 2120 movs r1, #32
8003210: 5499 strb r1, [r3, r2]
hi2c->Mode = HAL_I2C_MODE_NONE;
8003212: 68fb ldr r3, [r7, #12]
8003214: 2242 movs r2, #66 ; 0x42
8003216: 2100 movs r1, #0
8003218: 5499 strb r1, [r3, r2]
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
800321a: 68fb ldr r3, [r7, #12]
800321c: 2240 movs r2, #64 ; 0x40
800321e: 2100 movs r1, #0
8003220: 5499 strb r1, [r3, r2]
return HAL_ERROR;
8003222: 2301 movs r3, #1
8003224: e00f b.n 8003246 <I2C_WaitOnFlagUntilTimeout+0x76>
while (__HAL_I2C_GET_FLAG(hi2c, Flag) == Status)
8003226: 68fb ldr r3, [r7, #12]
8003228: 681b ldr r3, [r3, #0]
800322a: 699b ldr r3, [r3, #24]
800322c: 68ba ldr r2, [r7, #8]
800322e: 4013 ands r3, r2
8003230: 68ba ldr r2, [r7, #8]
8003232: 1ad3 subs r3, r2, r3
8003234: 425a negs r2, r3
8003236: 4153 adcs r3, r2
8003238: b2db uxtb r3, r3
800323a: 001a movs r2, r3
800323c: 1dfb adds r3, r7, #7
800323e: 781b ldrb r3, [r3, #0]
8003240: 429a cmp r2, r3
8003242: d0ce beq.n 80031e2 <I2C_WaitOnFlagUntilTimeout+0x12>
}
}
}
return HAL_OK;
8003244: 2300 movs r3, #0
}
8003246: 0018 movs r0, r3
8003248: 46bd mov sp, r7
800324a: b004 add sp, #16
800324c: bd80 pop {r7, pc}
0800324e <I2C_WaitOnTXISFlagUntilTimeout>:
* @param Tickstart Tick start value
* @retval HAL status
*/
static HAL_StatusTypeDef I2C_WaitOnTXISFlagUntilTimeout(I2C_HandleTypeDef *hi2c, uint32_t Timeout,
uint32_t Tickstart)
{
800324e: b580 push {r7, lr}
8003250: b084 sub sp, #16
8003252: af00 add r7, sp, #0
8003254: 60f8 str r0, [r7, #12]
8003256: 60b9 str r1, [r7, #8]
8003258: 607a str r2, [r7, #4]
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXIS) == RESET)
800325a: e02b b.n 80032b4 <I2C_WaitOnTXISFlagUntilTimeout+0x66>
{
/* Check if an error is detected */
if (I2C_IsErrorOccurred(hi2c, Timeout, Tickstart) != HAL_OK)
800325c: 687a ldr r2, [r7, #4]
800325e: 68b9 ldr r1, [r7, #8]
8003260: 68fb ldr r3, [r7, #12]
8003262: 0018 movs r0, r3
8003264: f000 f86e bl 8003344 <I2C_IsErrorOccurred>
8003268: 1e03 subs r3, r0, #0
800326a: d001 beq.n 8003270 <I2C_WaitOnTXISFlagUntilTimeout+0x22>
{
return HAL_ERROR;
800326c: 2301 movs r3, #1
800326e: e029 b.n 80032c4 <I2C_WaitOnTXISFlagUntilTimeout+0x76>
}
/* Check for the Timeout */
if (Timeout != HAL_MAX_DELAY)
8003270: 68bb ldr r3, [r7, #8]
8003272: 3301 adds r3, #1
8003274: d01e beq.n 80032b4 <I2C_WaitOnTXISFlagUntilTimeout+0x66>
{
if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
8003276: f7fe fd89 bl 8001d8c <HAL_GetTick>
800327a: 0002 movs r2, r0
800327c: 687b ldr r3, [r7, #4]
800327e: 1ad3 subs r3, r2, r3
8003280: 68ba ldr r2, [r7, #8]
8003282: 429a cmp r2, r3
8003284: d302 bcc.n 800328c <I2C_WaitOnTXISFlagUntilTimeout+0x3e>
8003286: 68bb ldr r3, [r7, #8]
8003288: 2b00 cmp r3, #0
800328a: d113 bne.n 80032b4 <I2C_WaitOnTXISFlagUntilTimeout+0x66>
{
hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT;
800328c: 68fb ldr r3, [r7, #12]
800328e: 6c5b ldr r3, [r3, #68] ; 0x44
8003290: 2220 movs r2, #32
8003292: 431a orrs r2, r3
8003294: 68fb ldr r3, [r7, #12]
8003296: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
8003298: 68fb ldr r3, [r7, #12]
800329a: 2241 movs r2, #65 ; 0x41
800329c: 2120 movs r1, #32
800329e: 5499 strb r1, [r3, r2]
hi2c->Mode = HAL_I2C_MODE_NONE;
80032a0: 68fb ldr r3, [r7, #12]
80032a2: 2242 movs r2, #66 ; 0x42
80032a4: 2100 movs r1, #0
80032a6: 5499 strb r1, [r3, r2]
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
80032a8: 68fb ldr r3, [r7, #12]
80032aa: 2240 movs r2, #64 ; 0x40
80032ac: 2100 movs r1, #0
80032ae: 5499 strb r1, [r3, r2]
return HAL_ERROR;
80032b0: 2301 movs r3, #1
80032b2: e007 b.n 80032c4 <I2C_WaitOnTXISFlagUntilTimeout+0x76>
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXIS) == RESET)
80032b4: 68fb ldr r3, [r7, #12]
80032b6: 681b ldr r3, [r3, #0]
80032b8: 699b ldr r3, [r3, #24]
80032ba: 2202 movs r2, #2
80032bc: 4013 ands r3, r2
80032be: 2b02 cmp r3, #2
80032c0: d1cc bne.n 800325c <I2C_WaitOnTXISFlagUntilTimeout+0xe>
}
}
}
return HAL_OK;
80032c2: 2300 movs r3, #0
}
80032c4: 0018 movs r0, r3
80032c6: 46bd mov sp, r7
80032c8: b004 add sp, #16
80032ca: bd80 pop {r7, pc}
080032cc <I2C_WaitOnSTOPFlagUntilTimeout>:
* @param Tickstart Tick start value
* @retval HAL status
*/
static HAL_StatusTypeDef I2C_WaitOnSTOPFlagUntilTimeout(I2C_HandleTypeDef *hi2c, uint32_t Timeout,
uint32_t Tickstart)
{
80032cc: b580 push {r7, lr}
80032ce: b084 sub sp, #16
80032d0: af00 add r7, sp, #0
80032d2: 60f8 str r0, [r7, #12]
80032d4: 60b9 str r1, [r7, #8]
80032d6: 607a str r2, [r7, #4]
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET)
80032d8: e028 b.n 800332c <I2C_WaitOnSTOPFlagUntilTimeout+0x60>
{
/* Check if an error is detected */
if (I2C_IsErrorOccurred(hi2c, Timeout, Tickstart) != HAL_OK)
80032da: 687a ldr r2, [r7, #4]
80032dc: 68b9 ldr r1, [r7, #8]
80032de: 68fb ldr r3, [r7, #12]
80032e0: 0018 movs r0, r3
80032e2: f000 f82f bl 8003344 <I2C_IsErrorOccurred>
80032e6: 1e03 subs r3, r0, #0
80032e8: d001 beq.n 80032ee <I2C_WaitOnSTOPFlagUntilTimeout+0x22>
{
return HAL_ERROR;
80032ea: 2301 movs r3, #1
80032ec: e026 b.n 800333c <I2C_WaitOnSTOPFlagUntilTimeout+0x70>
}
/* Check for the Timeout */
if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
80032ee: f7fe fd4d bl 8001d8c <HAL_GetTick>
80032f2: 0002 movs r2, r0
80032f4: 687b ldr r3, [r7, #4]
80032f6: 1ad3 subs r3, r2, r3
80032f8: 68ba ldr r2, [r7, #8]
80032fa: 429a cmp r2, r3
80032fc: d302 bcc.n 8003304 <I2C_WaitOnSTOPFlagUntilTimeout+0x38>
80032fe: 68bb ldr r3, [r7, #8]
8003300: 2b00 cmp r3, #0
8003302: d113 bne.n 800332c <I2C_WaitOnSTOPFlagUntilTimeout+0x60>
{
hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT;
8003304: 68fb ldr r3, [r7, #12]
8003306: 6c5b ldr r3, [r3, #68] ; 0x44
8003308: 2220 movs r2, #32
800330a: 431a orrs r2, r3
800330c: 68fb ldr r3, [r7, #12]
800330e: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
8003310: 68fb ldr r3, [r7, #12]
8003312: 2241 movs r2, #65 ; 0x41
8003314: 2120 movs r1, #32
8003316: 5499 strb r1, [r3, r2]
hi2c->Mode = HAL_I2C_MODE_NONE;
8003318: 68fb ldr r3, [r7, #12]
800331a: 2242 movs r2, #66 ; 0x42
800331c: 2100 movs r1, #0
800331e: 5499 strb r1, [r3, r2]
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8003320: 68fb ldr r3, [r7, #12]
8003322: 2240 movs r2, #64 ; 0x40
8003324: 2100 movs r1, #0
8003326: 5499 strb r1, [r3, r2]
return HAL_ERROR;
8003328: 2301 movs r3, #1
800332a: e007 b.n 800333c <I2C_WaitOnSTOPFlagUntilTimeout+0x70>
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET)
800332c: 68fb ldr r3, [r7, #12]
800332e: 681b ldr r3, [r3, #0]
8003330: 699b ldr r3, [r3, #24]
8003332: 2220 movs r2, #32
8003334: 4013 ands r3, r2
8003336: 2b20 cmp r3, #32
8003338: d1cf bne.n 80032da <I2C_WaitOnSTOPFlagUntilTimeout+0xe>
}
}
return HAL_OK;
800333a: 2300 movs r3, #0
}
800333c: 0018 movs r0, r3
800333e: 46bd mov sp, r7
8003340: b004 add sp, #16
8003342: bd80 pop {r7, pc}
08003344 <I2C_IsErrorOccurred>:
* @param Timeout Timeout duration
* @param Tickstart Tick start value
* @retval HAL status
*/
static HAL_StatusTypeDef I2C_IsErrorOccurred(I2C_HandleTypeDef *hi2c, uint32_t Timeout, uint32_t Tickstart)
{
8003344: b590 push {r4, r7, lr}
8003346: b08b sub sp, #44 ; 0x2c
8003348: af00 add r7, sp, #0
800334a: 60f8 str r0, [r7, #12]
800334c: 60b9 str r1, [r7, #8]
800334e: 607a str r2, [r7, #4]
HAL_StatusTypeDef status = HAL_OK;
8003350: 2327 movs r3, #39 ; 0x27
8003352: 18fb adds r3, r7, r3
8003354: 2200 movs r2, #0
8003356: 701a strb r2, [r3, #0]
uint32_t itflag = hi2c->Instance->ISR;
8003358: 68fb ldr r3, [r7, #12]
800335a: 681b ldr r3, [r3, #0]
800335c: 699b ldr r3, [r3, #24]
800335e: 61bb str r3, [r7, #24]
uint32_t error_code = 0;
8003360: 2300 movs r3, #0
8003362: 623b str r3, [r7, #32]
uint32_t tickstart = Tickstart;
8003364: 687b ldr r3, [r7, #4]
8003366: 61fb str r3, [r7, #28]
uint32_t tmp1;
HAL_I2C_ModeTypeDef tmp2;
if (HAL_IS_BIT_SET(itflag, I2C_FLAG_AF))
8003368: 69bb ldr r3, [r7, #24]
800336a: 2210 movs r2, #16
800336c: 4013 ands r3, r2
800336e: d100 bne.n 8003372 <I2C_IsErrorOccurred+0x2e>
8003370: e082 b.n 8003478 <I2C_IsErrorOccurred+0x134>
{
/* Clear NACKF Flag */
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF);
8003372: 68fb ldr r3, [r7, #12]
8003374: 681b ldr r3, [r3, #0]
8003376: 2210 movs r2, #16
8003378: 61da str r2, [r3, #28]
/* Wait until STOP Flag is set or timeout occurred */
/* AutoEnd should be initiate after AF */
while ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET) && (status == HAL_OK))
800337a: e060 b.n 800343e <I2C_IsErrorOccurred+0xfa>
800337c: 2427 movs r4, #39 ; 0x27
800337e: 193b adds r3, r7, r4
8003380: 193a adds r2, r7, r4
8003382: 7812 ldrb r2, [r2, #0]
8003384: 701a strb r2, [r3, #0]
{
/* Check for the Timeout */
if (Timeout != HAL_MAX_DELAY)
8003386: 68bb ldr r3, [r7, #8]
8003388: 3301 adds r3, #1
800338a: d058 beq.n 800343e <I2C_IsErrorOccurred+0xfa>
{
if (((HAL_GetTick() - tickstart) > Timeout) || (Timeout == 0U))
800338c: f7fe fcfe bl 8001d8c <HAL_GetTick>
8003390: 0002 movs r2, r0
8003392: 69fb ldr r3, [r7, #28]
8003394: 1ad3 subs r3, r2, r3
8003396: 68ba ldr r2, [r7, #8]
8003398: 429a cmp r2, r3
800339a: d306 bcc.n 80033aa <I2C_IsErrorOccurred+0x66>
800339c: 193b adds r3, r7, r4
800339e: 193a adds r2, r7, r4
80033a0: 7812 ldrb r2, [r2, #0]
80033a2: 701a strb r2, [r3, #0]
80033a4: 68bb ldr r3, [r7, #8]
80033a6: 2b00 cmp r3, #0
80033a8: d149 bne.n 800343e <I2C_IsErrorOccurred+0xfa>
{
tmp1 = (uint32_t)(hi2c->Instance->CR2 & I2C_CR2_STOP);
80033aa: 68fb ldr r3, [r7, #12]
80033ac: 681b ldr r3, [r3, #0]
80033ae: 685a ldr r2, [r3, #4]
80033b0: 2380 movs r3, #128 ; 0x80
80033b2: 01db lsls r3, r3, #7
80033b4: 4013 ands r3, r2
80033b6: 617b str r3, [r7, #20]
tmp2 = hi2c->Mode;
80033b8: 2013 movs r0, #19
80033ba: 183b adds r3, r7, r0
80033bc: 68fa ldr r2, [r7, #12]
80033be: 2142 movs r1, #66 ; 0x42
80033c0: 5c52 ldrb r2, [r2, r1]
80033c2: 701a strb r2, [r3, #0]
/* In case of I2C still busy, try to regenerate a STOP manually */
if ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) != RESET) && \
80033c4: 68fb ldr r3, [r7, #12]
80033c6: 681b ldr r3, [r3, #0]
80033c8: 699a ldr r2, [r3, #24]
80033ca: 2380 movs r3, #128 ; 0x80
80033cc: 021b lsls r3, r3, #8
80033ce: 401a ands r2, r3
80033d0: 2380 movs r3, #128 ; 0x80
80033d2: 021b lsls r3, r3, #8
80033d4: 429a cmp r2, r3
80033d6: d126 bne.n 8003426 <I2C_IsErrorOccurred+0xe2>
80033d8: 697a ldr r2, [r7, #20]
80033da: 2380 movs r3, #128 ; 0x80
80033dc: 01db lsls r3, r3, #7
80033de: 429a cmp r2, r3
80033e0: d021 beq.n 8003426 <I2C_IsErrorOccurred+0xe2>
(tmp1 != I2C_CR2_STOP) && \
80033e2: 183b adds r3, r7, r0
80033e4: 781b ldrb r3, [r3, #0]
80033e6: 2b20 cmp r3, #32
80033e8: d01d beq.n 8003426 <I2C_IsErrorOccurred+0xe2>
(tmp2 != HAL_I2C_MODE_SLAVE))
{
/* Generate Stop */
hi2c->Instance->CR2 |= I2C_CR2_STOP;
80033ea: 68fb ldr r3, [r7, #12]
80033ec: 681b ldr r3, [r3, #0]
80033ee: 685a ldr r2, [r3, #4]
80033f0: 68fb ldr r3, [r7, #12]
80033f2: 681b ldr r3, [r3, #0]
80033f4: 2180 movs r1, #128 ; 0x80
80033f6: 01c9 lsls r1, r1, #7
80033f8: 430a orrs r2, r1
80033fa: 605a str r2, [r3, #4]
/* Update Tick with new reference */
tickstart = HAL_GetTick();
80033fc: f7fe fcc6 bl 8001d8c <HAL_GetTick>
8003400: 0003 movs r3, r0
8003402: 61fb str r3, [r7, #28]
}
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET)
8003404: e00f b.n 8003426 <I2C_IsErrorOccurred+0xe2>
{
/* Check for the Timeout */
if ((HAL_GetTick() - tickstart) > I2C_TIMEOUT_STOPF)
8003406: f7fe fcc1 bl 8001d8c <HAL_GetTick>
800340a: 0002 movs r2, r0
800340c: 69fb ldr r3, [r7, #28]
800340e: 1ad3 subs r3, r2, r3
8003410: 2b19 cmp r3, #25
8003412: d908 bls.n 8003426 <I2C_IsErrorOccurred+0xe2>
{
error_code |=HAL_I2C_ERROR_TIMEOUT;
8003414: 6a3b ldr r3, [r7, #32]
8003416: 2220 movs r2, #32
8003418: 4313 orrs r3, r2
800341a: 623b str r3, [r7, #32]
status = HAL_ERROR;
800341c: 2327 movs r3, #39 ; 0x27
800341e: 18fb adds r3, r7, r3
8003420: 2201 movs r2, #1
8003422: 701a strb r2, [r3, #0]
break;
8003424: e00b b.n 800343e <I2C_IsErrorOccurred+0xfa>
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET)
8003426: 68fb ldr r3, [r7, #12]
8003428: 681b ldr r3, [r3, #0]
800342a: 699b ldr r3, [r3, #24]
800342c: 2220 movs r2, #32
800342e: 4013 ands r3, r2
8003430: 2127 movs r1, #39 ; 0x27
8003432: 187a adds r2, r7, r1
8003434: 1879 adds r1, r7, r1
8003436: 7809 ldrb r1, [r1, #0]
8003438: 7011 strb r1, [r2, #0]
800343a: 2b20 cmp r3, #32
800343c: d1e3 bne.n 8003406 <I2C_IsErrorOccurred+0xc2>
while ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET) && (status == HAL_OK))
800343e: 68fb ldr r3, [r7, #12]
8003440: 681b ldr r3, [r3, #0]
8003442: 699b ldr r3, [r3, #24]
8003444: 2220 movs r2, #32
8003446: 4013 ands r3, r2
8003448: 2b20 cmp r3, #32
800344a: d004 beq.n 8003456 <I2C_IsErrorOccurred+0x112>
800344c: 2327 movs r3, #39 ; 0x27
800344e: 18fb adds r3, r7, r3
8003450: 781b ldrb r3, [r3, #0]
8003452: 2b00 cmp r3, #0
8003454: d092 beq.n 800337c <I2C_IsErrorOccurred+0x38>
}
}
}
/* In case STOP Flag is detected, clear it */
if (status == HAL_OK)
8003456: 2327 movs r3, #39 ; 0x27
8003458: 18fb adds r3, r7, r3
800345a: 781b ldrb r3, [r3, #0]
800345c: 2b00 cmp r3, #0
800345e: d103 bne.n 8003468 <I2C_IsErrorOccurred+0x124>
{
/* Clear STOP Flag */
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF);
8003460: 68fb ldr r3, [r7, #12]
8003462: 681b ldr r3, [r3, #0]
8003464: 2220 movs r2, #32
8003466: 61da str r2, [r3, #28]
}
error_code |= HAL_I2C_ERROR_AF;
8003468: 6a3b ldr r3, [r7, #32]
800346a: 2204 movs r2, #4
800346c: 4313 orrs r3, r2
800346e: 623b str r3, [r7, #32]
status = HAL_ERROR;
8003470: 2327 movs r3, #39 ; 0x27
8003472: 18fb adds r3, r7, r3
8003474: 2201 movs r2, #1
8003476: 701a strb r2, [r3, #0]
}
/* Refresh Content of Status register */
itflag = hi2c->Instance->ISR;
8003478: 68fb ldr r3, [r7, #12]
800347a: 681b ldr r3, [r3, #0]
800347c: 699b ldr r3, [r3, #24]
800347e: 61bb str r3, [r7, #24]
/* Then verify if an additional errors occurs */
/* Check if a Bus error occurred */
if (HAL_IS_BIT_SET(itflag, I2C_FLAG_BERR))
8003480: 69ba ldr r2, [r7, #24]
8003482: 2380 movs r3, #128 ; 0x80
8003484: 005b lsls r3, r3, #1
8003486: 4013 ands r3, r2
8003488: d00c beq.n 80034a4 <I2C_IsErrorOccurred+0x160>
{
error_code |= HAL_I2C_ERROR_BERR;
800348a: 6a3b ldr r3, [r7, #32]
800348c: 2201 movs r2, #1
800348e: 4313 orrs r3, r2
8003490: 623b str r3, [r7, #32]
/* Clear BERR flag */
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_BERR);
8003492: 68fb ldr r3, [r7, #12]
8003494: 681b ldr r3, [r3, #0]
8003496: 2280 movs r2, #128 ; 0x80
8003498: 0052 lsls r2, r2, #1
800349a: 61da str r2, [r3, #28]
status = HAL_ERROR;
800349c: 2327 movs r3, #39 ; 0x27
800349e: 18fb adds r3, r7, r3
80034a0: 2201 movs r2, #1
80034a2: 701a strb r2, [r3, #0]
}
/* Check if an Over-Run/Under-Run error occurred */
if (HAL_IS_BIT_SET(itflag, I2C_FLAG_OVR))
80034a4: 69ba ldr r2, [r7, #24]
80034a6: 2380 movs r3, #128 ; 0x80
80034a8: 00db lsls r3, r3, #3
80034aa: 4013 ands r3, r2
80034ac: d00c beq.n 80034c8 <I2C_IsErrorOccurred+0x184>
{
error_code |= HAL_I2C_ERROR_OVR;
80034ae: 6a3b ldr r3, [r7, #32]
80034b0: 2208 movs r2, #8
80034b2: 4313 orrs r3, r2
80034b4: 623b str r3, [r7, #32]
/* Clear OVR flag */
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_OVR);
80034b6: 68fb ldr r3, [r7, #12]
80034b8: 681b ldr r3, [r3, #0]
80034ba: 2280 movs r2, #128 ; 0x80
80034bc: 00d2 lsls r2, r2, #3
80034be: 61da str r2, [r3, #28]
status = HAL_ERROR;
80034c0: 2327 movs r3, #39 ; 0x27
80034c2: 18fb adds r3, r7, r3
80034c4: 2201 movs r2, #1
80034c6: 701a strb r2, [r3, #0]
}
/* Check if an Arbitration Loss error occurred */
if (HAL_IS_BIT_SET(itflag, I2C_FLAG_ARLO))
80034c8: 69ba ldr r2, [r7, #24]
80034ca: 2380 movs r3, #128 ; 0x80
80034cc: 009b lsls r3, r3, #2
80034ce: 4013 ands r3, r2
80034d0: d00c beq.n 80034ec <I2C_IsErrorOccurred+0x1a8>
{
error_code |= HAL_I2C_ERROR_ARLO;
80034d2: 6a3b ldr r3, [r7, #32]
80034d4: 2202 movs r2, #2
80034d6: 4313 orrs r3, r2
80034d8: 623b str r3, [r7, #32]
/* Clear ARLO flag */
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_ARLO);
80034da: 68fb ldr r3, [r7, #12]
80034dc: 681b ldr r3, [r3, #0]
80034de: 2280 movs r2, #128 ; 0x80
80034e0: 0092 lsls r2, r2, #2
80034e2: 61da str r2, [r3, #28]
status = HAL_ERROR;
80034e4: 2327 movs r3, #39 ; 0x27
80034e6: 18fb adds r3, r7, r3
80034e8: 2201 movs r2, #1
80034ea: 701a strb r2, [r3, #0]
}
if (status != HAL_OK)
80034ec: 2327 movs r3, #39 ; 0x27
80034ee: 18fb adds r3, r7, r3
80034f0: 781b ldrb r3, [r3, #0]
80034f2: 2b00 cmp r3, #0
80034f4: d01d beq.n 8003532 <I2C_IsErrorOccurred+0x1ee>
{
/* Flush TX register */
I2C_Flush_TXDR(hi2c);
80034f6: 68fb ldr r3, [r7, #12]
80034f8: 0018 movs r0, r3
80034fa: f7ff fe47 bl 800318c <I2C_Flush_TXDR>
/* Clear Configuration Register 2 */
I2C_RESET_CR2(hi2c);
80034fe: 68fb ldr r3, [r7, #12]
8003500: 681b ldr r3, [r3, #0]
8003502: 685a ldr r2, [r3, #4]
8003504: 68fb ldr r3, [r7, #12]
8003506: 681b ldr r3, [r3, #0]
8003508: 490d ldr r1, [pc, #52] ; (8003540 <I2C_IsErrorOccurred+0x1fc>)
800350a: 400a ands r2, r1
800350c: 605a str r2, [r3, #4]
hi2c->ErrorCode |= error_code;
800350e: 68fb ldr r3, [r7, #12]
8003510: 6c5a ldr r2, [r3, #68] ; 0x44
8003512: 6a3b ldr r3, [r7, #32]
8003514: 431a orrs r2, r3
8003516: 68fb ldr r3, [r7, #12]
8003518: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
800351a: 68fb ldr r3, [r7, #12]
800351c: 2241 movs r2, #65 ; 0x41
800351e: 2120 movs r1, #32
8003520: 5499 strb r1, [r3, r2]
hi2c->Mode = HAL_I2C_MODE_NONE;
8003522: 68fb ldr r3, [r7, #12]
8003524: 2242 movs r2, #66 ; 0x42
8003526: 2100 movs r1, #0
8003528: 5499 strb r1, [r3, r2]
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
800352a: 68fb ldr r3, [r7, #12]
800352c: 2240 movs r2, #64 ; 0x40
800352e: 2100 movs r1, #0
8003530: 5499 strb r1, [r3, r2]
}
return status;
8003532: 2327 movs r3, #39 ; 0x27
8003534: 18fb adds r3, r7, r3
8003536: 781b ldrb r3, [r3, #0]
}
8003538: 0018 movs r0, r3
800353a: 46bd mov sp, r7
800353c: b00b add sp, #44 ; 0x2c
800353e: bd90 pop {r4, r7, pc}
8003540: fe00e800 .word 0xfe00e800
08003544 <I2C_TransferConfig>:
* @arg @ref I2C_GENERATE_START_WRITE Generate Restart for write request.
* @retval None
*/
static void I2C_TransferConfig(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t Size, uint32_t Mode,
uint32_t Request)
{
8003544: b590 push {r4, r7, lr}
8003546: b087 sub sp, #28
8003548: af00 add r7, sp, #0
800354a: 60f8 str r0, [r7, #12]
800354c: 0008 movs r0, r1
800354e: 0011 movs r1, r2
8003550: 607b str r3, [r7, #4]
8003552: 240a movs r4, #10
8003554: 193b adds r3, r7, r4
8003556: 1c02 adds r2, r0, #0
8003558: 801a strh r2, [r3, #0]
800355a: 2009 movs r0, #9
800355c: 183b adds r3, r7, r0
800355e: 1c0a adds r2, r1, #0
8003560: 701a strb r2, [r3, #0]
assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance));
assert_param(IS_TRANSFER_MODE(Mode));
assert_param(IS_TRANSFER_REQUEST(Request));
/* Declaration of tmp to prevent undefined behavior of volatile usage */
uint32_t tmp = ((uint32_t)(((uint32_t)DevAddress & I2C_CR2_SADD) | \
8003562: 193b adds r3, r7, r4
8003564: 881b ldrh r3, [r3, #0]
8003566: 059b lsls r3, r3, #22
8003568: 0d9a lsrs r2, r3, #22
(((uint32_t)Size << I2C_CR2_NBYTES_Pos) & I2C_CR2_NBYTES) | \
800356a: 183b adds r3, r7, r0
800356c: 781b ldrb r3, [r3, #0]
800356e: 0419 lsls r1, r3, #16
8003570: 23ff movs r3, #255 ; 0xff
8003572: 041b lsls r3, r3, #16
8003574: 400b ands r3, r1
uint32_t tmp = ((uint32_t)(((uint32_t)DevAddress & I2C_CR2_SADD) | \
8003576: 431a orrs r2, r3
(((uint32_t)Size << I2C_CR2_NBYTES_Pos) & I2C_CR2_NBYTES) | \
8003578: 687b ldr r3, [r7, #4]
800357a: 431a orrs r2, r3
uint32_t tmp = ((uint32_t)(((uint32_t)DevAddress & I2C_CR2_SADD) | \
800357c: 6abb ldr r3, [r7, #40] ; 0x28
800357e: 4313 orrs r3, r2
8003580: 005b lsls r3, r3, #1
8003582: 085b lsrs r3, r3, #1
8003584: 617b str r3, [r7, #20]
(uint32_t)Mode | (uint32_t)Request) & (~0x80000000U));
/* update CR2 register */
MODIFY_REG(hi2c->Instance->CR2, \
8003586: 68fb ldr r3, [r7, #12]
8003588: 681b ldr r3, [r3, #0]
800358a: 685b ldr r3, [r3, #4]
800358c: 6aba ldr r2, [r7, #40] ; 0x28
800358e: 0d51 lsrs r1, r2, #21
8003590: 2280 movs r2, #128 ; 0x80
8003592: 00d2 lsls r2, r2, #3
8003594: 400a ands r2, r1
8003596: 4907 ldr r1, [pc, #28] ; (80035b4 <I2C_TransferConfig+0x70>)
8003598: 430a orrs r2, r1
800359a: 43d2 mvns r2, r2
800359c: 401a ands r2, r3
800359e: 0011 movs r1, r2
80035a0: 68fb ldr r3, [r7, #12]
80035a2: 681b ldr r3, [r3, #0]
80035a4: 697a ldr r2, [r7, #20]
80035a6: 430a orrs r2, r1
80035a8: 605a str r2, [r3, #4]
((I2C_CR2_SADD | I2C_CR2_NBYTES | I2C_CR2_RELOAD | I2C_CR2_AUTOEND | \
(I2C_CR2_RD_WRN & (uint32_t)(Request >> (31U - I2C_CR2_RD_WRN_Pos))) | \
I2C_CR2_START | I2C_CR2_STOP)), tmp);
}
80035aa: 46c0 nop ; (mov r8, r8)
80035ac: 46bd mov sp, r7
80035ae: b007 add sp, #28
80035b0: bd90 pop {r4, r7, pc}
80035b2: 46c0 nop ; (mov r8, r8)
80035b4: 03ff63ff .word 0x03ff63ff
080035b8 <HAL_I2CEx_ConfigAnalogFilter>:
* the configuration information for the specified I2Cx peripheral.
* @param AnalogFilter New state of the Analog filter.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter)
{
80035b8: b580 push {r7, lr}
80035ba: b082 sub sp, #8
80035bc: af00 add r7, sp, #0
80035be: 6078 str r0, [r7, #4]
80035c0: 6039 str r1, [r7, #0]
/* Check the parameters */
assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance));
assert_param(IS_I2C_ANALOG_FILTER(AnalogFilter));
if (hi2c->State == HAL_I2C_STATE_READY)
80035c2: 687b ldr r3, [r7, #4]
80035c4: 2241 movs r2, #65 ; 0x41
80035c6: 5c9b ldrb r3, [r3, r2]
80035c8: b2db uxtb r3, r3
80035ca: 2b20 cmp r3, #32
80035cc: d138 bne.n 8003640 <HAL_I2CEx_ConfigAnalogFilter+0x88>
{
/* Process Locked */
__HAL_LOCK(hi2c);
80035ce: 687b ldr r3, [r7, #4]
80035d0: 2240 movs r2, #64 ; 0x40
80035d2: 5c9b ldrb r3, [r3, r2]
80035d4: 2b01 cmp r3, #1
80035d6: d101 bne.n 80035dc <HAL_I2CEx_ConfigAnalogFilter+0x24>
80035d8: 2302 movs r3, #2
80035da: e032 b.n 8003642 <HAL_I2CEx_ConfigAnalogFilter+0x8a>
80035dc: 687b ldr r3, [r7, #4]
80035de: 2240 movs r2, #64 ; 0x40
80035e0: 2101 movs r1, #1
80035e2: 5499 strb r1, [r3, r2]
hi2c->State = HAL_I2C_STATE_BUSY;
80035e4: 687b ldr r3, [r7, #4]
80035e6: 2241 movs r2, #65 ; 0x41
80035e8: 2124 movs r1, #36 ; 0x24
80035ea: 5499 strb r1, [r3, r2]
/* Disable the selected I2C peripheral */
__HAL_I2C_DISABLE(hi2c);
80035ec: 687b ldr r3, [r7, #4]
80035ee: 681b ldr r3, [r3, #0]
80035f0: 681a ldr r2, [r3, #0]
80035f2: 687b ldr r3, [r7, #4]
80035f4: 681b ldr r3, [r3, #0]
80035f6: 2101 movs r1, #1
80035f8: 438a bics r2, r1
80035fa: 601a str r2, [r3, #0]
/* Reset I2Cx ANOFF bit */
hi2c->Instance->CR1 &= ~(I2C_CR1_ANFOFF);
80035fc: 687b ldr r3, [r7, #4]
80035fe: 681b ldr r3, [r3, #0]
8003600: 681a ldr r2, [r3, #0]
8003602: 687b ldr r3, [r7, #4]
8003604: 681b ldr r3, [r3, #0]
8003606: 4911 ldr r1, [pc, #68] ; (800364c <HAL_I2CEx_ConfigAnalogFilter+0x94>)
8003608: 400a ands r2, r1
800360a: 601a str r2, [r3, #0]
/* Set analog filter bit*/
hi2c->Instance->CR1 |= AnalogFilter;
800360c: 687b ldr r3, [r7, #4]
800360e: 681b ldr r3, [r3, #0]
8003610: 6819 ldr r1, [r3, #0]
8003612: 687b ldr r3, [r7, #4]
8003614: 681b ldr r3, [r3, #0]
8003616: 683a ldr r2, [r7, #0]
8003618: 430a orrs r2, r1
800361a: 601a str r2, [r3, #0]
__HAL_I2C_ENABLE(hi2c);
800361c: 687b ldr r3, [r7, #4]
800361e: 681b ldr r3, [r3, #0]
8003620: 681a ldr r2, [r3, #0]
8003622: 687b ldr r3, [r7, #4]
8003624: 681b ldr r3, [r3, #0]
8003626: 2101 movs r1, #1
8003628: 430a orrs r2, r1
800362a: 601a str r2, [r3, #0]
hi2c->State = HAL_I2C_STATE_READY;
800362c: 687b ldr r3, [r7, #4]
800362e: 2241 movs r2, #65 ; 0x41
8003630: 2120 movs r1, #32
8003632: 5499 strb r1, [r3, r2]
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8003634: 687b ldr r3, [r7, #4]
8003636: 2240 movs r2, #64 ; 0x40
8003638: 2100 movs r1, #0
800363a: 5499 strb r1, [r3, r2]
return HAL_OK;
800363c: 2300 movs r3, #0
800363e: e000 b.n 8003642 <HAL_I2CEx_ConfigAnalogFilter+0x8a>
}
else
{
return HAL_BUSY;
8003640: 2302 movs r3, #2
}
}
8003642: 0018 movs r0, r3
8003644: 46bd mov sp, r7
8003646: b002 add sp, #8
8003648: bd80 pop {r7, pc}
800364a: 46c0 nop ; (mov r8, r8)
800364c: ffffefff .word 0xffffefff
08003650 <HAL_I2CEx_ConfigDigitalFilter>:
* the configuration information for the specified I2Cx peripheral.
* @param DigitalFilter Coefficient of digital noise filter between Min_Data=0x00 and Max_Data=0x0F.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter)
{
8003650: b580 push {r7, lr}
8003652: b084 sub sp, #16
8003654: af00 add r7, sp, #0
8003656: 6078 str r0, [r7, #4]
8003658: 6039 str r1, [r7, #0]
/* Check the parameters */
assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance));
assert_param(IS_I2C_DIGITAL_FILTER(DigitalFilter));
if (hi2c->State == HAL_I2C_STATE_READY)
800365a: 687b ldr r3, [r7, #4]
800365c: 2241 movs r2, #65 ; 0x41
800365e: 5c9b ldrb r3, [r3, r2]
8003660: b2db uxtb r3, r3
8003662: 2b20 cmp r3, #32
8003664: d139 bne.n 80036da <HAL_I2CEx_ConfigDigitalFilter+0x8a>
{
/* Process Locked */
__HAL_LOCK(hi2c);
8003666: 687b ldr r3, [r7, #4]
8003668: 2240 movs r2, #64 ; 0x40
800366a: 5c9b ldrb r3, [r3, r2]
800366c: 2b01 cmp r3, #1
800366e: d101 bne.n 8003674 <HAL_I2CEx_ConfigDigitalFilter+0x24>
8003670: 2302 movs r3, #2
8003672: e033 b.n 80036dc <HAL_I2CEx_ConfigDigitalFilter+0x8c>
8003674: 687b ldr r3, [r7, #4]
8003676: 2240 movs r2, #64 ; 0x40
8003678: 2101 movs r1, #1
800367a: 5499 strb r1, [r3, r2]
hi2c->State = HAL_I2C_STATE_BUSY;
800367c: 687b ldr r3, [r7, #4]
800367e: 2241 movs r2, #65 ; 0x41
8003680: 2124 movs r1, #36 ; 0x24
8003682: 5499 strb r1, [r3, r2]
/* Disable the selected I2C peripheral */
__HAL_I2C_DISABLE(hi2c);
8003684: 687b ldr r3, [r7, #4]
8003686: 681b ldr r3, [r3, #0]
8003688: 681a ldr r2, [r3, #0]
800368a: 687b ldr r3, [r7, #4]
800368c: 681b ldr r3, [r3, #0]
800368e: 2101 movs r1, #1
8003690: 438a bics r2, r1
8003692: 601a str r2, [r3, #0]
/* Get the old register value */
tmpreg = hi2c->Instance->CR1;
8003694: 687b ldr r3, [r7, #4]
8003696: 681b ldr r3, [r3, #0]
8003698: 681b ldr r3, [r3, #0]
800369a: 60fb str r3, [r7, #12]
/* Reset I2Cx DNF bits [11:8] */
tmpreg &= ~(I2C_CR1_DNF);
800369c: 68fb ldr r3, [r7, #12]
800369e: 4a11 ldr r2, [pc, #68] ; (80036e4 <HAL_I2CEx_ConfigDigitalFilter+0x94>)
80036a0: 4013 ands r3, r2
80036a2: 60fb str r3, [r7, #12]
/* Set I2Cx DNF coefficient */
tmpreg |= DigitalFilter << 8U;
80036a4: 683b ldr r3, [r7, #0]
80036a6: 021b lsls r3, r3, #8
80036a8: 68fa ldr r2, [r7, #12]
80036aa: 4313 orrs r3, r2
80036ac: 60fb str r3, [r7, #12]
/* Store the new register value */
hi2c->Instance->CR1 = tmpreg;
80036ae: 687b ldr r3, [r7, #4]
80036b0: 681b ldr r3, [r3, #0]
80036b2: 68fa ldr r2, [r7, #12]
80036b4: 601a str r2, [r3, #0]
__HAL_I2C_ENABLE(hi2c);
80036b6: 687b ldr r3, [r7, #4]
80036b8: 681b ldr r3, [r3, #0]
80036ba: 681a ldr r2, [r3, #0]
80036bc: 687b ldr r3, [r7, #4]
80036be: 681b ldr r3, [r3, #0]
80036c0: 2101 movs r1, #1
80036c2: 430a orrs r2, r1
80036c4: 601a str r2, [r3, #0]
hi2c->State = HAL_I2C_STATE_READY;
80036c6: 687b ldr r3, [r7, #4]
80036c8: 2241 movs r2, #65 ; 0x41
80036ca: 2120 movs r1, #32
80036cc: 5499 strb r1, [r3, r2]
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
80036ce: 687b ldr r3, [r7, #4]
80036d0: 2240 movs r2, #64 ; 0x40
80036d2: 2100 movs r1, #0
80036d4: 5499 strb r1, [r3, r2]
return HAL_OK;
80036d6: 2300 movs r3, #0
80036d8: e000 b.n 80036dc <HAL_I2CEx_ConfigDigitalFilter+0x8c>
}
else
{
return HAL_BUSY;
80036da: 2302 movs r3, #2
}
}
80036dc: 0018 movs r0, r3
80036de: 46bd mov sp, r7
80036e0: b004 add sp, #16
80036e2: bd80 pop {r7, pc}
80036e4: fffff0ff .word 0xfffff0ff
080036e8 <HAL_PWREx_ControlVoltageScaling>:
* cleared before returning the status. If the flag is not cleared within
* 6 microseconds, HAL_TIMEOUT status is reported.
* @retval HAL Status
*/
HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling(uint32_t VoltageScaling)
{
80036e8: b580 push {r7, lr}
80036ea: b084 sub sp, #16
80036ec: af00 add r7, sp, #0
80036ee: 6078 str r0, [r7, #4]
uint32_t wait_loop_index;
assert_param(IS_PWR_VOLTAGE_SCALING_RANGE(VoltageScaling));
/* Modify voltage scaling range */
MODIFY_REG(PWR->CR1, PWR_CR1_VOS, VoltageScaling);
80036f0: 4b19 ldr r3, [pc, #100] ; (8003758 <HAL_PWREx_ControlVoltageScaling+0x70>)
80036f2: 681b ldr r3, [r3, #0]
80036f4: 4a19 ldr r2, [pc, #100] ; (800375c <HAL_PWREx_ControlVoltageScaling+0x74>)
80036f6: 4013 ands r3, r2
80036f8: 0019 movs r1, r3
80036fa: 4b17 ldr r3, [pc, #92] ; (8003758 <HAL_PWREx_ControlVoltageScaling+0x70>)
80036fc: 687a ldr r2, [r7, #4]
80036fe: 430a orrs r2, r1
8003700: 601a str r2, [r3, #0]
/* In case of Range 1 selected, we need to ensure that main regulator reaches new value */
if (VoltageScaling == PWR_REGULATOR_VOLTAGE_SCALE1)
8003702: 687a ldr r2, [r7, #4]
8003704: 2380 movs r3, #128 ; 0x80
8003706: 009b lsls r3, r3, #2
8003708: 429a cmp r2, r3
800370a: d11f bne.n 800374c <HAL_PWREx_ControlVoltageScaling+0x64>
{
/* Set timeout value */
wait_loop_index = ((PWR_VOSF_SETTING_DELAY_6_US * SystemCoreClock) / 1000000U) + 1U;
800370c: 4b14 ldr r3, [pc, #80] ; (8003760 <HAL_PWREx_ControlVoltageScaling+0x78>)
800370e: 681a ldr r2, [r3, #0]
8003710: 0013 movs r3, r2
8003712: 005b lsls r3, r3, #1
8003714: 189b adds r3, r3, r2
8003716: 005b lsls r3, r3, #1
8003718: 4912 ldr r1, [pc, #72] ; (8003764 <HAL_PWREx_ControlVoltageScaling+0x7c>)
800371a: 0018 movs r0, r3
800371c: f7fc fcf4 bl 8000108 <__udivsi3>
8003720: 0003 movs r3, r0
8003722: 3301 adds r3, #1
8003724: 60fb str r3, [r7, #12]
/* Wait until VOSF is reset */
while (HAL_IS_BIT_SET(PWR->SR2, PWR_SR2_VOSF))
8003726: e008 b.n 800373a <HAL_PWREx_ControlVoltageScaling+0x52>
{
if (wait_loop_index != 0U)
8003728: 68fb ldr r3, [r7, #12]
800372a: 2b00 cmp r3, #0
800372c: d003 beq.n 8003736 <HAL_PWREx_ControlVoltageScaling+0x4e>
{
wait_loop_index--;
800372e: 68fb ldr r3, [r7, #12]
8003730: 3b01 subs r3, #1
8003732: 60fb str r3, [r7, #12]
8003734: e001 b.n 800373a <HAL_PWREx_ControlVoltageScaling+0x52>
}
else
{
return HAL_TIMEOUT;
8003736: 2303 movs r3, #3
8003738: e009 b.n 800374e <HAL_PWREx_ControlVoltageScaling+0x66>
while (HAL_IS_BIT_SET(PWR->SR2, PWR_SR2_VOSF))
800373a: 4b07 ldr r3, [pc, #28] ; (8003758 <HAL_PWREx_ControlVoltageScaling+0x70>)
800373c: 695a ldr r2, [r3, #20]
800373e: 2380 movs r3, #128 ; 0x80
8003740: 00db lsls r3, r3, #3
8003742: 401a ands r2, r3
8003744: 2380 movs r3, #128 ; 0x80
8003746: 00db lsls r3, r3, #3
8003748: 429a cmp r2, r3
800374a: d0ed beq.n 8003728 <HAL_PWREx_ControlVoltageScaling+0x40>
}
}
}
return HAL_OK;
800374c: 2300 movs r3, #0
}
800374e: 0018 movs r0, r3
8003750: 46bd mov sp, r7
8003752: b004 add sp, #16
8003754: bd80 pop {r7, pc}
8003756: 46c0 nop ; (mov r8, r8)
8003758: 40007000 .word 0x40007000
800375c: fffff9ff .word 0xfffff9ff
8003760: 20000004 .word 0x20000004
8003764: 000f4240 .word 0x000f4240
08003768 <HAL_RCC_OscConfig>:
* supported by this function. User should request a transition to LSE Off
* first and then to LSE On or LSE Bypass.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
{
8003768: b580 push {r7, lr}
800376a: b088 sub sp, #32
800376c: af00 add r7, sp, #0
800376e: 6078 str r0, [r7, #4]
uint32_t tickstart;
uint32_t temp_sysclksrc;
uint32_t temp_pllckcfg;
/* Check Null pointer */
if (RCC_OscInitStruct == NULL)
8003770: 687b ldr r3, [r7, #4]
8003772: 2b00 cmp r3, #0
8003774: d101 bne.n 800377a <HAL_RCC_OscConfig+0x12>
{
return HAL_ERROR;
8003776: 2301 movs r3, #1
8003778: e2fe b.n 8003d78 <HAL_RCC_OscConfig+0x610>
/* Check the parameters */
assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType));
/*------------------------------- HSE Configuration ------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE)
800377a: 687b ldr r3, [r7, #4]
800377c: 681b ldr r3, [r3, #0]
800377e: 2201 movs r2, #1
8003780: 4013 ands r3, r2
8003782: d100 bne.n 8003786 <HAL_RCC_OscConfig+0x1e>
8003784: e07c b.n 8003880 <HAL_RCC_OscConfig+0x118>
{
/* Check the parameters */
assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState));
temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE();
8003786: 4bc3 ldr r3, [pc, #780] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003788: 689b ldr r3, [r3, #8]
800378a: 2238 movs r2, #56 ; 0x38
800378c: 4013 ands r3, r2
800378e: 61bb str r3, [r7, #24]
temp_pllckcfg = __HAL_RCC_GET_PLL_OSCSOURCE();
8003790: 4bc0 ldr r3, [pc, #768] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003792: 68db ldr r3, [r3, #12]
8003794: 2203 movs r2, #3
8003796: 4013 ands r3, r2
8003798: 617b str r3, [r7, #20]
/* When the HSE is used as system clock or clock source for PLL in these cases it is not allowed to be disabled */
if (((temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (temp_pllckcfg == RCC_PLLSOURCE_HSE))
800379a: 69bb ldr r3, [r7, #24]
800379c: 2b10 cmp r3, #16
800379e: d102 bne.n 80037a6 <HAL_RCC_OscConfig+0x3e>
80037a0: 697b ldr r3, [r7, #20]
80037a2: 2b03 cmp r3, #3
80037a4: d002 beq.n 80037ac <HAL_RCC_OscConfig+0x44>
|| (temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_HSE))
80037a6: 69bb ldr r3, [r7, #24]
80037a8: 2b08 cmp r3, #8
80037aa: d10b bne.n 80037c4 <HAL_RCC_OscConfig+0x5c>
{
if ((READ_BIT(RCC->CR, RCC_CR_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
80037ac: 4bb9 ldr r3, [pc, #740] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80037ae: 681a ldr r2, [r3, #0]
80037b0: 2380 movs r3, #128 ; 0x80
80037b2: 029b lsls r3, r3, #10
80037b4: 4013 ands r3, r2
80037b6: d062 beq.n 800387e <HAL_RCC_OscConfig+0x116>
80037b8: 687b ldr r3, [r7, #4]
80037ba: 685b ldr r3, [r3, #4]
80037bc: 2b00 cmp r3, #0
80037be: d15e bne.n 800387e <HAL_RCC_OscConfig+0x116>
{
return HAL_ERROR;
80037c0: 2301 movs r3, #1
80037c2: e2d9 b.n 8003d78 <HAL_RCC_OscConfig+0x610>
}
}
else
{
/* Set the new HSE configuration ---------------------------------------*/
__HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
80037c4: 687b ldr r3, [r7, #4]
80037c6: 685a ldr r2, [r3, #4]
80037c8: 2380 movs r3, #128 ; 0x80
80037ca: 025b lsls r3, r3, #9
80037cc: 429a cmp r2, r3
80037ce: d107 bne.n 80037e0 <HAL_RCC_OscConfig+0x78>
80037d0: 4bb0 ldr r3, [pc, #704] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80037d2: 681a ldr r2, [r3, #0]
80037d4: 4baf ldr r3, [pc, #700] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80037d6: 2180 movs r1, #128 ; 0x80
80037d8: 0249 lsls r1, r1, #9
80037da: 430a orrs r2, r1
80037dc: 601a str r2, [r3, #0]
80037de: e020 b.n 8003822 <HAL_RCC_OscConfig+0xba>
80037e0: 687b ldr r3, [r7, #4]
80037e2: 685a ldr r2, [r3, #4]
80037e4: 23a0 movs r3, #160 ; 0xa0
80037e6: 02db lsls r3, r3, #11
80037e8: 429a cmp r2, r3
80037ea: d10e bne.n 800380a <HAL_RCC_OscConfig+0xa2>
80037ec: 4ba9 ldr r3, [pc, #676] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80037ee: 681a ldr r2, [r3, #0]
80037f0: 4ba8 ldr r3, [pc, #672] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80037f2: 2180 movs r1, #128 ; 0x80
80037f4: 02c9 lsls r1, r1, #11
80037f6: 430a orrs r2, r1
80037f8: 601a str r2, [r3, #0]
80037fa: 4ba6 ldr r3, [pc, #664] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80037fc: 681a ldr r2, [r3, #0]
80037fe: 4ba5 ldr r3, [pc, #660] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003800: 2180 movs r1, #128 ; 0x80
8003802: 0249 lsls r1, r1, #9
8003804: 430a orrs r2, r1
8003806: 601a str r2, [r3, #0]
8003808: e00b b.n 8003822 <HAL_RCC_OscConfig+0xba>
800380a: 4ba2 ldr r3, [pc, #648] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
800380c: 681a ldr r2, [r3, #0]
800380e: 4ba1 ldr r3, [pc, #644] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003810: 49a1 ldr r1, [pc, #644] ; (8003a98 <HAL_RCC_OscConfig+0x330>)
8003812: 400a ands r2, r1
8003814: 601a str r2, [r3, #0]
8003816: 4b9f ldr r3, [pc, #636] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003818: 681a ldr r2, [r3, #0]
800381a: 4b9e ldr r3, [pc, #632] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
800381c: 499f ldr r1, [pc, #636] ; (8003a9c <HAL_RCC_OscConfig+0x334>)
800381e: 400a ands r2, r1
8003820: 601a str r2, [r3, #0]
/* Check the HSE State */
if (RCC_OscInitStruct->HSEState != RCC_HSE_OFF)
8003822: 687b ldr r3, [r7, #4]
8003824: 685b ldr r3, [r3, #4]
8003826: 2b00 cmp r3, #0
8003828: d014 beq.n 8003854 <HAL_RCC_OscConfig+0xec>
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
800382a: f7fe faaf bl 8001d8c <HAL_GetTick>
800382e: 0003 movs r3, r0
8003830: 613b str r3, [r7, #16]
/* Wait till HSE is ready */
while (READ_BIT(RCC->CR, RCC_CR_HSERDY) == 0U)
8003832: e008 b.n 8003846 <HAL_RCC_OscConfig+0xde>
{
if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
8003834: f7fe faaa bl 8001d8c <HAL_GetTick>
8003838: 0002 movs r2, r0
800383a: 693b ldr r3, [r7, #16]
800383c: 1ad3 subs r3, r2, r3
800383e: 2b64 cmp r3, #100 ; 0x64
8003840: d901 bls.n 8003846 <HAL_RCC_OscConfig+0xde>
{
return HAL_TIMEOUT;
8003842: 2303 movs r3, #3
8003844: e298 b.n 8003d78 <HAL_RCC_OscConfig+0x610>
while (READ_BIT(RCC->CR, RCC_CR_HSERDY) == 0U)
8003846: 4b93 ldr r3, [pc, #588] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003848: 681a ldr r2, [r3, #0]
800384a: 2380 movs r3, #128 ; 0x80
800384c: 029b lsls r3, r3, #10
800384e: 4013 ands r3, r2
8003850: d0f0 beq.n 8003834 <HAL_RCC_OscConfig+0xcc>
8003852: e015 b.n 8003880 <HAL_RCC_OscConfig+0x118>
}
}
else
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
8003854: f7fe fa9a bl 8001d8c <HAL_GetTick>
8003858: 0003 movs r3, r0
800385a: 613b str r3, [r7, #16]
/* Wait till HSE is disabled */
while (READ_BIT(RCC->CR, RCC_CR_HSERDY) != 0U)
800385c: e008 b.n 8003870 <HAL_RCC_OscConfig+0x108>
{
if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
800385e: f7fe fa95 bl 8001d8c <HAL_GetTick>
8003862: 0002 movs r2, r0
8003864: 693b ldr r3, [r7, #16]
8003866: 1ad3 subs r3, r2, r3
8003868: 2b64 cmp r3, #100 ; 0x64
800386a: d901 bls.n 8003870 <HAL_RCC_OscConfig+0x108>
{
return HAL_TIMEOUT;
800386c: 2303 movs r3, #3
800386e: e283 b.n 8003d78 <HAL_RCC_OscConfig+0x610>
while (READ_BIT(RCC->CR, RCC_CR_HSERDY) != 0U)
8003870: 4b88 ldr r3, [pc, #544] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003872: 681a ldr r2, [r3, #0]
8003874: 2380 movs r3, #128 ; 0x80
8003876: 029b lsls r3, r3, #10
8003878: 4013 ands r3, r2
800387a: d1f0 bne.n 800385e <HAL_RCC_OscConfig+0xf6>
800387c: e000 b.n 8003880 <HAL_RCC_OscConfig+0x118>
if ((READ_BIT(RCC->CR, RCC_CR_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
800387e: 46c0 nop ; (mov r8, r8)
}
}
}
}
/*----------------------------- HSI Configuration --------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
8003880: 687b ldr r3, [r7, #4]
8003882: 681b ldr r3, [r3, #0]
8003884: 2202 movs r2, #2
8003886: 4013 ands r3, r2
8003888: d100 bne.n 800388c <HAL_RCC_OscConfig+0x124>
800388a: e099 b.n 80039c0 <HAL_RCC_OscConfig+0x258>
assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState));
assert_param(IS_RCC_HSI_CALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue));
assert_param(IS_RCC_HSIDIV(RCC_OscInitStruct->HSIDiv));
/* Check if HSI16 is used as system clock or as PLL source when PLL is selected as system clock */
temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE();
800388c: 4b81 ldr r3, [pc, #516] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
800388e: 689b ldr r3, [r3, #8]
8003890: 2238 movs r2, #56 ; 0x38
8003892: 4013 ands r3, r2
8003894: 61bb str r3, [r7, #24]
temp_pllckcfg = __HAL_RCC_GET_PLL_OSCSOURCE();
8003896: 4b7f ldr r3, [pc, #508] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003898: 68db ldr r3, [r3, #12]
800389a: 2203 movs r2, #3
800389c: 4013 ands r3, r2
800389e: 617b str r3, [r7, #20]
if (((temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (temp_pllckcfg == RCC_PLLSOURCE_HSI))
80038a0: 69bb ldr r3, [r7, #24]
80038a2: 2b10 cmp r3, #16
80038a4: d102 bne.n 80038ac <HAL_RCC_OscConfig+0x144>
80038a6: 697b ldr r3, [r7, #20]
80038a8: 2b02 cmp r3, #2
80038aa: d002 beq.n 80038b2 <HAL_RCC_OscConfig+0x14a>
|| (temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_HSI))
80038ac: 69bb ldr r3, [r7, #24]
80038ae: 2b00 cmp r3, #0
80038b0: d135 bne.n 800391e <HAL_RCC_OscConfig+0x1b6>
{
/* When HSI is used as system clock or as PLL input clock it can not be disabled */
if ((READ_BIT(RCC->CR, RCC_CR_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF))
80038b2: 4b78 ldr r3, [pc, #480] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80038b4: 681a ldr r2, [r3, #0]
80038b6: 2380 movs r3, #128 ; 0x80
80038b8: 00db lsls r3, r3, #3
80038ba: 4013 ands r3, r2
80038bc: d005 beq.n 80038ca <HAL_RCC_OscConfig+0x162>
80038be: 687b ldr r3, [r7, #4]
80038c0: 68db ldr r3, [r3, #12]
80038c2: 2b00 cmp r3, #0
80038c4: d101 bne.n 80038ca <HAL_RCC_OscConfig+0x162>
{
return HAL_ERROR;
80038c6: 2301 movs r3, #1
80038c8: e256 b.n 8003d78 <HAL_RCC_OscConfig+0x610>
}
/* Otherwise, just the calibration is allowed */
else
{
/* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
80038ca: 4b72 ldr r3, [pc, #456] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80038cc: 685b ldr r3, [r3, #4]
80038ce: 4a74 ldr r2, [pc, #464] ; (8003aa0 <HAL_RCC_OscConfig+0x338>)
80038d0: 4013 ands r3, r2
80038d2: 0019 movs r1, r3
80038d4: 687b ldr r3, [r7, #4]
80038d6: 695b ldr r3, [r3, #20]
80038d8: 021a lsls r2, r3, #8
80038da: 4b6e ldr r3, [pc, #440] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80038dc: 430a orrs r2, r1
80038de: 605a str r2, [r3, #4]
if (temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_HSI)
80038e0: 69bb ldr r3, [r7, #24]
80038e2: 2b00 cmp r3, #0
80038e4: d112 bne.n 800390c <HAL_RCC_OscConfig+0x1a4>
{
/* Adjust the HSI16 division factor */
__HAL_RCC_HSI_CONFIG(RCC_OscInitStruct->HSIDiv);
80038e6: 4b6b ldr r3, [pc, #428] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80038e8: 681b ldr r3, [r3, #0]
80038ea: 4a6e ldr r2, [pc, #440] ; (8003aa4 <HAL_RCC_OscConfig+0x33c>)
80038ec: 4013 ands r3, r2
80038ee: 0019 movs r1, r3
80038f0: 687b ldr r3, [r7, #4]
80038f2: 691a ldr r2, [r3, #16]
80038f4: 4b67 ldr r3, [pc, #412] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80038f6: 430a orrs r2, r1
80038f8: 601a str r2, [r3, #0]
/* Update the SystemCoreClock global variable with HSISYS value */
SystemCoreClock = (HSI_VALUE / (1UL << ((READ_BIT(RCC->CR, RCC_CR_HSIDIV)) >> RCC_CR_HSIDIV_Pos)));
80038fa: 4b66 ldr r3, [pc, #408] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80038fc: 681b ldr r3, [r3, #0]
80038fe: 0adb lsrs r3, r3, #11
8003900: 2207 movs r2, #7
8003902: 4013 ands r3, r2
8003904: 4a68 ldr r2, [pc, #416] ; (8003aa8 <HAL_RCC_OscConfig+0x340>)
8003906: 40da lsrs r2, r3
8003908: 4b68 ldr r3, [pc, #416] ; (8003aac <HAL_RCC_OscConfig+0x344>)
800390a: 601a str r2, [r3, #0]
}
/* Adapt Systick interrupt period */
if (HAL_InitTick(uwTickPrio) != HAL_OK)
800390c: 4b68 ldr r3, [pc, #416] ; (8003ab0 <HAL_RCC_OscConfig+0x348>)
800390e: 681b ldr r3, [r3, #0]
8003910: 0018 movs r0, r3
8003912: f7fe f9df bl 8001cd4 <HAL_InitTick>
8003916: 1e03 subs r3, r0, #0
8003918: d051 beq.n 80039be <HAL_RCC_OscConfig+0x256>
{
return HAL_ERROR;
800391a: 2301 movs r3, #1
800391c: e22c b.n 8003d78 <HAL_RCC_OscConfig+0x610>
}
}
else
{
/* Check the HSI State */
if (RCC_OscInitStruct->HSIState != RCC_HSI_OFF)
800391e: 687b ldr r3, [r7, #4]
8003920: 68db ldr r3, [r3, #12]
8003922: 2b00 cmp r3, #0
8003924: d030 beq.n 8003988 <HAL_RCC_OscConfig+0x220>
{
/* Configure the HSI16 division factor */
__HAL_RCC_HSI_CONFIG(RCC_OscInitStruct->HSIDiv);
8003926: 4b5b ldr r3, [pc, #364] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003928: 681b ldr r3, [r3, #0]
800392a: 4a5e ldr r2, [pc, #376] ; (8003aa4 <HAL_RCC_OscConfig+0x33c>)
800392c: 4013 ands r3, r2
800392e: 0019 movs r1, r3
8003930: 687b ldr r3, [r7, #4]
8003932: 691a ldr r2, [r3, #16]
8003934: 4b57 ldr r3, [pc, #348] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003936: 430a orrs r2, r1
8003938: 601a str r2, [r3, #0]
/* Enable the Internal High Speed oscillator (HSI16). */
__HAL_RCC_HSI_ENABLE();
800393a: 4b56 ldr r3, [pc, #344] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
800393c: 681a ldr r2, [r3, #0]
800393e: 4b55 ldr r3, [pc, #340] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003940: 2180 movs r1, #128 ; 0x80
8003942: 0049 lsls r1, r1, #1
8003944: 430a orrs r2, r1
8003946: 601a str r2, [r3, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8003948: f7fe fa20 bl 8001d8c <HAL_GetTick>
800394c: 0003 movs r3, r0
800394e: 613b str r3, [r7, #16]
/* Wait till HSI is ready */
while (READ_BIT(RCC->CR, RCC_CR_HSIRDY) == 0U)
8003950: e008 b.n 8003964 <HAL_RCC_OscConfig+0x1fc>
{
if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE)
8003952: f7fe fa1b bl 8001d8c <HAL_GetTick>
8003956: 0002 movs r2, r0
8003958: 693b ldr r3, [r7, #16]
800395a: 1ad3 subs r3, r2, r3
800395c: 2b02 cmp r3, #2
800395e: d901 bls.n 8003964 <HAL_RCC_OscConfig+0x1fc>
{
return HAL_TIMEOUT;
8003960: 2303 movs r3, #3
8003962: e209 b.n 8003d78 <HAL_RCC_OscConfig+0x610>
while (READ_BIT(RCC->CR, RCC_CR_HSIRDY) == 0U)
8003964: 4b4b ldr r3, [pc, #300] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003966: 681a ldr r2, [r3, #0]
8003968: 2380 movs r3, #128 ; 0x80
800396a: 00db lsls r3, r3, #3
800396c: 4013 ands r3, r2
800396e: d0f0 beq.n 8003952 <HAL_RCC_OscConfig+0x1ea>
}
}
/* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
8003970: 4b48 ldr r3, [pc, #288] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003972: 685b ldr r3, [r3, #4]
8003974: 4a4a ldr r2, [pc, #296] ; (8003aa0 <HAL_RCC_OscConfig+0x338>)
8003976: 4013 ands r3, r2
8003978: 0019 movs r1, r3
800397a: 687b ldr r3, [r7, #4]
800397c: 695b ldr r3, [r3, #20]
800397e: 021a lsls r2, r3, #8
8003980: 4b44 ldr r3, [pc, #272] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003982: 430a orrs r2, r1
8003984: 605a str r2, [r3, #4]
8003986: e01b b.n 80039c0 <HAL_RCC_OscConfig+0x258>
}
else
{
/* Disable the Internal High Speed oscillator (HSI16). */
__HAL_RCC_HSI_DISABLE();
8003988: 4b42 ldr r3, [pc, #264] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
800398a: 681a ldr r2, [r3, #0]
800398c: 4b41 ldr r3, [pc, #260] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
800398e: 4949 ldr r1, [pc, #292] ; (8003ab4 <HAL_RCC_OscConfig+0x34c>)
8003990: 400a ands r2, r1
8003992: 601a str r2, [r3, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8003994: f7fe f9fa bl 8001d8c <HAL_GetTick>
8003998: 0003 movs r3, r0
800399a: 613b str r3, [r7, #16]
/* Wait till HSI is disabled */
while (READ_BIT(RCC->CR, RCC_CR_HSIRDY) != 0U)
800399c: e008 b.n 80039b0 <HAL_RCC_OscConfig+0x248>
{
if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE)
800399e: f7fe f9f5 bl 8001d8c <HAL_GetTick>
80039a2: 0002 movs r2, r0
80039a4: 693b ldr r3, [r7, #16]
80039a6: 1ad3 subs r3, r2, r3
80039a8: 2b02 cmp r3, #2
80039aa: d901 bls.n 80039b0 <HAL_RCC_OscConfig+0x248>
{
return HAL_TIMEOUT;
80039ac: 2303 movs r3, #3
80039ae: e1e3 b.n 8003d78 <HAL_RCC_OscConfig+0x610>
while (READ_BIT(RCC->CR, RCC_CR_HSIRDY) != 0U)
80039b0: 4b38 ldr r3, [pc, #224] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80039b2: 681a ldr r2, [r3, #0]
80039b4: 2380 movs r3, #128 ; 0x80
80039b6: 00db lsls r3, r3, #3
80039b8: 4013 ands r3, r2
80039ba: d1f0 bne.n 800399e <HAL_RCC_OscConfig+0x236>
80039bc: e000 b.n 80039c0 <HAL_RCC_OscConfig+0x258>
if ((READ_BIT(RCC->CR, RCC_CR_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF))
80039be: 46c0 nop ; (mov r8, r8)
}
}
}
}
/*------------------------------ LSI Configuration -------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
80039c0: 687b ldr r3, [r7, #4]
80039c2: 681b ldr r3, [r3, #0]
80039c4: 2208 movs r2, #8
80039c6: 4013 ands r3, r2
80039c8: d047 beq.n 8003a5a <HAL_RCC_OscConfig+0x2f2>
{
/* Check the parameters */
assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState));
/* Check if LSI is used as system clock */
if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_LSI)
80039ca: 4b32 ldr r3, [pc, #200] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80039cc: 689b ldr r3, [r3, #8]
80039ce: 2238 movs r2, #56 ; 0x38
80039d0: 4013 ands r3, r2
80039d2: 2b18 cmp r3, #24
80039d4: d10a bne.n 80039ec <HAL_RCC_OscConfig+0x284>
{
/* When LSI is used as system clock it will not be disabled */
if ((((RCC->CSR) & RCC_CSR_LSIRDY) != 0U) && (RCC_OscInitStruct->LSIState == RCC_LSI_OFF))
80039d6: 4b2f ldr r3, [pc, #188] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80039d8: 6e1b ldr r3, [r3, #96] ; 0x60
80039da: 2202 movs r2, #2
80039dc: 4013 ands r3, r2
80039de: d03c beq.n 8003a5a <HAL_RCC_OscConfig+0x2f2>
80039e0: 687b ldr r3, [r7, #4]
80039e2: 699b ldr r3, [r3, #24]
80039e4: 2b00 cmp r3, #0
80039e6: d138 bne.n 8003a5a <HAL_RCC_OscConfig+0x2f2>
{
return HAL_ERROR;
80039e8: 2301 movs r3, #1
80039ea: e1c5 b.n 8003d78 <HAL_RCC_OscConfig+0x610>
}
}
else
{
/* Check the LSI State */
if (RCC_OscInitStruct->LSIState != RCC_LSI_OFF)
80039ec: 687b ldr r3, [r7, #4]
80039ee: 699b ldr r3, [r3, #24]
80039f0: 2b00 cmp r3, #0
80039f2: d019 beq.n 8003a28 <HAL_RCC_OscConfig+0x2c0>
{
/* Enable the Internal Low Speed oscillator (LSI). */
__HAL_RCC_LSI_ENABLE();
80039f4: 4b27 ldr r3, [pc, #156] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80039f6: 6e1a ldr r2, [r3, #96] ; 0x60
80039f8: 4b26 ldr r3, [pc, #152] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
80039fa: 2101 movs r1, #1
80039fc: 430a orrs r2, r1
80039fe: 661a str r2, [r3, #96] ; 0x60
/* Get Start Tick*/
tickstart = HAL_GetTick();
8003a00: f7fe f9c4 bl 8001d8c <HAL_GetTick>
8003a04: 0003 movs r3, r0
8003a06: 613b str r3, [r7, #16]
/* Wait till LSI is ready */
while (READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) == 0U)
8003a08: e008 b.n 8003a1c <HAL_RCC_OscConfig+0x2b4>
{
if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE)
8003a0a: f7fe f9bf bl 8001d8c <HAL_GetTick>
8003a0e: 0002 movs r2, r0
8003a10: 693b ldr r3, [r7, #16]
8003a12: 1ad3 subs r3, r2, r3
8003a14: 2b02 cmp r3, #2
8003a16: d901 bls.n 8003a1c <HAL_RCC_OscConfig+0x2b4>
{
return HAL_TIMEOUT;
8003a18: 2303 movs r3, #3
8003a1a: e1ad b.n 8003d78 <HAL_RCC_OscConfig+0x610>
while (READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) == 0U)
8003a1c: 4b1d ldr r3, [pc, #116] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003a1e: 6e1b ldr r3, [r3, #96] ; 0x60
8003a20: 2202 movs r2, #2
8003a22: 4013 ands r3, r2
8003a24: d0f1 beq.n 8003a0a <HAL_RCC_OscConfig+0x2a2>
8003a26: e018 b.n 8003a5a <HAL_RCC_OscConfig+0x2f2>
}
}
else
{
/* Disable the Internal Low Speed oscillator (LSI). */
__HAL_RCC_LSI_DISABLE();
8003a28: 4b1a ldr r3, [pc, #104] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003a2a: 6e1a ldr r2, [r3, #96] ; 0x60
8003a2c: 4b19 ldr r3, [pc, #100] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003a2e: 2101 movs r1, #1
8003a30: 438a bics r2, r1
8003a32: 661a str r2, [r3, #96] ; 0x60
/* Get Start Tick*/
tickstart = HAL_GetTick();
8003a34: f7fe f9aa bl 8001d8c <HAL_GetTick>
8003a38: 0003 movs r3, r0
8003a3a: 613b str r3, [r7, #16]
/* Wait till LSI is disabled */
while (READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) != 0U)
8003a3c: e008 b.n 8003a50 <HAL_RCC_OscConfig+0x2e8>
{
if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE)
8003a3e: f7fe f9a5 bl 8001d8c <HAL_GetTick>
8003a42: 0002 movs r2, r0
8003a44: 693b ldr r3, [r7, #16]
8003a46: 1ad3 subs r3, r2, r3
8003a48: 2b02 cmp r3, #2
8003a4a: d901 bls.n 8003a50 <HAL_RCC_OscConfig+0x2e8>
{
return HAL_TIMEOUT;
8003a4c: 2303 movs r3, #3
8003a4e: e193 b.n 8003d78 <HAL_RCC_OscConfig+0x610>
while (READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) != 0U)
8003a50: 4b10 ldr r3, [pc, #64] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003a52: 6e1b ldr r3, [r3, #96] ; 0x60
8003a54: 2202 movs r2, #2
8003a56: 4013 ands r3, r2
8003a58: d1f1 bne.n 8003a3e <HAL_RCC_OscConfig+0x2d6>
}
}
}
}
/*------------------------------ LSE Configuration -------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
8003a5a: 687b ldr r3, [r7, #4]
8003a5c: 681b ldr r3, [r3, #0]
8003a5e: 2204 movs r2, #4
8003a60: 4013 ands r3, r2
8003a62: d100 bne.n 8003a66 <HAL_RCC_OscConfig+0x2fe>
8003a64: e0c6 b.n 8003bf4 <HAL_RCC_OscConfig+0x48c>
{
FlagStatus pwrclkchanged = RESET;
8003a66: 231f movs r3, #31
8003a68: 18fb adds r3, r7, r3
8003a6a: 2200 movs r2, #0
8003a6c: 701a strb r2, [r3, #0]
/* Check the parameters */
assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState));
/* When the LSE is used as system clock, it is not allowed disable it */
if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_LSE)
8003a6e: 4b09 ldr r3, [pc, #36] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003a70: 689b ldr r3, [r3, #8]
8003a72: 2238 movs r2, #56 ; 0x38
8003a74: 4013 ands r3, r2
8003a76: 2b20 cmp r3, #32
8003a78: d11e bne.n 8003ab8 <HAL_RCC_OscConfig+0x350>
{
if ((((RCC->BDCR) & RCC_BDCR_LSERDY) != 0U) && (RCC_OscInitStruct->LSEState == RCC_LSE_OFF))
8003a7a: 4b06 ldr r3, [pc, #24] ; (8003a94 <HAL_RCC_OscConfig+0x32c>)
8003a7c: 6ddb ldr r3, [r3, #92] ; 0x5c
8003a7e: 2202 movs r2, #2
8003a80: 4013 ands r3, r2
8003a82: d100 bne.n 8003a86 <HAL_RCC_OscConfig+0x31e>
8003a84: e0b6 b.n 8003bf4 <HAL_RCC_OscConfig+0x48c>
8003a86: 687b ldr r3, [r7, #4]
8003a88: 689b ldr r3, [r3, #8]
8003a8a: 2b00 cmp r3, #0
8003a8c: d000 beq.n 8003a90 <HAL_RCC_OscConfig+0x328>
8003a8e: e0b1 b.n 8003bf4 <HAL_RCC_OscConfig+0x48c>
{
return HAL_ERROR;
8003a90: 2301 movs r3, #1
8003a92: e171 b.n 8003d78 <HAL_RCC_OscConfig+0x610>
8003a94: 40021000 .word 0x40021000
8003a98: fffeffff .word 0xfffeffff
8003a9c: fffbffff .word 0xfffbffff
8003aa0: ffff80ff .word 0xffff80ff
8003aa4: ffffc7ff .word 0xffffc7ff
8003aa8: 00f42400 .word 0x00f42400
8003aac: 20000004 .word 0x20000004
8003ab0: 20000008 .word 0x20000008
8003ab4: fffffeff .word 0xfffffeff
}
else
{
/* Update LSE configuration in Backup Domain control register */
/* Requires to enable write access to Backup Domain of necessary */
if (__HAL_RCC_PWR_IS_CLK_DISABLED() != 0U)
8003ab8: 4bb1 ldr r3, [pc, #708] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003aba: 6bda ldr r2, [r3, #60] ; 0x3c
8003abc: 2380 movs r3, #128 ; 0x80
8003abe: 055b lsls r3, r3, #21
8003ac0: 4013 ands r3, r2
8003ac2: d101 bne.n 8003ac8 <HAL_RCC_OscConfig+0x360>
8003ac4: 2301 movs r3, #1
8003ac6: e000 b.n 8003aca <HAL_RCC_OscConfig+0x362>
8003ac8: 2300 movs r3, #0
8003aca: 2b00 cmp r3, #0
8003acc: d011 beq.n 8003af2 <HAL_RCC_OscConfig+0x38a>
{
__HAL_RCC_PWR_CLK_ENABLE();
8003ace: 4bac ldr r3, [pc, #688] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003ad0: 6bda ldr r2, [r3, #60] ; 0x3c
8003ad2: 4bab ldr r3, [pc, #684] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003ad4: 2180 movs r1, #128 ; 0x80
8003ad6: 0549 lsls r1, r1, #21
8003ad8: 430a orrs r2, r1
8003ada: 63da str r2, [r3, #60] ; 0x3c
8003adc: 4ba8 ldr r3, [pc, #672] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003ade: 6bda ldr r2, [r3, #60] ; 0x3c
8003ae0: 2380 movs r3, #128 ; 0x80
8003ae2: 055b lsls r3, r3, #21
8003ae4: 4013 ands r3, r2
8003ae6: 60fb str r3, [r7, #12]
8003ae8: 68fb ldr r3, [r7, #12]
pwrclkchanged = SET;
8003aea: 231f movs r3, #31
8003aec: 18fb adds r3, r7, r3
8003aee: 2201 movs r2, #1
8003af0: 701a strb r2, [r3, #0]
}
if (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
8003af2: 4ba4 ldr r3, [pc, #656] ; (8003d84 <HAL_RCC_OscConfig+0x61c>)
8003af4: 681a ldr r2, [r3, #0]
8003af6: 2380 movs r3, #128 ; 0x80
8003af8: 005b lsls r3, r3, #1
8003afa: 4013 ands r3, r2
8003afc: d11a bne.n 8003b34 <HAL_RCC_OscConfig+0x3cc>
{
/* Enable write access to Backup domain */
SET_BIT(PWR->CR1, PWR_CR1_DBP);
8003afe: 4ba1 ldr r3, [pc, #644] ; (8003d84 <HAL_RCC_OscConfig+0x61c>)
8003b00: 681a ldr r2, [r3, #0]
8003b02: 4ba0 ldr r3, [pc, #640] ; (8003d84 <HAL_RCC_OscConfig+0x61c>)
8003b04: 2180 movs r1, #128 ; 0x80
8003b06: 0049 lsls r1, r1, #1
8003b08: 430a orrs r2, r1
8003b0a: 601a str r2, [r3, #0]
/* Wait for Backup domain Write protection disable */
tickstart = HAL_GetTick();
8003b0c: f7fe f93e bl 8001d8c <HAL_GetTick>
8003b10: 0003 movs r3, r0
8003b12: 613b str r3, [r7, #16]
while (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
8003b14: e008 b.n 8003b28 <HAL_RCC_OscConfig+0x3c0>
{
if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
8003b16: f7fe f939 bl 8001d8c <HAL_GetTick>
8003b1a: 0002 movs r2, r0
8003b1c: 693b ldr r3, [r7, #16]
8003b1e: 1ad3 subs r3, r2, r3
8003b20: 2b02 cmp r3, #2
8003b22: d901 bls.n 8003b28 <HAL_RCC_OscConfig+0x3c0>
{
return HAL_TIMEOUT;
8003b24: 2303 movs r3, #3
8003b26: e127 b.n 8003d78 <HAL_RCC_OscConfig+0x610>
while (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
8003b28: 4b96 ldr r3, [pc, #600] ; (8003d84 <HAL_RCC_OscConfig+0x61c>)
8003b2a: 681a ldr r2, [r3, #0]
8003b2c: 2380 movs r3, #128 ; 0x80
8003b2e: 005b lsls r3, r3, #1
8003b30: 4013 ands r3, r2
8003b32: d0f0 beq.n 8003b16 <HAL_RCC_OscConfig+0x3ae>
}
}
}
/* Set the new LSE configuration -----------------------------------------*/
__HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
8003b34: 687b ldr r3, [r7, #4]
8003b36: 689b ldr r3, [r3, #8]
8003b38: 2b01 cmp r3, #1
8003b3a: d106 bne.n 8003b4a <HAL_RCC_OscConfig+0x3e2>
8003b3c: 4b90 ldr r3, [pc, #576] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003b3e: 6dda ldr r2, [r3, #92] ; 0x5c
8003b40: 4b8f ldr r3, [pc, #572] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003b42: 2101 movs r1, #1
8003b44: 430a orrs r2, r1
8003b46: 65da str r2, [r3, #92] ; 0x5c
8003b48: e01c b.n 8003b84 <HAL_RCC_OscConfig+0x41c>
8003b4a: 687b ldr r3, [r7, #4]
8003b4c: 689b ldr r3, [r3, #8]
8003b4e: 2b05 cmp r3, #5
8003b50: d10c bne.n 8003b6c <HAL_RCC_OscConfig+0x404>
8003b52: 4b8b ldr r3, [pc, #556] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003b54: 6dda ldr r2, [r3, #92] ; 0x5c
8003b56: 4b8a ldr r3, [pc, #552] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003b58: 2104 movs r1, #4
8003b5a: 430a orrs r2, r1
8003b5c: 65da str r2, [r3, #92] ; 0x5c
8003b5e: 4b88 ldr r3, [pc, #544] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003b60: 6dda ldr r2, [r3, #92] ; 0x5c
8003b62: 4b87 ldr r3, [pc, #540] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003b64: 2101 movs r1, #1
8003b66: 430a orrs r2, r1
8003b68: 65da str r2, [r3, #92] ; 0x5c
8003b6a: e00b b.n 8003b84 <HAL_RCC_OscConfig+0x41c>
8003b6c: 4b84 ldr r3, [pc, #528] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003b6e: 6dda ldr r2, [r3, #92] ; 0x5c
8003b70: 4b83 ldr r3, [pc, #524] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003b72: 2101 movs r1, #1
8003b74: 438a bics r2, r1
8003b76: 65da str r2, [r3, #92] ; 0x5c
8003b78: 4b81 ldr r3, [pc, #516] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003b7a: 6dda ldr r2, [r3, #92] ; 0x5c
8003b7c: 4b80 ldr r3, [pc, #512] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003b7e: 2104 movs r1, #4
8003b80: 438a bics r2, r1
8003b82: 65da str r2, [r3, #92] ; 0x5c
/* Check the LSE State */
if (RCC_OscInitStruct->LSEState != RCC_LSE_OFF)
8003b84: 687b ldr r3, [r7, #4]
8003b86: 689b ldr r3, [r3, #8]
8003b88: 2b00 cmp r3, #0
8003b8a: d014 beq.n 8003bb6 <HAL_RCC_OscConfig+0x44e>
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
8003b8c: f7fe f8fe bl 8001d8c <HAL_GetTick>
8003b90: 0003 movs r3, r0
8003b92: 613b str r3, [r7, #16]
/* Wait till LSE is ready */
while (READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == 0U)
8003b94: e009 b.n 8003baa <HAL_RCC_OscConfig+0x442>
{
if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
8003b96: f7fe f8f9 bl 8001d8c <HAL_GetTick>
8003b9a: 0002 movs r2, r0
8003b9c: 693b ldr r3, [r7, #16]
8003b9e: 1ad3 subs r3, r2, r3
8003ba0: 4a79 ldr r2, [pc, #484] ; (8003d88 <HAL_RCC_OscConfig+0x620>)
8003ba2: 4293 cmp r3, r2
8003ba4: d901 bls.n 8003baa <HAL_RCC_OscConfig+0x442>
{
return HAL_TIMEOUT;
8003ba6: 2303 movs r3, #3
8003ba8: e0e6 b.n 8003d78 <HAL_RCC_OscConfig+0x610>
while (READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == 0U)
8003baa: 4b75 ldr r3, [pc, #468] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003bac: 6ddb ldr r3, [r3, #92] ; 0x5c
8003bae: 2202 movs r2, #2
8003bb0: 4013 ands r3, r2
8003bb2: d0f0 beq.n 8003b96 <HAL_RCC_OscConfig+0x42e>
8003bb4: e013 b.n 8003bde <HAL_RCC_OscConfig+0x476>
}
}
else
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
8003bb6: f7fe f8e9 bl 8001d8c <HAL_GetTick>
8003bba: 0003 movs r3, r0
8003bbc: 613b str r3, [r7, #16]
/* Wait till LSE is disabled */
while (READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) != 0U)
8003bbe: e009 b.n 8003bd4 <HAL_RCC_OscConfig+0x46c>
{
if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
8003bc0: f7fe f8e4 bl 8001d8c <HAL_GetTick>
8003bc4: 0002 movs r2, r0
8003bc6: 693b ldr r3, [r7, #16]
8003bc8: 1ad3 subs r3, r2, r3
8003bca: 4a6f ldr r2, [pc, #444] ; (8003d88 <HAL_RCC_OscConfig+0x620>)
8003bcc: 4293 cmp r3, r2
8003bce: d901 bls.n 8003bd4 <HAL_RCC_OscConfig+0x46c>
{
return HAL_TIMEOUT;
8003bd0: 2303 movs r3, #3
8003bd2: e0d1 b.n 8003d78 <HAL_RCC_OscConfig+0x610>
while (READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) != 0U)
8003bd4: 4b6a ldr r3, [pc, #424] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003bd6: 6ddb ldr r3, [r3, #92] ; 0x5c
8003bd8: 2202 movs r2, #2
8003bda: 4013 ands r3, r2
8003bdc: d1f0 bne.n 8003bc0 <HAL_RCC_OscConfig+0x458>
}
}
}
/* Restore clock configuration if changed */
if (pwrclkchanged == SET)
8003bde: 231f movs r3, #31
8003be0: 18fb adds r3, r7, r3
8003be2: 781b ldrb r3, [r3, #0]
8003be4: 2b01 cmp r3, #1
8003be6: d105 bne.n 8003bf4 <HAL_RCC_OscConfig+0x48c>
{
__HAL_RCC_PWR_CLK_DISABLE();
8003be8: 4b65 ldr r3, [pc, #404] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003bea: 6bda ldr r2, [r3, #60] ; 0x3c
8003bec: 4b64 ldr r3, [pc, #400] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003bee: 4967 ldr r1, [pc, #412] ; (8003d8c <HAL_RCC_OscConfig+0x624>)
8003bf0: 400a ands r2, r1
8003bf2: 63da str r2, [r3, #60] ; 0x3c
#endif /* RCC_HSI48_SUPPORT */
/*-------------------------------- PLL Configuration -----------------------*/
/* Check the parameters */
assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState));
if (RCC_OscInitStruct->PLL.PLLState != RCC_PLL_NONE)
8003bf4: 687b ldr r3, [r7, #4]
8003bf6: 69db ldr r3, [r3, #28]
8003bf8: 2b00 cmp r3, #0
8003bfa: d100 bne.n 8003bfe <HAL_RCC_OscConfig+0x496>
8003bfc: e0bb b.n 8003d76 <HAL_RCC_OscConfig+0x60e>
{
/* Check if the PLL is used as system clock or not */
if (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_PLLCLK)
8003bfe: 4b60 ldr r3, [pc, #384] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003c00: 689b ldr r3, [r3, #8]
8003c02: 2238 movs r2, #56 ; 0x38
8003c04: 4013 ands r3, r2
8003c06: 2b10 cmp r3, #16
8003c08: d100 bne.n 8003c0c <HAL_RCC_OscConfig+0x4a4>
8003c0a: e07b b.n 8003d04 <HAL_RCC_OscConfig+0x59c>
{
if (RCC_OscInitStruct->PLL.PLLState == RCC_PLL_ON)
8003c0c: 687b ldr r3, [r7, #4]
8003c0e: 69db ldr r3, [r3, #28]
8003c10: 2b02 cmp r3, #2
8003c12: d156 bne.n 8003cc2 <HAL_RCC_OscConfig+0x55a>
assert_param(IS_RCC_PLLQ_VALUE(RCC_OscInitStruct->PLL.PLLQ));
#endif /* RCC_PLLQ_SUPPORT */
assert_param(IS_RCC_PLLR_VALUE(RCC_OscInitStruct->PLL.PLLR));
/* Disable the main PLL. */
__HAL_RCC_PLL_DISABLE();
8003c14: 4b5a ldr r3, [pc, #360] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003c16: 681a ldr r2, [r3, #0]
8003c18: 4b59 ldr r3, [pc, #356] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003c1a: 495d ldr r1, [pc, #372] ; (8003d90 <HAL_RCC_OscConfig+0x628>)
8003c1c: 400a ands r2, r1
8003c1e: 601a str r2, [r3, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8003c20: f7fe f8b4 bl 8001d8c <HAL_GetTick>
8003c24: 0003 movs r3, r0
8003c26: 613b str r3, [r7, #16]
/* Wait till PLL is ready */
while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U)
8003c28: e008 b.n 8003c3c <HAL_RCC_OscConfig+0x4d4>
{
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
8003c2a: f7fe f8af bl 8001d8c <HAL_GetTick>
8003c2e: 0002 movs r2, r0
8003c30: 693b ldr r3, [r7, #16]
8003c32: 1ad3 subs r3, r2, r3
8003c34: 2b02 cmp r3, #2
8003c36: d901 bls.n 8003c3c <HAL_RCC_OscConfig+0x4d4>
{
return HAL_TIMEOUT;
8003c38: 2303 movs r3, #3
8003c3a: e09d b.n 8003d78 <HAL_RCC_OscConfig+0x610>
while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U)
8003c3c: 4b50 ldr r3, [pc, #320] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003c3e: 681a ldr r2, [r3, #0]
8003c40: 2380 movs r3, #128 ; 0x80
8003c42: 049b lsls r3, r3, #18
8003c44: 4013 ands r3, r2
8003c46: d1f0 bne.n 8003c2a <HAL_RCC_OscConfig+0x4c2>
}
}
/* Configure the main PLL clock source, multiplication and division factors. */
#if defined(RCC_PLLQ_SUPPORT)
__HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource,
8003c48: 4b4d ldr r3, [pc, #308] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003c4a: 68db ldr r3, [r3, #12]
8003c4c: 4a51 ldr r2, [pc, #324] ; (8003d94 <HAL_RCC_OscConfig+0x62c>)
8003c4e: 4013 ands r3, r2
8003c50: 0019 movs r1, r3
8003c52: 687b ldr r3, [r7, #4]
8003c54: 6a1a ldr r2, [r3, #32]
8003c56: 687b ldr r3, [r7, #4]
8003c58: 6a5b ldr r3, [r3, #36] ; 0x24
8003c5a: 431a orrs r2, r3
8003c5c: 687b ldr r3, [r7, #4]
8003c5e: 6a9b ldr r3, [r3, #40] ; 0x28
8003c60: 021b lsls r3, r3, #8
8003c62: 431a orrs r2, r3
8003c64: 687b ldr r3, [r7, #4]
8003c66: 6adb ldr r3, [r3, #44] ; 0x2c
8003c68: 431a orrs r2, r3
8003c6a: 687b ldr r3, [r7, #4]
8003c6c: 6b1b ldr r3, [r3, #48] ; 0x30
8003c6e: 431a orrs r2, r3
8003c70: 687b ldr r3, [r7, #4]
8003c72: 6b5b ldr r3, [r3, #52] ; 0x34
8003c74: 431a orrs r2, r3
8003c76: 4b42 ldr r3, [pc, #264] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003c78: 430a orrs r2, r1
8003c7a: 60da str r2, [r3, #12]
RCC_OscInitStruct->PLL.PLLP,
RCC_OscInitStruct->PLL.PLLR);
#endif /* RCC_PLLQ_SUPPORT */
/* Enable the main PLL. */
__HAL_RCC_PLL_ENABLE();
8003c7c: 4b40 ldr r3, [pc, #256] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003c7e: 681a ldr r2, [r3, #0]
8003c80: 4b3f ldr r3, [pc, #252] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003c82: 2180 movs r1, #128 ; 0x80
8003c84: 0449 lsls r1, r1, #17
8003c86: 430a orrs r2, r1
8003c88: 601a str r2, [r3, #0]
/* Enable PLLR Clock output. */
__HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLLRCLK);
8003c8a: 4b3d ldr r3, [pc, #244] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003c8c: 68da ldr r2, [r3, #12]
8003c8e: 4b3c ldr r3, [pc, #240] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003c90: 2180 movs r1, #128 ; 0x80
8003c92: 0549 lsls r1, r1, #21
8003c94: 430a orrs r2, r1
8003c96: 60da str r2, [r3, #12]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8003c98: f7fe f878 bl 8001d8c <HAL_GetTick>
8003c9c: 0003 movs r3, r0
8003c9e: 613b str r3, [r7, #16]
/* Wait till PLL is ready */
while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U)
8003ca0: e008 b.n 8003cb4 <HAL_RCC_OscConfig+0x54c>
{
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
8003ca2: f7fe f873 bl 8001d8c <HAL_GetTick>
8003ca6: 0002 movs r2, r0
8003ca8: 693b ldr r3, [r7, #16]
8003caa: 1ad3 subs r3, r2, r3
8003cac: 2b02 cmp r3, #2
8003cae: d901 bls.n 8003cb4 <HAL_RCC_OscConfig+0x54c>
{
return HAL_TIMEOUT;
8003cb0: 2303 movs r3, #3
8003cb2: e061 b.n 8003d78 <HAL_RCC_OscConfig+0x610>
while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U)
8003cb4: 4b32 ldr r3, [pc, #200] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003cb6: 681a ldr r2, [r3, #0]
8003cb8: 2380 movs r3, #128 ; 0x80
8003cba: 049b lsls r3, r3, #18
8003cbc: 4013 ands r3, r2
8003cbe: d0f0 beq.n 8003ca2 <HAL_RCC_OscConfig+0x53a>
8003cc0: e059 b.n 8003d76 <HAL_RCC_OscConfig+0x60e>
}
}
else
{
/* Disable the main PLL. */
__HAL_RCC_PLL_DISABLE();
8003cc2: 4b2f ldr r3, [pc, #188] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003cc4: 681a ldr r2, [r3, #0]
8003cc6: 4b2e ldr r3, [pc, #184] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003cc8: 4931 ldr r1, [pc, #196] ; (8003d90 <HAL_RCC_OscConfig+0x628>)
8003cca: 400a ands r2, r1
8003ccc: 601a str r2, [r3, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8003cce: f7fe f85d bl 8001d8c <HAL_GetTick>
8003cd2: 0003 movs r3, r0
8003cd4: 613b str r3, [r7, #16]
/* Wait till PLL is disabled */
while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U)
8003cd6: e008 b.n 8003cea <HAL_RCC_OscConfig+0x582>
{
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
8003cd8: f7fe f858 bl 8001d8c <HAL_GetTick>
8003cdc: 0002 movs r2, r0
8003cde: 693b ldr r3, [r7, #16]
8003ce0: 1ad3 subs r3, r2, r3
8003ce2: 2b02 cmp r3, #2
8003ce4: d901 bls.n 8003cea <HAL_RCC_OscConfig+0x582>
{
return HAL_TIMEOUT;
8003ce6: 2303 movs r3, #3
8003ce8: e046 b.n 8003d78 <HAL_RCC_OscConfig+0x610>
while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U)
8003cea: 4b25 ldr r3, [pc, #148] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003cec: 681a ldr r2, [r3, #0]
8003cee: 2380 movs r3, #128 ; 0x80
8003cf0: 049b lsls r3, r3, #18
8003cf2: 4013 ands r3, r2
8003cf4: d1f0 bne.n 8003cd8 <HAL_RCC_OscConfig+0x570>
}
}
/* Unselect main PLL clock source and disable main PLL outputs to save power */
#if defined(RCC_PLLQ_SUPPORT)
RCC->PLLCFGR &= ~(RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLPEN | RCC_PLLCFGR_PLLQEN | RCC_PLLCFGR_PLLREN);
8003cf6: 4b22 ldr r3, [pc, #136] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003cf8: 68da ldr r2, [r3, #12]
8003cfa: 4b21 ldr r3, [pc, #132] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003cfc: 4926 ldr r1, [pc, #152] ; (8003d98 <HAL_RCC_OscConfig+0x630>)
8003cfe: 400a ands r2, r1
8003d00: 60da str r2, [r3, #12]
8003d02: e038 b.n 8003d76 <HAL_RCC_OscConfig+0x60e>
}
}
else
{
/* Check if there is a request to disable the PLL used as System clock source */
if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF)
8003d04: 687b ldr r3, [r7, #4]
8003d06: 69db ldr r3, [r3, #28]
8003d08: 2b01 cmp r3, #1
8003d0a: d101 bne.n 8003d10 <HAL_RCC_OscConfig+0x5a8>
{
return HAL_ERROR;
8003d0c: 2301 movs r3, #1
8003d0e: e033 b.n 8003d78 <HAL_RCC_OscConfig+0x610>
}
else
{
/* Do not return HAL_ERROR if request repeats the current configuration */
temp_pllckcfg = RCC->PLLCFGR;
8003d10: 4b1b ldr r3, [pc, #108] ; (8003d80 <HAL_RCC_OscConfig+0x618>)
8003d12: 68db ldr r3, [r3, #12]
8003d14: 617b str r3, [r7, #20]
if ((READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
8003d16: 697b ldr r3, [r7, #20]
8003d18: 2203 movs r2, #3
8003d1a: 401a ands r2, r3
8003d1c: 687b ldr r3, [r7, #4]
8003d1e: 6a1b ldr r3, [r3, #32]
8003d20: 429a cmp r2, r3
8003d22: d126 bne.n 8003d72 <HAL_RCC_OscConfig+0x60a>
(READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLM) != RCC_OscInitStruct->PLL.PLLM) ||
8003d24: 697b ldr r3, [r7, #20]
8003d26: 2270 movs r2, #112 ; 0x70
8003d28: 401a ands r2, r3
8003d2a: 687b ldr r3, [r7, #4]
8003d2c: 6a5b ldr r3, [r3, #36] ; 0x24
if ((READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
8003d2e: 429a cmp r2, r3
8003d30: d11f bne.n 8003d72 <HAL_RCC_OscConfig+0x60a>
(READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos)) ||
8003d32: 697a ldr r2, [r7, #20]
8003d34: 23fe movs r3, #254 ; 0xfe
8003d36: 01db lsls r3, r3, #7
8003d38: 401a ands r2, r3
8003d3a: 687b ldr r3, [r7, #4]
8003d3c: 6a9b ldr r3, [r3, #40] ; 0x28
8003d3e: 021b lsls r3, r3, #8
(READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLM) != RCC_OscInitStruct->PLL.PLLM) ||
8003d40: 429a cmp r2, r3
8003d42: d116 bne.n 8003d72 <HAL_RCC_OscConfig+0x60a>
(READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLP) != RCC_OscInitStruct->PLL.PLLP) ||
8003d44: 697a ldr r2, [r7, #20]
8003d46: 23f8 movs r3, #248 ; 0xf8
8003d48: 039b lsls r3, r3, #14
8003d4a: 401a ands r2, r3
8003d4c: 687b ldr r3, [r7, #4]
8003d4e: 6adb ldr r3, [r3, #44] ; 0x2c
(READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos)) ||
8003d50: 429a cmp r2, r3
8003d52: d10e bne.n 8003d72 <HAL_RCC_OscConfig+0x60a>
#if defined (RCC_PLLQ_SUPPORT)
(READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLQ) != RCC_OscInitStruct->PLL.PLLQ) ||
8003d54: 697a ldr r2, [r7, #20]
8003d56: 23e0 movs r3, #224 ; 0xe0
8003d58: 051b lsls r3, r3, #20
8003d5a: 401a ands r2, r3
8003d5c: 687b ldr r3, [r7, #4]
8003d5e: 6b1b ldr r3, [r3, #48] ; 0x30
(READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLP) != RCC_OscInitStruct->PLL.PLLP) ||
8003d60: 429a cmp r2, r3
8003d62: d106 bne.n 8003d72 <HAL_RCC_OscConfig+0x60a>
#endif /* RCC_PLLQ_SUPPORT */
(READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLR) != RCC_OscInitStruct->PLL.PLLR))
8003d64: 697b ldr r3, [r7, #20]
8003d66: 0f5b lsrs r3, r3, #29
8003d68: 075a lsls r2, r3, #29
8003d6a: 687b ldr r3, [r7, #4]
8003d6c: 6b5b ldr r3, [r3, #52] ; 0x34
(READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLQ) != RCC_OscInitStruct->PLL.PLLQ) ||
8003d6e: 429a cmp r2, r3
8003d70: d001 beq.n 8003d76 <HAL_RCC_OscConfig+0x60e>
{
return HAL_ERROR;
8003d72: 2301 movs r3, #1
8003d74: e000 b.n 8003d78 <HAL_RCC_OscConfig+0x610>
}
}
}
}
return HAL_OK;
8003d76: 2300 movs r3, #0
}
8003d78: 0018 movs r0, r3
8003d7a: 46bd mov sp, r7
8003d7c: b008 add sp, #32
8003d7e: bd80 pop {r7, pc}
8003d80: 40021000 .word 0x40021000
8003d84: 40007000 .word 0x40007000
8003d88: 00001388 .word 0x00001388
8003d8c: efffffff .word 0xefffffff
8003d90: feffffff .word 0xfeffffff
8003d94: 11c1808c .word 0x11c1808c
8003d98: eefefffc .word 0xeefefffc
08003d9c <HAL_RCC_ClockConfig>:
* HPRE[3:0] bits to ensure that HCLK not exceed the maximum allowed frequency
* (for more details refer to section above "Initialization/de-initialization functions")
* @retval None
*/
HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency)
{
8003d9c: b580 push {r7, lr}
8003d9e: b084 sub sp, #16
8003da0: af00 add r7, sp, #0
8003da2: 6078 str r0, [r7, #4]
8003da4: 6039 str r1, [r7, #0]
uint32_t tickstart;
/* Check Null pointer */
if (RCC_ClkInitStruct == NULL)
8003da6: 687b ldr r3, [r7, #4]
8003da8: 2b00 cmp r3, #0
8003daa: d101 bne.n 8003db0 <HAL_RCC_ClockConfig+0x14>
{
return HAL_ERROR;
8003dac: 2301 movs r3, #1
8003dae: e0e9 b.n 8003f84 <HAL_RCC_ClockConfig+0x1e8>
/* To correctly read data from FLASH memory, the number of wait states (LATENCY)
must be correctly programmed according to the frequency of the FLASH clock
(HCLK) and the supply voltage of the device. */
/* Increasing the number of wait states because of higher CPU frequency */
if (FLatency > __HAL_FLASH_GET_LATENCY())
8003db0: 4b76 ldr r3, [pc, #472] ; (8003f8c <HAL_RCC_ClockConfig+0x1f0>)
8003db2: 681b ldr r3, [r3, #0]
8003db4: 2207 movs r2, #7
8003db6: 4013 ands r3, r2
8003db8: 683a ldr r2, [r7, #0]
8003dba: 429a cmp r2, r3
8003dbc: d91e bls.n 8003dfc <HAL_RCC_ClockConfig+0x60>
{
/* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
__HAL_FLASH_SET_LATENCY(FLatency);
8003dbe: 4b73 ldr r3, [pc, #460] ; (8003f8c <HAL_RCC_ClockConfig+0x1f0>)
8003dc0: 681b ldr r3, [r3, #0]
8003dc2: 2207 movs r2, #7
8003dc4: 4393 bics r3, r2
8003dc6: 0019 movs r1, r3
8003dc8: 4b70 ldr r3, [pc, #448] ; (8003f8c <HAL_RCC_ClockConfig+0x1f0>)
8003dca: 683a ldr r2, [r7, #0]
8003dcc: 430a orrs r2, r1
8003dce: 601a str r2, [r3, #0]
/* Check that the new number of wait states is taken into account to access the Flash
memory by polling the FLASH_ACR register */
tickstart = HAL_GetTick();
8003dd0: f7fd ffdc bl 8001d8c <HAL_GetTick>
8003dd4: 0003 movs r3, r0
8003dd6: 60fb str r3, [r7, #12]
while ((FLASH->ACR & FLASH_ACR_LATENCY) != FLatency)
8003dd8: e009 b.n 8003dee <HAL_RCC_ClockConfig+0x52>
{
if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
8003dda: f7fd ffd7 bl 8001d8c <HAL_GetTick>
8003dde: 0002 movs r2, r0
8003de0: 68fb ldr r3, [r7, #12]
8003de2: 1ad3 subs r3, r2, r3
8003de4: 4a6a ldr r2, [pc, #424] ; (8003f90 <HAL_RCC_ClockConfig+0x1f4>)
8003de6: 4293 cmp r3, r2
8003de8: d901 bls.n 8003dee <HAL_RCC_ClockConfig+0x52>
{
return HAL_TIMEOUT;
8003dea: 2303 movs r3, #3
8003dec: e0ca b.n 8003f84 <HAL_RCC_ClockConfig+0x1e8>
while ((FLASH->ACR & FLASH_ACR_LATENCY) != FLatency)
8003dee: 4b67 ldr r3, [pc, #412] ; (8003f8c <HAL_RCC_ClockConfig+0x1f0>)
8003df0: 681b ldr r3, [r3, #0]
8003df2: 2207 movs r2, #7
8003df4: 4013 ands r3, r2
8003df6: 683a ldr r2, [r7, #0]
8003df8: 429a cmp r2, r3
8003dfa: d1ee bne.n 8003dda <HAL_RCC_ClockConfig+0x3e>
}
}
}
/*-------------------------- HCLK Configuration --------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
8003dfc: 687b ldr r3, [r7, #4]
8003dfe: 681b ldr r3, [r3, #0]
8003e00: 2202 movs r2, #2
8003e02: 4013 ands r3, r2
8003e04: d015 beq.n 8003e32 <HAL_RCC_ClockConfig+0x96>
{
/* Set the highest APB divider in order to ensure that we do not go through
a non-spec phase whatever we decrease or increase HCLK. */
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
8003e06: 687b ldr r3, [r7, #4]
8003e08: 681b ldr r3, [r3, #0]
8003e0a: 2204 movs r2, #4
8003e0c: 4013 ands r3, r2
8003e0e: d006 beq.n 8003e1e <HAL_RCC_ClockConfig+0x82>
{
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE, RCC_HCLK_DIV16);
8003e10: 4b60 ldr r3, [pc, #384] ; (8003f94 <HAL_RCC_ClockConfig+0x1f8>)
8003e12: 689a ldr r2, [r3, #8]
8003e14: 4b5f ldr r3, [pc, #380] ; (8003f94 <HAL_RCC_ClockConfig+0x1f8>)
8003e16: 21e0 movs r1, #224 ; 0xe0
8003e18: 01c9 lsls r1, r1, #7
8003e1a: 430a orrs r2, r1
8003e1c: 609a str r2, [r3, #8]
}
/* Set the new HCLK clock divider */
assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
8003e1e: 4b5d ldr r3, [pc, #372] ; (8003f94 <HAL_RCC_ClockConfig+0x1f8>)
8003e20: 689b ldr r3, [r3, #8]
8003e22: 4a5d ldr r2, [pc, #372] ; (8003f98 <HAL_RCC_ClockConfig+0x1fc>)
8003e24: 4013 ands r3, r2
8003e26: 0019 movs r1, r3
8003e28: 687b ldr r3, [r7, #4]
8003e2a: 689a ldr r2, [r3, #8]
8003e2c: 4b59 ldr r3, [pc, #356] ; (8003f94 <HAL_RCC_ClockConfig+0x1f8>)
8003e2e: 430a orrs r2, r1
8003e30: 609a str r2, [r3, #8]
}
/*------------------------- SYSCLK Configuration ---------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
8003e32: 687b ldr r3, [r7, #4]
8003e34: 681b ldr r3, [r3, #0]
8003e36: 2201 movs r2, #1
8003e38: 4013 ands r3, r2
8003e3a: d057 beq.n 8003eec <HAL_RCC_ClockConfig+0x150>
{
assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource));
/* HSE is selected as System Clock Source */
if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE)
8003e3c: 687b ldr r3, [r7, #4]
8003e3e: 685b ldr r3, [r3, #4]
8003e40: 2b01 cmp r3, #1
8003e42: d107 bne.n 8003e54 <HAL_RCC_ClockConfig+0xb8>
{
/* Check the HSE ready flag */
if (READ_BIT(RCC->CR, RCC_CR_HSERDY) == 0U)
8003e44: 4b53 ldr r3, [pc, #332] ; (8003f94 <HAL_RCC_ClockConfig+0x1f8>)
8003e46: 681a ldr r2, [r3, #0]
8003e48: 2380 movs r3, #128 ; 0x80
8003e4a: 029b lsls r3, r3, #10
8003e4c: 4013 ands r3, r2
8003e4e: d12b bne.n 8003ea8 <HAL_RCC_ClockConfig+0x10c>
{
return HAL_ERROR;
8003e50: 2301 movs r3, #1
8003e52: e097 b.n 8003f84 <HAL_RCC_ClockConfig+0x1e8>
}
}
/* PLL is selected as System Clock Source */
else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK)
8003e54: 687b ldr r3, [r7, #4]
8003e56: 685b ldr r3, [r3, #4]
8003e58: 2b02 cmp r3, #2
8003e5a: d107 bne.n 8003e6c <HAL_RCC_ClockConfig+0xd0>
{
/* Check the PLL ready flag */
if (READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U)
8003e5c: 4b4d ldr r3, [pc, #308] ; (8003f94 <HAL_RCC_ClockConfig+0x1f8>)
8003e5e: 681a ldr r2, [r3, #0]
8003e60: 2380 movs r3, #128 ; 0x80
8003e62: 049b lsls r3, r3, #18
8003e64: 4013 ands r3, r2
8003e66: d11f bne.n 8003ea8 <HAL_RCC_ClockConfig+0x10c>
{
return HAL_ERROR;
8003e68: 2301 movs r3, #1
8003e6a: e08b b.n 8003f84 <HAL_RCC_ClockConfig+0x1e8>
}
}
/* HSI is selected as System Clock Source */
else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSI)
8003e6c: 687b ldr r3, [r7, #4]
8003e6e: 685b ldr r3, [r3, #4]
8003e70: 2b00 cmp r3, #0
8003e72: d107 bne.n 8003e84 <HAL_RCC_ClockConfig+0xe8>
{
/* Check the HSI ready flag */
if (READ_BIT(RCC->CR, RCC_CR_HSIRDY) == 0U)
8003e74: 4b47 ldr r3, [pc, #284] ; (8003f94 <HAL_RCC_ClockConfig+0x1f8>)
8003e76: 681a ldr r2, [r3, #0]
8003e78: 2380 movs r3, #128 ; 0x80
8003e7a: 00db lsls r3, r3, #3
8003e7c: 4013 ands r3, r2
8003e7e: d113 bne.n 8003ea8 <HAL_RCC_ClockConfig+0x10c>
{
return HAL_ERROR;
8003e80: 2301 movs r3, #1
8003e82: e07f b.n 8003f84 <HAL_RCC_ClockConfig+0x1e8>
}
}
/* LSI is selected as System Clock Source */
else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_LSI)
8003e84: 687b ldr r3, [r7, #4]
8003e86: 685b ldr r3, [r3, #4]
8003e88: 2b03 cmp r3, #3
8003e8a: d106 bne.n 8003e9a <HAL_RCC_ClockConfig+0xfe>
{
/* Check the LSI ready flag */
if (READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) == 0U)
8003e8c: 4b41 ldr r3, [pc, #260] ; (8003f94 <HAL_RCC_ClockConfig+0x1f8>)
8003e8e: 6e1b ldr r3, [r3, #96] ; 0x60
8003e90: 2202 movs r2, #2
8003e92: 4013 ands r3, r2
8003e94: d108 bne.n 8003ea8 <HAL_RCC_ClockConfig+0x10c>
{
return HAL_ERROR;
8003e96: 2301 movs r3, #1
8003e98: e074 b.n 8003f84 <HAL_RCC_ClockConfig+0x1e8>
}
/* LSE is selected as System Clock Source */
else
{
/* Check the LSE ready flag */
if (READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == 0U)
8003e9a: 4b3e ldr r3, [pc, #248] ; (8003f94 <HAL_RCC_ClockConfig+0x1f8>)
8003e9c: 6ddb ldr r3, [r3, #92] ; 0x5c
8003e9e: 2202 movs r2, #2
8003ea0: 4013 ands r3, r2
8003ea2: d101 bne.n 8003ea8 <HAL_RCC_ClockConfig+0x10c>
{
return HAL_ERROR;
8003ea4: 2301 movs r3, #1
8003ea6: e06d b.n 8003f84 <HAL_RCC_ClockConfig+0x1e8>
}
}
MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, RCC_ClkInitStruct->SYSCLKSource);
8003ea8: 4b3a ldr r3, [pc, #232] ; (8003f94 <HAL_RCC_ClockConfig+0x1f8>)
8003eaa: 689b ldr r3, [r3, #8]
8003eac: 2207 movs r2, #7
8003eae: 4393 bics r3, r2
8003eb0: 0019 movs r1, r3
8003eb2: 687b ldr r3, [r7, #4]
8003eb4: 685a ldr r2, [r3, #4]
8003eb6: 4b37 ldr r3, [pc, #220] ; (8003f94 <HAL_RCC_ClockConfig+0x1f8>)
8003eb8: 430a orrs r2, r1
8003eba: 609a str r2, [r3, #8]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8003ebc: f7fd ff66 bl 8001d8c <HAL_GetTick>
8003ec0: 0003 movs r3, r0
8003ec2: 60fb str r3, [r7, #12]
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
8003ec4: e009 b.n 8003eda <HAL_RCC_ClockConfig+0x13e>
{
if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
8003ec6: f7fd ff61 bl 8001d8c <HAL_GetTick>
8003eca: 0002 movs r2, r0
8003ecc: 68fb ldr r3, [r7, #12]
8003ece: 1ad3 subs r3, r2, r3
8003ed0: 4a2f ldr r2, [pc, #188] ; (8003f90 <HAL_RCC_ClockConfig+0x1f4>)
8003ed2: 4293 cmp r3, r2
8003ed4: d901 bls.n 8003eda <HAL_RCC_ClockConfig+0x13e>
{
return HAL_TIMEOUT;
8003ed6: 2303 movs r3, #3
8003ed8: e054 b.n 8003f84 <HAL_RCC_ClockConfig+0x1e8>
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
8003eda: 4b2e ldr r3, [pc, #184] ; (8003f94 <HAL_RCC_ClockConfig+0x1f8>)
8003edc: 689b ldr r3, [r3, #8]
8003ede: 2238 movs r2, #56 ; 0x38
8003ee0: 401a ands r2, r3
8003ee2: 687b ldr r3, [r7, #4]
8003ee4: 685b ldr r3, [r3, #4]
8003ee6: 00db lsls r3, r3, #3
8003ee8: 429a cmp r2, r3
8003eea: d1ec bne.n 8003ec6 <HAL_RCC_ClockConfig+0x12a>
}
}
}
/* Decreasing the number of wait states because of lower CPU frequency */
if (FLatency < __HAL_FLASH_GET_LATENCY())
8003eec: 4b27 ldr r3, [pc, #156] ; (8003f8c <HAL_RCC_ClockConfig+0x1f0>)
8003eee: 681b ldr r3, [r3, #0]
8003ef0: 2207 movs r2, #7
8003ef2: 4013 ands r3, r2
8003ef4: 683a ldr r2, [r7, #0]
8003ef6: 429a cmp r2, r3
8003ef8: d21e bcs.n 8003f38 <HAL_RCC_ClockConfig+0x19c>
{
/* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
__HAL_FLASH_SET_LATENCY(FLatency);
8003efa: 4b24 ldr r3, [pc, #144] ; (8003f8c <HAL_RCC_ClockConfig+0x1f0>)
8003efc: 681b ldr r3, [r3, #0]
8003efe: 2207 movs r2, #7
8003f00: 4393 bics r3, r2
8003f02: 0019 movs r1, r3
8003f04: 4b21 ldr r3, [pc, #132] ; (8003f8c <HAL_RCC_ClockConfig+0x1f0>)
8003f06: 683a ldr r2, [r7, #0]
8003f08: 430a orrs r2, r1
8003f0a: 601a str r2, [r3, #0]
/* Check that the new number of wait states is taken into account to access the Flash
memory by polling the FLASH_ACR register */
tickstart = HAL_GetTick();
8003f0c: f7fd ff3e bl 8001d8c <HAL_GetTick>
8003f10: 0003 movs r3, r0
8003f12: 60fb str r3, [r7, #12]
while ((FLASH->ACR & FLASH_ACR_LATENCY) != FLatency)
8003f14: e009 b.n 8003f2a <HAL_RCC_ClockConfig+0x18e>
{
if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
8003f16: f7fd ff39 bl 8001d8c <HAL_GetTick>
8003f1a: 0002 movs r2, r0
8003f1c: 68fb ldr r3, [r7, #12]
8003f1e: 1ad3 subs r3, r2, r3
8003f20: 4a1b ldr r2, [pc, #108] ; (8003f90 <HAL_RCC_ClockConfig+0x1f4>)
8003f22: 4293 cmp r3, r2
8003f24: d901 bls.n 8003f2a <HAL_RCC_ClockConfig+0x18e>
{
return HAL_TIMEOUT;
8003f26: 2303 movs r3, #3
8003f28: e02c b.n 8003f84 <HAL_RCC_ClockConfig+0x1e8>
while ((FLASH->ACR & FLASH_ACR_LATENCY) != FLatency)
8003f2a: 4b18 ldr r3, [pc, #96] ; (8003f8c <HAL_RCC_ClockConfig+0x1f0>)
8003f2c: 681b ldr r3, [r3, #0]
8003f2e: 2207 movs r2, #7
8003f30: 4013 ands r3, r2
8003f32: 683a ldr r2, [r7, #0]
8003f34: 429a cmp r2, r3
8003f36: d1ee bne.n 8003f16 <HAL_RCC_ClockConfig+0x17a>
}
}
}
/*-------------------------- PCLK1 Configuration ---------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
8003f38: 687b ldr r3, [r7, #4]
8003f3a: 681b ldr r3, [r3, #0]
8003f3c: 2204 movs r2, #4
8003f3e: 4013 ands r3, r2
8003f40: d009 beq.n 8003f56 <HAL_RCC_ClockConfig+0x1ba>
{
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE, RCC_ClkInitStruct->APB1CLKDivider);
8003f42: 4b14 ldr r3, [pc, #80] ; (8003f94 <HAL_RCC_ClockConfig+0x1f8>)
8003f44: 689b ldr r3, [r3, #8]
8003f46: 4a15 ldr r2, [pc, #84] ; (8003f9c <HAL_RCC_ClockConfig+0x200>)
8003f48: 4013 ands r3, r2
8003f4a: 0019 movs r1, r3
8003f4c: 687b ldr r3, [r7, #4]
8003f4e: 68da ldr r2, [r3, #12]
8003f50: 4b10 ldr r3, [pc, #64] ; (8003f94 <HAL_RCC_ClockConfig+0x1f8>)
8003f52: 430a orrs r2, r1
8003f54: 609a str r2, [r3, #8]
}
/* Update the SystemCoreClock global variable */
SystemCoreClock = (HAL_RCC_GetSysClockFreq() >> ((AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos]) & 0x1FU));
8003f56: f000 f829 bl 8003fac <HAL_RCC_GetSysClockFreq>
8003f5a: 0001 movs r1, r0
8003f5c: 4b0d ldr r3, [pc, #52] ; (8003f94 <HAL_RCC_ClockConfig+0x1f8>)
8003f5e: 689b ldr r3, [r3, #8]
8003f60: 0a1b lsrs r3, r3, #8
8003f62: 220f movs r2, #15
8003f64: 401a ands r2, r3
8003f66: 4b0e ldr r3, [pc, #56] ; (8003fa0 <HAL_RCC_ClockConfig+0x204>)
8003f68: 0092 lsls r2, r2, #2
8003f6a: 58d3 ldr r3, [r2, r3]
8003f6c: 221f movs r2, #31
8003f6e: 4013 ands r3, r2
8003f70: 000a movs r2, r1
8003f72: 40da lsrs r2, r3
8003f74: 4b0b ldr r3, [pc, #44] ; (8003fa4 <HAL_RCC_ClockConfig+0x208>)
8003f76: 601a str r2, [r3, #0]
/* Configure the source of time base considering new system clocks settings*/
return HAL_InitTick(uwTickPrio);
8003f78: 4b0b ldr r3, [pc, #44] ; (8003fa8 <HAL_RCC_ClockConfig+0x20c>)
8003f7a: 681b ldr r3, [r3, #0]
8003f7c: 0018 movs r0, r3
8003f7e: f7fd fea9 bl 8001cd4 <HAL_InitTick>
8003f82: 0003 movs r3, r0
}
8003f84: 0018 movs r0, r3
8003f86: 46bd mov sp, r7
8003f88: b004 add sp, #16
8003f8a: bd80 pop {r7, pc}
8003f8c: 40022000 .word 0x40022000
8003f90: 00001388 .word 0x00001388
8003f94: 40021000 .word 0x40021000
8003f98: fffff0ff .word 0xfffff0ff
8003f9c: ffff8fff .word 0xffff8fff
8003fa0: 080067e8 .word 0x080067e8
8003fa4: 20000004 .word 0x20000004
8003fa8: 20000008 .word 0x20000008
08003fac <HAL_RCC_GetSysClockFreq>:
*
*
* @retval SYSCLK frequency
*/
uint32_t HAL_RCC_GetSysClockFreq(void)
{
8003fac: b580 push {r7, lr}
8003fae: b086 sub sp, #24
8003fb0: af00 add r7, sp, #0
uint32_t pllvco, pllsource, pllr, pllm, hsidiv;
uint32_t sysclockfreq;
if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_HSI)
8003fb2: 4b3c ldr r3, [pc, #240] ; (80040a4 <HAL_RCC_GetSysClockFreq+0xf8>)
8003fb4: 689b ldr r3, [r3, #8]
8003fb6: 2238 movs r2, #56 ; 0x38
8003fb8: 4013 ands r3, r2
8003fba: d10f bne.n 8003fdc <HAL_RCC_GetSysClockFreq+0x30>
{
/* HSISYS can be derived for HSI16 */
hsidiv = (1UL << ((READ_BIT(RCC->CR, RCC_CR_HSIDIV)) >> RCC_CR_HSIDIV_Pos));
8003fbc: 4b39 ldr r3, [pc, #228] ; (80040a4 <HAL_RCC_GetSysClockFreq+0xf8>)
8003fbe: 681b ldr r3, [r3, #0]
8003fc0: 0adb lsrs r3, r3, #11
8003fc2: 2207 movs r2, #7
8003fc4: 4013 ands r3, r2
8003fc6: 2201 movs r2, #1
8003fc8: 409a lsls r2, r3
8003fca: 0013 movs r3, r2
8003fcc: 603b str r3, [r7, #0]
/* HSI used as system clock source */
sysclockfreq = (HSI_VALUE / hsidiv);
8003fce: 6839 ldr r1, [r7, #0]
8003fd0: 4835 ldr r0, [pc, #212] ; (80040a8 <HAL_RCC_GetSysClockFreq+0xfc>)
8003fd2: f7fc f899 bl 8000108 <__udivsi3>
8003fd6: 0003 movs r3, r0
8003fd8: 613b str r3, [r7, #16]
8003fda: e05d b.n 8004098 <HAL_RCC_GetSysClockFreq+0xec>
}
else if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_HSE)
8003fdc: 4b31 ldr r3, [pc, #196] ; (80040a4 <HAL_RCC_GetSysClockFreq+0xf8>)
8003fde: 689b ldr r3, [r3, #8]
8003fe0: 2238 movs r2, #56 ; 0x38
8003fe2: 4013 ands r3, r2
8003fe4: 2b08 cmp r3, #8
8003fe6: d102 bne.n 8003fee <HAL_RCC_GetSysClockFreq+0x42>
{
/* HSE used as system clock source */
sysclockfreq = HSE_VALUE;
8003fe8: 4b30 ldr r3, [pc, #192] ; (80040ac <HAL_RCC_GetSysClockFreq+0x100>)
8003fea: 613b str r3, [r7, #16]
8003fec: e054 b.n 8004098 <HAL_RCC_GetSysClockFreq+0xec>
}
else if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK)
8003fee: 4b2d ldr r3, [pc, #180] ; (80040a4 <HAL_RCC_GetSysClockFreq+0xf8>)
8003ff0: 689b ldr r3, [r3, #8]
8003ff2: 2238 movs r2, #56 ; 0x38
8003ff4: 4013 ands r3, r2
8003ff6: 2b10 cmp r3, #16
8003ff8: d138 bne.n 800406c <HAL_RCC_GetSysClockFreq+0xc0>
/* PLL used as system clock source */
/* PLL_VCO = ((HSE_VALUE or HSI_VALUE)/ PLLM) * PLLN
SYSCLK = PLL_VCO / PLLR
*/
pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC);
8003ffa: 4b2a ldr r3, [pc, #168] ; (80040a4 <HAL_RCC_GetSysClockFreq+0xf8>)
8003ffc: 68db ldr r3, [r3, #12]
8003ffe: 2203 movs r2, #3
8004000: 4013 ands r3, r2
8004002: 60fb str r3, [r7, #12]
pllm = ((RCC->PLLCFGR & RCC_PLLCFGR_PLLM) >> RCC_PLLCFGR_PLLM_Pos) + 1U ;
8004004: 4b27 ldr r3, [pc, #156] ; (80040a4 <HAL_RCC_GetSysClockFreq+0xf8>)
8004006: 68db ldr r3, [r3, #12]
8004008: 091b lsrs r3, r3, #4
800400a: 2207 movs r2, #7
800400c: 4013 ands r3, r2
800400e: 3301 adds r3, #1
8004010: 60bb str r3, [r7, #8]
switch (pllsource)
8004012: 68fb ldr r3, [r7, #12]
8004014: 2b03 cmp r3, #3
8004016: d10d bne.n 8004034 <HAL_RCC_GetSysClockFreq+0x88>
{
case RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */
pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos);
8004018: 68b9 ldr r1, [r7, #8]
800401a: 4824 ldr r0, [pc, #144] ; (80040ac <HAL_RCC_GetSysClockFreq+0x100>)
800401c: f7fc f874 bl 8000108 <__udivsi3>
8004020: 0003 movs r3, r0
8004022: 0019 movs r1, r3
8004024: 4b1f ldr r3, [pc, #124] ; (80040a4 <HAL_RCC_GetSysClockFreq+0xf8>)
8004026: 68db ldr r3, [r3, #12]
8004028: 0a1b lsrs r3, r3, #8
800402a: 227f movs r2, #127 ; 0x7f
800402c: 4013 ands r3, r2
800402e: 434b muls r3, r1
8004030: 617b str r3, [r7, #20]
break;
8004032: e00d b.n 8004050 <HAL_RCC_GetSysClockFreq+0xa4>
case RCC_PLLSOURCE_HSI: /* HSI16 used as PLL clock source */
default: /* HSI16 used as PLL clock source */
pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos) ;
8004034: 68b9 ldr r1, [r7, #8]
8004036: 481c ldr r0, [pc, #112] ; (80040a8 <HAL_RCC_GetSysClockFreq+0xfc>)
8004038: f7fc f866 bl 8000108 <__udivsi3>
800403c: 0003 movs r3, r0
800403e: 0019 movs r1, r3
8004040: 4b18 ldr r3, [pc, #96] ; (80040a4 <HAL_RCC_GetSysClockFreq+0xf8>)
8004042: 68db ldr r3, [r3, #12]
8004044: 0a1b lsrs r3, r3, #8
8004046: 227f movs r2, #127 ; 0x7f
8004048: 4013 ands r3, r2
800404a: 434b muls r3, r1
800404c: 617b str r3, [r7, #20]
break;
800404e: 46c0 nop ; (mov r8, r8)
}
pllr = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLR) >> RCC_PLLCFGR_PLLR_Pos) + 1U);
8004050: 4b14 ldr r3, [pc, #80] ; (80040a4 <HAL_RCC_GetSysClockFreq+0xf8>)
8004052: 68db ldr r3, [r3, #12]
8004054: 0f5b lsrs r3, r3, #29
8004056: 2207 movs r2, #7
8004058: 4013 ands r3, r2
800405a: 3301 adds r3, #1
800405c: 607b str r3, [r7, #4]
sysclockfreq = pllvco / pllr;
800405e: 6879 ldr r1, [r7, #4]
8004060: 6978 ldr r0, [r7, #20]
8004062: f7fc f851 bl 8000108 <__udivsi3>
8004066: 0003 movs r3, r0
8004068: 613b str r3, [r7, #16]
800406a: e015 b.n 8004098 <HAL_RCC_GetSysClockFreq+0xec>
}
else if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_LSE)
800406c: 4b0d ldr r3, [pc, #52] ; (80040a4 <HAL_RCC_GetSysClockFreq+0xf8>)
800406e: 689b ldr r3, [r3, #8]
8004070: 2238 movs r2, #56 ; 0x38
8004072: 4013 ands r3, r2
8004074: 2b20 cmp r3, #32
8004076: d103 bne.n 8004080 <HAL_RCC_GetSysClockFreq+0xd4>
{
/* LSE used as system clock source */
sysclockfreq = LSE_VALUE;
8004078: 2380 movs r3, #128 ; 0x80
800407a: 021b lsls r3, r3, #8
800407c: 613b str r3, [r7, #16]
800407e: e00b b.n 8004098 <HAL_RCC_GetSysClockFreq+0xec>
}
else if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_LSI)
8004080: 4b08 ldr r3, [pc, #32] ; (80040a4 <HAL_RCC_GetSysClockFreq+0xf8>)
8004082: 689b ldr r3, [r3, #8]
8004084: 2238 movs r2, #56 ; 0x38
8004086: 4013 ands r3, r2
8004088: 2b18 cmp r3, #24
800408a: d103 bne.n 8004094 <HAL_RCC_GetSysClockFreq+0xe8>
{
/* LSI used as system clock source */
sysclockfreq = LSI_VALUE;
800408c: 23fa movs r3, #250 ; 0xfa
800408e: 01db lsls r3, r3, #7
8004090: 613b str r3, [r7, #16]
8004092: e001 b.n 8004098 <HAL_RCC_GetSysClockFreq+0xec>
}
else
{
sysclockfreq = 0U;
8004094: 2300 movs r3, #0
8004096: 613b str r3, [r7, #16]
}
return sysclockfreq;
8004098: 693b ldr r3, [r7, #16]
}
800409a: 0018 movs r0, r3
800409c: 46bd mov sp, r7
800409e: b006 add sp, #24
80040a0: bd80 pop {r7, pc}
80040a2: 46c0 nop ; (mov r8, r8)
80040a4: 40021000 .word 0x40021000
80040a8: 00f42400 .word 0x00f42400
80040ac: 007a1200 .word 0x007a1200
080040b0 <HAL_RCCEx_PeriphCLKConfig>:
* the RTC clock source: in this case the access to Backup domain is enabled.
*
* @retval HAL status
*/
HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit)
{
80040b0: b580 push {r7, lr}
80040b2: b086 sub sp, #24
80040b4: af00 add r7, sp, #0
80040b6: 6078 str r0, [r7, #4]
uint32_t tmpregister;
uint32_t tickstart;
HAL_StatusTypeDef ret = HAL_OK; /* Intermediate status */
80040b8: 2313 movs r3, #19
80040ba: 18fb adds r3, r7, r3
80040bc: 2200 movs r2, #0
80040be: 701a strb r2, [r3, #0]
HAL_StatusTypeDef status = HAL_OK; /* Final status */
80040c0: 2312 movs r3, #18
80040c2: 18fb adds r3, r7, r3
80040c4: 2200 movs r2, #0
80040c6: 701a strb r2, [r3, #0]
/* Check the parameters */
assert_param(IS_RCC_PERIPHCLOCK(PeriphClkInit->PeriphClockSelection));
/*-------------------------- RTC clock source configuration ----------------------*/
if ((PeriphClkInit->PeriphClockSelection & RCC_PERIPHCLK_RTC) == RCC_PERIPHCLK_RTC)
80040c8: 687b ldr r3, [r7, #4]
80040ca: 681a ldr r2, [r3, #0]
80040cc: 2380 movs r3, #128 ; 0x80
80040ce: 029b lsls r3, r3, #10
80040d0: 4013 ands r3, r2
80040d2: d100 bne.n 80040d6 <HAL_RCCEx_PeriphCLKConfig+0x26>
80040d4: e0a3 b.n 800421e <HAL_RCCEx_PeriphCLKConfig+0x16e>
{
FlagStatus pwrclkchanged = RESET;
80040d6: 2011 movs r0, #17
80040d8: 183b adds r3, r7, r0
80040da: 2200 movs r2, #0
80040dc: 701a strb r2, [r3, #0]
/* Check for RTC Parameters used to output RTCCLK */
assert_param(IS_RCC_RTCCLKSOURCE(PeriphClkInit->RTCClockSelection));
/* Enable Power Clock */
if (__HAL_RCC_PWR_IS_CLK_DISABLED())
80040de: 4ba5 ldr r3, [pc, #660] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
80040e0: 6bda ldr r2, [r3, #60] ; 0x3c
80040e2: 2380 movs r3, #128 ; 0x80
80040e4: 055b lsls r3, r3, #21
80040e6: 4013 ands r3, r2
80040e8: d110 bne.n 800410c <HAL_RCCEx_PeriphCLKConfig+0x5c>
{
__HAL_RCC_PWR_CLK_ENABLE();
80040ea: 4ba2 ldr r3, [pc, #648] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
80040ec: 6bda ldr r2, [r3, #60] ; 0x3c
80040ee: 4ba1 ldr r3, [pc, #644] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
80040f0: 2180 movs r1, #128 ; 0x80
80040f2: 0549 lsls r1, r1, #21
80040f4: 430a orrs r2, r1
80040f6: 63da str r2, [r3, #60] ; 0x3c
80040f8: 4b9e ldr r3, [pc, #632] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
80040fa: 6bda ldr r2, [r3, #60] ; 0x3c
80040fc: 2380 movs r3, #128 ; 0x80
80040fe: 055b lsls r3, r3, #21
8004100: 4013 ands r3, r2
8004102: 60bb str r3, [r7, #8]
8004104: 68bb ldr r3, [r7, #8]
pwrclkchanged = SET;
8004106: 183b adds r3, r7, r0
8004108: 2201 movs r2, #1
800410a: 701a strb r2, [r3, #0]
}
/* Enable write access to Backup domain */
SET_BIT(PWR->CR1, PWR_CR1_DBP);
800410c: 4b9a ldr r3, [pc, #616] ; (8004378 <HAL_RCCEx_PeriphCLKConfig+0x2c8>)
800410e: 681a ldr r2, [r3, #0]
8004110: 4b99 ldr r3, [pc, #612] ; (8004378 <HAL_RCCEx_PeriphCLKConfig+0x2c8>)
8004112: 2180 movs r1, #128 ; 0x80
8004114: 0049 lsls r1, r1, #1
8004116: 430a orrs r2, r1
8004118: 601a str r2, [r3, #0]
/* Wait for Backup domain Write protection disable */
tickstart = HAL_GetTick();
800411a: f7fd fe37 bl 8001d8c <HAL_GetTick>
800411e: 0003 movs r3, r0
8004120: 60fb str r3, [r7, #12]
while ((PWR->CR1 & PWR_CR1_DBP) == 0U)
8004122: e00b b.n 800413c <HAL_RCCEx_PeriphCLKConfig+0x8c>
{
if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
8004124: f7fd fe32 bl 8001d8c <HAL_GetTick>
8004128: 0002 movs r2, r0
800412a: 68fb ldr r3, [r7, #12]
800412c: 1ad3 subs r3, r2, r3
800412e: 2b02 cmp r3, #2
8004130: d904 bls.n 800413c <HAL_RCCEx_PeriphCLKConfig+0x8c>
{
ret = HAL_TIMEOUT;
8004132: 2313 movs r3, #19
8004134: 18fb adds r3, r7, r3
8004136: 2203 movs r2, #3
8004138: 701a strb r2, [r3, #0]
break;
800413a: e005 b.n 8004148 <HAL_RCCEx_PeriphCLKConfig+0x98>
while ((PWR->CR1 & PWR_CR1_DBP) == 0U)
800413c: 4b8e ldr r3, [pc, #568] ; (8004378 <HAL_RCCEx_PeriphCLKConfig+0x2c8>)
800413e: 681a ldr r2, [r3, #0]
8004140: 2380 movs r3, #128 ; 0x80
8004142: 005b lsls r3, r3, #1
8004144: 4013 ands r3, r2
8004146: d0ed beq.n 8004124 <HAL_RCCEx_PeriphCLKConfig+0x74>
}
}
if (ret == HAL_OK)
8004148: 2313 movs r3, #19
800414a: 18fb adds r3, r7, r3
800414c: 781b ldrb r3, [r3, #0]
800414e: 2b00 cmp r3, #0
8004150: d154 bne.n 80041fc <HAL_RCCEx_PeriphCLKConfig+0x14c>
{
/* Reset the Backup domain only if the RTC Clock source selection is modified from default */
tmpregister = READ_BIT(RCC->BDCR, RCC_BDCR_RTCSEL);
8004152: 4b88 ldr r3, [pc, #544] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004154: 6dda ldr r2, [r3, #92] ; 0x5c
8004156: 23c0 movs r3, #192 ; 0xc0
8004158: 009b lsls r3, r3, #2
800415a: 4013 ands r3, r2
800415c: 617b str r3, [r7, #20]
/* Reset the Backup domain only if the RTC Clock source selection is modified */
if ((tmpregister != RCC_RTCCLKSOURCE_NONE) && (tmpregister != PeriphClkInit->RTCClockSelection))
800415e: 697b ldr r3, [r7, #20]
8004160: 2b00 cmp r3, #0
8004162: d019 beq.n 8004198 <HAL_RCCEx_PeriphCLKConfig+0xe8>
8004164: 687b ldr r3, [r7, #4]
8004166: 6a5b ldr r3, [r3, #36] ; 0x24
8004168: 697a ldr r2, [r7, #20]
800416a: 429a cmp r2, r3
800416c: d014 beq.n 8004198 <HAL_RCCEx_PeriphCLKConfig+0xe8>
{
/* Store the content of BDCR register before the reset of Backup Domain */
tmpregister = READ_BIT(RCC->BDCR, ~(RCC_BDCR_RTCSEL));
800416e: 4b81 ldr r3, [pc, #516] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004170: 6ddb ldr r3, [r3, #92] ; 0x5c
8004172: 4a82 ldr r2, [pc, #520] ; (800437c <HAL_RCCEx_PeriphCLKConfig+0x2cc>)
8004174: 4013 ands r3, r2
8004176: 617b str r3, [r7, #20]
/* RTC Clock selection can be changed only if the Backup Domain is reset */
__HAL_RCC_BACKUPRESET_FORCE();
8004178: 4b7e ldr r3, [pc, #504] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
800417a: 6dda ldr r2, [r3, #92] ; 0x5c
800417c: 4b7d ldr r3, [pc, #500] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
800417e: 2180 movs r1, #128 ; 0x80
8004180: 0249 lsls r1, r1, #9
8004182: 430a orrs r2, r1
8004184: 65da str r2, [r3, #92] ; 0x5c
__HAL_RCC_BACKUPRESET_RELEASE();
8004186: 4b7b ldr r3, [pc, #492] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004188: 6dda ldr r2, [r3, #92] ; 0x5c
800418a: 4b7a ldr r3, [pc, #488] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
800418c: 497c ldr r1, [pc, #496] ; (8004380 <HAL_RCCEx_PeriphCLKConfig+0x2d0>)
800418e: 400a ands r2, r1
8004190: 65da str r2, [r3, #92] ; 0x5c
/* Restore the Content of BDCR register */
RCC->BDCR = tmpregister;
8004192: 4b78 ldr r3, [pc, #480] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004194: 697a ldr r2, [r7, #20]
8004196: 65da str r2, [r3, #92] ; 0x5c
}
/* Wait for LSE reactivation if LSE was enable prior to Backup Domain reset */
if (HAL_IS_BIT_SET(tmpregister, RCC_BDCR_LSEON))
8004198: 697b ldr r3, [r7, #20]
800419a: 2201 movs r2, #1
800419c: 4013 ands r3, r2
800419e: d016 beq.n 80041ce <HAL_RCCEx_PeriphCLKConfig+0x11e>
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
80041a0: f7fd fdf4 bl 8001d8c <HAL_GetTick>
80041a4: 0003 movs r3, r0
80041a6: 60fb str r3, [r7, #12]
/* Wait till LSE is ready */
while (READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == 0U)
80041a8: e00c b.n 80041c4 <HAL_RCCEx_PeriphCLKConfig+0x114>
{
if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
80041aa: f7fd fdef bl 8001d8c <HAL_GetTick>
80041ae: 0002 movs r2, r0
80041b0: 68fb ldr r3, [r7, #12]
80041b2: 1ad3 subs r3, r2, r3
80041b4: 4a73 ldr r2, [pc, #460] ; (8004384 <HAL_RCCEx_PeriphCLKConfig+0x2d4>)
80041b6: 4293 cmp r3, r2
80041b8: d904 bls.n 80041c4 <HAL_RCCEx_PeriphCLKConfig+0x114>
{
ret = HAL_TIMEOUT;
80041ba: 2313 movs r3, #19
80041bc: 18fb adds r3, r7, r3
80041be: 2203 movs r2, #3
80041c0: 701a strb r2, [r3, #0]
break;
80041c2: e004 b.n 80041ce <HAL_RCCEx_PeriphCLKConfig+0x11e>
while (READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == 0U)
80041c4: 4b6b ldr r3, [pc, #428] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
80041c6: 6ddb ldr r3, [r3, #92] ; 0x5c
80041c8: 2202 movs r2, #2
80041ca: 4013 ands r3, r2
80041cc: d0ed beq.n 80041aa <HAL_RCCEx_PeriphCLKConfig+0xfa>
}
}
}
if (ret == HAL_OK)
80041ce: 2313 movs r3, #19
80041d0: 18fb adds r3, r7, r3
80041d2: 781b ldrb r3, [r3, #0]
80041d4: 2b00 cmp r3, #0
80041d6: d10a bne.n 80041ee <HAL_RCCEx_PeriphCLKConfig+0x13e>
{
/* Apply new RTC clock source selection */
__HAL_RCC_RTC_CONFIG(PeriphClkInit->RTCClockSelection);
80041d8: 4b66 ldr r3, [pc, #408] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
80041da: 6ddb ldr r3, [r3, #92] ; 0x5c
80041dc: 4a67 ldr r2, [pc, #412] ; (800437c <HAL_RCCEx_PeriphCLKConfig+0x2cc>)
80041de: 4013 ands r3, r2
80041e0: 0019 movs r1, r3
80041e2: 687b ldr r3, [r7, #4]
80041e4: 6a5a ldr r2, [r3, #36] ; 0x24
80041e6: 4b63 ldr r3, [pc, #396] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
80041e8: 430a orrs r2, r1
80041ea: 65da str r2, [r3, #92] ; 0x5c
80041ec: e00c b.n 8004208 <HAL_RCCEx_PeriphCLKConfig+0x158>
}
else
{
/* set overall return value */
status = ret;
80041ee: 2312 movs r3, #18
80041f0: 18fb adds r3, r7, r3
80041f2: 2213 movs r2, #19
80041f4: 18ba adds r2, r7, r2
80041f6: 7812 ldrb r2, [r2, #0]
80041f8: 701a strb r2, [r3, #0]
80041fa: e005 b.n 8004208 <HAL_RCCEx_PeriphCLKConfig+0x158>
}
}
else
{
/* set overall return value */
status = ret;
80041fc: 2312 movs r3, #18
80041fe: 18fb adds r3, r7, r3
8004200: 2213 movs r2, #19
8004202: 18ba adds r2, r7, r2
8004204: 7812 ldrb r2, [r2, #0]
8004206: 701a strb r2, [r3, #0]
}
/* Restore clock configuration if changed */
if (pwrclkchanged == SET)
8004208: 2311 movs r3, #17
800420a: 18fb adds r3, r7, r3
800420c: 781b ldrb r3, [r3, #0]
800420e: 2b01 cmp r3, #1
8004210: d105 bne.n 800421e <HAL_RCCEx_PeriphCLKConfig+0x16e>
{
__HAL_RCC_PWR_CLK_DISABLE();
8004212: 4b58 ldr r3, [pc, #352] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004214: 6bda ldr r2, [r3, #60] ; 0x3c
8004216: 4b57 ldr r3, [pc, #348] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004218: 495b ldr r1, [pc, #364] ; (8004388 <HAL_RCCEx_PeriphCLKConfig+0x2d8>)
800421a: 400a ands r2, r1
800421c: 63da str r2, [r3, #60] ; 0x3c
}
}
/*-------------------------- USART1 clock source configuration -------------------*/
if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART1) == RCC_PERIPHCLK_USART1)
800421e: 687b ldr r3, [r7, #4]
8004220: 681b ldr r3, [r3, #0]
8004222: 2201 movs r2, #1
8004224: 4013 ands r3, r2
8004226: d009 beq.n 800423c <HAL_RCCEx_PeriphCLKConfig+0x18c>
{
/* Check the parameters */
assert_param(IS_RCC_USART1CLKSOURCE(PeriphClkInit->Usart1ClockSelection));
/* Configure the USART1 clock source */
__HAL_RCC_USART1_CONFIG(PeriphClkInit->Usart1ClockSelection);
8004228: 4b52 ldr r3, [pc, #328] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
800422a: 6d5b ldr r3, [r3, #84] ; 0x54
800422c: 2203 movs r2, #3
800422e: 4393 bics r3, r2
8004230: 0019 movs r1, r3
8004232: 687b ldr r3, [r7, #4]
8004234: 685a ldr r2, [r3, #4]
8004236: 4b4f ldr r3, [pc, #316] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004238: 430a orrs r2, r1
800423a: 655a str r2, [r3, #84] ; 0x54
}
#endif /* RCC_CCIPR_USART3SEL */
#if defined(LPUART1)
/*-------------------------- LPUART1 clock source configuration ------------------*/
if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPUART1) == RCC_PERIPHCLK_LPUART1)
800423c: 687b ldr r3, [r7, #4]
800423e: 681b ldr r3, [r3, #0]
8004240: 2210 movs r2, #16
8004242: 4013 ands r3, r2
8004244: d009 beq.n 800425a <HAL_RCCEx_PeriphCLKConfig+0x1aa>
{
/* Check the parameters */
assert_param(IS_RCC_LPUART1CLKSOURCE(PeriphClkInit->Lpuart1ClockSelection));
/* Configure the LPUART1 clock source */
__HAL_RCC_LPUART1_CONFIG(PeriphClkInit->Lpuart1ClockSelection);
8004246: 4b4b ldr r3, [pc, #300] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004248: 6d5b ldr r3, [r3, #84] ; 0x54
800424a: 4a50 ldr r2, [pc, #320] ; (800438c <HAL_RCCEx_PeriphCLKConfig+0x2dc>)
800424c: 4013 ands r3, r2
800424e: 0019 movs r1, r3
8004250: 687b ldr r3, [r7, #4]
8004252: 689a ldr r2, [r3, #8]
8004254: 4b47 ldr r3, [pc, #284] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004256: 430a orrs r2, r1
8004258: 655a str r2, [r3, #84] ; 0x54
}
#endif /* LPUART2 */
#if defined(RCC_CCIPR_LPTIM1SEL)
/*-------------------------- LPTIM1 clock source configuration -------------------*/
if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM1) == (RCC_PERIPHCLK_LPTIM1))
800425a: 687b ldr r3, [r7, #4]
800425c: 681a ldr r2, [r3, #0]
800425e: 2380 movs r3, #128 ; 0x80
8004260: 009b lsls r3, r3, #2
8004262: 4013 ands r3, r2
8004264: d009 beq.n 800427a <HAL_RCCEx_PeriphCLKConfig+0x1ca>
{
assert_param(IS_RCC_LPTIM1CLKSOURCE(PeriphClkInit->Lptim1ClockSelection));
__HAL_RCC_LPTIM1_CONFIG(PeriphClkInit->Lptim1ClockSelection);
8004266: 4b43 ldr r3, [pc, #268] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004268: 6d5b ldr r3, [r3, #84] ; 0x54
800426a: 4a49 ldr r2, [pc, #292] ; (8004390 <HAL_RCCEx_PeriphCLKConfig+0x2e0>)
800426c: 4013 ands r3, r2
800426e: 0019 movs r1, r3
8004270: 687b ldr r3, [r7, #4]
8004272: 695a ldr r2, [r3, #20]
8004274: 4b3f ldr r3, [pc, #252] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004276: 430a orrs r2, r1
8004278: 655a str r2, [r3, #84] ; 0x54
}
#endif /* RCC_CCIPR_LPTIM1SEL */
#if defined(RCC_CCIPR_LPTIM2SEL)
/*-------------------------- LPTIM2 clock source configuration -------------------*/
if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM2) == (RCC_PERIPHCLK_LPTIM2))
800427a: 687b ldr r3, [r7, #4]
800427c: 681a ldr r2, [r3, #0]
800427e: 2380 movs r3, #128 ; 0x80
8004280: 00db lsls r3, r3, #3
8004282: 4013 ands r3, r2
8004284: d009 beq.n 800429a <HAL_RCCEx_PeriphCLKConfig+0x1ea>
{
assert_param(IS_RCC_LPTIM2CLKSOURCE(PeriphClkInit->Lptim2ClockSelection));
__HAL_RCC_LPTIM2_CONFIG(PeriphClkInit->Lptim2ClockSelection);
8004286: 4b3b ldr r3, [pc, #236] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004288: 6d5b ldr r3, [r3, #84] ; 0x54
800428a: 4a42 ldr r2, [pc, #264] ; (8004394 <HAL_RCCEx_PeriphCLKConfig+0x2e4>)
800428c: 4013 ands r3, r2
800428e: 0019 movs r1, r3
8004290: 687b ldr r3, [r7, #4]
8004292: 699a ldr r2, [r3, #24]
8004294: 4b37 ldr r3, [pc, #220] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004296: 430a orrs r2, r1
8004298: 655a str r2, [r3, #84] ; 0x54
}
#endif /* RCC_CCIPR_LPTIM2SEL */
/*-------------------------- I2C1 clock source configuration ---------------------*/
if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C1) == RCC_PERIPHCLK_I2C1)
800429a: 687b ldr r3, [r7, #4]
800429c: 681b ldr r3, [r3, #0]
800429e: 2220 movs r2, #32
80042a0: 4013 ands r3, r2
80042a2: d009 beq.n 80042b8 <HAL_RCCEx_PeriphCLKConfig+0x208>
{
/* Check the parameters */
assert_param(IS_RCC_I2C1CLKSOURCE(PeriphClkInit->I2c1ClockSelection));
/* Configure the I2C1 clock source */
__HAL_RCC_I2C1_CONFIG(PeriphClkInit->I2c1ClockSelection);
80042a4: 4b33 ldr r3, [pc, #204] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
80042a6: 6d5b ldr r3, [r3, #84] ; 0x54
80042a8: 4a3b ldr r2, [pc, #236] ; (8004398 <HAL_RCCEx_PeriphCLKConfig+0x2e8>)
80042aa: 4013 ands r3, r2
80042ac: 0019 movs r1, r3
80042ae: 687b ldr r3, [r7, #4]
80042b0: 68da ldr r2, [r3, #12]
80042b2: 4b30 ldr r3, [pc, #192] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
80042b4: 430a orrs r2, r1
80042b6: 655a str r2, [r3, #84] ; 0x54
__HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLLQCLK);
}
}
#endif /* RNG */
/*-------------------------- ADC clock source configuration ----------------------*/
if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_ADC) == RCC_PERIPHCLK_ADC)
80042b8: 687b ldr r3, [r7, #4]
80042ba: 681a ldr r2, [r3, #0]
80042bc: 2380 movs r3, #128 ; 0x80
80042be: 01db lsls r3, r3, #7
80042c0: 4013 ands r3, r2
80042c2: d015 beq.n 80042f0 <HAL_RCCEx_PeriphCLKConfig+0x240>
{
/* Check the parameters */
assert_param(IS_RCC_ADCCLKSOURCE(PeriphClkInit->AdcClockSelection));
/* Configure the ADC interface clock source */
__HAL_RCC_ADC_CONFIG(PeriphClkInit->AdcClockSelection);
80042c4: 4b2b ldr r3, [pc, #172] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
80042c6: 6d5b ldr r3, [r3, #84] ; 0x54
80042c8: 009b lsls r3, r3, #2
80042ca: 0899 lsrs r1, r3, #2
80042cc: 687b ldr r3, [r7, #4]
80042ce: 69da ldr r2, [r3, #28]
80042d0: 4b28 ldr r3, [pc, #160] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
80042d2: 430a orrs r2, r1
80042d4: 655a str r2, [r3, #84] ; 0x54
if (PeriphClkInit->AdcClockSelection == RCC_ADCCLKSOURCE_PLLADC)
80042d6: 687b ldr r3, [r7, #4]
80042d8: 69da ldr r2, [r3, #28]
80042da: 2380 movs r3, #128 ; 0x80
80042dc: 05db lsls r3, r3, #23
80042de: 429a cmp r2, r3
80042e0: d106 bne.n 80042f0 <HAL_RCCEx_PeriphCLKConfig+0x240>
{
/* Enable PLLPCLK output */
__HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLLPCLK);
80042e2: 4b24 ldr r3, [pc, #144] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
80042e4: 68da ldr r2, [r3, #12]
80042e6: 4b23 ldr r3, [pc, #140] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
80042e8: 2180 movs r1, #128 ; 0x80
80042ea: 0249 lsls r1, r1, #9
80042ec: 430a orrs r2, r1
80042ee: 60da str r2, [r3, #12]
}
#endif /* CEC */
#if defined(RCC_CCIPR_TIM1SEL)
/*-------------------------- TIM1 clock source configuration ---------------------*/
if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_TIM1) == RCC_PERIPHCLK_TIM1)
80042f0: 687b ldr r3, [r7, #4]
80042f2: 681a ldr r2, [r3, #0]
80042f4: 2380 movs r3, #128 ; 0x80
80042f6: 039b lsls r3, r3, #14
80042f8: 4013 ands r3, r2
80042fa: d016 beq.n 800432a <HAL_RCCEx_PeriphCLKConfig+0x27a>
{
/* Check the parameters */
assert_param(IS_RCC_TIM1CLKSOURCE(PeriphClkInit->Tim1ClockSelection));
/* Configure the TIM1 clock source */
__HAL_RCC_TIM1_CONFIG(PeriphClkInit->Tim1ClockSelection);
80042fc: 4b1d ldr r3, [pc, #116] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
80042fe: 6d5b ldr r3, [r3, #84] ; 0x54
8004300: 4a26 ldr r2, [pc, #152] ; (800439c <HAL_RCCEx_PeriphCLKConfig+0x2ec>)
8004302: 4013 ands r3, r2
8004304: 0019 movs r1, r3
8004306: 687b ldr r3, [r7, #4]
8004308: 6a1a ldr r2, [r3, #32]
800430a: 4b1a ldr r3, [pc, #104] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
800430c: 430a orrs r2, r1
800430e: 655a str r2, [r3, #84] ; 0x54
if (PeriphClkInit->Tim1ClockSelection == RCC_TIM1CLKSOURCE_PLL)
8004310: 687b ldr r3, [r7, #4]
8004312: 6a1a ldr r2, [r3, #32]
8004314: 2380 movs r3, #128 ; 0x80
8004316: 03db lsls r3, r3, #15
8004318: 429a cmp r2, r3
800431a: d106 bne.n 800432a <HAL_RCCEx_PeriphCLKConfig+0x27a>
{
/* Enable PLLQCLK output */
__HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLLQCLK);
800431c: 4b15 ldr r3, [pc, #84] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
800431e: 68da ldr r2, [r3, #12]
8004320: 4b14 ldr r3, [pc, #80] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004322: 2180 movs r1, #128 ; 0x80
8004324: 0449 lsls r1, r1, #17
8004326: 430a orrs r2, r1
8004328: 60da str r2, [r3, #12]
}
}
#endif /* RCC_CCIPR_TIM15SEL */
/*-------------------------- I2S1 clock source configuration ---------------------*/
if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S1) == RCC_PERIPHCLK_I2S1)
800432a: 687b ldr r3, [r7, #4]
800432c: 681a ldr r2, [r3, #0]
800432e: 2380 movs r3, #128 ; 0x80
8004330: 011b lsls r3, r3, #4
8004332: 4013 ands r3, r2
8004334: d016 beq.n 8004364 <HAL_RCCEx_PeriphCLKConfig+0x2b4>
{
/* Check the parameters */
assert_param(IS_RCC_I2S1CLKSOURCE(PeriphClkInit->I2s1ClockSelection));
/* Configure the I2S1 clock source */
__HAL_RCC_I2S1_CONFIG(PeriphClkInit->I2s1ClockSelection);
8004336: 4b0f ldr r3, [pc, #60] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004338: 6d5b ldr r3, [r3, #84] ; 0x54
800433a: 4a19 ldr r2, [pc, #100] ; (80043a0 <HAL_RCCEx_PeriphCLKConfig+0x2f0>)
800433c: 4013 ands r3, r2
800433e: 0019 movs r1, r3
8004340: 687b ldr r3, [r7, #4]
8004342: 691a ldr r2, [r3, #16]
8004344: 4b0b ldr r3, [pc, #44] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004346: 430a orrs r2, r1
8004348: 655a str r2, [r3, #84] ; 0x54
if (PeriphClkInit->I2s1ClockSelection == RCC_I2S1CLKSOURCE_PLL)
800434a: 687b ldr r3, [r7, #4]
800434c: 691a ldr r2, [r3, #16]
800434e: 2380 movs r3, #128 ; 0x80
8004350: 01db lsls r3, r3, #7
8004352: 429a cmp r2, r3
8004354: d106 bne.n 8004364 <HAL_RCCEx_PeriphCLKConfig+0x2b4>
{
/* Enable PLLPCLK output */
__HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLLPCLK);
8004356: 4b07 ldr r3, [pc, #28] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
8004358: 68da ldr r2, [r3, #12]
800435a: 4b06 ldr r3, [pc, #24] ; (8004374 <HAL_RCCEx_PeriphCLKConfig+0x2c4>)
800435c: 2180 movs r1, #128 ; 0x80
800435e: 0249 lsls r1, r1, #9
8004360: 430a orrs r2, r1
8004362: 60da str r2, [r3, #12]
__HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLLQCLK);
}
}
#endif /* FDCAN1 || FDCAN2 */
return status;
8004364: 2312 movs r3, #18
8004366: 18fb adds r3, r7, r3
8004368: 781b ldrb r3, [r3, #0]
}
800436a: 0018 movs r0, r3
800436c: 46bd mov sp, r7
800436e: b006 add sp, #24
8004370: bd80 pop {r7, pc}
8004372: 46c0 nop ; (mov r8, r8)
8004374: 40021000 .word 0x40021000
8004378: 40007000 .word 0x40007000
800437c: fffffcff .word 0xfffffcff
8004380: fffeffff .word 0xfffeffff
8004384: 00001388 .word 0x00001388
8004388: efffffff .word 0xefffffff
800438c: fffff3ff .word 0xfffff3ff
8004390: fff3ffff .word 0xfff3ffff
8004394: ffcfffff .word 0xffcfffff
8004398: ffffcfff .word 0xffffcfff
800439c: ffbfffff .word 0xffbfffff
80043a0: ffff3fff .word 0xffff3fff
080043a4 <HAL_TIM_Base_Init>:
* Ex: call @ref HAL_TIM_Base_DeInit() before HAL_TIM_Base_Init()
* @param htim TIM Base handle
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_Base_Init(TIM_HandleTypeDef *htim)
{
80043a4: b580 push {r7, lr}
80043a6: b082 sub sp, #8
80043a8: af00 add r7, sp, #0
80043aa: 6078 str r0, [r7, #4]
/* Check the TIM handle allocation */
if (htim == NULL)
80043ac: 687b ldr r3, [r7, #4]
80043ae: 2b00 cmp r3, #0
80043b0: d101 bne.n 80043b6 <HAL_TIM_Base_Init+0x12>
{
return HAL_ERROR;
80043b2: 2301 movs r3, #1
80043b4: e04a b.n 800444c <HAL_TIM_Base_Init+0xa8>
assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
assert_param(IS_TIM_PERIOD(htim, htim->Init.Period));
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
if (htim->State == HAL_TIM_STATE_RESET)
80043b6: 687b ldr r3, [r7, #4]
80043b8: 223d movs r2, #61 ; 0x3d
80043ba: 5c9b ldrb r3, [r3, r2]
80043bc: b2db uxtb r3, r3
80043be: 2b00 cmp r3, #0
80043c0: d107 bne.n 80043d2 <HAL_TIM_Base_Init+0x2e>
{
/* Allocate lock resource and initialize it */
htim->Lock = HAL_UNLOCKED;
80043c2: 687b ldr r3, [r7, #4]
80043c4: 223c movs r2, #60 ; 0x3c
80043c6: 2100 movs r1, #0
80043c8: 5499 strb r1, [r3, r2]
}
/* Init the low level hardware : GPIO, CLOCK, NVIC */
htim->Base_MspInitCallback(htim);
#else
/* Init the low level hardware : GPIO, CLOCK, NVIC */
HAL_TIM_Base_MspInit(htim);
80043ca: 687b ldr r3, [r7, #4]
80043cc: 0018 movs r0, r3
80043ce: f7fd fb59 bl 8001a84 <HAL_TIM_Base_MspInit>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
/* Set the TIM state */
htim->State = HAL_TIM_STATE_BUSY;
80043d2: 687b ldr r3, [r7, #4]
80043d4: 223d movs r2, #61 ; 0x3d
80043d6: 2102 movs r1, #2
80043d8: 5499 strb r1, [r3, r2]
/* Set the Time Base configuration */
TIM_Base_SetConfig(htim->Instance, &htim->Init);
80043da: 687b ldr r3, [r7, #4]
80043dc: 681a ldr r2, [r3, #0]
80043de: 687b ldr r3, [r7, #4]
80043e0: 3304 adds r3, #4
80043e2: 0019 movs r1, r3
80043e4: 0010 movs r0, r2
80043e6: f000 fd1d bl 8004e24 <TIM_Base_SetConfig>
/* Initialize the DMA burst operation state */
htim->DMABurstState = HAL_DMA_BURST_STATE_READY;
80043ea: 687b ldr r3, [r7, #4]
80043ec: 2248 movs r2, #72 ; 0x48
80043ee: 2101 movs r1, #1
80043f0: 5499 strb r1, [r3, r2]
/* Initialize the TIM channels state */
TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
80043f2: 687b ldr r3, [r7, #4]
80043f4: 223e movs r2, #62 ; 0x3e
80043f6: 2101 movs r1, #1
80043f8: 5499 strb r1, [r3, r2]
80043fa: 687b ldr r3, [r7, #4]
80043fc: 223f movs r2, #63 ; 0x3f
80043fe: 2101 movs r1, #1
8004400: 5499 strb r1, [r3, r2]
8004402: 687b ldr r3, [r7, #4]
8004404: 2240 movs r2, #64 ; 0x40
8004406: 2101 movs r1, #1
8004408: 5499 strb r1, [r3, r2]
800440a: 687b ldr r3, [r7, #4]
800440c: 2241 movs r2, #65 ; 0x41
800440e: 2101 movs r1, #1
8004410: 5499 strb r1, [r3, r2]
8004412: 687b ldr r3, [r7, #4]
8004414: 2242 movs r2, #66 ; 0x42
8004416: 2101 movs r1, #1
8004418: 5499 strb r1, [r3, r2]
800441a: 687b ldr r3, [r7, #4]
800441c: 2243 movs r2, #67 ; 0x43
800441e: 2101 movs r1, #1
8004420: 5499 strb r1, [r3, r2]
TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
8004422: 687b ldr r3, [r7, #4]
8004424: 2244 movs r2, #68 ; 0x44
8004426: 2101 movs r1, #1
8004428: 5499 strb r1, [r3, r2]
800442a: 687b ldr r3, [r7, #4]
800442c: 2245 movs r2, #69 ; 0x45
800442e: 2101 movs r1, #1
8004430: 5499 strb r1, [r3, r2]
8004432: 687b ldr r3, [r7, #4]
8004434: 2246 movs r2, #70 ; 0x46
8004436: 2101 movs r1, #1
8004438: 5499 strb r1, [r3, r2]
800443a: 687b ldr r3, [r7, #4]
800443c: 2247 movs r2, #71 ; 0x47
800443e: 2101 movs r1, #1
8004440: 5499 strb r1, [r3, r2]
/* Initialize the TIM state*/
htim->State = HAL_TIM_STATE_READY;
8004442: 687b ldr r3, [r7, #4]
8004444: 223d movs r2, #61 ; 0x3d
8004446: 2101 movs r1, #1
8004448: 5499 strb r1, [r3, r2]
return HAL_OK;
800444a: 2300 movs r3, #0
}
800444c: 0018 movs r0, r3
800444e: 46bd mov sp, r7
8004450: b002 add sp, #8
8004452: bd80 pop {r7, pc}
08004454 <HAL_TIM_Base_Start_IT>:
* @brief Starts the TIM Base generation in interrupt mode.
* @param htim TIM Base handle
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_Base_Start_IT(TIM_HandleTypeDef *htim)
{
8004454: b580 push {r7, lr}
8004456: b084 sub sp, #16
8004458: af00 add r7, sp, #0
800445a: 6078 str r0, [r7, #4]
/* Check the parameters */
assert_param(IS_TIM_INSTANCE(htim->Instance));
/* Check the TIM state */
if (htim->State != HAL_TIM_STATE_READY)
800445c: 687b ldr r3, [r7, #4]
800445e: 223d movs r2, #61 ; 0x3d
8004460: 5c9b ldrb r3, [r3, r2]
8004462: b2db uxtb r3, r3
8004464: 2b01 cmp r3, #1
8004466: d001 beq.n 800446c <HAL_TIM_Base_Start_IT+0x18>
{
return HAL_ERROR;
8004468: 2301 movs r3, #1
800446a: e03d b.n 80044e8 <HAL_TIM_Base_Start_IT+0x94>
}
/* Set the TIM state */
htim->State = HAL_TIM_STATE_BUSY;
800446c: 687b ldr r3, [r7, #4]
800446e: 223d movs r2, #61 ; 0x3d
8004470: 2102 movs r1, #2
8004472: 5499 strb r1, [r3, r2]
/* Enable the TIM Update interrupt */
__HAL_TIM_ENABLE_IT(htim, TIM_IT_UPDATE);
8004474: 687b ldr r3, [r7, #4]
8004476: 681b ldr r3, [r3, #0]
8004478: 68da ldr r2, [r3, #12]
800447a: 687b ldr r3, [r7, #4]
800447c: 681b ldr r3, [r3, #0]
800447e: 2101 movs r1, #1
8004480: 430a orrs r2, r1
8004482: 60da str r2, [r3, #12]
/* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
8004484: 687b ldr r3, [r7, #4]
8004486: 681b ldr r3, [r3, #0]
8004488: 4a19 ldr r2, [pc, #100] ; (80044f0 <HAL_TIM_Base_Start_IT+0x9c>)
800448a: 4293 cmp r3, r2
800448c: d00a beq.n 80044a4 <HAL_TIM_Base_Start_IT+0x50>
800448e: 687b ldr r3, [r7, #4]
8004490: 681a ldr r2, [r3, #0]
8004492: 2380 movs r3, #128 ; 0x80
8004494: 05db lsls r3, r3, #23
8004496: 429a cmp r2, r3
8004498: d004 beq.n 80044a4 <HAL_TIM_Base_Start_IT+0x50>
800449a: 687b ldr r3, [r7, #4]
800449c: 681b ldr r3, [r3, #0]
800449e: 4a15 ldr r2, [pc, #84] ; (80044f4 <HAL_TIM_Base_Start_IT+0xa0>)
80044a0: 4293 cmp r3, r2
80044a2: d116 bne.n 80044d2 <HAL_TIM_Base_Start_IT+0x7e>
{
tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
80044a4: 687b ldr r3, [r7, #4]
80044a6: 681b ldr r3, [r3, #0]
80044a8: 689b ldr r3, [r3, #8]
80044aa: 4a13 ldr r2, [pc, #76] ; (80044f8 <HAL_TIM_Base_Start_IT+0xa4>)
80044ac: 4013 ands r3, r2
80044ae: 60fb str r3, [r7, #12]
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
80044b0: 68fb ldr r3, [r7, #12]
80044b2: 2b06 cmp r3, #6
80044b4: d016 beq.n 80044e4 <HAL_TIM_Base_Start_IT+0x90>
80044b6: 68fa ldr r2, [r7, #12]
80044b8: 2380 movs r3, #128 ; 0x80
80044ba: 025b lsls r3, r3, #9
80044bc: 429a cmp r2, r3
80044be: d011 beq.n 80044e4 <HAL_TIM_Base_Start_IT+0x90>
{
__HAL_TIM_ENABLE(htim);
80044c0: 687b ldr r3, [r7, #4]
80044c2: 681b ldr r3, [r3, #0]
80044c4: 681a ldr r2, [r3, #0]
80044c6: 687b ldr r3, [r7, #4]
80044c8: 681b ldr r3, [r3, #0]
80044ca: 2101 movs r1, #1
80044cc: 430a orrs r2, r1
80044ce: 601a str r2, [r3, #0]
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
80044d0: e008 b.n 80044e4 <HAL_TIM_Base_Start_IT+0x90>
}
}
else
{
__HAL_TIM_ENABLE(htim);
80044d2: 687b ldr r3, [r7, #4]
80044d4: 681b ldr r3, [r3, #0]
80044d6: 681a ldr r2, [r3, #0]
80044d8: 687b ldr r3, [r7, #4]
80044da: 681b ldr r3, [r3, #0]
80044dc: 2101 movs r1, #1
80044de: 430a orrs r2, r1
80044e0: 601a str r2, [r3, #0]
80044e2: e000 b.n 80044e6 <HAL_TIM_Base_Start_IT+0x92>
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
80044e4: 46c0 nop ; (mov r8, r8)
}
/* Return function status */
return HAL_OK;
80044e6: 2300 movs r3, #0
}
80044e8: 0018 movs r0, r3
80044ea: 46bd mov sp, r7
80044ec: b004 add sp, #16
80044ee: bd80 pop {r7, pc}
80044f0: 40012c00 .word 0x40012c00
80044f4: 40000400 .word 0x40000400
80044f8: 00010007 .word 0x00010007
080044fc <HAL_TIM_Base_Stop_IT>:
* @brief Stops the TIM Base generation in interrupt mode.
* @param htim TIM Base handle
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_Base_Stop_IT(TIM_HandleTypeDef *htim)
{
80044fc: b580 push {r7, lr}
80044fe: b082 sub sp, #8
8004500: af00 add r7, sp, #0
8004502: 6078 str r0, [r7, #4]
/* Check the parameters */
assert_param(IS_TIM_INSTANCE(htim->Instance));
/* Disable the TIM Update interrupt */
__HAL_TIM_DISABLE_IT(htim, TIM_IT_UPDATE);
8004504: 687b ldr r3, [r7, #4]
8004506: 681b ldr r3, [r3, #0]
8004508: 68da ldr r2, [r3, #12]
800450a: 687b ldr r3, [r7, #4]
800450c: 681b ldr r3, [r3, #0]
800450e: 2101 movs r1, #1
8004510: 438a bics r2, r1
8004512: 60da str r2, [r3, #12]
/* Disable the Peripheral */
__HAL_TIM_DISABLE(htim);
8004514: 687b ldr r3, [r7, #4]
8004516: 681b ldr r3, [r3, #0]
8004518: 6a1b ldr r3, [r3, #32]
800451a: 4a0d ldr r2, [pc, #52] ; (8004550 <HAL_TIM_Base_Stop_IT+0x54>)
800451c: 4013 ands r3, r2
800451e: d10d bne.n 800453c <HAL_TIM_Base_Stop_IT+0x40>
8004520: 687b ldr r3, [r7, #4]
8004522: 681b ldr r3, [r3, #0]
8004524: 6a1b ldr r3, [r3, #32]
8004526: 4a0b ldr r2, [pc, #44] ; (8004554 <HAL_TIM_Base_Stop_IT+0x58>)
8004528: 4013 ands r3, r2
800452a: d107 bne.n 800453c <HAL_TIM_Base_Stop_IT+0x40>
800452c: 687b ldr r3, [r7, #4]
800452e: 681b ldr r3, [r3, #0]
8004530: 681a ldr r2, [r3, #0]
8004532: 687b ldr r3, [r7, #4]
8004534: 681b ldr r3, [r3, #0]
8004536: 2101 movs r1, #1
8004538: 438a bics r2, r1
800453a: 601a str r2, [r3, #0]
/* Set the TIM state */
htim->State = HAL_TIM_STATE_READY;
800453c: 687b ldr r3, [r7, #4]
800453e: 223d movs r2, #61 ; 0x3d
8004540: 2101 movs r1, #1
8004542: 5499 strb r1, [r3, r2]
/* Return function status */
return HAL_OK;
8004544: 2300 movs r3, #0
}
8004546: 0018 movs r0, r3
8004548: 46bd mov sp, r7
800454a: b002 add sp, #8
800454c: bd80 pop {r7, pc}
800454e: 46c0 nop ; (mov r8, r8)
8004550: 00001111 .word 0x00001111
8004554: 00000444 .word 0x00000444
08004558 <HAL_TIM_PWM_Init>:
* Ex: call @ref HAL_TIM_PWM_DeInit() before HAL_TIM_PWM_Init()
* @param htim TIM PWM handle
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_PWM_Init(TIM_HandleTypeDef *htim)
{
8004558: b580 push {r7, lr}
800455a: b082 sub sp, #8
800455c: af00 add r7, sp, #0
800455e: 6078 str r0, [r7, #4]
/* Check the TIM handle allocation */
if (htim == NULL)
8004560: 687b ldr r3, [r7, #4]
8004562: 2b00 cmp r3, #0
8004564: d101 bne.n 800456a <HAL_TIM_PWM_Init+0x12>
{
return HAL_ERROR;
8004566: 2301 movs r3, #1
8004568: e04a b.n 8004600 <HAL_TIM_PWM_Init+0xa8>
assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
assert_param(IS_TIM_PERIOD(htim, htim->Init.Period));
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
if (htim->State == HAL_TIM_STATE_RESET)
800456a: 687b ldr r3, [r7, #4]
800456c: 223d movs r2, #61 ; 0x3d
800456e: 5c9b ldrb r3, [r3, r2]
8004570: b2db uxtb r3, r3
8004572: 2b00 cmp r3, #0
8004574: d107 bne.n 8004586 <HAL_TIM_PWM_Init+0x2e>
{
/* Allocate lock resource and initialize it */
htim->Lock = HAL_UNLOCKED;
8004576: 687b ldr r3, [r7, #4]
8004578: 223c movs r2, #60 ; 0x3c
800457a: 2100 movs r1, #0
800457c: 5499 strb r1, [r3, r2]
}
/* Init the low level hardware : GPIO, CLOCK, NVIC */
htim->PWM_MspInitCallback(htim);
#else
/* Init the low level hardware : GPIO, CLOCK, NVIC and DMA */
HAL_TIM_PWM_MspInit(htim);
800457e: 687b ldr r3, [r7, #4]
8004580: 0018 movs r0, r3
8004582: f000 f841 bl 8004608 <HAL_TIM_PWM_MspInit>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
/* Set the TIM state */
htim->State = HAL_TIM_STATE_BUSY;
8004586: 687b ldr r3, [r7, #4]
8004588: 223d movs r2, #61 ; 0x3d
800458a: 2102 movs r1, #2
800458c: 5499 strb r1, [r3, r2]
/* Init the base time for the PWM */
TIM_Base_SetConfig(htim->Instance, &htim->Init);
800458e: 687b ldr r3, [r7, #4]
8004590: 681a ldr r2, [r3, #0]
8004592: 687b ldr r3, [r7, #4]
8004594: 3304 adds r3, #4
8004596: 0019 movs r1, r3
8004598: 0010 movs r0, r2
800459a: f000 fc43 bl 8004e24 <TIM_Base_SetConfig>
/* Initialize the DMA burst operation state */
htim->DMABurstState = HAL_DMA_BURST_STATE_READY;
800459e: 687b ldr r3, [r7, #4]
80045a0: 2248 movs r2, #72 ; 0x48
80045a2: 2101 movs r1, #1
80045a4: 5499 strb r1, [r3, r2]
/* Initialize the TIM channels state */
TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
80045a6: 687b ldr r3, [r7, #4]
80045a8: 223e movs r2, #62 ; 0x3e
80045aa: 2101 movs r1, #1
80045ac: 5499 strb r1, [r3, r2]
80045ae: 687b ldr r3, [r7, #4]
80045b0: 223f movs r2, #63 ; 0x3f
80045b2: 2101 movs r1, #1
80045b4: 5499 strb r1, [r3, r2]
80045b6: 687b ldr r3, [r7, #4]
80045b8: 2240 movs r2, #64 ; 0x40
80045ba: 2101 movs r1, #1
80045bc: 5499 strb r1, [r3, r2]
80045be: 687b ldr r3, [r7, #4]
80045c0: 2241 movs r2, #65 ; 0x41
80045c2: 2101 movs r1, #1
80045c4: 5499 strb r1, [r3, r2]
80045c6: 687b ldr r3, [r7, #4]
80045c8: 2242 movs r2, #66 ; 0x42
80045ca: 2101 movs r1, #1
80045cc: 5499 strb r1, [r3, r2]
80045ce: 687b ldr r3, [r7, #4]
80045d0: 2243 movs r2, #67 ; 0x43
80045d2: 2101 movs r1, #1
80045d4: 5499 strb r1, [r3, r2]
TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
80045d6: 687b ldr r3, [r7, #4]
80045d8: 2244 movs r2, #68 ; 0x44
80045da: 2101 movs r1, #1
80045dc: 5499 strb r1, [r3, r2]
80045de: 687b ldr r3, [r7, #4]
80045e0: 2245 movs r2, #69 ; 0x45
80045e2: 2101 movs r1, #1
80045e4: 5499 strb r1, [r3, r2]
80045e6: 687b ldr r3, [r7, #4]
80045e8: 2246 movs r2, #70 ; 0x46
80045ea: 2101 movs r1, #1
80045ec: 5499 strb r1, [r3, r2]
80045ee: 687b ldr r3, [r7, #4]
80045f0: 2247 movs r2, #71 ; 0x47
80045f2: 2101 movs r1, #1
80045f4: 5499 strb r1, [r3, r2]
/* Initialize the TIM state*/
htim->State = HAL_TIM_STATE_READY;
80045f6: 687b ldr r3, [r7, #4]
80045f8: 223d movs r2, #61 ; 0x3d
80045fa: 2101 movs r1, #1
80045fc: 5499 strb r1, [r3, r2]
return HAL_OK;
80045fe: 2300 movs r3, #0
}
8004600: 0018 movs r0, r3
8004602: 46bd mov sp, r7
8004604: b002 add sp, #8
8004606: bd80 pop {r7, pc}
08004608 <HAL_TIM_PWM_MspInit>:
* @brief Initializes the TIM PWM MSP.
* @param htim TIM PWM handle
* @retval None
*/
__weak void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef *htim)
{
8004608: b580 push {r7, lr}
800460a: b082 sub sp, #8
800460c: af00 add r7, sp, #0
800460e: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIM_PWM_MspInit could be implemented in the user file
*/
}
8004610: 46c0 nop ; (mov r8, r8)
8004612: 46bd mov sp, r7
8004614: b002 add sp, #8
8004616: bd80 pop {r7, pc}
08004618 <HAL_TIM_PWM_Start>:
* @arg TIM_CHANNEL_5: TIM Channel 5 selected
* @arg TIM_CHANNEL_6: TIM Channel 6 selected
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_PWM_Start(TIM_HandleTypeDef *htim, uint32_t Channel)
{
8004618: b580 push {r7, lr}
800461a: b084 sub sp, #16
800461c: af00 add r7, sp, #0
800461e: 6078 str r0, [r7, #4]
8004620: 6039 str r1, [r7, #0]
/* Check the parameters */
assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel));
/* Check the TIM channel state */
if (TIM_CHANNEL_STATE_GET(htim, Channel) != HAL_TIM_CHANNEL_STATE_READY)
8004622: 683b ldr r3, [r7, #0]
8004624: 2b00 cmp r3, #0
8004626: d108 bne.n 800463a <HAL_TIM_PWM_Start+0x22>
8004628: 687b ldr r3, [r7, #4]
800462a: 223e movs r2, #62 ; 0x3e
800462c: 5c9b ldrb r3, [r3, r2]
800462e: b2db uxtb r3, r3
8004630: 3b01 subs r3, #1
8004632: 1e5a subs r2, r3, #1
8004634: 4193 sbcs r3, r2
8004636: b2db uxtb r3, r3
8004638: e037 b.n 80046aa <HAL_TIM_PWM_Start+0x92>
800463a: 683b ldr r3, [r7, #0]
800463c: 2b04 cmp r3, #4
800463e: d108 bne.n 8004652 <HAL_TIM_PWM_Start+0x3a>
8004640: 687b ldr r3, [r7, #4]
8004642: 223f movs r2, #63 ; 0x3f
8004644: 5c9b ldrb r3, [r3, r2]
8004646: b2db uxtb r3, r3
8004648: 3b01 subs r3, #1
800464a: 1e5a subs r2, r3, #1
800464c: 4193 sbcs r3, r2
800464e: b2db uxtb r3, r3
8004650: e02b b.n 80046aa <HAL_TIM_PWM_Start+0x92>
8004652: 683b ldr r3, [r7, #0]
8004654: 2b08 cmp r3, #8
8004656: d108 bne.n 800466a <HAL_TIM_PWM_Start+0x52>
8004658: 687b ldr r3, [r7, #4]
800465a: 2240 movs r2, #64 ; 0x40
800465c: 5c9b ldrb r3, [r3, r2]
800465e: b2db uxtb r3, r3
8004660: 3b01 subs r3, #1
8004662: 1e5a subs r2, r3, #1
8004664: 4193 sbcs r3, r2
8004666: b2db uxtb r3, r3
8004668: e01f b.n 80046aa <HAL_TIM_PWM_Start+0x92>
800466a: 683b ldr r3, [r7, #0]
800466c: 2b0c cmp r3, #12
800466e: d108 bne.n 8004682 <HAL_TIM_PWM_Start+0x6a>
8004670: 687b ldr r3, [r7, #4]
8004672: 2241 movs r2, #65 ; 0x41
8004674: 5c9b ldrb r3, [r3, r2]
8004676: b2db uxtb r3, r3
8004678: 3b01 subs r3, #1
800467a: 1e5a subs r2, r3, #1
800467c: 4193 sbcs r3, r2
800467e: b2db uxtb r3, r3
8004680: e013 b.n 80046aa <HAL_TIM_PWM_Start+0x92>
8004682: 683b ldr r3, [r7, #0]
8004684: 2b10 cmp r3, #16
8004686: d108 bne.n 800469a <HAL_TIM_PWM_Start+0x82>
8004688: 687b ldr r3, [r7, #4]
800468a: 2242 movs r2, #66 ; 0x42
800468c: 5c9b ldrb r3, [r3, r2]
800468e: b2db uxtb r3, r3
8004690: 3b01 subs r3, #1
8004692: 1e5a subs r2, r3, #1
8004694: 4193 sbcs r3, r2
8004696: b2db uxtb r3, r3
8004698: e007 b.n 80046aa <HAL_TIM_PWM_Start+0x92>
800469a: 687b ldr r3, [r7, #4]
800469c: 2243 movs r2, #67 ; 0x43
800469e: 5c9b ldrb r3, [r3, r2]
80046a0: b2db uxtb r3, r3
80046a2: 3b01 subs r3, #1
80046a4: 1e5a subs r2, r3, #1
80046a6: 4193 sbcs r3, r2
80046a8: b2db uxtb r3, r3
80046aa: 2b00 cmp r3, #0
80046ac: d001 beq.n 80046b2 <HAL_TIM_PWM_Start+0x9a>
{
return HAL_ERROR;
80046ae: 2301 movs r3, #1
80046b0: e081 b.n 80047b6 <HAL_TIM_PWM_Start+0x19e>
}
/* Set the TIM channel state */
TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY);
80046b2: 683b ldr r3, [r7, #0]
80046b4: 2b00 cmp r3, #0
80046b6: d104 bne.n 80046c2 <HAL_TIM_PWM_Start+0xaa>
80046b8: 687b ldr r3, [r7, #4]
80046ba: 223e movs r2, #62 ; 0x3e
80046bc: 2102 movs r1, #2
80046be: 5499 strb r1, [r3, r2]
80046c0: e023 b.n 800470a <HAL_TIM_PWM_Start+0xf2>
80046c2: 683b ldr r3, [r7, #0]
80046c4: 2b04 cmp r3, #4
80046c6: d104 bne.n 80046d2 <HAL_TIM_PWM_Start+0xba>
80046c8: 687b ldr r3, [r7, #4]
80046ca: 223f movs r2, #63 ; 0x3f
80046cc: 2102 movs r1, #2
80046ce: 5499 strb r1, [r3, r2]
80046d0: e01b b.n 800470a <HAL_TIM_PWM_Start+0xf2>
80046d2: 683b ldr r3, [r7, #0]
80046d4: 2b08 cmp r3, #8
80046d6: d104 bne.n 80046e2 <HAL_TIM_PWM_Start+0xca>
80046d8: 687b ldr r3, [r7, #4]
80046da: 2240 movs r2, #64 ; 0x40
80046dc: 2102 movs r1, #2
80046de: 5499 strb r1, [r3, r2]
80046e0: e013 b.n 800470a <HAL_TIM_PWM_Start+0xf2>
80046e2: 683b ldr r3, [r7, #0]
80046e4: 2b0c cmp r3, #12
80046e6: d104 bne.n 80046f2 <HAL_TIM_PWM_Start+0xda>
80046e8: 687b ldr r3, [r7, #4]
80046ea: 2241 movs r2, #65 ; 0x41
80046ec: 2102 movs r1, #2
80046ee: 5499 strb r1, [r3, r2]
80046f0: e00b b.n 800470a <HAL_TIM_PWM_Start+0xf2>
80046f2: 683b ldr r3, [r7, #0]
80046f4: 2b10 cmp r3, #16
80046f6: d104 bne.n 8004702 <HAL_TIM_PWM_Start+0xea>
80046f8: 687b ldr r3, [r7, #4]
80046fa: 2242 movs r2, #66 ; 0x42
80046fc: 2102 movs r1, #2
80046fe: 5499 strb r1, [r3, r2]
8004700: e003 b.n 800470a <HAL_TIM_PWM_Start+0xf2>
8004702: 687b ldr r3, [r7, #4]
8004704: 2243 movs r2, #67 ; 0x43
8004706: 2102 movs r1, #2
8004708: 5499 strb r1, [r3, r2]
/* Enable the Capture compare channel */
TIM_CCxChannelCmd(htim->Instance, Channel, TIM_CCx_ENABLE);
800470a: 687b ldr r3, [r7, #4]
800470c: 681b ldr r3, [r3, #0]
800470e: 6839 ldr r1, [r7, #0]
8004710: 2201 movs r2, #1
8004712: 0018 movs r0, r3
8004714: f000 ff34 bl 8005580 <TIM_CCxChannelCmd>
if (IS_TIM_BREAK_INSTANCE(htim->Instance) != RESET)
8004718: 687b ldr r3, [r7, #4]
800471a: 681b ldr r3, [r3, #0]
800471c: 4a28 ldr r2, [pc, #160] ; (80047c0 <HAL_TIM_PWM_Start+0x1a8>)
800471e: 4293 cmp r3, r2
8004720: d009 beq.n 8004736 <HAL_TIM_PWM_Start+0x11e>
8004722: 687b ldr r3, [r7, #4]
8004724: 681b ldr r3, [r3, #0]
8004726: 4a27 ldr r2, [pc, #156] ; (80047c4 <HAL_TIM_PWM_Start+0x1ac>)
8004728: 4293 cmp r3, r2
800472a: d004 beq.n 8004736 <HAL_TIM_PWM_Start+0x11e>
800472c: 687b ldr r3, [r7, #4]
800472e: 681b ldr r3, [r3, #0]
8004730: 4a25 ldr r2, [pc, #148] ; (80047c8 <HAL_TIM_PWM_Start+0x1b0>)
8004732: 4293 cmp r3, r2
8004734: d101 bne.n 800473a <HAL_TIM_PWM_Start+0x122>
8004736: 2301 movs r3, #1
8004738: e000 b.n 800473c <HAL_TIM_PWM_Start+0x124>
800473a: 2300 movs r3, #0
800473c: 2b00 cmp r3, #0
800473e: d008 beq.n 8004752 <HAL_TIM_PWM_Start+0x13a>
{
/* Enable the main output */
__HAL_TIM_MOE_ENABLE(htim);
8004740: 687b ldr r3, [r7, #4]
8004742: 681b ldr r3, [r3, #0]
8004744: 6c5a ldr r2, [r3, #68] ; 0x44
8004746: 687b ldr r3, [r7, #4]
8004748: 681b ldr r3, [r3, #0]
800474a: 2180 movs r1, #128 ; 0x80
800474c: 0209 lsls r1, r1, #8
800474e: 430a orrs r2, r1
8004750: 645a str r2, [r3, #68] ; 0x44
}
/* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
8004752: 687b ldr r3, [r7, #4]
8004754: 681b ldr r3, [r3, #0]
8004756: 4a1a ldr r2, [pc, #104] ; (80047c0 <HAL_TIM_PWM_Start+0x1a8>)
8004758: 4293 cmp r3, r2
800475a: d00a beq.n 8004772 <HAL_TIM_PWM_Start+0x15a>
800475c: 687b ldr r3, [r7, #4]
800475e: 681a ldr r2, [r3, #0]
8004760: 2380 movs r3, #128 ; 0x80
8004762: 05db lsls r3, r3, #23
8004764: 429a cmp r2, r3
8004766: d004 beq.n 8004772 <HAL_TIM_PWM_Start+0x15a>
8004768: 687b ldr r3, [r7, #4]
800476a: 681b ldr r3, [r3, #0]
800476c: 4a17 ldr r2, [pc, #92] ; (80047cc <HAL_TIM_PWM_Start+0x1b4>)
800476e: 4293 cmp r3, r2
8004770: d116 bne.n 80047a0 <HAL_TIM_PWM_Start+0x188>
{
tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
8004772: 687b ldr r3, [r7, #4]
8004774: 681b ldr r3, [r3, #0]
8004776: 689b ldr r3, [r3, #8]
8004778: 4a15 ldr r2, [pc, #84] ; (80047d0 <HAL_TIM_PWM_Start+0x1b8>)
800477a: 4013 ands r3, r2
800477c: 60fb str r3, [r7, #12]
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
800477e: 68fb ldr r3, [r7, #12]
8004780: 2b06 cmp r3, #6
8004782: d016 beq.n 80047b2 <HAL_TIM_PWM_Start+0x19a>
8004784: 68fa ldr r2, [r7, #12]
8004786: 2380 movs r3, #128 ; 0x80
8004788: 025b lsls r3, r3, #9
800478a: 429a cmp r2, r3
800478c: d011 beq.n 80047b2 <HAL_TIM_PWM_Start+0x19a>
{
__HAL_TIM_ENABLE(htim);
800478e: 687b ldr r3, [r7, #4]
8004790: 681b ldr r3, [r3, #0]
8004792: 681a ldr r2, [r3, #0]
8004794: 687b ldr r3, [r7, #4]
8004796: 681b ldr r3, [r3, #0]
8004798: 2101 movs r1, #1
800479a: 430a orrs r2, r1
800479c: 601a str r2, [r3, #0]
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
800479e: e008 b.n 80047b2 <HAL_TIM_PWM_Start+0x19a>
}
}
else
{
__HAL_TIM_ENABLE(htim);
80047a0: 687b ldr r3, [r7, #4]
80047a2: 681b ldr r3, [r3, #0]
80047a4: 681a ldr r2, [r3, #0]
80047a6: 687b ldr r3, [r7, #4]
80047a8: 681b ldr r3, [r3, #0]
80047aa: 2101 movs r1, #1
80047ac: 430a orrs r2, r1
80047ae: 601a str r2, [r3, #0]
80047b0: e000 b.n 80047b4 <HAL_TIM_PWM_Start+0x19c>
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
80047b2: 46c0 nop ; (mov r8, r8)
}
/* Return function status */
return HAL_OK;
80047b4: 2300 movs r3, #0
}
80047b6: 0018 movs r0, r3
80047b8: 46bd mov sp, r7
80047ba: b004 add sp, #16
80047bc: bd80 pop {r7, pc}
80047be: 46c0 nop ; (mov r8, r8)
80047c0: 40012c00 .word 0x40012c00
80047c4: 40014400 .word 0x40014400
80047c8: 40014800 .word 0x40014800
80047cc: 40000400 .word 0x40000400
80047d0: 00010007 .word 0x00010007
080047d4 <HAL_TIM_IRQHandler>:
* @brief This function handles TIM interrupts requests.
* @param htim TIM handle
* @retval None
*/
void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
{
80047d4: b580 push {r7, lr}
80047d6: b082 sub sp, #8
80047d8: af00 add r7, sp, #0
80047da: 6078 str r0, [r7, #4]
/* Capture compare 1 event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC1) != RESET)
80047dc: 687b ldr r3, [r7, #4]
80047de: 681b ldr r3, [r3, #0]
80047e0: 691b ldr r3, [r3, #16]
80047e2: 2202 movs r2, #2
80047e4: 4013 ands r3, r2
80047e6: 2b02 cmp r3, #2
80047e8: d124 bne.n 8004834 <HAL_TIM_IRQHandler+0x60>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC1) != RESET)
80047ea: 687b ldr r3, [r7, #4]
80047ec: 681b ldr r3, [r3, #0]
80047ee: 68db ldr r3, [r3, #12]
80047f0: 2202 movs r2, #2
80047f2: 4013 ands r3, r2
80047f4: 2b02 cmp r3, #2
80047f6: d11d bne.n 8004834 <HAL_TIM_IRQHandler+0x60>
{
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC1);
80047f8: 687b ldr r3, [r7, #4]
80047fa: 681b ldr r3, [r3, #0]
80047fc: 2203 movs r2, #3
80047fe: 4252 negs r2, r2
8004800: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1;
8004802: 687b ldr r3, [r7, #4]
8004804: 2201 movs r2, #1
8004806: 771a strb r2, [r3, #28]
/* Input capture event */
if ((htim->Instance->CCMR1 & TIM_CCMR1_CC1S) != 0x00U)
8004808: 687b ldr r3, [r7, #4]
800480a: 681b ldr r3, [r3, #0]
800480c: 699b ldr r3, [r3, #24]
800480e: 2203 movs r2, #3
8004810: 4013 ands r3, r2
8004812: d004 beq.n 800481e <HAL_TIM_IRQHandler+0x4a>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
8004814: 687b ldr r3, [r7, #4]
8004816: 0018 movs r0, r3
8004818: f000 faec bl 8004df4 <HAL_TIM_IC_CaptureCallback>
800481c: e007 b.n 800482e <HAL_TIM_IRQHandler+0x5a>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->OC_DelayElapsedCallback(htim);
htim->PWM_PulseFinishedCallback(htim);
#else
HAL_TIM_OC_DelayElapsedCallback(htim);
800481e: 687b ldr r3, [r7, #4]
8004820: 0018 movs r0, r3
8004822: f000 fadf bl 8004de4 <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
8004826: 687b ldr r3, [r7, #4]
8004828: 0018 movs r0, r3
800482a: f000 faeb bl 8004e04 <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
800482e: 687b ldr r3, [r7, #4]
8004830: 2200 movs r2, #0
8004832: 771a strb r2, [r3, #28]
}
}
}
/* Capture compare 2 event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC2) != RESET)
8004834: 687b ldr r3, [r7, #4]
8004836: 681b ldr r3, [r3, #0]
8004838: 691b ldr r3, [r3, #16]
800483a: 2204 movs r2, #4
800483c: 4013 ands r3, r2
800483e: 2b04 cmp r3, #4
8004840: d125 bne.n 800488e <HAL_TIM_IRQHandler+0xba>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC2) != RESET)
8004842: 687b ldr r3, [r7, #4]
8004844: 681b ldr r3, [r3, #0]
8004846: 68db ldr r3, [r3, #12]
8004848: 2204 movs r2, #4
800484a: 4013 ands r3, r2
800484c: 2b04 cmp r3, #4
800484e: d11e bne.n 800488e <HAL_TIM_IRQHandler+0xba>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC2);
8004850: 687b ldr r3, [r7, #4]
8004852: 681b ldr r3, [r3, #0]
8004854: 2205 movs r2, #5
8004856: 4252 negs r2, r2
8004858: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2;
800485a: 687b ldr r3, [r7, #4]
800485c: 2202 movs r2, #2
800485e: 771a strb r2, [r3, #28]
/* Input capture event */
if ((htim->Instance->CCMR1 & TIM_CCMR1_CC2S) != 0x00U)
8004860: 687b ldr r3, [r7, #4]
8004862: 681b ldr r3, [r3, #0]
8004864: 699a ldr r2, [r3, #24]
8004866: 23c0 movs r3, #192 ; 0xc0
8004868: 009b lsls r3, r3, #2
800486a: 4013 ands r3, r2
800486c: d004 beq.n 8004878 <HAL_TIM_IRQHandler+0xa4>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
800486e: 687b ldr r3, [r7, #4]
8004870: 0018 movs r0, r3
8004872: f000 fabf bl 8004df4 <HAL_TIM_IC_CaptureCallback>
8004876: e007 b.n 8004888 <HAL_TIM_IRQHandler+0xb4>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->OC_DelayElapsedCallback(htim);
htim->PWM_PulseFinishedCallback(htim);
#else
HAL_TIM_OC_DelayElapsedCallback(htim);
8004878: 687b ldr r3, [r7, #4]
800487a: 0018 movs r0, r3
800487c: f000 fab2 bl 8004de4 <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
8004880: 687b ldr r3, [r7, #4]
8004882: 0018 movs r0, r3
8004884: f000 fabe bl 8004e04 <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
8004888: 687b ldr r3, [r7, #4]
800488a: 2200 movs r2, #0
800488c: 771a strb r2, [r3, #28]
}
}
/* Capture compare 3 event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC3) != RESET)
800488e: 687b ldr r3, [r7, #4]
8004890: 681b ldr r3, [r3, #0]
8004892: 691b ldr r3, [r3, #16]
8004894: 2208 movs r2, #8
8004896: 4013 ands r3, r2
8004898: 2b08 cmp r3, #8
800489a: d124 bne.n 80048e6 <HAL_TIM_IRQHandler+0x112>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC3) != RESET)
800489c: 687b ldr r3, [r7, #4]
800489e: 681b ldr r3, [r3, #0]
80048a0: 68db ldr r3, [r3, #12]
80048a2: 2208 movs r2, #8
80048a4: 4013 ands r3, r2
80048a6: 2b08 cmp r3, #8
80048a8: d11d bne.n 80048e6 <HAL_TIM_IRQHandler+0x112>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC3);
80048aa: 687b ldr r3, [r7, #4]
80048ac: 681b ldr r3, [r3, #0]
80048ae: 2209 movs r2, #9
80048b0: 4252 negs r2, r2
80048b2: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3;
80048b4: 687b ldr r3, [r7, #4]
80048b6: 2204 movs r2, #4
80048b8: 771a strb r2, [r3, #28]
/* Input capture event */
if ((htim->Instance->CCMR2 & TIM_CCMR2_CC3S) != 0x00U)
80048ba: 687b ldr r3, [r7, #4]
80048bc: 681b ldr r3, [r3, #0]
80048be: 69db ldr r3, [r3, #28]
80048c0: 2203 movs r2, #3
80048c2: 4013 ands r3, r2
80048c4: d004 beq.n 80048d0 <HAL_TIM_IRQHandler+0xfc>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
80048c6: 687b ldr r3, [r7, #4]
80048c8: 0018 movs r0, r3
80048ca: f000 fa93 bl 8004df4 <HAL_TIM_IC_CaptureCallback>
80048ce: e007 b.n 80048e0 <HAL_TIM_IRQHandler+0x10c>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->OC_DelayElapsedCallback(htim);
htim->PWM_PulseFinishedCallback(htim);
#else
HAL_TIM_OC_DelayElapsedCallback(htim);
80048d0: 687b ldr r3, [r7, #4]
80048d2: 0018 movs r0, r3
80048d4: f000 fa86 bl 8004de4 <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
80048d8: 687b ldr r3, [r7, #4]
80048da: 0018 movs r0, r3
80048dc: f000 fa92 bl 8004e04 <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
80048e0: 687b ldr r3, [r7, #4]
80048e2: 2200 movs r2, #0
80048e4: 771a strb r2, [r3, #28]
}
}
/* Capture compare 4 event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC4) != RESET)
80048e6: 687b ldr r3, [r7, #4]
80048e8: 681b ldr r3, [r3, #0]
80048ea: 691b ldr r3, [r3, #16]
80048ec: 2210 movs r2, #16
80048ee: 4013 ands r3, r2
80048f0: 2b10 cmp r3, #16
80048f2: d125 bne.n 8004940 <HAL_TIM_IRQHandler+0x16c>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC4) != RESET)
80048f4: 687b ldr r3, [r7, #4]
80048f6: 681b ldr r3, [r3, #0]
80048f8: 68db ldr r3, [r3, #12]
80048fa: 2210 movs r2, #16
80048fc: 4013 ands r3, r2
80048fe: 2b10 cmp r3, #16
8004900: d11e bne.n 8004940 <HAL_TIM_IRQHandler+0x16c>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC4);
8004902: 687b ldr r3, [r7, #4]
8004904: 681b ldr r3, [r3, #0]
8004906: 2211 movs r2, #17
8004908: 4252 negs r2, r2
800490a: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4;
800490c: 687b ldr r3, [r7, #4]
800490e: 2208 movs r2, #8
8004910: 771a strb r2, [r3, #28]
/* Input capture event */
if ((htim->Instance->CCMR2 & TIM_CCMR2_CC4S) != 0x00U)
8004912: 687b ldr r3, [r7, #4]
8004914: 681b ldr r3, [r3, #0]
8004916: 69da ldr r2, [r3, #28]
8004918: 23c0 movs r3, #192 ; 0xc0
800491a: 009b lsls r3, r3, #2
800491c: 4013 ands r3, r2
800491e: d004 beq.n 800492a <HAL_TIM_IRQHandler+0x156>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
8004920: 687b ldr r3, [r7, #4]
8004922: 0018 movs r0, r3
8004924: f000 fa66 bl 8004df4 <HAL_TIM_IC_CaptureCallback>
8004928: e007 b.n 800493a <HAL_TIM_IRQHandler+0x166>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->OC_DelayElapsedCallback(htim);
htim->PWM_PulseFinishedCallback(htim);
#else
HAL_TIM_OC_DelayElapsedCallback(htim);
800492a: 687b ldr r3, [r7, #4]
800492c: 0018 movs r0, r3
800492e: f000 fa59 bl 8004de4 <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
8004932: 687b ldr r3, [r7, #4]
8004934: 0018 movs r0, r3
8004936: f000 fa65 bl 8004e04 <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
800493a: 687b ldr r3, [r7, #4]
800493c: 2200 movs r2, #0
800493e: 771a strb r2, [r3, #28]
}
}
/* TIM Update event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_UPDATE) != RESET)
8004940: 687b ldr r3, [r7, #4]
8004942: 681b ldr r3, [r3, #0]
8004944: 691b ldr r3, [r3, #16]
8004946: 2201 movs r2, #1
8004948: 4013 ands r3, r2
800494a: 2b01 cmp r3, #1
800494c: d10f bne.n 800496e <HAL_TIM_IRQHandler+0x19a>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_UPDATE) != RESET)
800494e: 687b ldr r3, [r7, #4]
8004950: 681b ldr r3, [r3, #0]
8004952: 68db ldr r3, [r3, #12]
8004954: 2201 movs r2, #1
8004956: 4013 ands r3, r2
8004958: 2b01 cmp r3, #1
800495a: d108 bne.n 800496e <HAL_TIM_IRQHandler+0x19a>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_UPDATE);
800495c: 687b ldr r3, [r7, #4]
800495e: 681b ldr r3, [r3, #0]
8004960: 2202 movs r2, #2
8004962: 4252 negs r2, r2
8004964: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->PeriodElapsedCallback(htim);
#else
HAL_TIM_PeriodElapsedCallback(htim);
8004966: 687b ldr r3, [r7, #4]
8004968: 0018 movs r0, r3
800496a: f7fc ff8f bl 800188c <HAL_TIM_PeriodElapsedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
/* TIM Break input event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK) != RESET)
800496e: 687b ldr r3, [r7, #4]
8004970: 681b ldr r3, [r3, #0]
8004972: 691b ldr r3, [r3, #16]
8004974: 2280 movs r2, #128 ; 0x80
8004976: 4013 ands r3, r2
8004978: 2b80 cmp r3, #128 ; 0x80
800497a: d10f bne.n 800499c <HAL_TIM_IRQHandler+0x1c8>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET)
800497c: 687b ldr r3, [r7, #4]
800497e: 681b ldr r3, [r3, #0]
8004980: 68db ldr r3, [r3, #12]
8004982: 2280 movs r2, #128 ; 0x80
8004984: 4013 ands r3, r2
8004986: 2b80 cmp r3, #128 ; 0x80
8004988: d108 bne.n 800499c <HAL_TIM_IRQHandler+0x1c8>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_BREAK);
800498a: 687b ldr r3, [r7, #4]
800498c: 681b ldr r3, [r3, #0]
800498e: 2281 movs r2, #129 ; 0x81
8004990: 4252 negs r2, r2
8004992: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->BreakCallback(htim);
#else
HAL_TIMEx_BreakCallback(htim);
8004994: 687b ldr r3, [r7, #4]
8004996: 0018 movs r0, r3
8004998: f000 fe86 bl 80056a8 <HAL_TIMEx_BreakCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
/* TIM Break2 input event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK2) != RESET)
800499c: 687b ldr r3, [r7, #4]
800499e: 681b ldr r3, [r3, #0]
80049a0: 691a ldr r2, [r3, #16]
80049a2: 2380 movs r3, #128 ; 0x80
80049a4: 005b lsls r3, r3, #1
80049a6: 401a ands r2, r3
80049a8: 2380 movs r3, #128 ; 0x80
80049aa: 005b lsls r3, r3, #1
80049ac: 429a cmp r2, r3
80049ae: d10e bne.n 80049ce <HAL_TIM_IRQHandler+0x1fa>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET)
80049b0: 687b ldr r3, [r7, #4]
80049b2: 681b ldr r3, [r3, #0]
80049b4: 68db ldr r3, [r3, #12]
80049b6: 2280 movs r2, #128 ; 0x80
80049b8: 4013 ands r3, r2
80049ba: 2b80 cmp r3, #128 ; 0x80
80049bc: d107 bne.n 80049ce <HAL_TIM_IRQHandler+0x1fa>
{
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_BREAK2);
80049be: 687b ldr r3, [r7, #4]
80049c0: 681b ldr r3, [r3, #0]
80049c2: 4a1c ldr r2, [pc, #112] ; (8004a34 <HAL_TIM_IRQHandler+0x260>)
80049c4: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->Break2Callback(htim);
#else
HAL_TIMEx_Break2Callback(htim);
80049c6: 687b ldr r3, [r7, #4]
80049c8: 0018 movs r0, r3
80049ca: f000 fe75 bl 80056b8 <HAL_TIMEx_Break2Callback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
/* TIM Trigger detection event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_TRIGGER) != RESET)
80049ce: 687b ldr r3, [r7, #4]
80049d0: 681b ldr r3, [r3, #0]
80049d2: 691b ldr r3, [r3, #16]
80049d4: 2240 movs r2, #64 ; 0x40
80049d6: 4013 ands r3, r2
80049d8: 2b40 cmp r3, #64 ; 0x40
80049da: d10f bne.n 80049fc <HAL_TIM_IRQHandler+0x228>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_TRIGGER) != RESET)
80049dc: 687b ldr r3, [r7, #4]
80049de: 681b ldr r3, [r3, #0]
80049e0: 68db ldr r3, [r3, #12]
80049e2: 2240 movs r2, #64 ; 0x40
80049e4: 4013 ands r3, r2
80049e6: 2b40 cmp r3, #64 ; 0x40
80049e8: d108 bne.n 80049fc <HAL_TIM_IRQHandler+0x228>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_TRIGGER);
80049ea: 687b ldr r3, [r7, #4]
80049ec: 681b ldr r3, [r3, #0]
80049ee: 2241 movs r2, #65 ; 0x41
80049f0: 4252 negs r2, r2
80049f2: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->TriggerCallback(htim);
#else
HAL_TIM_TriggerCallback(htim);
80049f4: 687b ldr r3, [r7, #4]
80049f6: 0018 movs r0, r3
80049f8: f000 fa0c bl 8004e14 <HAL_TIM_TriggerCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
/* TIM commutation event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_COM) != RESET)
80049fc: 687b ldr r3, [r7, #4]
80049fe: 681b ldr r3, [r3, #0]
8004a00: 691b ldr r3, [r3, #16]
8004a02: 2220 movs r2, #32
8004a04: 4013 ands r3, r2
8004a06: 2b20 cmp r3, #32
8004a08: d10f bne.n 8004a2a <HAL_TIM_IRQHandler+0x256>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_COM) != RESET)
8004a0a: 687b ldr r3, [r7, #4]
8004a0c: 681b ldr r3, [r3, #0]
8004a0e: 68db ldr r3, [r3, #12]
8004a10: 2220 movs r2, #32
8004a12: 4013 ands r3, r2
8004a14: 2b20 cmp r3, #32
8004a16: d108 bne.n 8004a2a <HAL_TIM_IRQHandler+0x256>
{
__HAL_TIM_CLEAR_IT(htim, TIM_FLAG_COM);
8004a18: 687b ldr r3, [r7, #4]
8004a1a: 681b ldr r3, [r3, #0]
8004a1c: 2221 movs r2, #33 ; 0x21
8004a1e: 4252 negs r2, r2
8004a20: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->CommutationCallback(htim);
#else
HAL_TIMEx_CommutCallback(htim);
8004a22: 687b ldr r3, [r7, #4]
8004a24: 0018 movs r0, r3
8004a26: f000 fe37 bl 8005698 <HAL_TIMEx_CommutCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
}
8004a2a: 46c0 nop ; (mov r8, r8)
8004a2c: 46bd mov sp, r7
8004a2e: b002 add sp, #8
8004a30: bd80 pop {r7, pc}
8004a32: 46c0 nop ; (mov r8, r8)
8004a34: fffffeff .word 0xfffffeff
08004a38 <HAL_TIM_PWM_ConfigChannel>:
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim,
const TIM_OC_InitTypeDef *sConfig,
uint32_t Channel)
{
8004a38: b580 push {r7, lr}
8004a3a: b086 sub sp, #24
8004a3c: af00 add r7, sp, #0
8004a3e: 60f8 str r0, [r7, #12]
8004a40: 60b9 str r1, [r7, #8]
8004a42: 607a str r2, [r7, #4]
HAL_StatusTypeDef status = HAL_OK;
8004a44: 2317 movs r3, #23
8004a46: 18fb adds r3, r7, r3
8004a48: 2200 movs r2, #0
8004a4a: 701a strb r2, [r3, #0]
assert_param(IS_TIM_PWM_MODE(sConfig->OCMode));
assert_param(IS_TIM_OC_POLARITY(sConfig->OCPolarity));
assert_param(IS_TIM_FAST_STATE(sConfig->OCFastMode));
/* Process Locked */
__HAL_LOCK(htim);
8004a4c: 68fb ldr r3, [r7, #12]
8004a4e: 223c movs r2, #60 ; 0x3c
8004a50: 5c9b ldrb r3, [r3, r2]
8004a52: 2b01 cmp r3, #1
8004a54: d101 bne.n 8004a5a <HAL_TIM_PWM_ConfigChannel+0x22>
8004a56: 2302 movs r3, #2
8004a58: e0e5 b.n 8004c26 <HAL_TIM_PWM_ConfigChannel+0x1ee>
8004a5a: 68fb ldr r3, [r7, #12]
8004a5c: 223c movs r2, #60 ; 0x3c
8004a5e: 2101 movs r1, #1
8004a60: 5499 strb r1, [r3, r2]
switch (Channel)
8004a62: 687b ldr r3, [r7, #4]
8004a64: 2b14 cmp r3, #20
8004a66: d900 bls.n 8004a6a <HAL_TIM_PWM_ConfigChannel+0x32>
8004a68: e0d1 b.n 8004c0e <HAL_TIM_PWM_ConfigChannel+0x1d6>
8004a6a: 687b ldr r3, [r7, #4]
8004a6c: 009a lsls r2, r3, #2
8004a6e: 4b70 ldr r3, [pc, #448] ; (8004c30 <HAL_TIM_PWM_ConfigChannel+0x1f8>)
8004a70: 18d3 adds r3, r2, r3
8004a72: 681b ldr r3, [r3, #0]
8004a74: 469f mov pc, r3
{
/* Check the parameters */
assert_param(IS_TIM_CC1_INSTANCE(htim->Instance));
/* Configure the Channel 1 in PWM mode */
TIM_OC1_SetConfig(htim->Instance, sConfig);
8004a76: 68fb ldr r3, [r7, #12]
8004a78: 681b ldr r3, [r3, #0]
8004a7a: 68ba ldr r2, [r7, #8]
8004a7c: 0011 movs r1, r2
8004a7e: 0018 movs r0, r3
8004a80: f000 fa46 bl 8004f10 <TIM_OC1_SetConfig>
/* Set the Preload enable bit for channel1 */
htim->Instance->CCMR1 |= TIM_CCMR1_OC1PE;
8004a84: 68fb ldr r3, [r7, #12]
8004a86: 681b ldr r3, [r3, #0]
8004a88: 699a ldr r2, [r3, #24]
8004a8a: 68fb ldr r3, [r7, #12]
8004a8c: 681b ldr r3, [r3, #0]
8004a8e: 2108 movs r1, #8
8004a90: 430a orrs r2, r1
8004a92: 619a str r2, [r3, #24]
/* Configure the Output Fast mode */
htim->Instance->CCMR1 &= ~TIM_CCMR1_OC1FE;
8004a94: 68fb ldr r3, [r7, #12]
8004a96: 681b ldr r3, [r3, #0]
8004a98: 699a ldr r2, [r3, #24]
8004a9a: 68fb ldr r3, [r7, #12]
8004a9c: 681b ldr r3, [r3, #0]
8004a9e: 2104 movs r1, #4
8004aa0: 438a bics r2, r1
8004aa2: 619a str r2, [r3, #24]
htim->Instance->CCMR1 |= sConfig->OCFastMode;
8004aa4: 68fb ldr r3, [r7, #12]
8004aa6: 681b ldr r3, [r3, #0]
8004aa8: 6999 ldr r1, [r3, #24]
8004aaa: 68bb ldr r3, [r7, #8]
8004aac: 691a ldr r2, [r3, #16]
8004aae: 68fb ldr r3, [r7, #12]
8004ab0: 681b ldr r3, [r3, #0]
8004ab2: 430a orrs r2, r1
8004ab4: 619a str r2, [r3, #24]
break;
8004ab6: e0af b.n 8004c18 <HAL_TIM_PWM_ConfigChannel+0x1e0>
{
/* Check the parameters */
assert_param(IS_TIM_CC2_INSTANCE(htim->Instance));
/* Configure the Channel 2 in PWM mode */
TIM_OC2_SetConfig(htim->Instance, sConfig);
8004ab8: 68fb ldr r3, [r7, #12]
8004aba: 681b ldr r3, [r3, #0]
8004abc: 68ba ldr r2, [r7, #8]
8004abe: 0011 movs r1, r2
8004ac0: 0018 movs r0, r3
8004ac2: f000 faa5 bl 8005010 <TIM_OC2_SetConfig>
/* Set the Preload enable bit for channel2 */
htim->Instance->CCMR1 |= TIM_CCMR1_OC2PE;
8004ac6: 68fb ldr r3, [r7, #12]
8004ac8: 681b ldr r3, [r3, #0]
8004aca: 699a ldr r2, [r3, #24]
8004acc: 68fb ldr r3, [r7, #12]
8004ace: 681b ldr r3, [r3, #0]
8004ad0: 2180 movs r1, #128 ; 0x80
8004ad2: 0109 lsls r1, r1, #4
8004ad4: 430a orrs r2, r1
8004ad6: 619a str r2, [r3, #24]
/* Configure the Output Fast mode */
htim->Instance->CCMR1 &= ~TIM_CCMR1_OC2FE;
8004ad8: 68fb ldr r3, [r7, #12]
8004ada: 681b ldr r3, [r3, #0]
8004adc: 699a ldr r2, [r3, #24]
8004ade: 68fb ldr r3, [r7, #12]
8004ae0: 681b ldr r3, [r3, #0]
8004ae2: 4954 ldr r1, [pc, #336] ; (8004c34 <HAL_TIM_PWM_ConfigChannel+0x1fc>)
8004ae4: 400a ands r2, r1
8004ae6: 619a str r2, [r3, #24]
htim->Instance->CCMR1 |= sConfig->OCFastMode << 8U;
8004ae8: 68fb ldr r3, [r7, #12]
8004aea: 681b ldr r3, [r3, #0]
8004aec: 6999 ldr r1, [r3, #24]
8004aee: 68bb ldr r3, [r7, #8]
8004af0: 691b ldr r3, [r3, #16]
8004af2: 021a lsls r2, r3, #8
8004af4: 68fb ldr r3, [r7, #12]
8004af6: 681b ldr r3, [r3, #0]
8004af8: 430a orrs r2, r1
8004afa: 619a str r2, [r3, #24]
break;
8004afc: e08c b.n 8004c18 <HAL_TIM_PWM_ConfigChannel+0x1e0>
{
/* Check the parameters */
assert_param(IS_TIM_CC3_INSTANCE(htim->Instance));
/* Configure the Channel 3 in PWM mode */
TIM_OC3_SetConfig(htim->Instance, sConfig);
8004afe: 68fb ldr r3, [r7, #12]
8004b00: 681b ldr r3, [r3, #0]
8004b02: 68ba ldr r2, [r7, #8]
8004b04: 0011 movs r1, r2
8004b06: 0018 movs r0, r3
8004b08: f000 fb00 bl 800510c <TIM_OC3_SetConfig>
/* Set the Preload enable bit for channel3 */
htim->Instance->CCMR2 |= TIM_CCMR2_OC3PE;
8004b0c: 68fb ldr r3, [r7, #12]
8004b0e: 681b ldr r3, [r3, #0]
8004b10: 69da ldr r2, [r3, #28]
8004b12: 68fb ldr r3, [r7, #12]
8004b14: 681b ldr r3, [r3, #0]
8004b16: 2108 movs r1, #8
8004b18: 430a orrs r2, r1
8004b1a: 61da str r2, [r3, #28]
/* Configure the Output Fast mode */
htim->Instance->CCMR2 &= ~TIM_CCMR2_OC3FE;
8004b1c: 68fb ldr r3, [r7, #12]
8004b1e: 681b ldr r3, [r3, #0]
8004b20: 69da ldr r2, [r3, #28]
8004b22: 68fb ldr r3, [r7, #12]
8004b24: 681b ldr r3, [r3, #0]
8004b26: 2104 movs r1, #4
8004b28: 438a bics r2, r1
8004b2a: 61da str r2, [r3, #28]
htim->Instance->CCMR2 |= sConfig->OCFastMode;
8004b2c: 68fb ldr r3, [r7, #12]
8004b2e: 681b ldr r3, [r3, #0]
8004b30: 69d9 ldr r1, [r3, #28]
8004b32: 68bb ldr r3, [r7, #8]
8004b34: 691a ldr r2, [r3, #16]
8004b36: 68fb ldr r3, [r7, #12]
8004b38: 681b ldr r3, [r3, #0]
8004b3a: 430a orrs r2, r1
8004b3c: 61da str r2, [r3, #28]
break;
8004b3e: e06b b.n 8004c18 <HAL_TIM_PWM_ConfigChannel+0x1e0>
{
/* Check the parameters */
assert_param(IS_TIM_CC4_INSTANCE(htim->Instance));
/* Configure the Channel 4 in PWM mode */
TIM_OC4_SetConfig(htim->Instance, sConfig);
8004b40: 68fb ldr r3, [r7, #12]
8004b42: 681b ldr r3, [r3, #0]
8004b44: 68ba ldr r2, [r7, #8]
8004b46: 0011 movs r1, r2
8004b48: 0018 movs r0, r3
8004b4a: f000 fb61 bl 8005210 <TIM_OC4_SetConfig>
/* Set the Preload enable bit for channel4 */
htim->Instance->CCMR2 |= TIM_CCMR2_OC4PE;
8004b4e: 68fb ldr r3, [r7, #12]
8004b50: 681b ldr r3, [r3, #0]
8004b52: 69da ldr r2, [r3, #28]
8004b54: 68fb ldr r3, [r7, #12]
8004b56: 681b ldr r3, [r3, #0]
8004b58: 2180 movs r1, #128 ; 0x80
8004b5a: 0109 lsls r1, r1, #4
8004b5c: 430a orrs r2, r1
8004b5e: 61da str r2, [r3, #28]
/* Configure the Output Fast mode */
htim->Instance->CCMR2 &= ~TIM_CCMR2_OC4FE;
8004b60: 68fb ldr r3, [r7, #12]
8004b62: 681b ldr r3, [r3, #0]
8004b64: 69da ldr r2, [r3, #28]
8004b66: 68fb ldr r3, [r7, #12]
8004b68: 681b ldr r3, [r3, #0]
8004b6a: 4932 ldr r1, [pc, #200] ; (8004c34 <HAL_TIM_PWM_ConfigChannel+0x1fc>)
8004b6c: 400a ands r2, r1
8004b6e: 61da str r2, [r3, #28]
htim->Instance->CCMR2 |= sConfig->OCFastMode << 8U;
8004b70: 68fb ldr r3, [r7, #12]
8004b72: 681b ldr r3, [r3, #0]
8004b74: 69d9 ldr r1, [r3, #28]
8004b76: 68bb ldr r3, [r7, #8]
8004b78: 691b ldr r3, [r3, #16]
8004b7a: 021a lsls r2, r3, #8
8004b7c: 68fb ldr r3, [r7, #12]
8004b7e: 681b ldr r3, [r3, #0]
8004b80: 430a orrs r2, r1
8004b82: 61da str r2, [r3, #28]
break;
8004b84: e048 b.n 8004c18 <HAL_TIM_PWM_ConfigChannel+0x1e0>
{
/* Check the parameters */
assert_param(IS_TIM_CC5_INSTANCE(htim->Instance));
/* Configure the Channel 5 in PWM mode */
TIM_OC5_SetConfig(htim->Instance, sConfig);
8004b86: 68fb ldr r3, [r7, #12]
8004b88: 681b ldr r3, [r3, #0]
8004b8a: 68ba ldr r2, [r7, #8]
8004b8c: 0011 movs r1, r2
8004b8e: 0018 movs r0, r3
8004b90: f000 fba2 bl 80052d8 <TIM_OC5_SetConfig>
/* Set the Preload enable bit for channel5*/
htim->Instance->CCMR3 |= TIM_CCMR3_OC5PE;
8004b94: 68fb ldr r3, [r7, #12]
8004b96: 681b ldr r3, [r3, #0]
8004b98: 6d5a ldr r2, [r3, #84] ; 0x54
8004b9a: 68fb ldr r3, [r7, #12]
8004b9c: 681b ldr r3, [r3, #0]
8004b9e: 2108 movs r1, #8
8004ba0: 430a orrs r2, r1
8004ba2: 655a str r2, [r3, #84] ; 0x54
/* Configure the Output Fast mode */
htim->Instance->CCMR3 &= ~TIM_CCMR3_OC5FE;
8004ba4: 68fb ldr r3, [r7, #12]
8004ba6: 681b ldr r3, [r3, #0]
8004ba8: 6d5a ldr r2, [r3, #84] ; 0x54
8004baa: 68fb ldr r3, [r7, #12]
8004bac: 681b ldr r3, [r3, #0]
8004bae: 2104 movs r1, #4
8004bb0: 438a bics r2, r1
8004bb2: 655a str r2, [r3, #84] ; 0x54
htim->Instance->CCMR3 |= sConfig->OCFastMode;
8004bb4: 68fb ldr r3, [r7, #12]
8004bb6: 681b ldr r3, [r3, #0]
8004bb8: 6d59 ldr r1, [r3, #84] ; 0x54
8004bba: 68bb ldr r3, [r7, #8]
8004bbc: 691a ldr r2, [r3, #16]
8004bbe: 68fb ldr r3, [r7, #12]
8004bc0: 681b ldr r3, [r3, #0]
8004bc2: 430a orrs r2, r1
8004bc4: 655a str r2, [r3, #84] ; 0x54
break;
8004bc6: e027 b.n 8004c18 <HAL_TIM_PWM_ConfigChannel+0x1e0>
{
/* Check the parameters */
assert_param(IS_TIM_CC6_INSTANCE(htim->Instance));
/* Configure the Channel 6 in PWM mode */
TIM_OC6_SetConfig(htim->Instance, sConfig);
8004bc8: 68fb ldr r3, [r7, #12]
8004bca: 681b ldr r3, [r3, #0]
8004bcc: 68ba ldr r2, [r7, #8]
8004bce: 0011 movs r1, r2
8004bd0: 0018 movs r0, r3
8004bd2: f000 fbdb bl 800538c <TIM_OC6_SetConfig>
/* Set the Preload enable bit for channel6 */
htim->Instance->CCMR3 |= TIM_CCMR3_OC6PE;
8004bd6: 68fb ldr r3, [r7, #12]
8004bd8: 681b ldr r3, [r3, #0]
8004bda: 6d5a ldr r2, [r3, #84] ; 0x54
8004bdc: 68fb ldr r3, [r7, #12]
8004bde: 681b ldr r3, [r3, #0]
8004be0: 2180 movs r1, #128 ; 0x80
8004be2: 0109 lsls r1, r1, #4
8004be4: 430a orrs r2, r1
8004be6: 655a str r2, [r3, #84] ; 0x54
/* Configure the Output Fast mode */
htim->Instance->CCMR3 &= ~TIM_CCMR3_OC6FE;
8004be8: 68fb ldr r3, [r7, #12]
8004bea: 681b ldr r3, [r3, #0]
8004bec: 6d5a ldr r2, [r3, #84] ; 0x54
8004bee: 68fb ldr r3, [r7, #12]
8004bf0: 681b ldr r3, [r3, #0]
8004bf2: 4910 ldr r1, [pc, #64] ; (8004c34 <HAL_TIM_PWM_ConfigChannel+0x1fc>)
8004bf4: 400a ands r2, r1
8004bf6: 655a str r2, [r3, #84] ; 0x54
htim->Instance->CCMR3 |= sConfig->OCFastMode << 8U;
8004bf8: 68fb ldr r3, [r7, #12]
8004bfa: 681b ldr r3, [r3, #0]
8004bfc: 6d59 ldr r1, [r3, #84] ; 0x54
8004bfe: 68bb ldr r3, [r7, #8]
8004c00: 691b ldr r3, [r3, #16]
8004c02: 021a lsls r2, r3, #8
8004c04: 68fb ldr r3, [r7, #12]
8004c06: 681b ldr r3, [r3, #0]
8004c08: 430a orrs r2, r1
8004c0a: 655a str r2, [r3, #84] ; 0x54
break;
8004c0c: e004 b.n 8004c18 <HAL_TIM_PWM_ConfigChannel+0x1e0>
}
default:
status = HAL_ERROR;
8004c0e: 2317 movs r3, #23
8004c10: 18fb adds r3, r7, r3
8004c12: 2201 movs r2, #1
8004c14: 701a strb r2, [r3, #0]
break;
8004c16: 46c0 nop ; (mov r8, r8)
}
__HAL_UNLOCK(htim);
8004c18: 68fb ldr r3, [r7, #12]
8004c1a: 223c movs r2, #60 ; 0x3c
8004c1c: 2100 movs r1, #0
8004c1e: 5499 strb r1, [r3, r2]
return status;
8004c20: 2317 movs r3, #23
8004c22: 18fb adds r3, r7, r3
8004c24: 781b ldrb r3, [r3, #0]
}
8004c26: 0018 movs r0, r3
8004c28: 46bd mov sp, r7
8004c2a: b006 add sp, #24
8004c2c: bd80 pop {r7, pc}
8004c2e: 46c0 nop ; (mov r8, r8)
8004c30: 08006828 .word 0x08006828
8004c34: fffffbff .word 0xfffffbff
08004c38 <HAL_TIM_ConfigClockSource>:
* @param sClockSourceConfig pointer to a TIM_ClockConfigTypeDef structure that
* contains the clock source information for the TIM peripheral.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_ConfigClockSource(TIM_HandleTypeDef *htim, const TIM_ClockConfigTypeDef *sClockSourceConfig)
{
8004c38: b580 push {r7, lr}
8004c3a: b084 sub sp, #16
8004c3c: af00 add r7, sp, #0
8004c3e: 6078 str r0, [r7, #4]
8004c40: 6039 str r1, [r7, #0]
HAL_StatusTypeDef status = HAL_OK;
8004c42: 230f movs r3, #15
8004c44: 18fb adds r3, r7, r3
8004c46: 2200 movs r2, #0
8004c48: 701a strb r2, [r3, #0]
uint32_t tmpsmcr;
/* Process Locked */
__HAL_LOCK(htim);
8004c4a: 687b ldr r3, [r7, #4]
8004c4c: 223c movs r2, #60 ; 0x3c
8004c4e: 5c9b ldrb r3, [r3, r2]
8004c50: 2b01 cmp r3, #1
8004c52: d101 bne.n 8004c58 <HAL_TIM_ConfigClockSource+0x20>
8004c54: 2302 movs r3, #2
8004c56: e0bc b.n 8004dd2 <HAL_TIM_ConfigClockSource+0x19a>
8004c58: 687b ldr r3, [r7, #4]
8004c5a: 223c movs r2, #60 ; 0x3c
8004c5c: 2101 movs r1, #1
8004c5e: 5499 strb r1, [r3, r2]
htim->State = HAL_TIM_STATE_BUSY;
8004c60: 687b ldr r3, [r7, #4]
8004c62: 223d movs r2, #61 ; 0x3d
8004c64: 2102 movs r1, #2
8004c66: 5499 strb r1, [r3, r2]
/* Check the parameters */
assert_param(IS_TIM_CLOCKSOURCE(sClockSourceConfig->ClockSource));
/* Reset the SMS, TS, ECE, ETPS and ETRF bits */
tmpsmcr = htim->Instance->SMCR;
8004c68: 687b ldr r3, [r7, #4]
8004c6a: 681b ldr r3, [r3, #0]
8004c6c: 689b ldr r3, [r3, #8]
8004c6e: 60bb str r3, [r7, #8]
tmpsmcr &= ~(TIM_SMCR_SMS | TIM_SMCR_TS);
8004c70: 68bb ldr r3, [r7, #8]
8004c72: 4a5a ldr r2, [pc, #360] ; (8004ddc <HAL_TIM_ConfigClockSource+0x1a4>)
8004c74: 4013 ands r3, r2
8004c76: 60bb str r3, [r7, #8]
tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP);
8004c78: 68bb ldr r3, [r7, #8]
8004c7a: 4a59 ldr r2, [pc, #356] ; (8004de0 <HAL_TIM_ConfigClockSource+0x1a8>)
8004c7c: 4013 ands r3, r2
8004c7e: 60bb str r3, [r7, #8]
htim->Instance->SMCR = tmpsmcr;
8004c80: 687b ldr r3, [r7, #4]
8004c82: 681b ldr r3, [r3, #0]
8004c84: 68ba ldr r2, [r7, #8]
8004c86: 609a str r2, [r3, #8]
switch (sClockSourceConfig->ClockSource)
8004c88: 683b ldr r3, [r7, #0]
8004c8a: 681b ldr r3, [r3, #0]
8004c8c: 2280 movs r2, #128 ; 0x80
8004c8e: 0192 lsls r2, r2, #6
8004c90: 4293 cmp r3, r2
8004c92: d040 beq.n 8004d16 <HAL_TIM_ConfigClockSource+0xde>
8004c94: 2280 movs r2, #128 ; 0x80
8004c96: 0192 lsls r2, r2, #6
8004c98: 4293 cmp r3, r2
8004c9a: d900 bls.n 8004c9e <HAL_TIM_ConfigClockSource+0x66>
8004c9c: e088 b.n 8004db0 <HAL_TIM_ConfigClockSource+0x178>
8004c9e: 2280 movs r2, #128 ; 0x80
8004ca0: 0152 lsls r2, r2, #5
8004ca2: 4293 cmp r3, r2
8004ca4: d100 bne.n 8004ca8 <HAL_TIM_ConfigClockSource+0x70>
8004ca6: e088 b.n 8004dba <HAL_TIM_ConfigClockSource+0x182>
8004ca8: 2280 movs r2, #128 ; 0x80
8004caa: 0152 lsls r2, r2, #5
8004cac: 4293 cmp r3, r2
8004cae: d900 bls.n 8004cb2 <HAL_TIM_ConfigClockSource+0x7a>
8004cb0: e07e b.n 8004db0 <HAL_TIM_ConfigClockSource+0x178>
8004cb2: 2b70 cmp r3, #112 ; 0x70
8004cb4: d018 beq.n 8004ce8 <HAL_TIM_ConfigClockSource+0xb0>
8004cb6: d900 bls.n 8004cba <HAL_TIM_ConfigClockSource+0x82>
8004cb8: e07a b.n 8004db0 <HAL_TIM_ConfigClockSource+0x178>
8004cba: 2b60 cmp r3, #96 ; 0x60
8004cbc: d04f beq.n 8004d5e <HAL_TIM_ConfigClockSource+0x126>
8004cbe: d900 bls.n 8004cc2 <HAL_TIM_ConfigClockSource+0x8a>
8004cc0: e076 b.n 8004db0 <HAL_TIM_ConfigClockSource+0x178>
8004cc2: 2b50 cmp r3, #80 ; 0x50
8004cc4: d03b beq.n 8004d3e <HAL_TIM_ConfigClockSource+0x106>
8004cc6: d900 bls.n 8004cca <HAL_TIM_ConfigClockSource+0x92>
8004cc8: e072 b.n 8004db0 <HAL_TIM_ConfigClockSource+0x178>
8004cca: 2b40 cmp r3, #64 ; 0x40
8004ccc: d057 beq.n 8004d7e <HAL_TIM_ConfigClockSource+0x146>
8004cce: d900 bls.n 8004cd2 <HAL_TIM_ConfigClockSource+0x9a>
8004cd0: e06e b.n 8004db0 <HAL_TIM_ConfigClockSource+0x178>
8004cd2: 2b30 cmp r3, #48 ; 0x30
8004cd4: d063 beq.n 8004d9e <HAL_TIM_ConfigClockSource+0x166>
8004cd6: d86b bhi.n 8004db0 <HAL_TIM_ConfigClockSource+0x178>
8004cd8: 2b20 cmp r3, #32
8004cda: d060 beq.n 8004d9e <HAL_TIM_ConfigClockSource+0x166>
8004cdc: d868 bhi.n 8004db0 <HAL_TIM_ConfigClockSource+0x178>
8004cde: 2b00 cmp r3, #0
8004ce0: d05d beq.n 8004d9e <HAL_TIM_ConfigClockSource+0x166>
8004ce2: 2b10 cmp r3, #16
8004ce4: d05b beq.n 8004d9e <HAL_TIM_ConfigClockSource+0x166>
8004ce6: e063 b.n 8004db0 <HAL_TIM_ConfigClockSource+0x178>
assert_param(IS_TIM_CLOCKPRESCALER(sClockSourceConfig->ClockPrescaler));
assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity));
assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter));
/* Configure the ETR Clock source */
TIM_ETR_SetConfig(htim->Instance,
8004ce8: 687b ldr r3, [r7, #4]
8004cea: 6818 ldr r0, [r3, #0]
8004cec: 683b ldr r3, [r7, #0]
8004cee: 6899 ldr r1, [r3, #8]
8004cf0: 683b ldr r3, [r7, #0]
8004cf2: 685a ldr r2, [r3, #4]
8004cf4: 683b ldr r3, [r7, #0]
8004cf6: 68db ldr r3, [r3, #12]
8004cf8: f000 fc22 bl 8005540 <TIM_ETR_SetConfig>
sClockSourceConfig->ClockPrescaler,
sClockSourceConfig->ClockPolarity,
sClockSourceConfig->ClockFilter);
/* Select the External clock mode1 and the ETRF trigger */
tmpsmcr = htim->Instance->SMCR;
8004cfc: 687b ldr r3, [r7, #4]
8004cfe: 681b ldr r3, [r3, #0]
8004d00: 689b ldr r3, [r3, #8]
8004d02: 60bb str r3, [r7, #8]
tmpsmcr |= (TIM_SLAVEMODE_EXTERNAL1 | TIM_CLOCKSOURCE_ETRMODE1);
8004d04: 68bb ldr r3, [r7, #8]
8004d06: 2277 movs r2, #119 ; 0x77
8004d08: 4313 orrs r3, r2
8004d0a: 60bb str r3, [r7, #8]
/* Write to TIMx SMCR */
htim->Instance->SMCR = tmpsmcr;
8004d0c: 687b ldr r3, [r7, #4]
8004d0e: 681b ldr r3, [r3, #0]
8004d10: 68ba ldr r2, [r7, #8]
8004d12: 609a str r2, [r3, #8]
break;
8004d14: e052 b.n 8004dbc <HAL_TIM_ConfigClockSource+0x184>
assert_param(IS_TIM_CLOCKPRESCALER(sClockSourceConfig->ClockPrescaler));
assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity));
assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter));
/* Configure the ETR Clock source */
TIM_ETR_SetConfig(htim->Instance,
8004d16: 687b ldr r3, [r7, #4]
8004d18: 6818 ldr r0, [r3, #0]
8004d1a: 683b ldr r3, [r7, #0]
8004d1c: 6899 ldr r1, [r3, #8]
8004d1e: 683b ldr r3, [r7, #0]
8004d20: 685a ldr r2, [r3, #4]
8004d22: 683b ldr r3, [r7, #0]
8004d24: 68db ldr r3, [r3, #12]
8004d26: f000 fc0b bl 8005540 <TIM_ETR_SetConfig>
sClockSourceConfig->ClockPrescaler,
sClockSourceConfig->ClockPolarity,
sClockSourceConfig->ClockFilter);
/* Enable the External clock mode2 */
htim->Instance->SMCR |= TIM_SMCR_ECE;
8004d2a: 687b ldr r3, [r7, #4]
8004d2c: 681b ldr r3, [r3, #0]
8004d2e: 689a ldr r2, [r3, #8]
8004d30: 687b ldr r3, [r7, #4]
8004d32: 681b ldr r3, [r3, #0]
8004d34: 2180 movs r1, #128 ; 0x80
8004d36: 01c9 lsls r1, r1, #7
8004d38: 430a orrs r2, r1
8004d3a: 609a str r2, [r3, #8]
break;
8004d3c: e03e b.n 8004dbc <HAL_TIM_ConfigClockSource+0x184>
/* Check TI1 input conditioning related parameters */
assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity));
assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter));
TIM_TI1_ConfigInputStage(htim->Instance,
8004d3e: 687b ldr r3, [r7, #4]
8004d40: 6818 ldr r0, [r3, #0]
8004d42: 683b ldr r3, [r7, #0]
8004d44: 6859 ldr r1, [r3, #4]
8004d46: 683b ldr r3, [r7, #0]
8004d48: 68db ldr r3, [r3, #12]
8004d4a: 001a movs r2, r3
8004d4c: f000 fb7c bl 8005448 <TIM_TI1_ConfigInputStage>
sClockSourceConfig->ClockPolarity,
sClockSourceConfig->ClockFilter);
TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI1);
8004d50: 687b ldr r3, [r7, #4]
8004d52: 681b ldr r3, [r3, #0]
8004d54: 2150 movs r1, #80 ; 0x50
8004d56: 0018 movs r0, r3
8004d58: f000 fbd6 bl 8005508 <TIM_ITRx_SetConfig>
break;
8004d5c: e02e b.n 8004dbc <HAL_TIM_ConfigClockSource+0x184>
/* Check TI2 input conditioning related parameters */
assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity));
assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter));
TIM_TI2_ConfigInputStage(htim->Instance,
8004d5e: 687b ldr r3, [r7, #4]
8004d60: 6818 ldr r0, [r3, #0]
8004d62: 683b ldr r3, [r7, #0]
8004d64: 6859 ldr r1, [r3, #4]
8004d66: 683b ldr r3, [r7, #0]
8004d68: 68db ldr r3, [r3, #12]
8004d6a: 001a movs r2, r3
8004d6c: f000 fb9a bl 80054a4 <TIM_TI2_ConfigInputStage>
sClockSourceConfig->ClockPolarity,
sClockSourceConfig->ClockFilter);
TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI2);
8004d70: 687b ldr r3, [r7, #4]
8004d72: 681b ldr r3, [r3, #0]
8004d74: 2160 movs r1, #96 ; 0x60
8004d76: 0018 movs r0, r3
8004d78: f000 fbc6 bl 8005508 <TIM_ITRx_SetConfig>
break;
8004d7c: e01e b.n 8004dbc <HAL_TIM_ConfigClockSource+0x184>
/* Check TI1 input conditioning related parameters */
assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity));
assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter));
TIM_TI1_ConfigInputStage(htim->Instance,
8004d7e: 687b ldr r3, [r7, #4]
8004d80: 6818 ldr r0, [r3, #0]
8004d82: 683b ldr r3, [r7, #0]
8004d84: 6859 ldr r1, [r3, #4]
8004d86: 683b ldr r3, [r7, #0]
8004d88: 68db ldr r3, [r3, #12]
8004d8a: 001a movs r2, r3
8004d8c: f000 fb5c bl 8005448 <TIM_TI1_ConfigInputStage>
sClockSourceConfig->ClockPolarity,
sClockSourceConfig->ClockFilter);
TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI1ED);
8004d90: 687b ldr r3, [r7, #4]
8004d92: 681b ldr r3, [r3, #0]
8004d94: 2140 movs r1, #64 ; 0x40
8004d96: 0018 movs r0, r3
8004d98: f000 fbb6 bl 8005508 <TIM_ITRx_SetConfig>
break;
8004d9c: e00e b.n 8004dbc <HAL_TIM_ConfigClockSource+0x184>
case TIM_CLOCKSOURCE_ITR3:
{
/* Check whether or not the timer instance supports internal trigger input */
assert_param(IS_TIM_CLOCKSOURCE_ITRX_INSTANCE(htim->Instance));
TIM_ITRx_SetConfig(htim->Instance, sClockSourceConfig->ClockSource);
8004d9e: 687b ldr r3, [r7, #4]
8004da0: 681a ldr r2, [r3, #0]
8004da2: 683b ldr r3, [r7, #0]
8004da4: 681b ldr r3, [r3, #0]
8004da6: 0019 movs r1, r3
8004da8: 0010 movs r0, r2
8004daa: f000 fbad bl 8005508 <TIM_ITRx_SetConfig>
break;
8004dae: e005 b.n 8004dbc <HAL_TIM_ConfigClockSource+0x184>
}
default:
status = HAL_ERROR;
8004db0: 230f movs r3, #15
8004db2: 18fb adds r3, r7, r3
8004db4: 2201 movs r2, #1
8004db6: 701a strb r2, [r3, #0]
break;
8004db8: e000 b.n 8004dbc <HAL_TIM_ConfigClockSource+0x184>
break;
8004dba: 46c0 nop ; (mov r8, r8)
}
htim->State = HAL_TIM_STATE_READY;
8004dbc: 687b ldr r3, [r7, #4]
8004dbe: 223d movs r2, #61 ; 0x3d
8004dc0: 2101 movs r1, #1
8004dc2: 5499 strb r1, [r3, r2]
__HAL_UNLOCK(htim);
8004dc4: 687b ldr r3, [r7, #4]
8004dc6: 223c movs r2, #60 ; 0x3c
8004dc8: 2100 movs r1, #0
8004dca: 5499 strb r1, [r3, r2]
return status;
8004dcc: 230f movs r3, #15
8004dce: 18fb adds r3, r7, r3
8004dd0: 781b ldrb r3, [r3, #0]
}
8004dd2: 0018 movs r0, r3
8004dd4: 46bd mov sp, r7
8004dd6: b004 add sp, #16
8004dd8: bd80 pop {r7, pc}
8004dda: 46c0 nop ; (mov r8, r8)
8004ddc: ffceff88 .word 0xffceff88
8004de0: ffff00ff .word 0xffff00ff
08004de4 <HAL_TIM_OC_DelayElapsedCallback>:
* @brief Output Compare callback in non-blocking mode
* @param htim TIM OC handle
* @retval None
*/
__weak void HAL_TIM_OC_DelayElapsedCallback(TIM_HandleTypeDef *htim)
{
8004de4: b580 push {r7, lr}
8004de6: b082 sub sp, #8
8004de8: af00 add r7, sp, #0
8004dea: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIM_OC_DelayElapsedCallback could be implemented in the user file
*/
}
8004dec: 46c0 nop ; (mov r8, r8)
8004dee: 46bd mov sp, r7
8004df0: b002 add sp, #8
8004df2: bd80 pop {r7, pc}
08004df4 <HAL_TIM_IC_CaptureCallback>:
* @brief Input Capture callback in non-blocking mode
* @param htim TIM IC handle
* @retval None
*/
__weak void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim)
{
8004df4: b580 push {r7, lr}
8004df6: b082 sub sp, #8
8004df8: af00 add r7, sp, #0
8004dfa: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIM_IC_CaptureCallback could be implemented in the user file
*/
}
8004dfc: 46c0 nop ; (mov r8, r8)
8004dfe: 46bd mov sp, r7
8004e00: b002 add sp, #8
8004e02: bd80 pop {r7, pc}
08004e04 <HAL_TIM_PWM_PulseFinishedCallback>:
* @brief PWM Pulse finished callback in non-blocking mode
* @param htim TIM handle
* @retval None
*/
__weak void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim)
{
8004e04: b580 push {r7, lr}
8004e06: b082 sub sp, #8
8004e08: af00 add r7, sp, #0
8004e0a: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIM_PWM_PulseFinishedCallback could be implemented in the user file
*/
}
8004e0c: 46c0 nop ; (mov r8, r8)
8004e0e: 46bd mov sp, r7
8004e10: b002 add sp, #8
8004e12: bd80 pop {r7, pc}
08004e14 <HAL_TIM_TriggerCallback>:
* @brief Hall Trigger detection callback in non-blocking mode
* @param htim TIM handle
* @retval None
*/
__weak void HAL_TIM_TriggerCallback(TIM_HandleTypeDef *htim)
{
8004e14: b580 push {r7, lr}
8004e16: b082 sub sp, #8
8004e18: af00 add r7, sp, #0
8004e1a: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIM_TriggerCallback could be implemented in the user file
*/
}
8004e1c: 46c0 nop ; (mov r8, r8)
8004e1e: 46bd mov sp, r7
8004e20: b002 add sp, #8
8004e22: bd80 pop {r7, pc}
08004e24 <TIM_Base_SetConfig>:
* @param TIMx TIM peripheral
* @param Structure TIM Base configuration structure
* @retval None
*/
void TIM_Base_SetConfig(TIM_TypeDef *TIMx, const TIM_Base_InitTypeDef *Structure)
{
8004e24: b580 push {r7, lr}
8004e26: b084 sub sp, #16
8004e28: af00 add r7, sp, #0
8004e2a: 6078 str r0, [r7, #4]
8004e2c: 6039 str r1, [r7, #0]
uint32_t tmpcr1;
tmpcr1 = TIMx->CR1;
8004e2e: 687b ldr r3, [r7, #4]
8004e30: 681b ldr r3, [r3, #0]
8004e32: 60fb str r3, [r7, #12]
/* Set TIM Time Base Unit parameters ---------------------------------------*/
if (IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx))
8004e34: 687b ldr r3, [r7, #4]
8004e36: 4a30 ldr r2, [pc, #192] ; (8004ef8 <TIM_Base_SetConfig+0xd4>)
8004e38: 4293 cmp r3, r2
8004e3a: d008 beq.n 8004e4e <TIM_Base_SetConfig+0x2a>
8004e3c: 687a ldr r2, [r7, #4]
8004e3e: 2380 movs r3, #128 ; 0x80
8004e40: 05db lsls r3, r3, #23
8004e42: 429a cmp r2, r3
8004e44: d003 beq.n 8004e4e <TIM_Base_SetConfig+0x2a>
8004e46: 687b ldr r3, [r7, #4]
8004e48: 4a2c ldr r2, [pc, #176] ; (8004efc <TIM_Base_SetConfig+0xd8>)
8004e4a: 4293 cmp r3, r2
8004e4c: d108 bne.n 8004e60 <TIM_Base_SetConfig+0x3c>
{
/* Select the Counter Mode */
tmpcr1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS);
8004e4e: 68fb ldr r3, [r7, #12]
8004e50: 2270 movs r2, #112 ; 0x70
8004e52: 4393 bics r3, r2
8004e54: 60fb str r3, [r7, #12]
tmpcr1 |= Structure->CounterMode;
8004e56: 683b ldr r3, [r7, #0]
8004e58: 685b ldr r3, [r3, #4]
8004e5a: 68fa ldr r2, [r7, #12]
8004e5c: 4313 orrs r3, r2
8004e5e: 60fb str r3, [r7, #12]
}
if (IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx))
8004e60: 687b ldr r3, [r7, #4]
8004e62: 4a25 ldr r2, [pc, #148] ; (8004ef8 <TIM_Base_SetConfig+0xd4>)
8004e64: 4293 cmp r3, r2
8004e66: d014 beq.n 8004e92 <TIM_Base_SetConfig+0x6e>
8004e68: 687a ldr r2, [r7, #4]
8004e6a: 2380 movs r3, #128 ; 0x80
8004e6c: 05db lsls r3, r3, #23
8004e6e: 429a cmp r2, r3
8004e70: d00f beq.n 8004e92 <TIM_Base_SetConfig+0x6e>
8004e72: 687b ldr r3, [r7, #4]
8004e74: 4a21 ldr r2, [pc, #132] ; (8004efc <TIM_Base_SetConfig+0xd8>)
8004e76: 4293 cmp r3, r2
8004e78: d00b beq.n 8004e92 <TIM_Base_SetConfig+0x6e>
8004e7a: 687b ldr r3, [r7, #4]
8004e7c: 4a20 ldr r2, [pc, #128] ; (8004f00 <TIM_Base_SetConfig+0xdc>)
8004e7e: 4293 cmp r3, r2
8004e80: d007 beq.n 8004e92 <TIM_Base_SetConfig+0x6e>
8004e82: 687b ldr r3, [r7, #4]
8004e84: 4a1f ldr r2, [pc, #124] ; (8004f04 <TIM_Base_SetConfig+0xe0>)
8004e86: 4293 cmp r3, r2
8004e88: d003 beq.n 8004e92 <TIM_Base_SetConfig+0x6e>
8004e8a: 687b ldr r3, [r7, #4]
8004e8c: 4a1e ldr r2, [pc, #120] ; (8004f08 <TIM_Base_SetConfig+0xe4>)
8004e8e: 4293 cmp r3, r2
8004e90: d108 bne.n 8004ea4 <TIM_Base_SetConfig+0x80>
{
/* Set the clock division */
tmpcr1 &= ~TIM_CR1_CKD;
8004e92: 68fb ldr r3, [r7, #12]
8004e94: 4a1d ldr r2, [pc, #116] ; (8004f0c <TIM_Base_SetConfig+0xe8>)
8004e96: 4013 ands r3, r2
8004e98: 60fb str r3, [r7, #12]
tmpcr1 |= (uint32_t)Structure->ClockDivision;
8004e9a: 683b ldr r3, [r7, #0]
8004e9c: 68db ldr r3, [r3, #12]
8004e9e: 68fa ldr r2, [r7, #12]
8004ea0: 4313 orrs r3, r2
8004ea2: 60fb str r3, [r7, #12]
}
/* Set the auto-reload preload */
MODIFY_REG(tmpcr1, TIM_CR1_ARPE, Structure->AutoReloadPreload);
8004ea4: 68fb ldr r3, [r7, #12]
8004ea6: 2280 movs r2, #128 ; 0x80
8004ea8: 4393 bics r3, r2
8004eaa: 001a movs r2, r3
8004eac: 683b ldr r3, [r7, #0]
8004eae: 695b ldr r3, [r3, #20]
8004eb0: 4313 orrs r3, r2
8004eb2: 60fb str r3, [r7, #12]
TIMx->CR1 = tmpcr1;
8004eb4: 687b ldr r3, [r7, #4]
8004eb6: 68fa ldr r2, [r7, #12]
8004eb8: 601a str r2, [r3, #0]
/* Set the Autoreload value */
TIMx->ARR = (uint32_t)Structure->Period ;
8004eba: 683b ldr r3, [r7, #0]
8004ebc: 689a ldr r2, [r3, #8]
8004ebe: 687b ldr r3, [r7, #4]
8004ec0: 62da str r2, [r3, #44] ; 0x2c
/* Set the Prescaler value */
TIMx->PSC = Structure->Prescaler;
8004ec2: 683b ldr r3, [r7, #0]
8004ec4: 681a ldr r2, [r3, #0]
8004ec6: 687b ldr r3, [r7, #4]
8004ec8: 629a str r2, [r3, #40] ; 0x28
if (IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx))
8004eca: 687b ldr r3, [r7, #4]
8004ecc: 4a0a ldr r2, [pc, #40] ; (8004ef8 <TIM_Base_SetConfig+0xd4>)
8004ece: 4293 cmp r3, r2
8004ed0: d007 beq.n 8004ee2 <TIM_Base_SetConfig+0xbe>
8004ed2: 687b ldr r3, [r7, #4]
8004ed4: 4a0b ldr r2, [pc, #44] ; (8004f04 <TIM_Base_SetConfig+0xe0>)
8004ed6: 4293 cmp r3, r2
8004ed8: d003 beq.n 8004ee2 <TIM_Base_SetConfig+0xbe>
8004eda: 687b ldr r3, [r7, #4]
8004edc: 4a0a ldr r2, [pc, #40] ; (8004f08 <TIM_Base_SetConfig+0xe4>)
8004ede: 4293 cmp r3, r2
8004ee0: d103 bne.n 8004eea <TIM_Base_SetConfig+0xc6>
{
/* Set the Repetition Counter value */
TIMx->RCR = Structure->RepetitionCounter;
8004ee2: 683b ldr r3, [r7, #0]
8004ee4: 691a ldr r2, [r3, #16]
8004ee6: 687b ldr r3, [r7, #4]
8004ee8: 631a str r2, [r3, #48] ; 0x30
}
/* Generate an update event to reload the Prescaler
and the repetition counter (only for advanced timer) value immediately */
TIMx->EGR = TIM_EGR_UG;
8004eea: 687b ldr r3, [r7, #4]
8004eec: 2201 movs r2, #1
8004eee: 615a str r2, [r3, #20]
}
8004ef0: 46c0 nop ; (mov r8, r8)
8004ef2: 46bd mov sp, r7
8004ef4: b004 add sp, #16
8004ef6: bd80 pop {r7, pc}
8004ef8: 40012c00 .word 0x40012c00
8004efc: 40000400 .word 0x40000400
8004f00: 40002000 .word 0x40002000
8004f04: 40014400 .word 0x40014400
8004f08: 40014800 .word 0x40014800
8004f0c: fffffcff .word 0xfffffcff
08004f10 <TIM_OC1_SetConfig>:
* @param TIMx to select the TIM peripheral
* @param OC_Config The output configuration structure
* @retval None
*/
static void TIM_OC1_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
{
8004f10: b580 push {r7, lr}
8004f12: b086 sub sp, #24
8004f14: af00 add r7, sp, #0
8004f16: 6078 str r0, [r7, #4]
8004f18: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Disable the Channel 1: Reset the CC1E Bit */
TIMx->CCER &= ~TIM_CCER_CC1E;
8004f1a: 687b ldr r3, [r7, #4]
8004f1c: 6a1b ldr r3, [r3, #32]
8004f1e: 2201 movs r2, #1
8004f20: 4393 bics r3, r2
8004f22: 001a movs r2, r3
8004f24: 687b ldr r3, [r7, #4]
8004f26: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
8004f28: 687b ldr r3, [r7, #4]
8004f2a: 6a1b ldr r3, [r3, #32]
8004f2c: 617b str r3, [r7, #20]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
8004f2e: 687b ldr r3, [r7, #4]
8004f30: 685b ldr r3, [r3, #4]
8004f32: 613b str r3, [r7, #16]
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR1;
8004f34: 687b ldr r3, [r7, #4]
8004f36: 699b ldr r3, [r3, #24]
8004f38: 60fb str r3, [r7, #12]
/* Reset the Output Compare Mode Bits */
tmpccmrx &= ~TIM_CCMR1_OC1M;
8004f3a: 68fb ldr r3, [r7, #12]
8004f3c: 4a2e ldr r2, [pc, #184] ; (8004ff8 <TIM_OC1_SetConfig+0xe8>)
8004f3e: 4013 ands r3, r2
8004f40: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR1_CC1S;
8004f42: 68fb ldr r3, [r7, #12]
8004f44: 2203 movs r2, #3
8004f46: 4393 bics r3, r2
8004f48: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= OC_Config->OCMode;
8004f4a: 683b ldr r3, [r7, #0]
8004f4c: 681b ldr r3, [r3, #0]
8004f4e: 68fa ldr r2, [r7, #12]
8004f50: 4313 orrs r3, r2
8004f52: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC1P;
8004f54: 697b ldr r3, [r7, #20]
8004f56: 2202 movs r2, #2
8004f58: 4393 bics r3, r2
8004f5a: 617b str r3, [r7, #20]
/* Set the Output Compare Polarity */
tmpccer |= OC_Config->OCPolarity;
8004f5c: 683b ldr r3, [r7, #0]
8004f5e: 689b ldr r3, [r3, #8]
8004f60: 697a ldr r2, [r7, #20]
8004f62: 4313 orrs r3, r2
8004f64: 617b str r3, [r7, #20]
if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_1))
8004f66: 687b ldr r3, [r7, #4]
8004f68: 4a24 ldr r2, [pc, #144] ; (8004ffc <TIM_OC1_SetConfig+0xec>)
8004f6a: 4293 cmp r3, r2
8004f6c: d007 beq.n 8004f7e <TIM_OC1_SetConfig+0x6e>
8004f6e: 687b ldr r3, [r7, #4]
8004f70: 4a23 ldr r2, [pc, #140] ; (8005000 <TIM_OC1_SetConfig+0xf0>)
8004f72: 4293 cmp r3, r2
8004f74: d003 beq.n 8004f7e <TIM_OC1_SetConfig+0x6e>
8004f76: 687b ldr r3, [r7, #4]
8004f78: 4a22 ldr r2, [pc, #136] ; (8005004 <TIM_OC1_SetConfig+0xf4>)
8004f7a: 4293 cmp r3, r2
8004f7c: d10c bne.n 8004f98 <TIM_OC1_SetConfig+0x88>
{
/* Check parameters */
assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity));
/* Reset the Output N Polarity level */
tmpccer &= ~TIM_CCER_CC1NP;
8004f7e: 697b ldr r3, [r7, #20]
8004f80: 2208 movs r2, #8
8004f82: 4393 bics r3, r2
8004f84: 617b str r3, [r7, #20]
/* Set the Output N Polarity */
tmpccer |= OC_Config->OCNPolarity;
8004f86: 683b ldr r3, [r7, #0]
8004f88: 68db ldr r3, [r3, #12]
8004f8a: 697a ldr r2, [r7, #20]
8004f8c: 4313 orrs r3, r2
8004f8e: 617b str r3, [r7, #20]
/* Reset the Output N State */
tmpccer &= ~TIM_CCER_CC1NE;
8004f90: 697b ldr r3, [r7, #20]
8004f92: 2204 movs r2, #4
8004f94: 4393 bics r3, r2
8004f96: 617b str r3, [r7, #20]
}
if (IS_TIM_BREAK_INSTANCE(TIMx))
8004f98: 687b ldr r3, [r7, #4]
8004f9a: 4a18 ldr r2, [pc, #96] ; (8004ffc <TIM_OC1_SetConfig+0xec>)
8004f9c: 4293 cmp r3, r2
8004f9e: d007 beq.n 8004fb0 <TIM_OC1_SetConfig+0xa0>
8004fa0: 687b ldr r3, [r7, #4]
8004fa2: 4a17 ldr r2, [pc, #92] ; (8005000 <TIM_OC1_SetConfig+0xf0>)
8004fa4: 4293 cmp r3, r2
8004fa6: d003 beq.n 8004fb0 <TIM_OC1_SetConfig+0xa0>
8004fa8: 687b ldr r3, [r7, #4]
8004faa: 4a16 ldr r2, [pc, #88] ; (8005004 <TIM_OC1_SetConfig+0xf4>)
8004fac: 4293 cmp r3, r2
8004fae: d111 bne.n 8004fd4 <TIM_OC1_SetConfig+0xc4>
/* Check parameters */
assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState));
assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState));
/* Reset the Output Compare and Output Compare N IDLE State */
tmpcr2 &= ~TIM_CR2_OIS1;
8004fb0: 693b ldr r3, [r7, #16]
8004fb2: 4a15 ldr r2, [pc, #84] ; (8005008 <TIM_OC1_SetConfig+0xf8>)
8004fb4: 4013 ands r3, r2
8004fb6: 613b str r3, [r7, #16]
tmpcr2 &= ~TIM_CR2_OIS1N;
8004fb8: 693b ldr r3, [r7, #16]
8004fba: 4a14 ldr r2, [pc, #80] ; (800500c <TIM_OC1_SetConfig+0xfc>)
8004fbc: 4013 ands r3, r2
8004fbe: 613b str r3, [r7, #16]
/* Set the Output Idle state */
tmpcr2 |= OC_Config->OCIdleState;
8004fc0: 683b ldr r3, [r7, #0]
8004fc2: 695b ldr r3, [r3, #20]
8004fc4: 693a ldr r2, [r7, #16]
8004fc6: 4313 orrs r3, r2
8004fc8: 613b str r3, [r7, #16]
/* Set the Output N Idle state */
tmpcr2 |= OC_Config->OCNIdleState;
8004fca: 683b ldr r3, [r7, #0]
8004fcc: 699b ldr r3, [r3, #24]
8004fce: 693a ldr r2, [r7, #16]
8004fd0: 4313 orrs r3, r2
8004fd2: 613b str r3, [r7, #16]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
8004fd4: 687b ldr r3, [r7, #4]
8004fd6: 693a ldr r2, [r7, #16]
8004fd8: 605a str r2, [r3, #4]
/* Write to TIMx CCMR1 */
TIMx->CCMR1 = tmpccmrx;
8004fda: 687b ldr r3, [r7, #4]
8004fdc: 68fa ldr r2, [r7, #12]
8004fde: 619a str r2, [r3, #24]
/* Set the Capture Compare Register value */
TIMx->CCR1 = OC_Config->Pulse;
8004fe0: 683b ldr r3, [r7, #0]
8004fe2: 685a ldr r2, [r3, #4]
8004fe4: 687b ldr r3, [r7, #4]
8004fe6: 635a str r2, [r3, #52] ; 0x34
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
8004fe8: 687b ldr r3, [r7, #4]
8004fea: 697a ldr r2, [r7, #20]
8004fec: 621a str r2, [r3, #32]
}
8004fee: 46c0 nop ; (mov r8, r8)
8004ff0: 46bd mov sp, r7
8004ff2: b006 add sp, #24
8004ff4: bd80 pop {r7, pc}
8004ff6: 46c0 nop ; (mov r8, r8)
8004ff8: fffeff8f .word 0xfffeff8f
8004ffc: 40012c00 .word 0x40012c00
8005000: 40014400 .word 0x40014400
8005004: 40014800 .word 0x40014800
8005008: fffffeff .word 0xfffffeff
800500c: fffffdff .word 0xfffffdff
08005010 <TIM_OC2_SetConfig>:
* @param TIMx to select the TIM peripheral
* @param OC_Config The output configuration structure
* @retval None
*/
void TIM_OC2_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
{
8005010: b580 push {r7, lr}
8005012: b086 sub sp, #24
8005014: af00 add r7, sp, #0
8005016: 6078 str r0, [r7, #4]
8005018: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Disable the Channel 2: Reset the CC2E Bit */
TIMx->CCER &= ~TIM_CCER_CC2E;
800501a: 687b ldr r3, [r7, #4]
800501c: 6a1b ldr r3, [r3, #32]
800501e: 2210 movs r2, #16
8005020: 4393 bics r3, r2
8005022: 001a movs r2, r3
8005024: 687b ldr r3, [r7, #4]
8005026: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
8005028: 687b ldr r3, [r7, #4]
800502a: 6a1b ldr r3, [r3, #32]
800502c: 617b str r3, [r7, #20]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
800502e: 687b ldr r3, [r7, #4]
8005030: 685b ldr r3, [r3, #4]
8005032: 613b str r3, [r7, #16]
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR1;
8005034: 687b ldr r3, [r7, #4]
8005036: 699b ldr r3, [r3, #24]
8005038: 60fb str r3, [r7, #12]
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= ~TIM_CCMR1_OC2M;
800503a: 68fb ldr r3, [r7, #12]
800503c: 4a2c ldr r2, [pc, #176] ; (80050f0 <TIM_OC2_SetConfig+0xe0>)
800503e: 4013 ands r3, r2
8005040: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR1_CC2S;
8005042: 68fb ldr r3, [r7, #12]
8005044: 4a2b ldr r2, [pc, #172] ; (80050f4 <TIM_OC2_SetConfig+0xe4>)
8005046: 4013 ands r3, r2
8005048: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= (OC_Config->OCMode << 8U);
800504a: 683b ldr r3, [r7, #0]
800504c: 681b ldr r3, [r3, #0]
800504e: 021b lsls r3, r3, #8
8005050: 68fa ldr r2, [r7, #12]
8005052: 4313 orrs r3, r2
8005054: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC2P;
8005056: 697b ldr r3, [r7, #20]
8005058: 2220 movs r2, #32
800505a: 4393 bics r3, r2
800505c: 617b str r3, [r7, #20]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 4U);
800505e: 683b ldr r3, [r7, #0]
8005060: 689b ldr r3, [r3, #8]
8005062: 011b lsls r3, r3, #4
8005064: 697a ldr r2, [r7, #20]
8005066: 4313 orrs r3, r2
8005068: 617b str r3, [r7, #20]
if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_2))
800506a: 687b ldr r3, [r7, #4]
800506c: 4a22 ldr r2, [pc, #136] ; (80050f8 <TIM_OC2_SetConfig+0xe8>)
800506e: 4293 cmp r3, r2
8005070: d10d bne.n 800508e <TIM_OC2_SetConfig+0x7e>
{
assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity));
/* Reset the Output N Polarity level */
tmpccer &= ~TIM_CCER_CC2NP;
8005072: 697b ldr r3, [r7, #20]
8005074: 2280 movs r2, #128 ; 0x80
8005076: 4393 bics r3, r2
8005078: 617b str r3, [r7, #20]
/* Set the Output N Polarity */
tmpccer |= (OC_Config->OCNPolarity << 4U);
800507a: 683b ldr r3, [r7, #0]
800507c: 68db ldr r3, [r3, #12]
800507e: 011b lsls r3, r3, #4
8005080: 697a ldr r2, [r7, #20]
8005082: 4313 orrs r3, r2
8005084: 617b str r3, [r7, #20]
/* Reset the Output N State */
tmpccer &= ~TIM_CCER_CC2NE;
8005086: 697b ldr r3, [r7, #20]
8005088: 2240 movs r2, #64 ; 0x40
800508a: 4393 bics r3, r2
800508c: 617b str r3, [r7, #20]
}
if (IS_TIM_BREAK_INSTANCE(TIMx))
800508e: 687b ldr r3, [r7, #4]
8005090: 4a19 ldr r2, [pc, #100] ; (80050f8 <TIM_OC2_SetConfig+0xe8>)
8005092: 4293 cmp r3, r2
8005094: d007 beq.n 80050a6 <TIM_OC2_SetConfig+0x96>
8005096: 687b ldr r3, [r7, #4]
8005098: 4a18 ldr r2, [pc, #96] ; (80050fc <TIM_OC2_SetConfig+0xec>)
800509a: 4293 cmp r3, r2
800509c: d003 beq.n 80050a6 <TIM_OC2_SetConfig+0x96>
800509e: 687b ldr r3, [r7, #4]
80050a0: 4a17 ldr r2, [pc, #92] ; (8005100 <TIM_OC2_SetConfig+0xf0>)
80050a2: 4293 cmp r3, r2
80050a4: d113 bne.n 80050ce <TIM_OC2_SetConfig+0xbe>
/* Check parameters */
assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState));
assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState));
/* Reset the Output Compare and Output Compare N IDLE State */
tmpcr2 &= ~TIM_CR2_OIS2;
80050a6: 693b ldr r3, [r7, #16]
80050a8: 4a16 ldr r2, [pc, #88] ; (8005104 <TIM_OC2_SetConfig+0xf4>)
80050aa: 4013 ands r3, r2
80050ac: 613b str r3, [r7, #16]
tmpcr2 &= ~TIM_CR2_OIS2N;
80050ae: 693b ldr r3, [r7, #16]
80050b0: 4a15 ldr r2, [pc, #84] ; (8005108 <TIM_OC2_SetConfig+0xf8>)
80050b2: 4013 ands r3, r2
80050b4: 613b str r3, [r7, #16]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 2U);
80050b6: 683b ldr r3, [r7, #0]
80050b8: 695b ldr r3, [r3, #20]
80050ba: 009b lsls r3, r3, #2
80050bc: 693a ldr r2, [r7, #16]
80050be: 4313 orrs r3, r2
80050c0: 613b str r3, [r7, #16]
/* Set the Output N Idle state */
tmpcr2 |= (OC_Config->OCNIdleState << 2U);
80050c2: 683b ldr r3, [r7, #0]
80050c4: 699b ldr r3, [r3, #24]
80050c6: 009b lsls r3, r3, #2
80050c8: 693a ldr r2, [r7, #16]
80050ca: 4313 orrs r3, r2
80050cc: 613b str r3, [r7, #16]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
80050ce: 687b ldr r3, [r7, #4]
80050d0: 693a ldr r2, [r7, #16]
80050d2: 605a str r2, [r3, #4]
/* Write to TIMx CCMR1 */
TIMx->CCMR1 = tmpccmrx;
80050d4: 687b ldr r3, [r7, #4]
80050d6: 68fa ldr r2, [r7, #12]
80050d8: 619a str r2, [r3, #24]
/* Set the Capture Compare Register value */
TIMx->CCR2 = OC_Config->Pulse;
80050da: 683b ldr r3, [r7, #0]
80050dc: 685a ldr r2, [r3, #4]
80050de: 687b ldr r3, [r7, #4]
80050e0: 639a str r2, [r3, #56] ; 0x38
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
80050e2: 687b ldr r3, [r7, #4]
80050e4: 697a ldr r2, [r7, #20]
80050e6: 621a str r2, [r3, #32]
}
80050e8: 46c0 nop ; (mov r8, r8)
80050ea: 46bd mov sp, r7
80050ec: b006 add sp, #24
80050ee: bd80 pop {r7, pc}
80050f0: feff8fff .word 0xfeff8fff
80050f4: fffffcff .word 0xfffffcff
80050f8: 40012c00 .word 0x40012c00
80050fc: 40014400 .word 0x40014400
8005100: 40014800 .word 0x40014800
8005104: fffffbff .word 0xfffffbff
8005108: fffff7ff .word 0xfffff7ff
0800510c <TIM_OC3_SetConfig>:
* @param TIMx to select the TIM peripheral
* @param OC_Config The output configuration structure
* @retval None
*/
static void TIM_OC3_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
{
800510c: b580 push {r7, lr}
800510e: b086 sub sp, #24
8005110: af00 add r7, sp, #0
8005112: 6078 str r0, [r7, #4]
8005114: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Disable the Channel 3: Reset the CC2E Bit */
TIMx->CCER &= ~TIM_CCER_CC3E;
8005116: 687b ldr r3, [r7, #4]
8005118: 6a1b ldr r3, [r3, #32]
800511a: 4a33 ldr r2, [pc, #204] ; (80051e8 <TIM_OC3_SetConfig+0xdc>)
800511c: 401a ands r2, r3
800511e: 687b ldr r3, [r7, #4]
8005120: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
8005122: 687b ldr r3, [r7, #4]
8005124: 6a1b ldr r3, [r3, #32]
8005126: 617b str r3, [r7, #20]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
8005128: 687b ldr r3, [r7, #4]
800512a: 685b ldr r3, [r3, #4]
800512c: 613b str r3, [r7, #16]
/* Get the TIMx CCMR2 register value */
tmpccmrx = TIMx->CCMR2;
800512e: 687b ldr r3, [r7, #4]
8005130: 69db ldr r3, [r3, #28]
8005132: 60fb str r3, [r7, #12]
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= ~TIM_CCMR2_OC3M;
8005134: 68fb ldr r3, [r7, #12]
8005136: 4a2d ldr r2, [pc, #180] ; (80051ec <TIM_OC3_SetConfig+0xe0>)
8005138: 4013 ands r3, r2
800513a: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR2_CC3S;
800513c: 68fb ldr r3, [r7, #12]
800513e: 2203 movs r2, #3
8005140: 4393 bics r3, r2
8005142: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= OC_Config->OCMode;
8005144: 683b ldr r3, [r7, #0]
8005146: 681b ldr r3, [r3, #0]
8005148: 68fa ldr r2, [r7, #12]
800514a: 4313 orrs r3, r2
800514c: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC3P;
800514e: 697b ldr r3, [r7, #20]
8005150: 4a27 ldr r2, [pc, #156] ; (80051f0 <TIM_OC3_SetConfig+0xe4>)
8005152: 4013 ands r3, r2
8005154: 617b str r3, [r7, #20]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 8U);
8005156: 683b ldr r3, [r7, #0]
8005158: 689b ldr r3, [r3, #8]
800515a: 021b lsls r3, r3, #8
800515c: 697a ldr r2, [r7, #20]
800515e: 4313 orrs r3, r2
8005160: 617b str r3, [r7, #20]
if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_3))
8005162: 687b ldr r3, [r7, #4]
8005164: 4a23 ldr r2, [pc, #140] ; (80051f4 <TIM_OC3_SetConfig+0xe8>)
8005166: 4293 cmp r3, r2
8005168: d10d bne.n 8005186 <TIM_OC3_SetConfig+0x7a>
{
assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity));
/* Reset the Output N Polarity level */
tmpccer &= ~TIM_CCER_CC3NP;
800516a: 697b ldr r3, [r7, #20]
800516c: 4a22 ldr r2, [pc, #136] ; (80051f8 <TIM_OC3_SetConfig+0xec>)
800516e: 4013 ands r3, r2
8005170: 617b str r3, [r7, #20]
/* Set the Output N Polarity */
tmpccer |= (OC_Config->OCNPolarity << 8U);
8005172: 683b ldr r3, [r7, #0]
8005174: 68db ldr r3, [r3, #12]
8005176: 021b lsls r3, r3, #8
8005178: 697a ldr r2, [r7, #20]
800517a: 4313 orrs r3, r2
800517c: 617b str r3, [r7, #20]
/* Reset the Output N State */
tmpccer &= ~TIM_CCER_CC3NE;
800517e: 697b ldr r3, [r7, #20]
8005180: 4a1e ldr r2, [pc, #120] ; (80051fc <TIM_OC3_SetConfig+0xf0>)
8005182: 4013 ands r3, r2
8005184: 617b str r3, [r7, #20]
}
if (IS_TIM_BREAK_INSTANCE(TIMx))
8005186: 687b ldr r3, [r7, #4]
8005188: 4a1a ldr r2, [pc, #104] ; (80051f4 <TIM_OC3_SetConfig+0xe8>)
800518a: 4293 cmp r3, r2
800518c: d007 beq.n 800519e <TIM_OC3_SetConfig+0x92>
800518e: 687b ldr r3, [r7, #4]
8005190: 4a1b ldr r2, [pc, #108] ; (8005200 <TIM_OC3_SetConfig+0xf4>)
8005192: 4293 cmp r3, r2
8005194: d003 beq.n 800519e <TIM_OC3_SetConfig+0x92>
8005196: 687b ldr r3, [r7, #4]
8005198: 4a1a ldr r2, [pc, #104] ; (8005204 <TIM_OC3_SetConfig+0xf8>)
800519a: 4293 cmp r3, r2
800519c: d113 bne.n 80051c6 <TIM_OC3_SetConfig+0xba>
/* Check parameters */
assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState));
assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState));
/* Reset the Output Compare and Output Compare N IDLE State */
tmpcr2 &= ~TIM_CR2_OIS3;
800519e: 693b ldr r3, [r7, #16]
80051a0: 4a19 ldr r2, [pc, #100] ; (8005208 <TIM_OC3_SetConfig+0xfc>)
80051a2: 4013 ands r3, r2
80051a4: 613b str r3, [r7, #16]
tmpcr2 &= ~TIM_CR2_OIS3N;
80051a6: 693b ldr r3, [r7, #16]
80051a8: 4a18 ldr r2, [pc, #96] ; (800520c <TIM_OC3_SetConfig+0x100>)
80051aa: 4013 ands r3, r2
80051ac: 613b str r3, [r7, #16]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 4U);
80051ae: 683b ldr r3, [r7, #0]
80051b0: 695b ldr r3, [r3, #20]
80051b2: 011b lsls r3, r3, #4
80051b4: 693a ldr r2, [r7, #16]
80051b6: 4313 orrs r3, r2
80051b8: 613b str r3, [r7, #16]
/* Set the Output N Idle state */
tmpcr2 |= (OC_Config->OCNIdleState << 4U);
80051ba: 683b ldr r3, [r7, #0]
80051bc: 699b ldr r3, [r3, #24]
80051be: 011b lsls r3, r3, #4
80051c0: 693a ldr r2, [r7, #16]
80051c2: 4313 orrs r3, r2
80051c4: 613b str r3, [r7, #16]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
80051c6: 687b ldr r3, [r7, #4]
80051c8: 693a ldr r2, [r7, #16]
80051ca: 605a str r2, [r3, #4]
/* Write to TIMx CCMR2 */
TIMx->CCMR2 = tmpccmrx;
80051cc: 687b ldr r3, [r7, #4]
80051ce: 68fa ldr r2, [r7, #12]
80051d0: 61da str r2, [r3, #28]
/* Set the Capture Compare Register value */
TIMx->CCR3 = OC_Config->Pulse;
80051d2: 683b ldr r3, [r7, #0]
80051d4: 685a ldr r2, [r3, #4]
80051d6: 687b ldr r3, [r7, #4]
80051d8: 63da str r2, [r3, #60] ; 0x3c
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
80051da: 687b ldr r3, [r7, #4]
80051dc: 697a ldr r2, [r7, #20]
80051de: 621a str r2, [r3, #32]
}
80051e0: 46c0 nop ; (mov r8, r8)
80051e2: 46bd mov sp, r7
80051e4: b006 add sp, #24
80051e6: bd80 pop {r7, pc}
80051e8: fffffeff .word 0xfffffeff
80051ec: fffeff8f .word 0xfffeff8f
80051f0: fffffdff .word 0xfffffdff
80051f4: 40012c00 .word 0x40012c00
80051f8: fffff7ff .word 0xfffff7ff
80051fc: fffffbff .word 0xfffffbff
8005200: 40014400 .word 0x40014400
8005204: 40014800 .word 0x40014800
8005208: ffffefff .word 0xffffefff
800520c: ffffdfff .word 0xffffdfff
08005210 <TIM_OC4_SetConfig>:
* @param TIMx to select the TIM peripheral
* @param OC_Config The output configuration structure
* @retval None
*/
static void TIM_OC4_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
{
8005210: b580 push {r7, lr}
8005212: b086 sub sp, #24
8005214: af00 add r7, sp, #0
8005216: 6078 str r0, [r7, #4]
8005218: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Disable the Channel 4: Reset the CC4E Bit */
TIMx->CCER &= ~TIM_CCER_CC4E;
800521a: 687b ldr r3, [r7, #4]
800521c: 6a1b ldr r3, [r3, #32]
800521e: 4a26 ldr r2, [pc, #152] ; (80052b8 <TIM_OC4_SetConfig+0xa8>)
8005220: 401a ands r2, r3
8005222: 687b ldr r3, [r7, #4]
8005224: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
8005226: 687b ldr r3, [r7, #4]
8005228: 6a1b ldr r3, [r3, #32]
800522a: 613b str r3, [r7, #16]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
800522c: 687b ldr r3, [r7, #4]
800522e: 685b ldr r3, [r3, #4]
8005230: 617b str r3, [r7, #20]
/* Get the TIMx CCMR2 register value */
tmpccmrx = TIMx->CCMR2;
8005232: 687b ldr r3, [r7, #4]
8005234: 69db ldr r3, [r3, #28]
8005236: 60fb str r3, [r7, #12]
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= ~TIM_CCMR2_OC4M;
8005238: 68fb ldr r3, [r7, #12]
800523a: 4a20 ldr r2, [pc, #128] ; (80052bc <TIM_OC4_SetConfig+0xac>)
800523c: 4013 ands r3, r2
800523e: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR2_CC4S;
8005240: 68fb ldr r3, [r7, #12]
8005242: 4a1f ldr r2, [pc, #124] ; (80052c0 <TIM_OC4_SetConfig+0xb0>)
8005244: 4013 ands r3, r2
8005246: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= (OC_Config->OCMode << 8U);
8005248: 683b ldr r3, [r7, #0]
800524a: 681b ldr r3, [r3, #0]
800524c: 021b lsls r3, r3, #8
800524e: 68fa ldr r2, [r7, #12]
8005250: 4313 orrs r3, r2
8005252: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC4P;
8005254: 693b ldr r3, [r7, #16]
8005256: 4a1b ldr r2, [pc, #108] ; (80052c4 <TIM_OC4_SetConfig+0xb4>)
8005258: 4013 ands r3, r2
800525a: 613b str r3, [r7, #16]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 12U);
800525c: 683b ldr r3, [r7, #0]
800525e: 689b ldr r3, [r3, #8]
8005260: 031b lsls r3, r3, #12
8005262: 693a ldr r2, [r7, #16]
8005264: 4313 orrs r3, r2
8005266: 613b str r3, [r7, #16]
if (IS_TIM_BREAK_INSTANCE(TIMx))
8005268: 687b ldr r3, [r7, #4]
800526a: 4a17 ldr r2, [pc, #92] ; (80052c8 <TIM_OC4_SetConfig+0xb8>)
800526c: 4293 cmp r3, r2
800526e: d007 beq.n 8005280 <TIM_OC4_SetConfig+0x70>
8005270: 687b ldr r3, [r7, #4]
8005272: 4a16 ldr r2, [pc, #88] ; (80052cc <TIM_OC4_SetConfig+0xbc>)
8005274: 4293 cmp r3, r2
8005276: d003 beq.n 8005280 <TIM_OC4_SetConfig+0x70>
8005278: 687b ldr r3, [r7, #4]
800527a: 4a15 ldr r2, [pc, #84] ; (80052d0 <TIM_OC4_SetConfig+0xc0>)
800527c: 4293 cmp r3, r2
800527e: d109 bne.n 8005294 <TIM_OC4_SetConfig+0x84>
{
/* Check parameters */
assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState));
/* Reset the Output Compare IDLE State */
tmpcr2 &= ~TIM_CR2_OIS4;
8005280: 697b ldr r3, [r7, #20]
8005282: 4a14 ldr r2, [pc, #80] ; (80052d4 <TIM_OC4_SetConfig+0xc4>)
8005284: 4013 ands r3, r2
8005286: 617b str r3, [r7, #20]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 6U);
8005288: 683b ldr r3, [r7, #0]
800528a: 695b ldr r3, [r3, #20]
800528c: 019b lsls r3, r3, #6
800528e: 697a ldr r2, [r7, #20]
8005290: 4313 orrs r3, r2
8005292: 617b str r3, [r7, #20]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
8005294: 687b ldr r3, [r7, #4]
8005296: 697a ldr r2, [r7, #20]
8005298: 605a str r2, [r3, #4]
/* Write to TIMx CCMR2 */
TIMx->CCMR2 = tmpccmrx;
800529a: 687b ldr r3, [r7, #4]
800529c: 68fa ldr r2, [r7, #12]
800529e: 61da str r2, [r3, #28]
/* Set the Capture Compare Register value */
TIMx->CCR4 = OC_Config->Pulse;
80052a0: 683b ldr r3, [r7, #0]
80052a2: 685a ldr r2, [r3, #4]
80052a4: 687b ldr r3, [r7, #4]
80052a6: 641a str r2, [r3, #64] ; 0x40
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
80052a8: 687b ldr r3, [r7, #4]
80052aa: 693a ldr r2, [r7, #16]
80052ac: 621a str r2, [r3, #32]
}
80052ae: 46c0 nop ; (mov r8, r8)
80052b0: 46bd mov sp, r7
80052b2: b006 add sp, #24
80052b4: bd80 pop {r7, pc}
80052b6: 46c0 nop ; (mov r8, r8)
80052b8: ffffefff .word 0xffffefff
80052bc: feff8fff .word 0xfeff8fff
80052c0: fffffcff .word 0xfffffcff
80052c4: ffffdfff .word 0xffffdfff
80052c8: 40012c00 .word 0x40012c00
80052cc: 40014400 .word 0x40014400
80052d0: 40014800 .word 0x40014800
80052d4: ffffbfff .word 0xffffbfff
080052d8 <TIM_OC5_SetConfig>:
* @param OC_Config The output configuration structure
* @retval None
*/
static void TIM_OC5_SetConfig(TIM_TypeDef *TIMx,
const TIM_OC_InitTypeDef *OC_Config)
{
80052d8: b580 push {r7, lr}
80052da: b086 sub sp, #24
80052dc: af00 add r7, sp, #0
80052de: 6078 str r0, [r7, #4]
80052e0: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Disable the output: Reset the CCxE Bit */
TIMx->CCER &= ~TIM_CCER_CC5E;
80052e2: 687b ldr r3, [r7, #4]
80052e4: 6a1b ldr r3, [r3, #32]
80052e6: 4a23 ldr r2, [pc, #140] ; (8005374 <TIM_OC5_SetConfig+0x9c>)
80052e8: 401a ands r2, r3
80052ea: 687b ldr r3, [r7, #4]
80052ec: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
80052ee: 687b ldr r3, [r7, #4]
80052f0: 6a1b ldr r3, [r3, #32]
80052f2: 613b str r3, [r7, #16]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
80052f4: 687b ldr r3, [r7, #4]
80052f6: 685b ldr r3, [r3, #4]
80052f8: 617b str r3, [r7, #20]
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR3;
80052fa: 687b ldr r3, [r7, #4]
80052fc: 6d5b ldr r3, [r3, #84] ; 0x54
80052fe: 60fb str r3, [r7, #12]
/* Reset the Output Compare Mode Bits */
tmpccmrx &= ~(TIM_CCMR3_OC5M);
8005300: 68fb ldr r3, [r7, #12]
8005302: 4a1d ldr r2, [pc, #116] ; (8005378 <TIM_OC5_SetConfig+0xa0>)
8005304: 4013 ands r3, r2
8005306: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= OC_Config->OCMode;
8005308: 683b ldr r3, [r7, #0]
800530a: 681b ldr r3, [r3, #0]
800530c: 68fa ldr r2, [r7, #12]
800530e: 4313 orrs r3, r2
8005310: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC5P;
8005312: 693b ldr r3, [r7, #16]
8005314: 4a19 ldr r2, [pc, #100] ; (800537c <TIM_OC5_SetConfig+0xa4>)
8005316: 4013 ands r3, r2
8005318: 613b str r3, [r7, #16]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 16U);
800531a: 683b ldr r3, [r7, #0]
800531c: 689b ldr r3, [r3, #8]
800531e: 041b lsls r3, r3, #16
8005320: 693a ldr r2, [r7, #16]
8005322: 4313 orrs r3, r2
8005324: 613b str r3, [r7, #16]
if (IS_TIM_BREAK_INSTANCE(TIMx))
8005326: 687b ldr r3, [r7, #4]
8005328: 4a15 ldr r2, [pc, #84] ; (8005380 <TIM_OC5_SetConfig+0xa8>)
800532a: 4293 cmp r3, r2
800532c: d007 beq.n 800533e <TIM_OC5_SetConfig+0x66>
800532e: 687b ldr r3, [r7, #4]
8005330: 4a14 ldr r2, [pc, #80] ; (8005384 <TIM_OC5_SetConfig+0xac>)
8005332: 4293 cmp r3, r2
8005334: d003 beq.n 800533e <TIM_OC5_SetConfig+0x66>
8005336: 687b ldr r3, [r7, #4]
8005338: 4a13 ldr r2, [pc, #76] ; (8005388 <TIM_OC5_SetConfig+0xb0>)
800533a: 4293 cmp r3, r2
800533c: d109 bne.n 8005352 <TIM_OC5_SetConfig+0x7a>
{
/* Reset the Output Compare IDLE State */
tmpcr2 &= ~TIM_CR2_OIS5;
800533e: 697b ldr r3, [r7, #20]
8005340: 4a0c ldr r2, [pc, #48] ; (8005374 <TIM_OC5_SetConfig+0x9c>)
8005342: 4013 ands r3, r2
8005344: 617b str r3, [r7, #20]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 8U);
8005346: 683b ldr r3, [r7, #0]
8005348: 695b ldr r3, [r3, #20]
800534a: 021b lsls r3, r3, #8
800534c: 697a ldr r2, [r7, #20]
800534e: 4313 orrs r3, r2
8005350: 617b str r3, [r7, #20]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
8005352: 687b ldr r3, [r7, #4]
8005354: 697a ldr r2, [r7, #20]
8005356: 605a str r2, [r3, #4]
/* Write to TIMx CCMR3 */
TIMx->CCMR3 = tmpccmrx;
8005358: 687b ldr r3, [r7, #4]
800535a: 68fa ldr r2, [r7, #12]
800535c: 655a str r2, [r3, #84] ; 0x54
/* Set the Capture Compare Register value */
TIMx->CCR5 = OC_Config->Pulse;
800535e: 683b ldr r3, [r7, #0]
8005360: 685a ldr r2, [r3, #4]
8005362: 687b ldr r3, [r7, #4]
8005364: 659a str r2, [r3, #88] ; 0x58
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
8005366: 687b ldr r3, [r7, #4]
8005368: 693a ldr r2, [r7, #16]
800536a: 621a str r2, [r3, #32]
}
800536c: 46c0 nop ; (mov r8, r8)
800536e: 46bd mov sp, r7
8005370: b006 add sp, #24
8005372: bd80 pop {r7, pc}
8005374: fffeffff .word 0xfffeffff
8005378: fffeff8f .word 0xfffeff8f
800537c: fffdffff .word 0xfffdffff
8005380: 40012c00 .word 0x40012c00
8005384: 40014400 .word 0x40014400
8005388: 40014800 .word 0x40014800
0800538c <TIM_OC6_SetConfig>:
* @param OC_Config The output configuration structure
* @retval None
*/
static void TIM_OC6_SetConfig(TIM_TypeDef *TIMx,
const TIM_OC_InitTypeDef *OC_Config)
{
800538c: b580 push {r7, lr}
800538e: b086 sub sp, #24
8005390: af00 add r7, sp, #0
8005392: 6078 str r0, [r7, #4]
8005394: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Disable the output: Reset the CCxE Bit */
TIMx->CCER &= ~TIM_CCER_CC6E;
8005396: 687b ldr r3, [r7, #4]
8005398: 6a1b ldr r3, [r3, #32]
800539a: 4a24 ldr r2, [pc, #144] ; (800542c <TIM_OC6_SetConfig+0xa0>)
800539c: 401a ands r2, r3
800539e: 687b ldr r3, [r7, #4]
80053a0: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
80053a2: 687b ldr r3, [r7, #4]
80053a4: 6a1b ldr r3, [r3, #32]
80053a6: 613b str r3, [r7, #16]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
80053a8: 687b ldr r3, [r7, #4]
80053aa: 685b ldr r3, [r3, #4]
80053ac: 617b str r3, [r7, #20]
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR3;
80053ae: 687b ldr r3, [r7, #4]
80053b0: 6d5b ldr r3, [r3, #84] ; 0x54
80053b2: 60fb str r3, [r7, #12]
/* Reset the Output Compare Mode Bits */
tmpccmrx &= ~(TIM_CCMR3_OC6M);
80053b4: 68fb ldr r3, [r7, #12]
80053b6: 4a1e ldr r2, [pc, #120] ; (8005430 <TIM_OC6_SetConfig+0xa4>)
80053b8: 4013 ands r3, r2
80053ba: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= (OC_Config->OCMode << 8U);
80053bc: 683b ldr r3, [r7, #0]
80053be: 681b ldr r3, [r3, #0]
80053c0: 021b lsls r3, r3, #8
80053c2: 68fa ldr r2, [r7, #12]
80053c4: 4313 orrs r3, r2
80053c6: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= (uint32_t)~TIM_CCER_CC6P;
80053c8: 693b ldr r3, [r7, #16]
80053ca: 4a1a ldr r2, [pc, #104] ; (8005434 <TIM_OC6_SetConfig+0xa8>)
80053cc: 4013 ands r3, r2
80053ce: 613b str r3, [r7, #16]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 20U);
80053d0: 683b ldr r3, [r7, #0]
80053d2: 689b ldr r3, [r3, #8]
80053d4: 051b lsls r3, r3, #20
80053d6: 693a ldr r2, [r7, #16]
80053d8: 4313 orrs r3, r2
80053da: 613b str r3, [r7, #16]
if (IS_TIM_BREAK_INSTANCE(TIMx))
80053dc: 687b ldr r3, [r7, #4]
80053de: 4a16 ldr r2, [pc, #88] ; (8005438 <TIM_OC6_SetConfig+0xac>)
80053e0: 4293 cmp r3, r2
80053e2: d007 beq.n 80053f4 <TIM_OC6_SetConfig+0x68>
80053e4: 687b ldr r3, [r7, #4]
80053e6: 4a15 ldr r2, [pc, #84] ; (800543c <TIM_OC6_SetConfig+0xb0>)
80053e8: 4293 cmp r3, r2
80053ea: d003 beq.n 80053f4 <TIM_OC6_SetConfig+0x68>
80053ec: 687b ldr r3, [r7, #4]
80053ee: 4a14 ldr r2, [pc, #80] ; (8005440 <TIM_OC6_SetConfig+0xb4>)
80053f0: 4293 cmp r3, r2
80053f2: d109 bne.n 8005408 <TIM_OC6_SetConfig+0x7c>
{
/* Reset the Output Compare IDLE State */
tmpcr2 &= ~TIM_CR2_OIS6;
80053f4: 697b ldr r3, [r7, #20]
80053f6: 4a13 ldr r2, [pc, #76] ; (8005444 <TIM_OC6_SetConfig+0xb8>)
80053f8: 4013 ands r3, r2
80053fa: 617b str r3, [r7, #20]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 10U);
80053fc: 683b ldr r3, [r7, #0]
80053fe: 695b ldr r3, [r3, #20]
8005400: 029b lsls r3, r3, #10
8005402: 697a ldr r2, [r7, #20]
8005404: 4313 orrs r3, r2
8005406: 617b str r3, [r7, #20]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
8005408: 687b ldr r3, [r7, #4]
800540a: 697a ldr r2, [r7, #20]
800540c: 605a str r2, [r3, #4]
/* Write to TIMx CCMR3 */
TIMx->CCMR3 = tmpccmrx;
800540e: 687b ldr r3, [r7, #4]
8005410: 68fa ldr r2, [r7, #12]
8005412: 655a str r2, [r3, #84] ; 0x54
/* Set the Capture Compare Register value */
TIMx->CCR6 = OC_Config->Pulse;
8005414: 683b ldr r3, [r7, #0]
8005416: 685a ldr r2, [r3, #4]
8005418: 687b ldr r3, [r7, #4]
800541a: 65da str r2, [r3, #92] ; 0x5c
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
800541c: 687b ldr r3, [r7, #4]
800541e: 693a ldr r2, [r7, #16]
8005420: 621a str r2, [r3, #32]
}
8005422: 46c0 nop ; (mov r8, r8)
8005424: 46bd mov sp, r7
8005426: b006 add sp, #24
8005428: bd80 pop {r7, pc}
800542a: 46c0 nop ; (mov r8, r8)
800542c: ffefffff .word 0xffefffff
8005430: feff8fff .word 0xfeff8fff
8005434: ffdfffff .word 0xffdfffff
8005438: 40012c00 .word 0x40012c00
800543c: 40014400 .word 0x40014400
8005440: 40014800 .word 0x40014800
8005444: fffbffff .word 0xfffbffff
08005448 <TIM_TI1_ConfigInputStage>:
* @param TIM_ICFilter Specifies the Input Capture Filter.
* This parameter must be a value between 0x00 and 0x0F.
* @retval None
*/
static void TIM_TI1_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter)
{
8005448: b580 push {r7, lr}
800544a: b086 sub sp, #24
800544c: af00 add r7, sp, #0
800544e: 60f8 str r0, [r7, #12]
8005450: 60b9 str r1, [r7, #8]
8005452: 607a str r2, [r7, #4]
uint32_t tmpccmr1;
uint32_t tmpccer;
/* Disable the Channel 1: Reset the CC1E Bit */
tmpccer = TIMx->CCER;
8005454: 68fb ldr r3, [r7, #12]
8005456: 6a1b ldr r3, [r3, #32]
8005458: 617b str r3, [r7, #20]
TIMx->CCER &= ~TIM_CCER_CC1E;
800545a: 68fb ldr r3, [r7, #12]
800545c: 6a1b ldr r3, [r3, #32]
800545e: 2201 movs r2, #1
8005460: 4393 bics r3, r2
8005462: 001a movs r2, r3
8005464: 68fb ldr r3, [r7, #12]
8005466: 621a str r2, [r3, #32]
tmpccmr1 = TIMx->CCMR1;
8005468: 68fb ldr r3, [r7, #12]
800546a: 699b ldr r3, [r3, #24]
800546c: 613b str r3, [r7, #16]
/* Set the filter */
tmpccmr1 &= ~TIM_CCMR1_IC1F;
800546e: 693b ldr r3, [r7, #16]
8005470: 22f0 movs r2, #240 ; 0xf0
8005472: 4393 bics r3, r2
8005474: 613b str r3, [r7, #16]
tmpccmr1 |= (TIM_ICFilter << 4U);
8005476: 687b ldr r3, [r7, #4]
8005478: 011b lsls r3, r3, #4
800547a: 693a ldr r2, [r7, #16]
800547c: 4313 orrs r3, r2
800547e: 613b str r3, [r7, #16]
/* Select the Polarity and set the CC1E Bit */
tmpccer &= ~(TIM_CCER_CC1P | TIM_CCER_CC1NP);
8005480: 697b ldr r3, [r7, #20]
8005482: 220a movs r2, #10
8005484: 4393 bics r3, r2
8005486: 617b str r3, [r7, #20]
tmpccer |= TIM_ICPolarity;
8005488: 697a ldr r2, [r7, #20]
800548a: 68bb ldr r3, [r7, #8]
800548c: 4313 orrs r3, r2
800548e: 617b str r3, [r7, #20]
/* Write to TIMx CCMR1 and CCER registers */
TIMx->CCMR1 = tmpccmr1;
8005490: 68fb ldr r3, [r7, #12]
8005492: 693a ldr r2, [r7, #16]
8005494: 619a str r2, [r3, #24]
TIMx->CCER = tmpccer;
8005496: 68fb ldr r3, [r7, #12]
8005498: 697a ldr r2, [r7, #20]
800549a: 621a str r2, [r3, #32]
}
800549c: 46c0 nop ; (mov r8, r8)
800549e: 46bd mov sp, r7
80054a0: b006 add sp, #24
80054a2: bd80 pop {r7, pc}
080054a4 <TIM_TI2_ConfigInputStage>:
* @param TIM_ICFilter Specifies the Input Capture Filter.
* This parameter must be a value between 0x00 and 0x0F.
* @retval None
*/
static void TIM_TI2_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter)
{
80054a4: b580 push {r7, lr}
80054a6: b086 sub sp, #24
80054a8: af00 add r7, sp, #0
80054aa: 60f8 str r0, [r7, #12]
80054ac: 60b9 str r1, [r7, #8]
80054ae: 607a str r2, [r7, #4]
uint32_t tmpccmr1;
uint32_t tmpccer;
/* Disable the Channel 2: Reset the CC2E Bit */
TIMx->CCER &= ~TIM_CCER_CC2E;
80054b0: 68fb ldr r3, [r7, #12]
80054b2: 6a1b ldr r3, [r3, #32]
80054b4: 2210 movs r2, #16
80054b6: 4393 bics r3, r2
80054b8: 001a movs r2, r3
80054ba: 68fb ldr r3, [r7, #12]
80054bc: 621a str r2, [r3, #32]
tmpccmr1 = TIMx->CCMR1;
80054be: 68fb ldr r3, [r7, #12]
80054c0: 699b ldr r3, [r3, #24]
80054c2: 617b str r3, [r7, #20]
tmpccer = TIMx->CCER;
80054c4: 68fb ldr r3, [r7, #12]
80054c6: 6a1b ldr r3, [r3, #32]
80054c8: 613b str r3, [r7, #16]
/* Set the filter */
tmpccmr1 &= ~TIM_CCMR1_IC2F;
80054ca: 697b ldr r3, [r7, #20]
80054cc: 4a0d ldr r2, [pc, #52] ; (8005504 <TIM_TI2_ConfigInputStage+0x60>)
80054ce: 4013 ands r3, r2
80054d0: 617b str r3, [r7, #20]
tmpccmr1 |= (TIM_ICFilter << 12U);
80054d2: 687b ldr r3, [r7, #4]
80054d4: 031b lsls r3, r3, #12
80054d6: 697a ldr r2, [r7, #20]
80054d8: 4313 orrs r3, r2
80054da: 617b str r3, [r7, #20]
/* Select the Polarity and set the CC2E Bit */
tmpccer &= ~(TIM_CCER_CC2P | TIM_CCER_CC2NP);
80054dc: 693b ldr r3, [r7, #16]
80054de: 22a0 movs r2, #160 ; 0xa0
80054e0: 4393 bics r3, r2
80054e2: 613b str r3, [r7, #16]
tmpccer |= (TIM_ICPolarity << 4U);
80054e4: 68bb ldr r3, [r7, #8]
80054e6: 011b lsls r3, r3, #4
80054e8: 693a ldr r2, [r7, #16]
80054ea: 4313 orrs r3, r2
80054ec: 613b str r3, [r7, #16]
/* Write to TIMx CCMR1 and CCER registers */
TIMx->CCMR1 = tmpccmr1 ;
80054ee: 68fb ldr r3, [r7, #12]
80054f0: 697a ldr r2, [r7, #20]
80054f2: 619a str r2, [r3, #24]
TIMx->CCER = tmpccer;
80054f4: 68fb ldr r3, [r7, #12]
80054f6: 693a ldr r2, [r7, #16]
80054f8: 621a str r2, [r3, #32]
}
80054fa: 46c0 nop ; (mov r8, r8)
80054fc: 46bd mov sp, r7
80054fe: b006 add sp, #24
8005500: bd80 pop {r7, pc}
8005502: 46c0 nop ; (mov r8, r8)
8005504: ffff0fff .word 0xffff0fff
08005508 <TIM_ITRx_SetConfig>:
* @arg TIM_TS_TI2FP2: Filtered Timer Input 2
* @arg TIM_TS_ETRF: External Trigger input
* @retval None
*/
static void TIM_ITRx_SetConfig(TIM_TypeDef *TIMx, uint32_t InputTriggerSource)
{
8005508: b580 push {r7, lr}
800550a: b084 sub sp, #16
800550c: af00 add r7, sp, #0
800550e: 6078 str r0, [r7, #4]
8005510: 6039 str r1, [r7, #0]
uint32_t tmpsmcr;
/* Get the TIMx SMCR register value */
tmpsmcr = TIMx->SMCR;
8005512: 687b ldr r3, [r7, #4]
8005514: 689b ldr r3, [r3, #8]
8005516: 60fb str r3, [r7, #12]
/* Reset the TS Bits */
tmpsmcr &= ~TIM_SMCR_TS;
8005518: 68fb ldr r3, [r7, #12]
800551a: 4a08 ldr r2, [pc, #32] ; (800553c <TIM_ITRx_SetConfig+0x34>)
800551c: 4013 ands r3, r2
800551e: 60fb str r3, [r7, #12]
/* Set the Input Trigger source and the slave mode*/
tmpsmcr |= (InputTriggerSource | TIM_SLAVEMODE_EXTERNAL1);
8005520: 683a ldr r2, [r7, #0]
8005522: 68fb ldr r3, [r7, #12]
8005524: 4313 orrs r3, r2
8005526: 2207 movs r2, #7
8005528: 4313 orrs r3, r2
800552a: 60fb str r3, [r7, #12]
/* Write to TIMx SMCR */
TIMx->SMCR = tmpsmcr;
800552c: 687b ldr r3, [r7, #4]
800552e: 68fa ldr r2, [r7, #12]
8005530: 609a str r2, [r3, #8]
}
8005532: 46c0 nop ; (mov r8, r8)
8005534: 46bd mov sp, r7
8005536: b004 add sp, #16
8005538: bd80 pop {r7, pc}
800553a: 46c0 nop ; (mov r8, r8)
800553c: ffcfff8f .word 0xffcfff8f
08005540 <TIM_ETR_SetConfig>:
* This parameter must be a value between 0x00 and 0x0F
* @retval None
*/
void TIM_ETR_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ExtTRGPrescaler,
uint32_t TIM_ExtTRGPolarity, uint32_t ExtTRGFilter)
{
8005540: b580 push {r7, lr}
8005542: b086 sub sp, #24
8005544: af00 add r7, sp, #0
8005546: 60f8 str r0, [r7, #12]
8005548: 60b9 str r1, [r7, #8]
800554a: 607a str r2, [r7, #4]
800554c: 603b str r3, [r7, #0]
uint32_t tmpsmcr;
tmpsmcr = TIMx->SMCR;
800554e: 68fb ldr r3, [r7, #12]
8005550: 689b ldr r3, [r3, #8]
8005552: 617b str r3, [r7, #20]
/* Reset the ETR Bits */
tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP);
8005554: 697b ldr r3, [r7, #20]
8005556: 4a09 ldr r2, [pc, #36] ; (800557c <TIM_ETR_SetConfig+0x3c>)
8005558: 4013 ands r3, r2
800555a: 617b str r3, [r7, #20]
/* Set the Prescaler, the Filter value and the Polarity */
tmpsmcr |= (uint32_t)(TIM_ExtTRGPrescaler | (TIM_ExtTRGPolarity | (ExtTRGFilter << 8U)));
800555c: 683b ldr r3, [r7, #0]
800555e: 021a lsls r2, r3, #8
8005560: 687b ldr r3, [r7, #4]
8005562: 431a orrs r2, r3
8005564: 68bb ldr r3, [r7, #8]
8005566: 4313 orrs r3, r2
8005568: 697a ldr r2, [r7, #20]
800556a: 4313 orrs r3, r2
800556c: 617b str r3, [r7, #20]
/* Write to TIMx SMCR */
TIMx->SMCR = tmpsmcr;
800556e: 68fb ldr r3, [r7, #12]
8005570: 697a ldr r2, [r7, #20]
8005572: 609a str r2, [r3, #8]
}
8005574: 46c0 nop ; (mov r8, r8)
8005576: 46bd mov sp, r7
8005578: b006 add sp, #24
800557a: bd80 pop {r7, pc}
800557c: ffff00ff .word 0xffff00ff
08005580 <TIM_CCxChannelCmd>:
* @param ChannelState specifies the TIM Channel CCxE bit new state.
* This parameter can be: TIM_CCx_ENABLE or TIM_CCx_DISABLE.
* @retval None
*/
void TIM_CCxChannelCmd(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ChannelState)
{
8005580: b580 push {r7, lr}
8005582: b086 sub sp, #24
8005584: af00 add r7, sp, #0
8005586: 60f8 str r0, [r7, #12]
8005588: 60b9 str r1, [r7, #8]
800558a: 607a str r2, [r7, #4]
/* Check the parameters */
assert_param(IS_TIM_CC1_INSTANCE(TIMx));
assert_param(IS_TIM_CHANNELS(Channel));
tmp = TIM_CCER_CC1E << (Channel & 0x1FU); /* 0x1FU = 31 bits max shift */
800558c: 68bb ldr r3, [r7, #8]
800558e: 221f movs r2, #31
8005590: 4013 ands r3, r2
8005592: 2201 movs r2, #1
8005594: 409a lsls r2, r3
8005596: 0013 movs r3, r2
8005598: 617b str r3, [r7, #20]
/* Reset the CCxE Bit */
TIMx->CCER &= ~tmp;
800559a: 68fb ldr r3, [r7, #12]
800559c: 6a1b ldr r3, [r3, #32]
800559e: 697a ldr r2, [r7, #20]
80055a0: 43d2 mvns r2, r2
80055a2: 401a ands r2, r3
80055a4: 68fb ldr r3, [r7, #12]
80055a6: 621a str r2, [r3, #32]
/* Set or reset the CCxE Bit */
TIMx->CCER |= (uint32_t)(ChannelState << (Channel & 0x1FU)); /* 0x1FU = 31 bits max shift */
80055a8: 68fb ldr r3, [r7, #12]
80055aa: 6a1a ldr r2, [r3, #32]
80055ac: 68bb ldr r3, [r7, #8]
80055ae: 211f movs r1, #31
80055b0: 400b ands r3, r1
80055b2: 6879 ldr r1, [r7, #4]
80055b4: 4099 lsls r1, r3
80055b6: 000b movs r3, r1
80055b8: 431a orrs r2, r3
80055ba: 68fb ldr r3, [r7, #12]
80055bc: 621a str r2, [r3, #32]
}
80055be: 46c0 nop ; (mov r8, r8)
80055c0: 46bd mov sp, r7
80055c2: b006 add sp, #24
80055c4: bd80 pop {r7, pc}
...
080055c8 <HAL_TIMEx_MasterConfigSynchronization>:
* mode.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
const TIM_MasterConfigTypeDef *sMasterConfig)
{
80055c8: b580 push {r7, lr}
80055ca: b084 sub sp, #16
80055cc: af00 add r7, sp, #0
80055ce: 6078 str r0, [r7, #4]
80055d0: 6039 str r1, [r7, #0]
assert_param(IS_TIM_MASTER_INSTANCE(htim->Instance));
assert_param(IS_TIM_TRGO_SOURCE(sMasterConfig->MasterOutputTrigger));
assert_param(IS_TIM_MSM_STATE(sMasterConfig->MasterSlaveMode));
/* Check input state */
__HAL_LOCK(htim);
80055d2: 687b ldr r3, [r7, #4]
80055d4: 223c movs r2, #60 ; 0x3c
80055d6: 5c9b ldrb r3, [r3, r2]
80055d8: 2b01 cmp r3, #1
80055da: d101 bne.n 80055e0 <HAL_TIMEx_MasterConfigSynchronization+0x18>
80055dc: 2302 movs r3, #2
80055de: e050 b.n 8005682 <HAL_TIMEx_MasterConfigSynchronization+0xba>
80055e0: 687b ldr r3, [r7, #4]
80055e2: 223c movs r2, #60 ; 0x3c
80055e4: 2101 movs r1, #1
80055e6: 5499 strb r1, [r3, r2]
/* Change the handler state */
htim->State = HAL_TIM_STATE_BUSY;
80055e8: 687b ldr r3, [r7, #4]
80055ea: 223d movs r2, #61 ; 0x3d
80055ec: 2102 movs r1, #2
80055ee: 5499 strb r1, [r3, r2]
/* Get the TIMx CR2 register value */
tmpcr2 = htim->Instance->CR2;
80055f0: 687b ldr r3, [r7, #4]
80055f2: 681b ldr r3, [r3, #0]
80055f4: 685b ldr r3, [r3, #4]
80055f6: 60fb str r3, [r7, #12]
/* Get the TIMx SMCR register value */
tmpsmcr = htim->Instance->SMCR;
80055f8: 687b ldr r3, [r7, #4]
80055fa: 681b ldr r3, [r3, #0]
80055fc: 689b ldr r3, [r3, #8]
80055fe: 60bb str r3, [r7, #8]
/* If the timer supports ADC synchronization through TRGO2, set the master mode selection 2 */
if (IS_TIM_TRGO2_INSTANCE(htim->Instance))
8005600: 687b ldr r3, [r7, #4]
8005602: 681b ldr r3, [r3, #0]
8005604: 4a21 ldr r2, [pc, #132] ; (800568c <HAL_TIMEx_MasterConfigSynchronization+0xc4>)
8005606: 4293 cmp r3, r2
8005608: d108 bne.n 800561c <HAL_TIMEx_MasterConfigSynchronization+0x54>
{
/* Check the parameters */
assert_param(IS_TIM_TRGO2_SOURCE(sMasterConfig->MasterOutputTrigger2));
/* Clear the MMS2 bits */
tmpcr2 &= ~TIM_CR2_MMS2;
800560a: 68fb ldr r3, [r7, #12]
800560c: 4a20 ldr r2, [pc, #128] ; (8005690 <HAL_TIMEx_MasterConfigSynchronization+0xc8>)
800560e: 4013 ands r3, r2
8005610: 60fb str r3, [r7, #12]
/* Select the TRGO2 source*/
tmpcr2 |= sMasterConfig->MasterOutputTrigger2;
8005612: 683b ldr r3, [r7, #0]
8005614: 685b ldr r3, [r3, #4]
8005616: 68fa ldr r2, [r7, #12]
8005618: 4313 orrs r3, r2
800561a: 60fb str r3, [r7, #12]
}
/* Reset the MMS Bits */
tmpcr2 &= ~TIM_CR2_MMS;
800561c: 68fb ldr r3, [r7, #12]
800561e: 2270 movs r2, #112 ; 0x70
8005620: 4393 bics r3, r2
8005622: 60fb str r3, [r7, #12]
/* Select the TRGO source */
tmpcr2 |= sMasterConfig->MasterOutputTrigger;
8005624: 683b ldr r3, [r7, #0]
8005626: 681b ldr r3, [r3, #0]
8005628: 68fa ldr r2, [r7, #12]
800562a: 4313 orrs r3, r2
800562c: 60fb str r3, [r7, #12]
/* Update TIMx CR2 */
htim->Instance->CR2 = tmpcr2;
800562e: 687b ldr r3, [r7, #4]
8005630: 681b ldr r3, [r3, #0]
8005632: 68fa ldr r2, [r7, #12]
8005634: 605a str r2, [r3, #4]
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
8005636: 687b ldr r3, [r7, #4]
8005638: 681b ldr r3, [r3, #0]
800563a: 4a14 ldr r2, [pc, #80] ; (800568c <HAL_TIMEx_MasterConfigSynchronization+0xc4>)
800563c: 4293 cmp r3, r2
800563e: d00a beq.n 8005656 <HAL_TIMEx_MasterConfigSynchronization+0x8e>
8005640: 687b ldr r3, [r7, #4]
8005642: 681a ldr r2, [r3, #0]
8005644: 2380 movs r3, #128 ; 0x80
8005646: 05db lsls r3, r3, #23
8005648: 429a cmp r2, r3
800564a: d004 beq.n 8005656 <HAL_TIMEx_MasterConfigSynchronization+0x8e>
800564c: 687b ldr r3, [r7, #4]
800564e: 681b ldr r3, [r3, #0]
8005650: 4a10 ldr r2, [pc, #64] ; (8005694 <HAL_TIMEx_MasterConfigSynchronization+0xcc>)
8005652: 4293 cmp r3, r2
8005654: d10c bne.n 8005670 <HAL_TIMEx_MasterConfigSynchronization+0xa8>
{
/* Reset the MSM Bit */
tmpsmcr &= ~TIM_SMCR_MSM;
8005656: 68bb ldr r3, [r7, #8]
8005658: 2280 movs r2, #128 ; 0x80
800565a: 4393 bics r3, r2
800565c: 60bb str r3, [r7, #8]
/* Set master mode */
tmpsmcr |= sMasterConfig->MasterSlaveMode;
800565e: 683b ldr r3, [r7, #0]
8005660: 689b ldr r3, [r3, #8]
8005662: 68ba ldr r2, [r7, #8]
8005664: 4313 orrs r3, r2
8005666: 60bb str r3, [r7, #8]
/* Update TIMx SMCR */
htim->Instance->SMCR = tmpsmcr;
8005668: 687b ldr r3, [r7, #4]
800566a: 681b ldr r3, [r3, #0]
800566c: 68ba ldr r2, [r7, #8]
800566e: 609a str r2, [r3, #8]
}
/* Change the htim state */
htim->State = HAL_TIM_STATE_READY;
8005670: 687b ldr r3, [r7, #4]
8005672: 223d movs r2, #61 ; 0x3d
8005674: 2101 movs r1, #1
8005676: 5499 strb r1, [r3, r2]
__HAL_UNLOCK(htim);
8005678: 687b ldr r3, [r7, #4]
800567a: 223c movs r2, #60 ; 0x3c
800567c: 2100 movs r1, #0
800567e: 5499 strb r1, [r3, r2]
return HAL_OK;
8005680: 2300 movs r3, #0
}
8005682: 0018 movs r0, r3
8005684: 46bd mov sp, r7
8005686: b004 add sp, #16
8005688: bd80 pop {r7, pc}
800568a: 46c0 nop ; (mov r8, r8)
800568c: 40012c00 .word 0x40012c00
8005690: ff0fffff .word 0xff0fffff
8005694: 40000400 .word 0x40000400
08005698 <HAL_TIMEx_CommutCallback>:
* @brief Hall commutation changed callback in non-blocking mode
* @param htim TIM handle
* @retval None
*/
__weak void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim)
{
8005698: b580 push {r7, lr}
800569a: b082 sub sp, #8
800569c: af00 add r7, sp, #0
800569e: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIMEx_CommutCallback could be implemented in the user file
*/
}
80056a0: 46c0 nop ; (mov r8, r8)
80056a2: 46bd mov sp, r7
80056a4: b002 add sp, #8
80056a6: bd80 pop {r7, pc}
080056a8 <HAL_TIMEx_BreakCallback>:
* @brief Hall Break detection callback in non-blocking mode
* @param htim TIM handle
* @retval None
*/
__weak void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim)
{
80056a8: b580 push {r7, lr}
80056aa: b082 sub sp, #8
80056ac: af00 add r7, sp, #0
80056ae: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIMEx_BreakCallback could be implemented in the user file
*/
}
80056b0: 46c0 nop ; (mov r8, r8)
80056b2: 46bd mov sp, r7
80056b4: b002 add sp, #8
80056b6: bd80 pop {r7, pc}
080056b8 <HAL_TIMEx_Break2Callback>:
* @brief Hall Break2 detection callback in non blocking mode
* @param htim: TIM handle
* @retval None
*/
__weak void HAL_TIMEx_Break2Callback(TIM_HandleTypeDef *htim)
{
80056b8: b580 push {r7, lr}
80056ba: b082 sub sp, #8
80056bc: af00 add r7, sp, #0
80056be: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function Should not be modified, when the callback is needed,
the HAL_TIMEx_Break2Callback could be implemented in the user file
*/
}
80056c0: 46c0 nop ; (mov r8, r8)
80056c2: 46bd mov sp, r7
80056c4: b002 add sp, #8
80056c6: bd80 pop {r7, pc}
080056c8 <writeReg>:
//---------------------------------------------------------
// I2C communication Functions
//---------------------------------------------------------
// Write an 8-bit register
void writeReg(uint8_t reg, uint8_t value) {
80056c8: b580 push {r7, lr}
80056ca: b086 sub sp, #24
80056cc: af04 add r7, sp, #16
80056ce: 0002 movs r2, r0
80056d0: 1dfb adds r3, r7, #7
80056d2: 701a strb r2, [r3, #0]
80056d4: 1dbb adds r3, r7, #6
80056d6: 1c0a adds r2, r1, #0
80056d8: 701a strb r2, [r3, #0]
HAL_I2C_Mem_Write(&TOF_I2C, g_i2cAddr, reg, I2C_MEMADD_SIZE_8BIT, &value, 1, HAL_MAX_DELAY);
80056da: 4b0a ldr r3, [pc, #40] ; (8005704 <writeReg+0x3c>)
80056dc: 781b ldrb r3, [r3, #0]
80056de: b299 uxth r1, r3
80056e0: 1dfb adds r3, r7, #7
80056e2: 781b ldrb r3, [r3, #0]
80056e4: b29a uxth r2, r3
80056e6: 4808 ldr r0, [pc, #32] ; (8005708 <writeReg+0x40>)
80056e8: 2301 movs r3, #1
80056ea: 425b negs r3, r3
80056ec: 9302 str r3, [sp, #8]
80056ee: 2301 movs r3, #1
80056f0: 9301 str r3, [sp, #4]
80056f2: 1dbb adds r3, r7, #6
80056f4: 9300 str r3, [sp, #0]
80056f6: 2301 movs r3, #1
80056f8: f7fd fa20 bl 8002b3c <HAL_I2C_Mem_Write>
}
80056fc: 46c0 nop ; (mov r8, r8)
80056fe: 46bd mov sp, r7
8005700: b002 add sp, #8
8005702: bd80 pop {r7, pc}
8005704: 2000000d .word 0x2000000d
8005708: 200000d8 .word 0x200000d8
0800570c <writeReg16Bit>:
// Write a 16-bit register
void writeReg16Bit(uint8_t reg, uint16_t value) {
800570c: b590 push {r4, r7, lr}
800570e: b089 sub sp, #36 ; 0x24
8005710: af04 add r7, sp, #16
8005712: 0002 movs r2, r0
8005714: 1dfb adds r3, r7, #7
8005716: 701a strb r2, [r3, #0]
8005718: 1d3b adds r3, r7, #4
800571a: 1c0a adds r2, r1, #0
800571c: 801a strh r2, [r3, #0]
uint8_t data[2];
data[0] = (value >> 8) & 0xFF;
800571e: 1d3b adds r3, r7, #4
8005720: 881b ldrh r3, [r3, #0]
8005722: 0a1b lsrs r3, r3, #8
8005724: b29b uxth r3, r3
8005726: b2da uxtb r2, r3
8005728: 240c movs r4, #12
800572a: 193b adds r3, r7, r4
800572c: 701a strb r2, [r3, #0]
data[1] = (value ) & 0xFF;
800572e: 1d3b adds r3, r7, #4
8005730: 881b ldrh r3, [r3, #0]
8005732: b2da uxtb r2, r3
8005734: 193b adds r3, r7, r4
8005736: 705a strb r2, [r3, #1]
HAL_I2C_Mem_Write(&TOF_I2C, g_i2cAddr, reg, I2C_MEMADD_SIZE_8BIT, data, 2, HAL_MAX_DELAY);
8005738: 4b0a ldr r3, [pc, #40] ; (8005764 <writeReg16Bit+0x58>)
800573a: 781b ldrb r3, [r3, #0]
800573c: b299 uxth r1, r3
800573e: 1dfb adds r3, r7, #7
8005740: 781b ldrb r3, [r3, #0]
8005742: b29a uxth r2, r3
8005744: 4808 ldr r0, [pc, #32] ; (8005768 <writeReg16Bit+0x5c>)
8005746: 2301 movs r3, #1
8005748: 425b negs r3, r3
800574a: 9302 str r3, [sp, #8]
800574c: 2302 movs r3, #2
800574e: 9301 str r3, [sp, #4]
8005750: 193b adds r3, r7, r4
8005752: 9300 str r3, [sp, #0]
8005754: 2301 movs r3, #1
8005756: f7fd f9f1 bl 8002b3c <HAL_I2C_Mem_Write>
}
800575a: 46c0 nop ; (mov r8, r8)
800575c: 46bd mov sp, r7
800575e: b005 add sp, #20
8005760: bd90 pop {r4, r7, pc}
8005762: 46c0 nop ; (mov r8, r8)
8005764: 2000000d .word 0x2000000d
8005768: 200000d8 .word 0x200000d8
0800576c <writeReg32Bit>:
// Write a 32-bit register
void writeReg32Bit(uint8_t reg, uint32_t value) {
800576c: b590 push {r4, r7, lr}
800576e: b089 sub sp, #36 ; 0x24
8005770: af04 add r7, sp, #16
8005772: 0002 movs r2, r0
8005774: 6039 str r1, [r7, #0]
8005776: 1dfb adds r3, r7, #7
8005778: 701a strb r2, [r3, #0]
uint8_t data[4];
data[0] = (value >> 24) & 0xFF;
800577a: 683b ldr r3, [r7, #0]
800577c: 0e1b lsrs r3, r3, #24
800577e: b2da uxtb r2, r3
8005780: 240c movs r4, #12
8005782: 193b adds r3, r7, r4
8005784: 701a strb r2, [r3, #0]
data[1] = (value >> 16) & 0xFF;
8005786: 683b ldr r3, [r7, #0]
8005788: 0c1b lsrs r3, r3, #16
800578a: b2da uxtb r2, r3
800578c: 193b adds r3, r7, r4
800578e: 705a strb r2, [r3, #1]
data[2] = (value >> 8) & 0xFF;
8005790: 683b ldr r3, [r7, #0]
8005792: 0a1b lsrs r3, r3, #8
8005794: b2da uxtb r2, r3
8005796: 193b adds r3, r7, r4
8005798: 709a strb r2, [r3, #2]
data[3] = (value ) & 0xFF;
800579a: 683b ldr r3, [r7, #0]
800579c: b2da uxtb r2, r3
800579e: 193b adds r3, r7, r4
80057a0: 70da strb r2, [r3, #3]
HAL_I2C_Mem_Write(&TOF_I2C, g_i2cAddr, reg, I2C_MEMADD_SIZE_8BIT, data, 4, HAL_MAX_DELAY);
80057a2: 4b0a ldr r3, [pc, #40] ; (80057cc <writeReg32Bit+0x60>)
80057a4: 781b ldrb r3, [r3, #0]
80057a6: b299 uxth r1, r3
80057a8: 1dfb adds r3, r7, #7
80057aa: 781b ldrb r3, [r3, #0]
80057ac: b29a uxth r2, r3
80057ae: 4808 ldr r0, [pc, #32] ; (80057d0 <writeReg32Bit+0x64>)
80057b0: 2301 movs r3, #1
80057b2: 425b negs r3, r3
80057b4: 9302 str r3, [sp, #8]
80057b6: 2304 movs r3, #4
80057b8: 9301 str r3, [sp, #4]
80057ba: 193b adds r3, r7, r4
80057bc: 9300 str r3, [sp, #0]
80057be: 2301 movs r3, #1
80057c0: f7fd f9bc bl 8002b3c <HAL_I2C_Mem_Write>
}
80057c4: 46c0 nop ; (mov r8, r8)
80057c6: 46bd mov sp, r7
80057c8: b005 add sp, #20
80057ca: bd90 pop {r4, r7, pc}
80057cc: 2000000d .word 0x2000000d
80057d0: 200000d8 .word 0x200000d8
080057d4 <readReg>:
// Read an 8-bit register
uint8_t readReg(uint8_t reg) {
80057d4: b590 push {r4, r7, lr}
80057d6: b089 sub sp, #36 ; 0x24
80057d8: af04 add r7, sp, #16
80057da: 0002 movs r2, r0
80057dc: 1dfb adds r3, r7, #7
80057de: 701a strb r2, [r3, #0]
uint8_t data;
HAL_I2C_Mem_Read(&TOF_I2C, g_i2cAddr, reg, I2C_MEMADD_SIZE_8BIT, &data, 1, HAL_MAX_DELAY);
80057e0: 4b0b ldr r3, [pc, #44] ; (8005810 <readReg+0x3c>)
80057e2: 781b ldrb r3, [r3, #0]
80057e4: b299 uxth r1, r3
80057e6: 1dfb adds r3, r7, #7
80057e8: 781b ldrb r3, [r3, #0]
80057ea: b29a uxth r2, r3
80057ec: 4809 ldr r0, [pc, #36] ; (8005814 <readReg+0x40>)
80057ee: 2301 movs r3, #1
80057f0: 425b negs r3, r3
80057f2: 9302 str r3, [sp, #8]
80057f4: 2301 movs r3, #1
80057f6: 9301 str r3, [sp, #4]
80057f8: 240f movs r4, #15
80057fa: 193b adds r3, r7, r4
80057fc: 9300 str r3, [sp, #0]
80057fe: 2301 movs r3, #1
8005800: f7fd faca bl 8002d98 <HAL_I2C_Mem_Read>
return data;
8005804: 193b adds r3, r7, r4
8005806: 781b ldrb r3, [r3, #0]
}
8005808: 0018 movs r0, r3
800580a: 46bd mov sp, r7
800580c: b005 add sp, #20
800580e: bd90 pop {r4, r7, pc}
8005810: 2000000d .word 0x2000000d
8005814: 200000d8 .word 0x200000d8
08005818 <readReg16Bit>:
// Read a 16-bit register
uint16_t readReg16Bit(uint8_t reg) {
8005818: b590 push {r4, r7, lr}
800581a: b089 sub sp, #36 ; 0x24
800581c: af04 add r7, sp, #16
800581e: 0002 movs r2, r0
8005820: 1dfb adds r3, r7, #7
8005822: 701a strb r2, [r3, #0]
uint16_t value;
uint8_t data[2];
HAL_I2C_Mem_Read(&TOF_I2C, g_i2cAddr, reg, I2C_MEMADD_SIZE_8BIT, data, 2, HAL_MAX_DELAY);
8005824: 4b13 ldr r3, [pc, #76] ; (8005874 <readReg16Bit+0x5c>)
8005826: 781b ldrb r3, [r3, #0]
8005828: b299 uxth r1, r3
800582a: 1dfb adds r3, r7, #7
800582c: 781b ldrb r3, [r3, #0]
800582e: b29a uxth r2, r3
8005830: 4811 ldr r0, [pc, #68] ; (8005878 <readReg16Bit+0x60>)
8005832: 2301 movs r3, #1
8005834: 425b negs r3, r3
8005836: 9302 str r3, [sp, #8]
8005838: 2302 movs r3, #2
800583a: 9301 str r3, [sp, #4]
800583c: 240c movs r4, #12
800583e: 193b adds r3, r7, r4
8005840: 9300 str r3, [sp, #0]
8005842: 2301 movs r3, #1
8005844: f7fd faa8 bl 8002d98 <HAL_I2C_Mem_Read>
value = data[0] << 8;
8005848: 0021 movs r1, r4
800584a: 187b adds r3, r7, r1
800584c: 781b ldrb r3, [r3, #0]
800584e: b29a uxth r2, r3
8005850: 200e movs r0, #14
8005852: 183b adds r3, r7, r0
8005854: 0212 lsls r2, r2, #8
8005856: 801a strh r2, [r3, #0]
value |= data[1];
8005858: 187b adds r3, r7, r1
800585a: 785b ldrb r3, [r3, #1]
800585c: b299 uxth r1, r3
800585e: 183b adds r3, r7, r0
8005860: 183a adds r2, r7, r0
8005862: 8812 ldrh r2, [r2, #0]
8005864: 430a orrs r2, r1
8005866: 801a strh r2, [r3, #0]
return value;
8005868: 183b adds r3, r7, r0
800586a: 881b ldrh r3, [r3, #0]
}
800586c: 0018 movs r0, r3
800586e: 46bd mov sp, r7
8005870: b005 add sp, #20
8005872: bd90 pop {r4, r7, pc}
8005874: 2000000d .word 0x2000000d
8005878: 200000d8 .word 0x200000d8
0800587c <writeMulti>:
return value;
}
// Write an arbitrary number of bytes from the given array to the sensor,
// starting at the given register
void writeMulti(uint8_t reg, uint8_t *src, uint8_t count) {
800587c: b590 push {r4, r7, lr}
800587e: b087 sub sp, #28
8005880: af04 add r7, sp, #16
8005882: 6039 str r1, [r7, #0]
8005884: 0011 movs r1, r2
8005886: 1dfb adds r3, r7, #7
8005888: 1c02 adds r2, r0, #0
800588a: 701a strb r2, [r3, #0]
800588c: 1dbb adds r3, r7, #6
800588e: 1c0a adds r2, r1, #0
8005890: 701a strb r2, [r3, #0]
HAL_I2C_Mem_Write(&TOF_I2C, g_i2cAddr, reg, I2C_MEMADD_SIZE_8BIT, src, count, HAL_MAX_DELAY);
8005892: 4b0c ldr r3, [pc, #48] ; (80058c4 <writeMulti+0x48>)
8005894: 781b ldrb r3, [r3, #0]
8005896: b299 uxth r1, r3
8005898: 1dfb adds r3, r7, #7
800589a: 781b ldrb r3, [r3, #0]
800589c: b29c uxth r4, r3
800589e: 1dbb adds r3, r7, #6
80058a0: 781b ldrb r3, [r3, #0]
80058a2: b29b uxth r3, r3
80058a4: 4808 ldr r0, [pc, #32] ; (80058c8 <writeMulti+0x4c>)
80058a6: 2201 movs r2, #1
80058a8: 4252 negs r2, r2
80058aa: 9202 str r2, [sp, #8]
80058ac: 9301 str r3, [sp, #4]
80058ae: 683b ldr r3, [r7, #0]
80058b0: 9300 str r3, [sp, #0]
80058b2: 2301 movs r3, #1
80058b4: 0022 movs r2, r4
80058b6: f7fd f941 bl 8002b3c <HAL_I2C_Mem_Write>
}
80058ba: 46c0 nop ; (mov r8, r8)
80058bc: 46bd mov sp, r7
80058be: b003 add sp, #12
80058c0: bd90 pop {r4, r7, pc}
80058c2: 46c0 nop ; (mov r8, r8)
80058c4: 2000000d .word 0x2000000d
80058c8: 200000d8 .word 0x200000d8
080058cc <readMulti>:
// Read an arbitrary number of bytes from the sensor, starting at the given
// register, into the given array
void readMulti(uint8_t reg, uint8_t * dst, uint8_t count) {
80058cc: b590 push {r4, r7, lr}
80058ce: b087 sub sp, #28
80058d0: af04 add r7, sp, #16
80058d2: 6039 str r1, [r7, #0]
80058d4: 0011 movs r1, r2
80058d6: 1dfb adds r3, r7, #7
80058d8: 1c02 adds r2, r0, #0
80058da: 701a strb r2, [r3, #0]
80058dc: 1dbb adds r3, r7, #6
80058de: 1c0a adds r2, r1, #0
80058e0: 701a strb r2, [r3, #0]
HAL_I2C_Mem_Read(&TOF_I2C, g_i2cAddr, reg, I2C_MEMADD_SIZE_8BIT, dst, count, HAL_MAX_DELAY);
80058e2: 4b0c ldr r3, [pc, #48] ; (8005914 <readMulti+0x48>)
80058e4: 781b ldrb r3, [r3, #0]
80058e6: b299 uxth r1, r3
80058e8: 1dfb adds r3, r7, #7
80058ea: 781b ldrb r3, [r3, #0]
80058ec: b29c uxth r4, r3
80058ee: 1dbb adds r3, r7, #6
80058f0: 781b ldrb r3, [r3, #0]
80058f2: b29b uxth r3, r3
80058f4: 4808 ldr r0, [pc, #32] ; (8005918 <readMulti+0x4c>)
80058f6: 2201 movs r2, #1
80058f8: 4252 negs r2, r2
80058fa: 9202 str r2, [sp, #8]
80058fc: 9301 str r3, [sp, #4]
80058fe: 683b ldr r3, [r7, #0]
8005900: 9300 str r3, [sp, #0]
8005902: 2301 movs r3, #1
8005904: 0022 movs r2, r4
8005906: f7fd fa47 bl 8002d98 <HAL_I2C_Mem_Read>
}
800590a: 46c0 nop ; (mov r8, r8)
800590c: 46bd mov sp, r7
800590e: b003 add sp, #12
8005910: bd90 pop {r4, r7, pc}
8005912: 46c0 nop ; (mov r8, r8)
8005914: 2000000d .word 0x2000000d
8005918: 200000d8 .word 0x200000d8
0800591c <initVL53L0X>:
// (VL53L0X_PerformRefSpadManagement()), since the API user manual says that it
// is performed by ST on the bare modules; it seems like that should work well
// enough unless a cover glass is added.
// If io_2v8 (optional) is true or not given, the sensor is configured for 2V8
// mode.
bool initVL53L0X( bool io_2v8 ){
800591c: b590 push {r4, r7, lr}
800591e: b087 sub sp, #28
8005920: af00 add r7, sp, #0
8005922: 0002 movs r2, r0
8005924: 1dfb adds r3, r7, #7
8005926: 701a strb r2, [r3, #0]
// VL53L0X_DataInit() begin
// sensor uses 1V8 mode for I/O by default; switch to 2V8 mode if necessary
if (io_2v8)
8005928: 1dfb adds r3, r7, #7
800592a: 781b ldrb r3, [r3, #0]
800592c: 2b00 cmp r3, #0
800592e: d00b beq.n 8005948 <initVL53L0X+0x2c>
{
writeReg(VHV_CONFIG_PAD_SCL_SDA__EXTSUP_HV,
readReg(VHV_CONFIG_PAD_SCL_SDA__EXTSUP_HV) | 0x01); // set bit 0
8005930: 2089 movs r0, #137 ; 0x89
8005932: f7ff ff4f bl 80057d4 <readReg>
8005936: 0003 movs r3, r0
8005938: 001a movs r2, r3
writeReg(VHV_CONFIG_PAD_SCL_SDA__EXTSUP_HV,
800593a: 2301 movs r3, #1
800593c: 4313 orrs r3, r2
800593e: b2db uxtb r3, r3
8005940: 0019 movs r1, r3
8005942: 2089 movs r0, #137 ; 0x89
8005944: f7ff fec0 bl 80056c8 <writeReg>
}
// "Set I2C standard mode"
writeReg(0x88, 0x00);
8005948: 2100 movs r1, #0
800594a: 2088 movs r0, #136 ; 0x88
800594c: f7ff febc bl 80056c8 <writeReg>
writeReg(0x80, 0x01);
8005950: 2101 movs r1, #1
8005952: 2080 movs r0, #128 ; 0x80
8005954: f7ff feb8 bl 80056c8 <writeReg>
writeReg(0xFF, 0x01);
8005958: 2101 movs r1, #1
800595a: 20ff movs r0, #255 ; 0xff
800595c: f7ff feb4 bl 80056c8 <writeReg>
writeReg(0x00, 0x00);
8005960: 2100 movs r1, #0
8005962: 2000 movs r0, #0
8005964: f7ff feb0 bl 80056c8 <writeReg>
g_stopVariable = readReg(0x91);
8005968: 2091 movs r0, #145 ; 0x91
800596a: f7ff ff33 bl 80057d4 <readReg>
800596e: 0003 movs r3, r0
8005970: 001a movs r2, r3
8005972: 4b44 ldr r3, [pc, #272] ; (8005a84 <initVL53L0X+0x168>)
8005974: 701a strb r2, [r3, #0]
writeReg(0x00, 0x01);
8005976: 2101 movs r1, #1
8005978: 2000 movs r0, #0
800597a: f7ff fea5 bl 80056c8 <writeReg>
writeReg(0xFF, 0x00);
800597e: 2100 movs r1, #0
8005980: 20ff movs r0, #255 ; 0xff
8005982: f7ff fea1 bl 80056c8 <writeReg>
writeReg(0x80, 0x00);
8005986: 2100 movs r1, #0
8005988: 2080 movs r0, #128 ; 0x80
800598a: f7ff fe9d bl 80056c8 <writeReg>
// disable SIGNAL_RATE_MSRC (bit 1) and SIGNAL_RATE_PRE_RANGE (bit 4) limit checks
writeReg(MSRC_CONFIG_CONTROL, readReg(MSRC_CONFIG_CONTROL) | 0x12);
800598e: 2060 movs r0, #96 ; 0x60
8005990: f7ff ff20 bl 80057d4 <readReg>
8005994: 0003 movs r3, r0
8005996: 001a movs r2, r3
8005998: 2312 movs r3, #18
800599a: 4313 orrs r3, r2
800599c: b2db uxtb r3, r3
800599e: 0019 movs r1, r3
80059a0: 2060 movs r0, #96 ; 0x60
80059a2: f7ff fe91 bl 80056c8 <writeReg>
// set final range signal rate limit to 0.25 MCPS (million counts per second)
setSignalRateLimit(0.25);
80059a6: 23fa movs r3, #250 ; 0xfa
80059a8: 059b lsls r3, r3, #22
80059aa: 1c18 adds r0, r3, #0
80059ac: f000 fa1c bl 8005de8 <setSignalRateLimit>
writeReg(SYSTEM_SEQUENCE_CONFIG, 0xFF);
80059b0: 21ff movs r1, #255 ; 0xff
80059b2: 2001 movs r0, #1
80059b4: f7ff fe88 bl 80056c8 <writeReg>
// VL53L0X_StaticInit() begin
uint8_t spad_count;
bool spad_type_is_aperture;
if (!getSpadInfo(&spad_count, &spad_type_is_aperture)) { return false; }
80059b8: 2313 movs r3, #19
80059ba: 18fa adds r2, r7, r3
80059bc: 2314 movs r3, #20
80059be: 18fb adds r3, r7, r3
80059c0: 0011 movs r1, r2
80059c2: 0018 movs r0, r3
80059c4: f000 fc8a bl 80062dc <getSpadInfo>
80059c8: 1e03 subs r3, r0, #0
80059ca: d101 bne.n 80059d0 <initVL53L0X+0xb4>
80059cc: 2300 movs r3, #0
80059ce: e204 b.n 8005dda <initVL53L0X+0x4be>
// The SPAD map (RefGoodSpadMap) is read by VL53L0X_get_info_from_device() in
// the API, but the same data seems to be more easily readable from
// GLOBAL_CONFIG_SPAD_ENABLES_REF_0 through _6, so read it from there
uint8_t ref_spad_map[6];
readMulti(GLOBAL_CONFIG_SPAD_ENABLES_REF_0, ref_spad_map, 6);
80059d0: 230c movs r3, #12
80059d2: 18fb adds r3, r7, r3
80059d4: 2206 movs r2, #6
80059d6: 0019 movs r1, r3
80059d8: 20b0 movs r0, #176 ; 0xb0
80059da: f7ff ff77 bl 80058cc <readMulti>
// -- VL53L0X_set_reference_spads() begin (assume NVM values are valid)
writeReg(0xFF, 0x01);
80059de: 2101 movs r1, #1
80059e0: 20ff movs r0, #255 ; 0xff
80059e2: f7ff fe71 bl 80056c8 <writeReg>
writeReg(DYNAMIC_SPAD_REF_EN_START_OFFSET, 0x00);
80059e6: 2100 movs r1, #0
80059e8: 204f movs r0, #79 ; 0x4f
80059ea: f7ff fe6d bl 80056c8 <writeReg>
writeReg(DYNAMIC_SPAD_NUM_REQUESTED_REF_SPAD, 0x2C);
80059ee: 212c movs r1, #44 ; 0x2c
80059f0: 204e movs r0, #78 ; 0x4e
80059f2: f7ff fe69 bl 80056c8 <writeReg>
writeReg(0xFF, 0x00);
80059f6: 2100 movs r1, #0
80059f8: 20ff movs r0, #255 ; 0xff
80059fa: f7ff fe65 bl 80056c8 <writeReg>
writeReg(GLOBAL_CONFIG_REF_EN_START_SELECT, 0xB4);
80059fe: 21b4 movs r1, #180 ; 0xb4
8005a00: 20b6 movs r0, #182 ; 0xb6
8005a02: f7ff fe61 bl 80056c8 <writeReg>
uint8_t first_spad_to_enable = spad_type_is_aperture ? 12 : 0; // 12 is the first aperture spad
8005a06: 2313 movs r3, #19
8005a08: 18fb adds r3, r7, r3
8005a0a: 781b ldrb r3, [r3, #0]
8005a0c: 2b00 cmp r3, #0
8005a0e: d001 beq.n 8005a14 <initVL53L0X+0xf8>
8005a10: 220c movs r2, #12
8005a12: e000 b.n 8005a16 <initVL53L0X+0xfa>
8005a14: 2200 movs r2, #0
8005a16: 2315 movs r3, #21
8005a18: 18fb adds r3, r7, r3
8005a1a: 701a strb r2, [r3, #0]
uint8_t spads_enabled = 0;
8005a1c: 2317 movs r3, #23
8005a1e: 18fb adds r3, r7, r3
8005a20: 2200 movs r2, #0
8005a22: 701a strb r2, [r3, #0]
for (uint8_t i = 0; i < 48; i++)
8005a24: 2316 movs r3, #22
8005a26: 18fb adds r3, r7, r3
8005a28: 2200 movs r2, #0
8005a2a: 701a strb r2, [r3, #0]
8005a2c: e04b b.n 8005ac6 <initVL53L0X+0x1aa>
{
if (i < first_spad_to_enable || spads_enabled == spad_count)
8005a2e: 2316 movs r3, #22
8005a30: 18fa adds r2, r7, r3
8005a32: 2315 movs r3, #21
8005a34: 18fb adds r3, r7, r3
8005a36: 7812 ldrb r2, [r2, #0]
8005a38: 781b ldrb r3, [r3, #0]
8005a3a: 429a cmp r2, r3
8005a3c: d307 bcc.n 8005a4e <initVL53L0X+0x132>
8005a3e: 2314 movs r3, #20
8005a40: 18fb adds r3, r7, r3
8005a42: 781b ldrb r3, [r3, #0]
8005a44: 2217 movs r2, #23
8005a46: 18ba adds r2, r7, r2
8005a48: 7812 ldrb r2, [r2, #0]
8005a4a: 429a cmp r2, r3
8005a4c: d11c bne.n 8005a88 <initVL53L0X+0x16c>
{
// This bit is lower than the first one that should be enabled, or
// (reference_spad_count) bits have already been enabled, so zero this bit
ref_spad_map[i / 8] &= ~(1 << (i % 8));
8005a4e: 2116 movs r1, #22
8005a50: 187b adds r3, r7, r1
8005a52: 781b ldrb r3, [r3, #0]
8005a54: 08db lsrs r3, r3, #3
8005a56: b2d8 uxtb r0, r3
8005a58: 0002 movs r2, r0
8005a5a: 240c movs r4, #12
8005a5c: 193b adds r3, r7, r4
8005a5e: 5c9b ldrb r3, [r3, r2]
8005a60: b25b sxtb r3, r3
8005a62: 187a adds r2, r7, r1
8005a64: 7812 ldrb r2, [r2, #0]
8005a66: 2107 movs r1, #7
8005a68: 400a ands r2, r1
8005a6a: 2101 movs r1, #1
8005a6c: 4091 lsls r1, r2
8005a6e: 000a movs r2, r1
8005a70: b252 sxtb r2, r2
8005a72: 43d2 mvns r2, r2
8005a74: b252 sxtb r2, r2
8005a76: 4013 ands r3, r2
8005a78: b25b sxtb r3, r3
8005a7a: 0002 movs r2, r0
8005a7c: b2d9 uxtb r1, r3
8005a7e: 193b adds r3, r7, r4
8005a80: 5499 strb r1, [r3, r2]
8005a82: e01a b.n 8005aba <initVL53L0X+0x19e>
8005a84: 2000025e .word 0x2000025e
}
else if ((ref_spad_map[i / 8] >> (i % 8)) & 0x1)
8005a88: 2016 movs r0, #22
8005a8a: 183b adds r3, r7, r0
8005a8c: 781b ldrb r3, [r3, #0]
8005a8e: 08db lsrs r3, r3, #3
8005a90: b2db uxtb r3, r3
8005a92: 001a movs r2, r3
8005a94: 230c movs r3, #12
8005a96: 18fb adds r3, r7, r3
8005a98: 5c9b ldrb r3, [r3, r2]
8005a9a: 0019 movs r1, r3
8005a9c: 183b adds r3, r7, r0
8005a9e: 781b ldrb r3, [r3, #0]
8005aa0: 2207 movs r2, #7
8005aa2: 4013 ands r3, r2
8005aa4: 4119 asrs r1, r3
8005aa6: 000b movs r3, r1
8005aa8: 2201 movs r2, #1
8005aaa: 4013 ands r3, r2
8005aac: d005 beq.n 8005aba <initVL53L0X+0x19e>
{
spads_enabled++;
8005aae: 2117 movs r1, #23
8005ab0: 187b adds r3, r7, r1
8005ab2: 781a ldrb r2, [r3, #0]
8005ab4: 187b adds r3, r7, r1
8005ab6: 3201 adds r2, #1
8005ab8: 701a strb r2, [r3, #0]
for (uint8_t i = 0; i < 48; i++)
8005aba: 2116 movs r1, #22
8005abc: 187b adds r3, r7, r1
8005abe: 781a ldrb r2, [r3, #0]
8005ac0: 187b adds r3, r7, r1
8005ac2: 3201 adds r2, #1
8005ac4: 701a strb r2, [r3, #0]
8005ac6: 2316 movs r3, #22
8005ac8: 18fb adds r3, r7, r3
8005aca: 781b ldrb r3, [r3, #0]
8005acc: 2b2f cmp r3, #47 ; 0x2f
8005ace: d9ae bls.n 8005a2e <initVL53L0X+0x112>
}
}
writeMulti(GLOBAL_CONFIG_SPAD_ENABLES_REF_0, ref_spad_map, 6);
8005ad0: 230c movs r3, #12
8005ad2: 18fb adds r3, r7, r3
8005ad4: 2206 movs r2, #6
8005ad6: 0019 movs r1, r3
8005ad8: 20b0 movs r0, #176 ; 0xb0
8005ada: f7ff fecf bl 800587c <writeMulti>
// -- VL53L0X_set_reference_spads() end
// -- VL53L0X_load_tuning_settings() begin
// DefaultTuningSettings from vl53l0x_tuning.h
writeReg(0xFF, 0x01);
8005ade: 2101 movs r1, #1
8005ae0: 20ff movs r0, #255 ; 0xff
8005ae2: f7ff fdf1 bl 80056c8 <writeReg>
writeReg(0x00, 0x00);
8005ae6: 2100 movs r1, #0
8005ae8: 2000 movs r0, #0
8005aea: f7ff fded bl 80056c8 <writeReg>
writeReg(0xFF, 0x00);
8005aee: 2100 movs r1, #0
8005af0: 20ff movs r0, #255 ; 0xff
8005af2: f7ff fde9 bl 80056c8 <writeReg>
writeReg(0x09, 0x00);
8005af6: 2100 movs r1, #0
8005af8: 2009 movs r0, #9
8005afa: f7ff fde5 bl 80056c8 <writeReg>
writeReg(0x10, 0x00);
8005afe: 2100 movs r1, #0
8005b00: 2010 movs r0, #16
8005b02: f7ff fde1 bl 80056c8 <writeReg>
writeReg(0x11, 0x00);
8005b06: 2100 movs r1, #0
8005b08: 2011 movs r0, #17
8005b0a: f7ff fddd bl 80056c8 <writeReg>
writeReg(0x24, 0x01);
8005b0e: 2101 movs r1, #1
8005b10: 2024 movs r0, #36 ; 0x24
8005b12: f7ff fdd9 bl 80056c8 <writeReg>
writeReg(0x25, 0xFF);
8005b16: 21ff movs r1, #255 ; 0xff
8005b18: 2025 movs r0, #37 ; 0x25
8005b1a: f7ff fdd5 bl 80056c8 <writeReg>
writeReg(0x75, 0x00);
8005b1e: 2100 movs r1, #0
8005b20: 2075 movs r0, #117 ; 0x75
8005b22: f7ff fdd1 bl 80056c8 <writeReg>
writeReg(0xFF, 0x01);
8005b26: 2101 movs r1, #1
8005b28: 20ff movs r0, #255 ; 0xff
8005b2a: f7ff fdcd bl 80056c8 <writeReg>
writeReg(0x4E, 0x2C);
8005b2e: 212c movs r1, #44 ; 0x2c
8005b30: 204e movs r0, #78 ; 0x4e
8005b32: f7ff fdc9 bl 80056c8 <writeReg>
writeReg(0x48, 0x00);
8005b36: 2100 movs r1, #0
8005b38: 2048 movs r0, #72 ; 0x48
8005b3a: f7ff fdc5 bl 80056c8 <writeReg>
writeReg(0x30, 0x20);
8005b3e: 2120 movs r1, #32
8005b40: 2030 movs r0, #48 ; 0x30
8005b42: f7ff fdc1 bl 80056c8 <writeReg>
writeReg(0xFF, 0x00);
8005b46: 2100 movs r1, #0
8005b48: 20ff movs r0, #255 ; 0xff
8005b4a: f7ff fdbd bl 80056c8 <writeReg>
writeReg(0x30, 0x09);
8005b4e: 2109 movs r1, #9
8005b50: 2030 movs r0, #48 ; 0x30
8005b52: f7ff fdb9 bl 80056c8 <writeReg>
writeReg(0x54, 0x00);
8005b56: 2100 movs r1, #0
8005b58: 2054 movs r0, #84 ; 0x54
8005b5a: f7ff fdb5 bl 80056c8 <writeReg>
writeReg(0x31, 0x04);
8005b5e: 2104 movs r1, #4
8005b60: 2031 movs r0, #49 ; 0x31
8005b62: f7ff fdb1 bl 80056c8 <writeReg>
writeReg(0x32, 0x03);
8005b66: 2103 movs r1, #3
8005b68: 2032 movs r0, #50 ; 0x32
8005b6a: f7ff fdad bl 80056c8 <writeReg>
writeReg(0x40, 0x83);
8005b6e: 2183 movs r1, #131 ; 0x83
8005b70: 2040 movs r0, #64 ; 0x40
8005b72: f7ff fda9 bl 80056c8 <writeReg>
writeReg(0x46, 0x25);
8005b76: 2125 movs r1, #37 ; 0x25
8005b78: 2046 movs r0, #70 ; 0x46
8005b7a: f7ff fda5 bl 80056c8 <writeReg>
writeReg(0x60, 0x00);
8005b7e: 2100 movs r1, #0
8005b80: 2060 movs r0, #96 ; 0x60
8005b82: f7ff fda1 bl 80056c8 <writeReg>
writeReg(0x27, 0x00);
8005b86: 2100 movs r1, #0
8005b88: 2027 movs r0, #39 ; 0x27
8005b8a: f7ff fd9d bl 80056c8 <writeReg>
writeReg(0x50, 0x06);
8005b8e: 2106 movs r1, #6
8005b90: 2050 movs r0, #80 ; 0x50
8005b92: f7ff fd99 bl 80056c8 <writeReg>
writeReg(0x51, 0x00);
8005b96: 2100 movs r1, #0
8005b98: 2051 movs r0, #81 ; 0x51
8005b9a: f7ff fd95 bl 80056c8 <writeReg>
writeReg(0x52, 0x96);
8005b9e: 2196 movs r1, #150 ; 0x96
8005ba0: 2052 movs r0, #82 ; 0x52
8005ba2: f7ff fd91 bl 80056c8 <writeReg>
writeReg(0x56, 0x08);
8005ba6: 2108 movs r1, #8
8005ba8: 2056 movs r0, #86 ; 0x56
8005baa: f7ff fd8d bl 80056c8 <writeReg>
writeReg(0x57, 0x30);
8005bae: 2130 movs r1, #48 ; 0x30
8005bb0: 2057 movs r0, #87 ; 0x57
8005bb2: f7ff fd89 bl 80056c8 <writeReg>
writeReg(0x61, 0x00);
8005bb6: 2100 movs r1, #0
8005bb8: 2061 movs r0, #97 ; 0x61
8005bba: f7ff fd85 bl 80056c8 <writeReg>
writeReg(0x62, 0x00);
8005bbe: 2100 movs r1, #0
8005bc0: 2062 movs r0, #98 ; 0x62
8005bc2: f7ff fd81 bl 80056c8 <writeReg>
writeReg(0x64, 0x00);
8005bc6: 2100 movs r1, #0
8005bc8: 2064 movs r0, #100 ; 0x64
8005bca: f7ff fd7d bl 80056c8 <writeReg>
writeReg(0x65, 0x00);
8005bce: 2100 movs r1, #0
8005bd0: 2065 movs r0, #101 ; 0x65
8005bd2: f7ff fd79 bl 80056c8 <writeReg>
writeReg(0x66, 0xA0);
8005bd6: 21a0 movs r1, #160 ; 0xa0
8005bd8: 2066 movs r0, #102 ; 0x66
8005bda: f7ff fd75 bl 80056c8 <writeReg>
writeReg(0xFF, 0x01);
8005bde: 2101 movs r1, #1
8005be0: 20ff movs r0, #255 ; 0xff
8005be2: f7ff fd71 bl 80056c8 <writeReg>
writeReg(0x22, 0x32);
8005be6: 2132 movs r1, #50 ; 0x32
8005be8: 2022 movs r0, #34 ; 0x22
8005bea: f7ff fd6d bl 80056c8 <writeReg>
writeReg(0x47, 0x14);
8005bee: 2114 movs r1, #20
8005bf0: 2047 movs r0, #71 ; 0x47
8005bf2: f7ff fd69 bl 80056c8 <writeReg>
writeReg(0x49, 0xFF);
8005bf6: 21ff movs r1, #255 ; 0xff
8005bf8: 2049 movs r0, #73 ; 0x49
8005bfa: f7ff fd65 bl 80056c8 <writeReg>
writeReg(0x4A, 0x00);
8005bfe: 2100 movs r1, #0
8005c00: 204a movs r0, #74 ; 0x4a
8005c02: f7ff fd61 bl 80056c8 <writeReg>
writeReg(0xFF, 0x00);
8005c06: 2100 movs r1, #0
8005c08: 20ff movs r0, #255 ; 0xff
8005c0a: f7ff fd5d bl 80056c8 <writeReg>
writeReg(0x7A, 0x0A);
8005c0e: 210a movs r1, #10
8005c10: 207a movs r0, #122 ; 0x7a
8005c12: f7ff fd59 bl 80056c8 <writeReg>
writeReg(0x7B, 0x00);
8005c16: 2100 movs r1, #0
8005c18: 207b movs r0, #123 ; 0x7b
8005c1a: f7ff fd55 bl 80056c8 <writeReg>
writeReg(0x78, 0x21);
8005c1e: 2121 movs r1, #33 ; 0x21
8005c20: 2078 movs r0, #120 ; 0x78
8005c22: f7ff fd51 bl 80056c8 <writeReg>
writeReg(0xFF, 0x01);
8005c26: 2101 movs r1, #1
8005c28: 20ff movs r0, #255 ; 0xff
8005c2a: f7ff fd4d bl 80056c8 <writeReg>
writeReg(0x23, 0x34);
8005c2e: 2134 movs r1, #52 ; 0x34
8005c30: 2023 movs r0, #35 ; 0x23
8005c32: f7ff fd49 bl 80056c8 <writeReg>
writeReg(0x42, 0x00);
8005c36: 2100 movs r1, #0
8005c38: 2042 movs r0, #66 ; 0x42
8005c3a: f7ff fd45 bl 80056c8 <writeReg>
writeReg(0x44, 0xFF);
8005c3e: 21ff movs r1, #255 ; 0xff
8005c40: 2044 movs r0, #68 ; 0x44
8005c42: f7ff fd41 bl 80056c8 <writeReg>
writeReg(0x45, 0x26);
8005c46: 2126 movs r1, #38 ; 0x26
8005c48: 2045 movs r0, #69 ; 0x45
8005c4a: f7ff fd3d bl 80056c8 <writeReg>
writeReg(0x46, 0x05);
8005c4e: 2105 movs r1, #5
8005c50: 2046 movs r0, #70 ; 0x46
8005c52: f7ff fd39 bl 80056c8 <writeReg>
writeReg(0x40, 0x40);
8005c56: 2140 movs r1, #64 ; 0x40
8005c58: 2040 movs r0, #64 ; 0x40
8005c5a: f7ff fd35 bl 80056c8 <writeReg>
writeReg(0x0E, 0x06);
8005c5e: 2106 movs r1, #6
8005c60: 200e movs r0, #14
8005c62: f7ff fd31 bl 80056c8 <writeReg>
writeReg(0x20, 0x1A);
8005c66: 211a movs r1, #26
8005c68: 2020 movs r0, #32
8005c6a: f7ff fd2d bl 80056c8 <writeReg>
writeReg(0x43, 0x40);
8005c6e: 2140 movs r1, #64 ; 0x40
8005c70: 2043 movs r0, #67 ; 0x43
8005c72: f7ff fd29 bl 80056c8 <writeReg>
writeReg(0xFF, 0x00);
8005c76: 2100 movs r1, #0
8005c78: 20ff movs r0, #255 ; 0xff
8005c7a: f7ff fd25 bl 80056c8 <writeReg>
writeReg(0x34, 0x03);
8005c7e: 2103 movs r1, #3
8005c80: 2034 movs r0, #52 ; 0x34
8005c82: f7ff fd21 bl 80056c8 <writeReg>
writeReg(0x35, 0x44);
8005c86: 2144 movs r1, #68 ; 0x44
8005c88: 2035 movs r0, #53 ; 0x35
8005c8a: f7ff fd1d bl 80056c8 <writeReg>
writeReg(0xFF, 0x01);
8005c8e: 2101 movs r1, #1
8005c90: 20ff movs r0, #255 ; 0xff
8005c92: f7ff fd19 bl 80056c8 <writeReg>
writeReg(0x31, 0x04);
8005c96: 2104 movs r1, #4
8005c98: 2031 movs r0, #49 ; 0x31
8005c9a: f7ff fd15 bl 80056c8 <writeReg>
writeReg(0x4B, 0x09);
8005c9e: 2109 movs r1, #9
8005ca0: 204b movs r0, #75 ; 0x4b
8005ca2: f7ff fd11 bl 80056c8 <writeReg>
writeReg(0x4C, 0x05);
8005ca6: 2105 movs r1, #5
8005ca8: 204c movs r0, #76 ; 0x4c
8005caa: f7ff fd0d bl 80056c8 <writeReg>
writeReg(0x4D, 0x04);
8005cae: 2104 movs r1, #4
8005cb0: 204d movs r0, #77 ; 0x4d
8005cb2: f7ff fd09 bl 80056c8 <writeReg>
writeReg(0xFF, 0x00);
8005cb6: 2100 movs r1, #0
8005cb8: 20ff movs r0, #255 ; 0xff
8005cba: f7ff fd05 bl 80056c8 <writeReg>
writeReg(0x44, 0x00);
8005cbe: 2100 movs r1, #0
8005cc0: 2044 movs r0, #68 ; 0x44
8005cc2: f7ff fd01 bl 80056c8 <writeReg>
writeReg(0x45, 0x20);
8005cc6: 2120 movs r1, #32
8005cc8: 2045 movs r0, #69 ; 0x45
8005cca: f7ff fcfd bl 80056c8 <writeReg>
writeReg(0x47, 0x08);
8005cce: 2108 movs r1, #8
8005cd0: 2047 movs r0, #71 ; 0x47
8005cd2: f7ff fcf9 bl 80056c8 <writeReg>
writeReg(0x48, 0x28);
8005cd6: 2128 movs r1, #40 ; 0x28
8005cd8: 2048 movs r0, #72 ; 0x48
8005cda: f7ff fcf5 bl 80056c8 <writeReg>
writeReg(0x67, 0x00);
8005cde: 2100 movs r1, #0
8005ce0: 2067 movs r0, #103 ; 0x67
8005ce2: f7ff fcf1 bl 80056c8 <writeReg>
writeReg(0x70, 0x04);
8005ce6: 2104 movs r1, #4
8005ce8: 2070 movs r0, #112 ; 0x70
8005cea: f7ff fced bl 80056c8 <writeReg>
writeReg(0x71, 0x01);
8005cee: 2101 movs r1, #1
8005cf0: 2071 movs r0, #113 ; 0x71
8005cf2: f7ff fce9 bl 80056c8 <writeReg>
writeReg(0x72, 0xFE);
8005cf6: 21fe movs r1, #254 ; 0xfe
8005cf8: 2072 movs r0, #114 ; 0x72
8005cfa: f7ff fce5 bl 80056c8 <writeReg>
writeReg(0x76, 0x00);
8005cfe: 2100 movs r1, #0
8005d00: 2076 movs r0, #118 ; 0x76
8005d02: f7ff fce1 bl 80056c8 <writeReg>
writeReg(0x77, 0x00);
8005d06: 2100 movs r1, #0
8005d08: 2077 movs r0, #119 ; 0x77
8005d0a: f7ff fcdd bl 80056c8 <writeReg>
writeReg(0xFF, 0x01);
8005d0e: 2101 movs r1, #1
8005d10: 20ff movs r0, #255 ; 0xff
8005d12: f7ff fcd9 bl 80056c8 <writeReg>
writeReg(0x0D, 0x01);
8005d16: 2101 movs r1, #1
8005d18: 200d movs r0, #13
8005d1a: f7ff fcd5 bl 80056c8 <writeReg>
writeReg(0xFF, 0x00);
8005d1e: 2100 movs r1, #0
8005d20: 20ff movs r0, #255 ; 0xff
8005d22: f7ff fcd1 bl 80056c8 <writeReg>
writeReg(0x80, 0x01);
8005d26: 2101 movs r1, #1
8005d28: 2080 movs r0, #128 ; 0x80
8005d2a: f7ff fccd bl 80056c8 <writeReg>
writeReg(0x01, 0xF8);
8005d2e: 21f8 movs r1, #248 ; 0xf8
8005d30: 2001 movs r0, #1
8005d32: f7ff fcc9 bl 80056c8 <writeReg>
writeReg(0xFF, 0x01);
8005d36: 2101 movs r1, #1
8005d38: 20ff movs r0, #255 ; 0xff
8005d3a: f7ff fcc5 bl 80056c8 <writeReg>
writeReg(0x8E, 0x01);
8005d3e: 2101 movs r1, #1
8005d40: 208e movs r0, #142 ; 0x8e
8005d42: f7ff fcc1 bl 80056c8 <writeReg>
writeReg(0x00, 0x01);
8005d46: 2101 movs r1, #1
8005d48: 2000 movs r0, #0
8005d4a: f7ff fcbd bl 80056c8 <writeReg>
writeReg(0xFF, 0x00);
8005d4e: 2100 movs r1, #0
8005d50: 20ff movs r0, #255 ; 0xff
8005d52: f7ff fcb9 bl 80056c8 <writeReg>
writeReg(0x80, 0x00);
8005d56: 2100 movs r1, #0
8005d58: 2080 movs r0, #128 ; 0x80
8005d5a: f7ff fcb5 bl 80056c8 <writeReg>
// -- VL53L0X_load_tuning_settings() end
// "Set interrupt config to new sample ready"
// -- VL53L0X_SetGpioConfig() begin
writeReg(SYSTEM_INTERRUPT_CONFIG_GPIO, 0x04);
8005d5e: 2104 movs r1, #4
8005d60: 200a movs r0, #10
8005d62: f7ff fcb1 bl 80056c8 <writeReg>
writeReg(GPIO_HV_MUX_ACTIVE_HIGH, readReg(GPIO_HV_MUX_ACTIVE_HIGH) & ~0x10); // active low
8005d66: 2084 movs r0, #132 ; 0x84
8005d68: f7ff fd34 bl 80057d4 <readReg>
8005d6c: 0003 movs r3, r0
8005d6e: 001a movs r2, r3
8005d70: 2310 movs r3, #16
8005d72: 439a bics r2, r3
8005d74: 0013 movs r3, r2
8005d76: b2db uxtb r3, r3
8005d78: 0019 movs r1, r3
8005d7a: 2084 movs r0, #132 ; 0x84
8005d7c: f7ff fca4 bl 80056c8 <writeReg>
writeReg(SYSTEM_INTERRUPT_CLEAR, 0x01);
8005d80: 2101 movs r1, #1
8005d82: 200b movs r0, #11
8005d84: f7ff fca0 bl 80056c8 <writeReg>
// -- VL53L0X_SetGpioConfig() end
g_measTimBudUs = getMeasurementTimingBudget();
8005d88: f000 f924 bl 8005fd4 <getMeasurementTimingBudget>
8005d8c: 0002 movs r2, r0
8005d8e: 4b15 ldr r3, [pc, #84] ; (8005de4 <initVL53L0X+0x4c8>)
8005d90: 601a str r2, [r3, #0]
// "Disable MSRC and TCC by default"
// MSRC = Minimum Signal Rate Check
// TCC = Target CentreCheck
// -- VL53L0X_SetSequenceStepEnable() begin
writeReg(SYSTEM_SEQUENCE_CONFIG, 0xE8);
8005d92: 21e8 movs r1, #232 ; 0xe8
8005d94: 2001 movs r0, #1
8005d96: f7ff fc97 bl 80056c8 <writeReg>
// -- VL53L0X_SetSequenceStepEnable() end
// "Recalculate timing budget"
setMeasurementTimingBudget(g_measTimBudUs);
8005d9a: 4b12 ldr r3, [pc, #72] ; (8005de4 <initVL53L0X+0x4c8>)
8005d9c: 681b ldr r3, [r3, #0]
8005d9e: 0018 movs r0, r3
8005da0: f000 f850 bl 8005e44 <setMeasurementTimingBudget>
// VL53L0X_PerformRefCalibration() begin (VL53L0X_perform_ref_calibration())
// -- VL53L0X_perform_vhv_calibration() begin
writeReg(SYSTEM_SEQUENCE_CONFIG, 0x01);
8005da4: 2101 movs r1, #1
8005da6: 2001 movs r0, #1
8005da8: f7ff fc8e bl 80056c8 <writeReg>
if (!performSingleRefCalibration(0x40)) { return false; }
8005dac: 2040 movs r0, #64 ; 0x40
8005dae: f000 fc79 bl 80066a4 <performSingleRefCalibration>
8005db2: 1e03 subs r3, r0, #0
8005db4: d101 bne.n 8005dba <initVL53L0X+0x49e>
8005db6: 2300 movs r3, #0
8005db8: e00f b.n 8005dda <initVL53L0X+0x4be>
// -- VL53L0X_perform_vhv_calibration() end
// -- VL53L0X_perform_phase_calibration() begin
writeReg(SYSTEM_SEQUENCE_CONFIG, 0x02);
8005dba: 2102 movs r1, #2
8005dbc: 2001 movs r0, #1
8005dbe: f7ff fc83 bl 80056c8 <writeReg>
if (!performSingleRefCalibration(0x00)) { return false; }
8005dc2: 2000 movs r0, #0
8005dc4: f000 fc6e bl 80066a4 <performSingleRefCalibration>
8005dc8: 1e03 subs r3, r0, #0
8005dca: d101 bne.n 8005dd0 <initVL53L0X+0x4b4>
8005dcc: 2300 movs r3, #0
8005dce: e004 b.n 8005dda <initVL53L0X+0x4be>
// -- VL53L0X_perform_phase_calibration() end
// "restore the previous Sequence Config"
writeReg(SYSTEM_SEQUENCE_CONFIG, 0xE8);
8005dd0: 21e8 movs r1, #232 ; 0xe8
8005dd2: 2001 movs r0, #1
8005dd4: f7ff fc78 bl 80056c8 <writeReg>
// VL53L0X_PerformRefCalibration() end
return true;
8005dd8: 2301 movs r3, #1
}
8005dda: 0018 movs r0, r3
8005ddc: 46bd mov sp, r7
8005dde: b007 add sp, #28
8005de0: bd90 pop {r4, r7, pc}
8005de2: 46c0 nop ; (mov r8, r8)
8005de4: 20000260 .word 0x20000260
08005de8 <setSignalRateLimit>:
// Setting a lower limit increases the potential range of the sensor but also
// seems to increase the likelihood of getting an inaccurate reading because of
// unwanted reflections from objects other than the intended target.
// Defaults to 0.25 MCPS as initialized by the ST API and this library.
bool setSignalRateLimit(float limit_Mcps)
{
8005de8: b580 push {r7, lr}
8005dea: b082 sub sp, #8
8005dec: af00 add r7, sp, #0
8005dee: 6078 str r0, [r7, #4]
if (limit_Mcps < 0 || limit_Mcps > 511.99) { return false; }
8005df0: 2100 movs r1, #0
8005df2: 6878 ldr r0, [r7, #4]
8005df4: f7fa fb4e bl 8000494 <__aeabi_fcmplt>
8005df8: 1e03 subs r3, r0, #0
8005dfa: d108 bne.n 8005e0e <setSignalRateLimit+0x26>
8005dfc: 6878 ldr r0, [r7, #4]
8005dfe: f7fb f839 bl 8000e74 <__aeabi_f2d>
8005e02: 4a0e ldr r2, [pc, #56] ; (8005e3c <setSignalRateLimit+0x54>)
8005e04: 4b0e ldr r3, [pc, #56] ; (8005e40 <setSignalRateLimit+0x58>)
8005e06: f7fa fb1f bl 8000448 <__aeabi_dcmpgt>
8005e0a: 1e03 subs r3, r0, #0
8005e0c: d001 beq.n 8005e12 <setSignalRateLimit+0x2a>
8005e0e: 2300 movs r3, #0
8005e10: e00f b.n 8005e32 <setSignalRateLimit+0x4a>
// Q9.7 fixed point format (9 integer bits, 7 fractional bits)
writeReg16Bit(FINAL_RANGE_CONFIG_MIN_COUNT_RATE_RTN_LIMIT, limit_Mcps * (1 << 7));
8005e12: 2186 movs r1, #134 ; 0x86
8005e14: 05c9 lsls r1, r1, #23
8005e16: 6878 ldr r0, [r7, #4]
8005e18: f7fa fc2c bl 8000674 <__aeabi_fmul>
8005e1c: 1c03 adds r3, r0, #0
8005e1e: 1c18 adds r0, r3, #0
8005e20: f7fa fb60 bl 80004e4 <__aeabi_f2uiz>
8005e24: 0003 movs r3, r0
8005e26: b29b uxth r3, r3
8005e28: 0019 movs r1, r3
8005e2a: 2044 movs r0, #68 ; 0x44
8005e2c: f7ff fc6e bl 800570c <writeReg16Bit>
return true;
8005e30: 2301 movs r3, #1
}
8005e32: 0018 movs r0, r3
8005e34: 46bd mov sp, r7
8005e36: b002 add sp, #8
8005e38: bd80 pop {r7, pc}
8005e3a: 46c0 nop ; (mov r8, r8)
8005e3c: 0a3d70a4 .word 0x0a3d70a4
8005e40: 407fffd7 .word 0x407fffd7
08005e44 <setMeasurementTimingBudget>:
// budget allows for more accurate measurements. Increasing the budget by a
// factor of N decreases the range measurement standard deviation by a factor of
// sqrt(N). Defaults to about 33 milliseconds; the minimum is 20 ms.
// based on VL53L0X_set_measurement_timing_budget_micro_seconds()
bool setMeasurementTimingBudget(uint32_t budget_us)
{
8005e44: b5b0 push {r4, r5, r7, lr}
8005e46: b092 sub sp, #72 ; 0x48
8005e48: af00 add r7, sp, #0
8005e4a: 6078 str r0, [r7, #4]
SequenceStepEnables enables;
SequenceStepTimeouts timeouts;
uint16_t const StartOverhead = 1320; // note that this is different than the value in get_
8005e4c: 2340 movs r3, #64 ; 0x40
8005e4e: 18fb adds r3, r7, r3
8005e50: 22a5 movs r2, #165 ; 0xa5
8005e52: 00d2 lsls r2, r2, #3
8005e54: 801a strh r2, [r3, #0]
uint16_t const EndOverhead = 960;
8005e56: 233e movs r3, #62 ; 0x3e
8005e58: 18fb adds r3, r7, r3
8005e5a: 22f0 movs r2, #240 ; 0xf0
8005e5c: 0092 lsls r2, r2, #2
8005e5e: 801a strh r2, [r3, #0]
uint16_t const MsrcOverhead = 660;
8005e60: 233c movs r3, #60 ; 0x3c
8005e62: 18fb adds r3, r7, r3
8005e64: 22a5 movs r2, #165 ; 0xa5
8005e66: 0092 lsls r2, r2, #2
8005e68: 801a strh r2, [r3, #0]
uint16_t const TccOverhead = 590;
8005e6a: 233a movs r3, #58 ; 0x3a
8005e6c: 18fb adds r3, r7, r3
8005e6e: 4a54 ldr r2, [pc, #336] ; (8005fc0 <setMeasurementTimingBudget+0x17c>)
8005e70: 801a strh r2, [r3, #0]
uint16_t const DssOverhead = 690;
8005e72: 2338 movs r3, #56 ; 0x38
8005e74: 18fb adds r3, r7, r3
8005e76: 4a53 ldr r2, [pc, #332] ; (8005fc4 <setMeasurementTimingBudget+0x180>)
8005e78: 801a strh r2, [r3, #0]
uint16_t const PreRangeOverhead = 660;
8005e7a: 2336 movs r3, #54 ; 0x36
8005e7c: 18fb adds r3, r7, r3
8005e7e: 22a5 movs r2, #165 ; 0xa5
8005e80: 0092 lsls r2, r2, #2
8005e82: 801a strh r2, [r3, #0]
uint16_t const FinalRangeOverhead = 550;
8005e84: 2334 movs r3, #52 ; 0x34
8005e86: 18fb adds r3, r7, r3
8005e88: 4a4f ldr r2, [pc, #316] ; (8005fc8 <setMeasurementTimingBudget+0x184>)
8005e8a: 801a strh r2, [r3, #0]
uint32_t const MinTimingBudget = 20000;
8005e8c: 4b4f ldr r3, [pc, #316] ; (8005fcc <setMeasurementTimingBudget+0x188>)
8005e8e: 633b str r3, [r7, #48] ; 0x30
if (budget_us < MinTimingBudget) { return false; }
8005e90: 687a ldr r2, [r7, #4]
8005e92: 6b3b ldr r3, [r7, #48] ; 0x30
8005e94: 429a cmp r2, r3
8005e96: d201 bcs.n 8005e9c <setMeasurementTimingBudget+0x58>
8005e98: 2300 movs r3, #0
8005e9a: e08c b.n 8005fb6 <setMeasurementTimingBudget+0x172>
uint32_t used_budget_us = StartOverhead + EndOverhead;
8005e9c: 2340 movs r3, #64 ; 0x40
8005e9e: 18fb adds r3, r7, r3
8005ea0: 881a ldrh r2, [r3, #0]
8005ea2: 233e movs r3, #62 ; 0x3e
8005ea4: 18fb adds r3, r7, r3
8005ea6: 881b ldrh r3, [r3, #0]
8005ea8: 18d3 adds r3, r2, r3
8005eaa: 647b str r3, [r7, #68] ; 0x44
getSequenceStepEnables(&enables);
8005eac: 2424 movs r4, #36 ; 0x24
8005eae: 193b adds r3, r7, r4
8005eb0: 0018 movs r0, r3
8005eb2: f000 faad bl 8006410 <getSequenceStepEnables>
getSequenceStepTimeouts(&enables, &timeouts);
8005eb6: 250c movs r5, #12
8005eb8: 197a adds r2, r7, r5
8005eba: 193b adds r3, r7, r4
8005ebc: 0011 movs r1, r2
8005ebe: 0018 movs r0, r3
8005ec0: f000 fae0 bl 8006484 <getSequenceStepTimeouts>
if (enables.tcc)
8005ec4: 193b adds r3, r7, r4
8005ec6: 781b ldrb r3, [r3, #0]
8005ec8: 2b00 cmp r3, #0
8005eca: d008 beq.n 8005ede <setMeasurementTimingBudget+0x9a>
{
used_budget_us += (timeouts.msrc_dss_tcc_us + TccOverhead);
8005ecc: 197b adds r3, r7, r5
8005ece: 68da ldr r2, [r3, #12]
8005ed0: 233a movs r3, #58 ; 0x3a
8005ed2: 18fb adds r3, r7, r3
8005ed4: 881b ldrh r3, [r3, #0]
8005ed6: 18d3 adds r3, r2, r3
8005ed8: 6c7a ldr r2, [r7, #68] ; 0x44
8005eda: 18d3 adds r3, r2, r3
8005edc: 647b str r3, [r7, #68] ; 0x44
}
if (enables.dss)
8005ede: 2324 movs r3, #36 ; 0x24
8005ee0: 18fb adds r3, r7, r3
8005ee2: 789b ldrb r3, [r3, #2]
8005ee4: 2b00 cmp r3, #0
8005ee6: d00b beq.n 8005f00 <setMeasurementTimingBudget+0xbc>
{
used_budget_us += 2 * (timeouts.msrc_dss_tcc_us + DssOverhead);
8005ee8: 230c movs r3, #12
8005eea: 18fb adds r3, r7, r3
8005eec: 68da ldr r2, [r3, #12]
8005eee: 2338 movs r3, #56 ; 0x38
8005ef0: 18fb adds r3, r7, r3
8005ef2: 881b ldrh r3, [r3, #0]
8005ef4: 18d3 adds r3, r2, r3
8005ef6: 005b lsls r3, r3, #1
8005ef8: 6c7a ldr r2, [r7, #68] ; 0x44
8005efa: 18d3 adds r3, r2, r3
8005efc: 647b str r3, [r7, #68] ; 0x44
8005efe: e00e b.n 8005f1e <setMeasurementTimingBudget+0xda>
}
else if (enables.msrc)
8005f00: 2324 movs r3, #36 ; 0x24
8005f02: 18fb adds r3, r7, r3
8005f04: 785b ldrb r3, [r3, #1]
8005f06: 2b00 cmp r3, #0
8005f08: d009 beq.n 8005f1e <setMeasurementTimingBudget+0xda>
{
used_budget_us += (timeouts.msrc_dss_tcc_us + MsrcOverhead);
8005f0a: 230c movs r3, #12
8005f0c: 18fb adds r3, r7, r3
8005f0e: 68da ldr r2, [r3, #12]
8005f10: 233c movs r3, #60 ; 0x3c
8005f12: 18fb adds r3, r7, r3
8005f14: 881b ldrh r3, [r3, #0]
8005f16: 18d3 adds r3, r2, r3
8005f18: 6c7a ldr r2, [r7, #68] ; 0x44
8005f1a: 18d3 adds r3, r2, r3
8005f1c: 647b str r3, [r7, #68] ; 0x44
}
if (enables.pre_range)
8005f1e: 2324 movs r3, #36 ; 0x24
8005f20: 18fb adds r3, r7, r3
8005f22: 78db ldrb r3, [r3, #3]
8005f24: 2b00 cmp r3, #0
8005f26: d009 beq.n 8005f3c <setMeasurementTimingBudget+0xf8>
{
used_budget_us += (timeouts.pre_range_us + PreRangeOverhead);
8005f28: 230c movs r3, #12
8005f2a: 18fb adds r3, r7, r3
8005f2c: 691a ldr r2, [r3, #16]
8005f2e: 2336 movs r3, #54 ; 0x36
8005f30: 18fb adds r3, r7, r3
8005f32: 881b ldrh r3, [r3, #0]
8005f34: 18d3 adds r3, r2, r3
8005f36: 6c7a ldr r2, [r7, #68] ; 0x44
8005f38: 18d3 adds r3, r2, r3
8005f3a: 647b str r3, [r7, #68] ; 0x44
}
if (enables.final_range)
8005f3c: 2324 movs r3, #36 ; 0x24
8005f3e: 18fb adds r3, r7, r3
8005f40: 791b ldrb r3, [r3, #4]
8005f42: 2b00 cmp r3, #0
8005f44: d036 beq.n 8005fb4 <setMeasurementTimingBudget+0x170>
{
used_budget_us += FinalRangeOverhead;
8005f46: 2334 movs r3, #52 ; 0x34
8005f48: 18fb adds r3, r7, r3
8005f4a: 881b ldrh r3, [r3, #0]
8005f4c: 6c7a ldr r2, [r7, #68] ; 0x44
8005f4e: 18d3 adds r3, r2, r3
8005f50: 647b str r3, [r7, #68] ; 0x44
// budget and the sum of all other timeouts within the sequence.
// If there is no room for the final range timeout, then an error
// will be set. Otherwise the remaining time will be applied to
// the final range."
if (used_budget_us > budget_us)
8005f52: 6c7a ldr r2, [r7, #68] ; 0x44
8005f54: 687b ldr r3, [r7, #4]
8005f56: 429a cmp r2, r3
8005f58: d901 bls.n 8005f5e <setMeasurementTimingBudget+0x11a>
{
// "Requested timeout too big."
return false;
8005f5a: 2300 movs r3, #0
8005f5c: e02b b.n 8005fb6 <setMeasurementTimingBudget+0x172>
}
uint32_t final_range_timeout_us = budget_us - used_budget_us;
8005f5e: 687a ldr r2, [r7, #4]
8005f60: 6c7b ldr r3, [r7, #68] ; 0x44
8005f62: 1ad3 subs r3, r2, r3
8005f64: 62fb str r3, [r7, #44] ; 0x2c
// timeouts must be expressed in macro periods MClks
// because they have different vcsel periods."
uint16_t final_range_timeout_mclks =
timeoutMicrosecondsToMclks(final_range_timeout_us,
timeouts.final_range_vcsel_period_pclks);
8005f66: 240c movs r4, #12
8005f68: 193b adds r3, r7, r4
8005f6a: 885b ldrh r3, [r3, #2]
timeoutMicrosecondsToMclks(final_range_timeout_us,
8005f6c: b2da uxtb r2, r3
8005f6e: 6afb ldr r3, [r7, #44] ; 0x2c
8005f70: 0011 movs r1, r2
8005f72: 0018 movs r0, r3
8005f74: f000 fb65 bl 8006642 <timeoutMicrosecondsToMclks>
8005f78: 0002 movs r2, r0
uint16_t final_range_timeout_mclks =
8005f7a: 2042 movs r0, #66 ; 0x42
8005f7c: 183b adds r3, r7, r0
8005f7e: 801a strh r2, [r3, #0]
if (enables.pre_range)
8005f80: 2324 movs r3, #36 ; 0x24
8005f82: 18fb adds r3, r7, r3
8005f84: 78db ldrb r3, [r3, #3]
8005f86: 2b00 cmp r3, #0
8005f88: d006 beq.n 8005f98 <setMeasurementTimingBudget+0x154>
{
final_range_timeout_mclks += timeouts.pre_range_mclks;
8005f8a: 193b adds r3, r7, r4
8005f8c: 88d9 ldrh r1, [r3, #6]
8005f8e: 183b adds r3, r7, r0
8005f90: 183a adds r2, r7, r0
8005f92: 8812 ldrh r2, [r2, #0]
8005f94: 188a adds r2, r1, r2
8005f96: 801a strh r2, [r3, #0]
}
writeReg16Bit(FINAL_RANGE_CONFIG_TIMEOUT_MACROP_HI,
8005f98: 2342 movs r3, #66 ; 0x42
8005f9a: 18fb adds r3, r7, r3
8005f9c: 881b ldrh r3, [r3, #0]
8005f9e: 0018 movs r0, r3
8005fa0: f000 faec bl 800657c <encodeTimeout>
8005fa4: 0003 movs r3, r0
8005fa6: 0019 movs r1, r3
8005fa8: 2071 movs r0, #113 ; 0x71
8005faa: f7ff fbaf bl 800570c <writeReg16Bit>
encodeTimeout(final_range_timeout_mclks));
// set_sequence_step_timeout() end
g_measTimBudUs = budget_us; // store for internal reuse
8005fae: 4b08 ldr r3, [pc, #32] ; (8005fd0 <setMeasurementTimingBudget+0x18c>)
8005fb0: 687a ldr r2, [r7, #4]
8005fb2: 601a str r2, [r3, #0]
}
return true;
8005fb4: 2301 movs r3, #1
}
8005fb6: 0018 movs r0, r3
8005fb8: 46bd mov sp, r7
8005fba: b012 add sp, #72 ; 0x48
8005fbc: bdb0 pop {r4, r5, r7, pc}
8005fbe: 46c0 nop ; (mov r8, r8)
8005fc0: 0000024e .word 0x0000024e
8005fc4: 000002b2 .word 0x000002b2
8005fc8: 00000226 .word 0x00000226
8005fcc: 00004e20 .word 0x00004e20
8005fd0: 20000260 .word 0x20000260
08005fd4 <getMeasurementTimingBudget>:
// Get the measurement timing budget in microseconds
// based on VL53L0X_get_measurement_timing_budget_micro_seconds()
// in us
uint32_t getMeasurementTimingBudget(void)
{
8005fd4: b5b0 push {r4, r5, r7, lr}
8005fd6: b08c sub sp, #48 ; 0x30
8005fd8: af00 add r7, sp, #0
SequenceStepEnables enables;
SequenceStepTimeouts timeouts;
uint16_t const StartOverhead = 1910; // note that this is different than the value in set_
8005fda: 212a movs r1, #42 ; 0x2a
8005fdc: 187b adds r3, r7, r1
8005fde: 4a3e ldr r2, [pc, #248] ; (80060d8 <getMeasurementTimingBudget+0x104>)
8005fe0: 801a strh r2, [r3, #0]
uint16_t const EndOverhead = 960;
8005fe2: 2028 movs r0, #40 ; 0x28
8005fe4: 183b adds r3, r7, r0
8005fe6: 22f0 movs r2, #240 ; 0xf0
8005fe8: 0092 lsls r2, r2, #2
8005fea: 801a strh r2, [r3, #0]
uint16_t const MsrcOverhead = 660;
8005fec: 2326 movs r3, #38 ; 0x26
8005fee: 18fb adds r3, r7, r3
8005ff0: 22a5 movs r2, #165 ; 0xa5
8005ff2: 0092 lsls r2, r2, #2
8005ff4: 801a strh r2, [r3, #0]
uint16_t const TccOverhead = 590;
8005ff6: 2524 movs r5, #36 ; 0x24
8005ff8: 197b adds r3, r7, r5
8005ffa: 4a38 ldr r2, [pc, #224] ; (80060dc <getMeasurementTimingBudget+0x108>)
8005ffc: 801a strh r2, [r3, #0]
uint16_t const DssOverhead = 690;
8005ffe: 2322 movs r3, #34 ; 0x22
8006000: 18fb adds r3, r7, r3
8006002: 4a37 ldr r2, [pc, #220] ; (80060e0 <getMeasurementTimingBudget+0x10c>)
8006004: 801a strh r2, [r3, #0]
uint16_t const PreRangeOverhead = 660;
8006006: 2320 movs r3, #32
8006008: 18fb adds r3, r7, r3
800600a: 22a5 movs r2, #165 ; 0xa5
800600c: 0092 lsls r2, r2, #2
800600e: 801a strh r2, [r3, #0]
uint16_t const FinalRangeOverhead = 550;
8006010: 231e movs r3, #30
8006012: 18fb adds r3, r7, r3
8006014: 4a33 ldr r2, [pc, #204] ; (80060e4 <getMeasurementTimingBudget+0x110>)
8006016: 801a strh r2, [r3, #0]
// "Start and end overhead times always present"
uint32_t budget_us = StartOverhead + EndOverhead;
8006018: 187b adds r3, r7, r1
800601a: 881a ldrh r2, [r3, #0]
800601c: 183b adds r3, r7, r0
800601e: 881b ldrh r3, [r3, #0]
8006020: 18d3 adds r3, r2, r3
8006022: 62fb str r3, [r7, #44] ; 0x2c
getSequenceStepEnables(&enables);
8006024: 2418 movs r4, #24
8006026: 193b adds r3, r7, r4
8006028: 0018 movs r0, r3
800602a: f000 f9f1 bl 8006410 <getSequenceStepEnables>
getSequenceStepTimeouts(&enables, &timeouts);
800602e: 003a movs r2, r7
8006030: 193b adds r3, r7, r4
8006032: 0011 movs r1, r2
8006034: 0018 movs r0, r3
8006036: f000 fa25 bl 8006484 <getSequenceStepTimeouts>
if (enables.tcc)
800603a: 193b adds r3, r7, r4
800603c: 781b ldrb r3, [r3, #0]
800603e: 2b00 cmp r3, #0
8006040: d007 beq.n 8006052 <getMeasurementTimingBudget+0x7e>
{
budget_us += (timeouts.msrc_dss_tcc_us + TccOverhead);
8006042: 003b movs r3, r7
8006044: 68da ldr r2, [r3, #12]
8006046: 197b adds r3, r7, r5
8006048: 881b ldrh r3, [r3, #0]
800604a: 18d3 adds r3, r2, r3
800604c: 6afa ldr r2, [r7, #44] ; 0x2c
800604e: 18d3 adds r3, r2, r3
8006050: 62fb str r3, [r7, #44] ; 0x2c
}
if (enables.dss)
8006052: 2318 movs r3, #24
8006054: 18fb adds r3, r7, r3
8006056: 789b ldrb r3, [r3, #2]
8006058: 2b00 cmp r3, #0
800605a: d00a beq.n 8006072 <getMeasurementTimingBudget+0x9e>
{
budget_us += 2 * (timeouts.msrc_dss_tcc_us + DssOverhead);
800605c: 003b movs r3, r7
800605e: 68da ldr r2, [r3, #12]
8006060: 2322 movs r3, #34 ; 0x22
8006062: 18fb adds r3, r7, r3
8006064: 881b ldrh r3, [r3, #0]
8006066: 18d3 adds r3, r2, r3
8006068: 005b lsls r3, r3, #1
800606a: 6afa ldr r2, [r7, #44] ; 0x2c
800606c: 18d3 adds r3, r2, r3
800606e: 62fb str r3, [r7, #44] ; 0x2c
8006070: e00d b.n 800608e <getMeasurementTimingBudget+0xba>
}
else if (enables.msrc)
8006072: 2318 movs r3, #24
8006074: 18fb adds r3, r7, r3
8006076: 785b ldrb r3, [r3, #1]
8006078: 2b00 cmp r3, #0
800607a: d008 beq.n 800608e <getMeasurementTimingBudget+0xba>
{
budget_us += (timeouts.msrc_dss_tcc_us + MsrcOverhead);
800607c: 003b movs r3, r7
800607e: 68da ldr r2, [r3, #12]
8006080: 2326 movs r3, #38 ; 0x26
8006082: 18fb adds r3, r7, r3
8006084: 881b ldrh r3, [r3, #0]
8006086: 18d3 adds r3, r2, r3
8006088: 6afa ldr r2, [r7, #44] ; 0x2c
800608a: 18d3 adds r3, r2, r3
800608c: 62fb str r3, [r7, #44] ; 0x2c
}
if (enables.pre_range)
800608e: 2318 movs r3, #24
8006090: 18fb adds r3, r7, r3
8006092: 78db ldrb r3, [r3, #3]
8006094: 2b00 cmp r3, #0
8006096: d008 beq.n 80060aa <getMeasurementTimingBudget+0xd6>
{
budget_us += (timeouts.pre_range_us + PreRangeOverhead);
8006098: 003b movs r3, r7
800609a: 691a ldr r2, [r3, #16]
800609c: 2320 movs r3, #32
800609e: 18fb adds r3, r7, r3
80060a0: 881b ldrh r3, [r3, #0]
80060a2: 18d3 adds r3, r2, r3
80060a4: 6afa ldr r2, [r7, #44] ; 0x2c
80060a6: 18d3 adds r3, r2, r3
80060a8: 62fb str r3, [r7, #44] ; 0x2c
}
if (enables.final_range)
80060aa: 2318 movs r3, #24
80060ac: 18fb adds r3, r7, r3
80060ae: 791b ldrb r3, [r3, #4]
80060b0: 2b00 cmp r3, #0
80060b2: d008 beq.n 80060c6 <getMeasurementTimingBudget+0xf2>
{
budget_us += (timeouts.final_range_us + FinalRangeOverhead);
80060b4: 003b movs r3, r7
80060b6: 695a ldr r2, [r3, #20]
80060b8: 231e movs r3, #30
80060ba: 18fb adds r3, r7, r3
80060bc: 881b ldrh r3, [r3, #0]
80060be: 18d3 adds r3, r2, r3
80060c0: 6afa ldr r2, [r7, #44] ; 0x2c
80060c2: 18d3 adds r3, r2, r3
80060c4: 62fb str r3, [r7, #44] ; 0x2c
}
g_measTimBudUs = budget_us; // store for internal reuse
80060c6: 4b08 ldr r3, [pc, #32] ; (80060e8 <getMeasurementTimingBudget+0x114>)
80060c8: 6afa ldr r2, [r7, #44] ; 0x2c
80060ca: 601a str r2, [r3, #0]
return budget_us;
80060cc: 6afb ldr r3, [r7, #44] ; 0x2c
}
80060ce: 0018 movs r0, r3
80060d0: 46bd mov sp, r7
80060d2: b00c add sp, #48 ; 0x30
80060d4: bdb0 pop {r4, r5, r7, pc}
80060d6: 46c0 nop ; (mov r8, r8)
80060d8: 00000776 .word 0x00000776
80060dc: 0000024e .word 0x0000024e
80060e0: 000002b2 .word 0x000002b2
80060e4: 00000226 .word 0x00000226
80060e8: 20000260 .word 0x20000260
080060ec <getVcselPulsePeriod>:
}
// Get the VCSEL pulse period in PCLKs for the given period type.
// based on VL53L0X_get_vcsel_pulse_period()
uint8_t getVcselPulsePeriod(vcselPeriodType type)
{
80060ec: b580 push {r7, lr}
80060ee: b082 sub sp, #8
80060f0: af00 add r7, sp, #0
80060f2: 0002 movs r2, r0
80060f4: 1dfb adds r3, r7, #7
80060f6: 701a strb r2, [r3, #0]
if (type == VcselPeriodPreRange)
80060f8: 1dfb adds r3, r7, #7
80060fa: 781b ldrb r3, [r3, #0]
80060fc: 2b00 cmp r3, #0
80060fe: d108 bne.n 8006112 <getVcselPulsePeriod+0x26>
{
return decodeVcselPeriod(readReg(PRE_RANGE_CONFIG_VCSEL_PERIOD));
8006100: 2050 movs r0, #80 ; 0x50
8006102: f7ff fb67 bl 80057d4 <readReg>
8006106: 0003 movs r3, r0
8006108: 3301 adds r3, #1
800610a: b2db uxtb r3, r3
800610c: 18db adds r3, r3, r3
800610e: b2db uxtb r3, r3
8006110: e00d b.n 800612e <getVcselPulsePeriod+0x42>
}
else if (type == VcselPeriodFinalRange)
8006112: 1dfb adds r3, r7, #7
8006114: 781b ldrb r3, [r3, #0]
8006116: 2b01 cmp r3, #1
8006118: d108 bne.n 800612c <getVcselPulsePeriod+0x40>
{
return decodeVcselPeriod(readReg(FINAL_RANGE_CONFIG_VCSEL_PERIOD));
800611a: 2070 movs r0, #112 ; 0x70
800611c: f7ff fb5a bl 80057d4 <readReg>
8006120: 0003 movs r3, r0
8006122: 3301 adds r3, #1
8006124: b2db uxtb r3, r3
8006126: 18db adds r3, r3, r3
8006128: b2db uxtb r3, r3
800612a: e000 b.n 800612e <getVcselPulsePeriod+0x42>
}
else { return 255; }
800612c: 23ff movs r3, #255 ; 0xff
}
800612e: 0018 movs r0, r3
8006130: 46bd mov sp, r7
8006132: b002 add sp, #8
8006134: bd80 pop {r7, pc}
...
08006138 <startContinuous>:
// often as possible); otherwise, continuous timed mode is used, with the given
// inter-measurement period in milliseconds determining how often the sensor
// takes a measurement.
// based on VL53L0X_StartMeasurement()
void startContinuous(uint32_t period_ms)
{
8006138: b5b0 push {r4, r5, r7, lr}
800613a: b084 sub sp, #16
800613c: af00 add r7, sp, #0
800613e: 6078 str r0, [r7, #4]
writeReg(0x80, 0x01);
8006140: 2101 movs r1, #1
8006142: 2080 movs r0, #128 ; 0x80
8006144: f7ff fac0 bl 80056c8 <writeReg>
writeReg(0xFF, 0x01);
8006148: 2101 movs r1, #1
800614a: 20ff movs r0, #255 ; 0xff
800614c: f7ff fabc bl 80056c8 <writeReg>
writeReg(0x00, 0x00);
8006150: 2100 movs r1, #0
8006152: 2000 movs r0, #0
8006154: f7ff fab8 bl 80056c8 <writeReg>
writeReg(0x91, g_stopVariable);
8006158: 4b1b ldr r3, [pc, #108] ; (80061c8 <startContinuous+0x90>)
800615a: 781b ldrb r3, [r3, #0]
800615c: 0019 movs r1, r3
800615e: 2091 movs r0, #145 ; 0x91
8006160: f7ff fab2 bl 80056c8 <writeReg>
writeReg(0x00, 0x01);
8006164: 2101 movs r1, #1
8006166: 2000 movs r0, #0
8006168: f7ff faae bl 80056c8 <writeReg>
writeReg(0xFF, 0x00);
800616c: 2100 movs r1, #0
800616e: 20ff movs r0, #255 ; 0xff
8006170: f7ff faaa bl 80056c8 <writeReg>
writeReg(0x80, 0x00);
8006174: 2100 movs r1, #0
8006176: 2080 movs r0, #128 ; 0x80
8006178: f7ff faa6 bl 80056c8 <writeReg>
if (period_ms != 0)
800617c: 687b ldr r3, [r7, #4]
800617e: 2b00 cmp r3, #0
8006180: d019 beq.n 80061b6 <startContinuous+0x7e>
{
// continuous timed mode
// VL53L0X_SetInterMeasurementPeriodMilliSeconds() begin
uint16_t osc_calibrate_val = readReg16Bit(OSC_CALIBRATE_VAL);
8006182: 250e movs r5, #14
8006184: 197c adds r4, r7, r5
8006186: 20f8 movs r0, #248 ; 0xf8
8006188: f7ff fb46 bl 8005818 <readReg16Bit>
800618c: 0003 movs r3, r0
800618e: 8023 strh r3, [r4, #0]
if (osc_calibrate_val != 0)
8006190: 197b adds r3, r7, r5
8006192: 881b ldrh r3, [r3, #0]
8006194: 2b00 cmp r3, #0
8006196: d004 beq.n 80061a2 <startContinuous+0x6a>
{
period_ms *= osc_calibrate_val;
8006198: 197b adds r3, r7, r5
800619a: 881a ldrh r2, [r3, #0]
800619c: 687b ldr r3, [r7, #4]
800619e: 4353 muls r3, r2
80061a0: 607b str r3, [r7, #4]
}
writeReg32Bit(SYSTEM_INTERMEASUREMENT_PERIOD, period_ms);
80061a2: 687b ldr r3, [r7, #4]
80061a4: 0019 movs r1, r3
80061a6: 2004 movs r0, #4
80061a8: f7ff fae0 bl 800576c <writeReg32Bit>
// VL53L0X_SetInterMeasurementPeriodMilliSeconds() end
writeReg(SYSRANGE_START, 0x04); // VL53L0X_REG_SYSRANGE_MODE_TIMED
80061ac: 2104 movs r1, #4
80061ae: 2000 movs r0, #0
80061b0: f7ff fa8a bl 80056c8 <writeReg>
else
{
// continuous back-to-back mode
writeReg(SYSRANGE_START, 0x02); // VL53L0X_REG_SYSRANGE_MODE_BACKTOBACK
}
}
80061b4: e003 b.n 80061be <startContinuous+0x86>
writeReg(SYSRANGE_START, 0x02); // VL53L0X_REG_SYSRANGE_MODE_BACKTOBACK
80061b6: 2102 movs r1, #2
80061b8: 2000 movs r0, #0
80061ba: f7ff fa85 bl 80056c8 <writeReg>
}
80061be: 46c0 nop ; (mov r8, r8)
80061c0: 46bd mov sp, r7
80061c2: b004 add sp, #16
80061c4: bdb0 pop {r4, r5, r7, pc}
80061c6: 46c0 nop ; (mov r8, r8)
80061c8: 2000025e .word 0x2000025e
080061cc <readRangeContinuousMillimeters>:
// Returns a range reading in millimeters when continuous mode is active
// (readRangeSingleMillimeters() also calls this function after starting a
// single-shot range measurement)
// extraStats provides additional info for this measurment. Set to 0 if not needed.
uint16_t readRangeContinuousMillimeters( statInfo_t *extraStats ) {
80061cc: b590 push {r4, r7, lr}
80061ce: b087 sub sp, #28
80061d0: af00 add r7, sp, #0
80061d2: 6078 str r0, [r7, #4]
uint8_t tempBuffer[12];
uint16_t temp;
startTimeout();
80061d4: f7fb fdda bl 8001d8c <HAL_GetTick>
80061d8: 0003 movs r3, r0
80061da: b29a uxth r2, r3
80061dc: 4b3b ldr r3, [pc, #236] ; (80062cc <readRangeContinuousMillimeters+0x100>)
80061de: 801a strh r2, [r3, #0]
while ((readReg(RESULT_INTERRUPT_STATUS) & 0x07) == 0) {
80061e0: e014 b.n 800620c <readRangeContinuousMillimeters+0x40>
if (checkTimeoutExpired())
80061e2: 4b3b ldr r3, [pc, #236] ; (80062d0 <readRangeContinuousMillimeters+0x104>)
80061e4: 881b ldrh r3, [r3, #0]
80061e6: 2b00 cmp r3, #0
80061e8: d010 beq.n 800620c <readRangeContinuousMillimeters+0x40>
80061ea: f7fb fdcf bl 8001d8c <HAL_GetTick>
80061ee: 0003 movs r3, r0
80061f0: b29b uxth r3, r3
80061f2: 001a movs r2, r3
80061f4: 4b35 ldr r3, [pc, #212] ; (80062cc <readRangeContinuousMillimeters+0x100>)
80061f6: 881b ldrh r3, [r3, #0]
80061f8: 1ad3 subs r3, r2, r3
80061fa: 4a35 ldr r2, [pc, #212] ; (80062d0 <readRangeContinuousMillimeters+0x104>)
80061fc: 8812 ldrh r2, [r2, #0]
80061fe: 4293 cmp r3, r2
8006200: dd04 ble.n 800620c <readRangeContinuousMillimeters+0x40>
{
g_isTimeout = true;
8006202: 4b34 ldr r3, [pc, #208] ; (80062d4 <readRangeContinuousMillimeters+0x108>)
8006204: 2201 movs r2, #1
8006206: 701a strb r2, [r3, #0]
return 65535;
8006208: 4b33 ldr r3, [pc, #204] ; (80062d8 <readRangeContinuousMillimeters+0x10c>)
800620a: e05b b.n 80062c4 <readRangeContinuousMillimeters+0xf8>
while ((readReg(RESULT_INTERRUPT_STATUS) & 0x07) == 0) {
800620c: 2013 movs r0, #19
800620e: f7ff fae1 bl 80057d4 <readReg>
8006212: 0003 movs r3, r0
8006214: 001a movs r2, r3
8006216: 2307 movs r3, #7
8006218: 4013 ands r3, r2
800621a: d0e2 beq.n 80061e2 <readRangeContinuousMillimeters+0x16>
}
}
if( extraStats == 0 ){
800621c: 687b ldr r3, [r7, #4]
800621e: 2b00 cmp r3, #0
8006220: d107 bne.n 8006232 <readRangeContinuousMillimeters+0x66>
// assumptions: Linearity Corrective Gain is 1000 (default);
// fractional ranging is not enabled
temp = readReg16Bit(RESULT_RANGE_STATUS + 10);
8006222: 2316 movs r3, #22
8006224: 18fc adds r4, r7, r3
8006226: 201e movs r0, #30
8006228: f7ff faf6 bl 8005818 <readReg16Bit>
800622c: 0003 movs r3, r0
800622e: 8023 strh r3, [r4, #0]
8006230: e041 b.n 80062b6 <readRangeContinuousMillimeters+0xea>
// 4: 0 ?
// 5: ???
// 6,7: signal count rate [mcps], uint16_t, fixpoint9.7
// 9,8: AmbientRateRtnMegaCps [mcps], uint16_t, fixpoimt9.7
// A,B: uncorrected distance [mm], uint16_t
readMulti(0x14, tempBuffer, 12);
8006232: 2408 movs r4, #8
8006234: 193b adds r3, r7, r4
8006236: 220c movs r2, #12
8006238: 0019 movs r1, r3
800623a: 2014 movs r0, #20
800623c: f7ff fb46 bl 80058cc <readMulti>
extraStats->rangeStatus = tempBuffer[0x00]>>3;
8006240: 0021 movs r1, r4
8006242: 187b adds r3, r7, r1
8006244: 781b ldrb r3, [r3, #0]
8006246: 08db lsrs r3, r3, #3
8006248: b2da uxtb r2, r3
800624a: 687b ldr r3, [r7, #4]
800624c: 721a strb r2, [r3, #8]
extraStats->spadCnt = (tempBuffer[0x02]<<8) | tempBuffer[0x03];
800624e: 187b adds r3, r7, r1
8006250: 789b ldrb r3, [r3, #2]
8006252: 021b lsls r3, r3, #8
8006254: b21a sxth r2, r3
8006256: 187b adds r3, r7, r1
8006258: 78db ldrb r3, [r3, #3]
800625a: b21b sxth r3, r3
800625c: 4313 orrs r3, r2
800625e: b21b sxth r3, r3
8006260: b29a uxth r2, r3
8006262: 687b ldr r3, [r7, #4]
8006264: 80da strh r2, [r3, #6]
extraStats->signalCnt = (tempBuffer[0x06]<<8) | tempBuffer[0x07];
8006266: 187b adds r3, r7, r1
8006268: 799b ldrb r3, [r3, #6]
800626a: 021b lsls r3, r3, #8
800626c: b21a sxth r2, r3
800626e: 187b adds r3, r7, r1
8006270: 79db ldrb r3, [r3, #7]
8006272: b21b sxth r3, r3
8006274: 4313 orrs r3, r2
8006276: b21b sxth r3, r3
8006278: b29a uxth r2, r3
800627a: 687b ldr r3, [r7, #4]
800627c: 805a strh r2, [r3, #2]
extraStats->ambientCnt = (tempBuffer[0x08]<<8) | tempBuffer[0x09];
800627e: 187b adds r3, r7, r1
8006280: 7a1b ldrb r3, [r3, #8]
8006282: 021b lsls r3, r3, #8
8006284: b21a sxth r2, r3
8006286: 187b adds r3, r7, r1
8006288: 7a5b ldrb r3, [r3, #9]
800628a: b21b sxth r3, r3
800628c: 4313 orrs r3, r2
800628e: b21b sxth r3, r3
8006290: b29a uxth r2, r3
8006292: 687b ldr r3, [r7, #4]
8006294: 809a strh r2, [r3, #4]
temp = (tempBuffer[0x0A]<<8) | tempBuffer[0x0B];
8006296: 187b adds r3, r7, r1
8006298: 7a9b ldrb r3, [r3, #10]
800629a: 021b lsls r3, r3, #8
800629c: b21a sxth r2, r3
800629e: 187b adds r3, r7, r1
80062a0: 7adb ldrb r3, [r3, #11]
80062a2: b21b sxth r3, r3
80062a4: 4313 orrs r3, r2
80062a6: b21a sxth r2, r3
80062a8: 2116 movs r1, #22
80062aa: 187b adds r3, r7, r1
80062ac: 801a strh r2, [r3, #0]
extraStats->rawDistance = temp;
80062ae: 687b ldr r3, [r7, #4]
80062b0: 187a adds r2, r7, r1
80062b2: 8812 ldrh r2, [r2, #0]
80062b4: 801a strh r2, [r3, #0]
}
writeReg(SYSTEM_INTERRUPT_CLEAR, 0x01);
80062b6: 2101 movs r1, #1
80062b8: 200b movs r0, #11
80062ba: f7ff fa05 bl 80056c8 <writeReg>
return temp;
80062be: 2316 movs r3, #22
80062c0: 18fb adds r3, r7, r3
80062c2: 881b ldrh r3, [r3, #0]
}
80062c4: 0018 movs r0, r3
80062c6: 46bd mov sp, r7
80062c8: b007 add sp, #28
80062ca: bd90 pop {r4, r7, pc}
80062cc: 2000025c .word 0x2000025c
80062d0: 20000258 .word 0x20000258
80062d4: 2000025a .word 0x2000025a
80062d8: 0000ffff .word 0x0000ffff
080062dc <getSpadInfo>:
// Get reference SPAD (single photon avalanche diode) count and type
// based on VL53L0X_get_info_from_device(),
// but only gets reference SPAD count and type
bool getSpadInfo(uint8_t * count, bool * type_is_aperture)
{
80062dc: b5b0 push {r4, r5, r7, lr}
80062de: b084 sub sp, #16
80062e0: af00 add r7, sp, #0
80062e2: 6078 str r0, [r7, #4]
80062e4: 6039 str r1, [r7, #0]
uint8_t tmp;
writeReg(0x80, 0x01);
80062e6: 2101 movs r1, #1
80062e8: 2080 movs r0, #128 ; 0x80
80062ea: f7ff f9ed bl 80056c8 <writeReg>
writeReg(0xFF, 0x01);
80062ee: 2101 movs r1, #1
80062f0: 20ff movs r0, #255 ; 0xff
80062f2: f7ff f9e9 bl 80056c8 <writeReg>
writeReg(0x00, 0x00);
80062f6: 2100 movs r1, #0
80062f8: 2000 movs r0, #0
80062fa: f7ff f9e5 bl 80056c8 <writeReg>
writeReg(0xFF, 0x06);
80062fe: 2106 movs r1, #6
8006300: 20ff movs r0, #255 ; 0xff
8006302: f7ff f9e1 bl 80056c8 <writeReg>
writeReg(0x83, readReg(0x83) | 0x04);
8006306: 2083 movs r0, #131 ; 0x83
8006308: f7ff fa64 bl 80057d4 <readReg>
800630c: 0003 movs r3, r0
800630e: 001a movs r2, r3
8006310: 2304 movs r3, #4
8006312: 4313 orrs r3, r2
8006314: b2db uxtb r3, r3
8006316: 0019 movs r1, r3
8006318: 2083 movs r0, #131 ; 0x83
800631a: f7ff f9d5 bl 80056c8 <writeReg>
writeReg(0xFF, 0x07);
800631e: 2107 movs r1, #7
8006320: 20ff movs r0, #255 ; 0xff
8006322: f7ff f9d1 bl 80056c8 <writeReg>
writeReg(0x81, 0x01);
8006326: 2101 movs r1, #1
8006328: 2081 movs r0, #129 ; 0x81
800632a: f7ff f9cd bl 80056c8 <writeReg>
writeReg(0x80, 0x01);
800632e: 2101 movs r1, #1
8006330: 2080 movs r0, #128 ; 0x80
8006332: f7ff f9c9 bl 80056c8 <writeReg>
writeReg(0x94, 0x6b);
8006336: 216b movs r1, #107 ; 0x6b
8006338: 2094 movs r0, #148 ; 0x94
800633a: f7ff f9c5 bl 80056c8 <writeReg>
writeReg(0x83, 0x00);
800633e: 2100 movs r1, #0
8006340: 2083 movs r0, #131 ; 0x83
8006342: f7ff f9c1 bl 80056c8 <writeReg>
startTimeout();
8006346: f7fb fd21 bl 8001d8c <HAL_GetTick>
800634a: 0003 movs r3, r0
800634c: b29a uxth r2, r3
800634e: 4b2e ldr r3, [pc, #184] ; (8006408 <getSpadInfo+0x12c>)
8006350: 801a strh r2, [r3, #0]
while (readReg(0x83) == 0x00)
8006352: e011 b.n 8006378 <getSpadInfo+0x9c>
{
if (checkTimeoutExpired()) { return false; }
8006354: 4b2d ldr r3, [pc, #180] ; (800640c <getSpadInfo+0x130>)
8006356: 881b ldrh r3, [r3, #0]
8006358: 2b00 cmp r3, #0
800635a: d00d beq.n 8006378 <getSpadInfo+0x9c>
800635c: f7fb fd16 bl 8001d8c <HAL_GetTick>
8006360: 0003 movs r3, r0
8006362: b29b uxth r3, r3
8006364: 001a movs r2, r3
8006366: 4b28 ldr r3, [pc, #160] ; (8006408 <getSpadInfo+0x12c>)
8006368: 881b ldrh r3, [r3, #0]
800636a: 1ad3 subs r3, r2, r3
800636c: 4a27 ldr r2, [pc, #156] ; (800640c <getSpadInfo+0x130>)
800636e: 8812 ldrh r2, [r2, #0]
8006370: 4293 cmp r3, r2
8006372: dd01 ble.n 8006378 <getSpadInfo+0x9c>
8006374: 2300 movs r3, #0
8006376: e043 b.n 8006400 <getSpadInfo+0x124>
while (readReg(0x83) == 0x00)
8006378: 2083 movs r0, #131 ; 0x83
800637a: f7ff fa2b bl 80057d4 <readReg>
800637e: 1e03 subs r3, r0, #0
8006380: d0e8 beq.n 8006354 <getSpadInfo+0x78>
}
writeReg(0x83, 0x01);
8006382: 2101 movs r1, #1
8006384: 2083 movs r0, #131 ; 0x83
8006386: f7ff f99f bl 80056c8 <writeReg>
tmp = readReg(0x92);
800638a: 250f movs r5, #15
800638c: 197c adds r4, r7, r5
800638e: 2092 movs r0, #146 ; 0x92
8006390: f7ff fa20 bl 80057d4 <readReg>
8006394: 0003 movs r3, r0
8006396: 7023 strb r3, [r4, #0]
*count = tmp & 0x7f;
8006398: 0029 movs r1, r5
800639a: 187b adds r3, r7, r1
800639c: 781b ldrb r3, [r3, #0]
800639e: 227f movs r2, #127 ; 0x7f
80063a0: 4013 ands r3, r2
80063a2: b2da uxtb r2, r3
80063a4: 687b ldr r3, [r7, #4]
80063a6: 701a strb r2, [r3, #0]
*type_is_aperture = (tmp >> 7) & 0x01;
80063a8: 187b adds r3, r7, r1
80063aa: 781b ldrb r3, [r3, #0]
80063ac: 09db lsrs r3, r3, #7
80063ae: b2da uxtb r2, r3
80063b0: 683b ldr r3, [r7, #0]
80063b2: 701a strb r2, [r3, #0]
writeReg(0x81, 0x00);
80063b4: 2100 movs r1, #0
80063b6: 2081 movs r0, #129 ; 0x81
80063b8: f7ff f986 bl 80056c8 <writeReg>
writeReg(0xFF, 0x06);
80063bc: 2106 movs r1, #6
80063be: 20ff movs r0, #255 ; 0xff
80063c0: f7ff f982 bl 80056c8 <writeReg>
writeReg(0x83, readReg(0x83) & ~0x04);
80063c4: 2083 movs r0, #131 ; 0x83
80063c6: f7ff fa05 bl 80057d4 <readReg>
80063ca: 0003 movs r3, r0
80063cc: 001a movs r2, r3
80063ce: 2304 movs r3, #4
80063d0: 439a bics r2, r3
80063d2: 0013 movs r3, r2
80063d4: b2db uxtb r3, r3
80063d6: 0019 movs r1, r3
80063d8: 2083 movs r0, #131 ; 0x83
80063da: f7ff f975 bl 80056c8 <writeReg>
writeReg(0xFF, 0x01);
80063de: 2101 movs r1, #1
80063e0: 20ff movs r0, #255 ; 0xff
80063e2: f7ff f971 bl 80056c8 <writeReg>
writeReg(0x00, 0x01);
80063e6: 2101 movs r1, #1
80063e8: 2000 movs r0, #0
80063ea: f7ff f96d bl 80056c8 <writeReg>
writeReg(0xFF, 0x00);
80063ee: 2100 movs r1, #0
80063f0: 20ff movs r0, #255 ; 0xff
80063f2: f7ff f969 bl 80056c8 <writeReg>
writeReg(0x80, 0x00);
80063f6: 2100 movs r1, #0
80063f8: 2080 movs r0, #128 ; 0x80
80063fa: f7ff f965 bl 80056c8 <writeReg>
return true;
80063fe: 2301 movs r3, #1
}
8006400: 0018 movs r0, r3
8006402: 46bd mov sp, r7
8006404: b004 add sp, #16
8006406: bdb0 pop {r4, r5, r7, pc}
8006408: 2000025c .word 0x2000025c
800640c: 20000258 .word 0x20000258
08006410 <getSequenceStepEnables>:
// Get sequence step enables
// based on VL53L0X_GetSequenceStepEnables()
void getSequenceStepEnables(SequenceStepEnables * enables)
{
8006410: b5b0 push {r4, r5, r7, lr}
8006412: b084 sub sp, #16
8006414: af00 add r7, sp, #0
8006416: 6078 str r0, [r7, #4]
uint8_t sequence_config = readReg(SYSTEM_SEQUENCE_CONFIG);
8006418: 250f movs r5, #15
800641a: 197c adds r4, r7, r5
800641c: 2001 movs r0, #1
800641e: f7ff f9d9 bl 80057d4 <readReg>
8006422: 0003 movs r3, r0
8006424: 7023 strb r3, [r4, #0]
enables->tcc = (sequence_config >> 4) & 0x1;
8006426: 0029 movs r1, r5
8006428: 187b adds r3, r7, r1
800642a: 781b ldrb r3, [r3, #0]
800642c: 091b lsrs r3, r3, #4
800642e: b2db uxtb r3, r3
8006430: 2201 movs r2, #1
8006432: 4013 ands r3, r2
8006434: b2da uxtb r2, r3
8006436: 687b ldr r3, [r7, #4]
8006438: 701a strb r2, [r3, #0]
enables->dss = (sequence_config >> 3) & 0x1;
800643a: 187b adds r3, r7, r1
800643c: 781b ldrb r3, [r3, #0]
800643e: 08db lsrs r3, r3, #3
8006440: b2db uxtb r3, r3
8006442: 2201 movs r2, #1
8006444: 4013 ands r3, r2
8006446: b2da uxtb r2, r3
8006448: 687b ldr r3, [r7, #4]
800644a: 709a strb r2, [r3, #2]
enables->msrc = (sequence_config >> 2) & 0x1;
800644c: 187b adds r3, r7, r1
800644e: 781b ldrb r3, [r3, #0]
8006450: 089b lsrs r3, r3, #2
8006452: b2db uxtb r3, r3
8006454: 2201 movs r2, #1
8006456: 4013 ands r3, r2
8006458: b2da uxtb r2, r3
800645a: 687b ldr r3, [r7, #4]
800645c: 705a strb r2, [r3, #1]
enables->pre_range = (sequence_config >> 6) & 0x1;
800645e: 187b adds r3, r7, r1
8006460: 781b ldrb r3, [r3, #0]
8006462: 099b lsrs r3, r3, #6
8006464: b2db uxtb r3, r3
8006466: 2201 movs r2, #1
8006468: 4013 ands r3, r2
800646a: b2da uxtb r2, r3
800646c: 687b ldr r3, [r7, #4]
800646e: 70da strb r2, [r3, #3]
enables->final_range = (sequence_config >> 7) & 0x1;
8006470: 187b adds r3, r7, r1
8006472: 781b ldrb r3, [r3, #0]
8006474: 09db lsrs r3, r3, #7
8006476: b2da uxtb r2, r3
8006478: 687b ldr r3, [r7, #4]
800647a: 711a strb r2, [r3, #4]
}
800647c: 46c0 nop ; (mov r8, r8)
800647e: 46bd mov sp, r7
8006480: b004 add sp, #16
8006482: bdb0 pop {r4, r5, r7, pc}
08006484 <getSequenceStepTimeouts>:
// Get sequence step timeouts
// based on get_sequence_step_timeout(),
// but gets all timeouts instead of just the requested one, and also stores
// intermediate values
void getSequenceStepTimeouts(SequenceStepEnables const * enables, SequenceStepTimeouts * timeouts)
{
8006484: b580 push {r7, lr}
8006486: b082 sub sp, #8
8006488: af00 add r7, sp, #0
800648a: 6078 str r0, [r7, #4]
800648c: 6039 str r1, [r7, #0]
timeouts->pre_range_vcsel_period_pclks = getVcselPulsePeriod(VcselPeriodPreRange);
800648e: 2000 movs r0, #0
8006490: f7ff fe2c bl 80060ec <getVcselPulsePeriod>
8006494: 0003 movs r3, r0
8006496: b29a uxth r2, r3
8006498: 683b ldr r3, [r7, #0]
800649a: 801a strh r2, [r3, #0]
timeouts->msrc_dss_tcc_mclks = readReg(MSRC_CONFIG_TIMEOUT_MACROP) + 1;
800649c: 2046 movs r0, #70 ; 0x46
800649e: f7ff f999 bl 80057d4 <readReg>
80064a2: 0003 movs r3, r0
80064a4: b29b uxth r3, r3
80064a6: 3301 adds r3, #1
80064a8: b29a uxth r2, r3
80064aa: 683b ldr r3, [r7, #0]
80064ac: 809a strh r2, [r3, #4]
timeouts->msrc_dss_tcc_us =
timeoutMclksToMicroseconds(timeouts->msrc_dss_tcc_mclks,
80064ae: 683b ldr r3, [r7, #0]
80064b0: 889a ldrh r2, [r3, #4]
timeouts->pre_range_vcsel_period_pclks);
80064b2: 683b ldr r3, [r7, #0]
80064b4: 881b ldrh r3, [r3, #0]
timeoutMclksToMicroseconds(timeouts->msrc_dss_tcc_mclks,
80064b6: b2db uxtb r3, r3
80064b8: 0019 movs r1, r3
80064ba: 0010 movs r0, r2
80064bc: f000 f892 bl 80065e4 <timeoutMclksToMicroseconds>
80064c0: 0002 movs r2, r0
timeouts->msrc_dss_tcc_us =
80064c2: 683b ldr r3, [r7, #0]
80064c4: 60da str r2, [r3, #12]
timeouts->pre_range_mclks =
decodeTimeout(readReg16Bit(PRE_RANGE_CONFIG_TIMEOUT_MACROP_HI));
80064c6: 2051 movs r0, #81 ; 0x51
80064c8: f7ff f9a6 bl 8005818 <readReg16Bit>
80064cc: 0003 movs r3, r0
80064ce: 0018 movs r0, r3
80064d0: f000 f83e bl 8006550 <decodeTimeout>
80064d4: 0003 movs r3, r0
80064d6: 001a movs r2, r3
timeouts->pre_range_mclks =
80064d8: 683b ldr r3, [r7, #0]
80064da: 80da strh r2, [r3, #6]
timeouts->pre_range_us =
timeoutMclksToMicroseconds(timeouts->pre_range_mclks,
80064dc: 683b ldr r3, [r7, #0]
80064de: 88da ldrh r2, [r3, #6]
timeouts->pre_range_vcsel_period_pclks);
80064e0: 683b ldr r3, [r7, #0]
80064e2: 881b ldrh r3, [r3, #0]
timeoutMclksToMicroseconds(timeouts->pre_range_mclks,
80064e4: b2db uxtb r3, r3
80064e6: 0019 movs r1, r3
80064e8: 0010 movs r0, r2
80064ea: f000 f87b bl 80065e4 <timeoutMclksToMicroseconds>
80064ee: 0002 movs r2, r0
timeouts->pre_range_us =
80064f0: 683b ldr r3, [r7, #0]
80064f2: 611a str r2, [r3, #16]
timeouts->final_range_vcsel_period_pclks = getVcselPulsePeriod(VcselPeriodFinalRange);
80064f4: 2001 movs r0, #1
80064f6: f7ff fdf9 bl 80060ec <getVcselPulsePeriod>
80064fa: 0003 movs r3, r0
80064fc: b29a uxth r2, r3
80064fe: 683b ldr r3, [r7, #0]
8006500: 805a strh r2, [r3, #2]
timeouts->final_range_mclks =
decodeTimeout(readReg16Bit(FINAL_RANGE_CONFIG_TIMEOUT_MACROP_HI));
8006502: 2071 movs r0, #113 ; 0x71
8006504: f7ff f988 bl 8005818 <readReg16Bit>
8006508: 0003 movs r3, r0
800650a: 0018 movs r0, r3
800650c: f000 f820 bl 8006550 <decodeTimeout>
8006510: 0003 movs r3, r0
8006512: 001a movs r2, r3
timeouts->final_range_mclks =
8006514: 683b ldr r3, [r7, #0]
8006516: 811a strh r2, [r3, #8]
if (enables->pre_range)
8006518: 687b ldr r3, [r7, #4]
800651a: 78db ldrb r3, [r3, #3]
800651c: 2b00 cmp r3, #0
800651e: d007 beq.n 8006530 <getSequenceStepTimeouts+0xac>
{
timeouts->final_range_mclks -= timeouts->pre_range_mclks;
8006520: 683b ldr r3, [r7, #0]
8006522: 891a ldrh r2, [r3, #8]
8006524: 683b ldr r3, [r7, #0]
8006526: 88db ldrh r3, [r3, #6]
8006528: 1ad3 subs r3, r2, r3
800652a: b29a uxth r2, r3
800652c: 683b ldr r3, [r7, #0]
800652e: 811a strh r2, [r3, #8]
}
timeouts->final_range_us =
timeoutMclksToMicroseconds(timeouts->final_range_mclks,
8006530: 683b ldr r3, [r7, #0]
8006532: 891a ldrh r2, [r3, #8]
timeouts->final_range_vcsel_period_pclks);
8006534: 683b ldr r3, [r7, #0]
8006536: 885b ldrh r3, [r3, #2]
timeoutMclksToMicroseconds(timeouts->final_range_mclks,
8006538: b2db uxtb r3, r3
800653a: 0019 movs r1, r3
800653c: 0010 movs r0, r2
800653e: f000 f851 bl 80065e4 <timeoutMclksToMicroseconds>
8006542: 0002 movs r2, r0
timeouts->final_range_us =
8006544: 683b ldr r3, [r7, #0]
8006546: 615a str r2, [r3, #20]
}
8006548: 46c0 nop ; (mov r8, r8)
800654a: 46bd mov sp, r7
800654c: b002 add sp, #8
800654e: bd80 pop {r7, pc}
08006550 <decodeTimeout>:
// Decode sequence step timeout in MCLKs from register value
// based on VL53L0X_decode_timeout()
// Note: the original function returned a uint32_t, but the return value is
// always stored in a uint16_t.
uint16_t decodeTimeout(uint16_t reg_val)
{
8006550: b580 push {r7, lr}
8006552: b082 sub sp, #8
8006554: af00 add r7, sp, #0
8006556: 0002 movs r2, r0
8006558: 1dbb adds r3, r7, #6
800655a: 801a strh r2, [r3, #0]
// format: "(LSByte * 2^MSByte) + 1"
return (uint16_t)((reg_val & 0x00FF) <<
800655c: 1dbb adds r3, r7, #6
800655e: 881b ldrh r3, [r3, #0]
8006560: 22ff movs r2, #255 ; 0xff
8006562: 4013 ands r3, r2
(uint16_t)((reg_val & 0xFF00) >> 8)) + 1;
8006564: 1dba adds r2, r7, #6
8006566: 8812 ldrh r2, [r2, #0]
8006568: 0a12 lsrs r2, r2, #8
800656a: b292 uxth r2, r2
return (uint16_t)((reg_val & 0x00FF) <<
800656c: 4093 lsls r3, r2
800656e: b29b uxth r3, r3
(uint16_t)((reg_val & 0xFF00) >> 8)) + 1;
8006570: 3301 adds r3, #1
8006572: b29b uxth r3, r3
}
8006574: 0018 movs r0, r3
8006576: 46bd mov sp, r7
8006578: b002 add sp, #8
800657a: bd80 pop {r7, pc}
0800657c <encodeTimeout>:
// Encode sequence step timeout register value from timeout in MCLKs
// based on VL53L0X_encode_timeout()
// Note: the original function took a uint16_t, but the argument passed to it
// is always a uint16_t.
uint16_t encodeTimeout(uint16_t timeout_mclks)
{
800657c: b580 push {r7, lr}
800657e: b084 sub sp, #16
8006580: af00 add r7, sp, #0
8006582: 0002 movs r2, r0
8006584: 1dbb adds r3, r7, #6
8006586: 801a strh r2, [r3, #0]
// format: "(LSByte * 2^MSByte) + 1"
uint32_t ls_byte = 0;
8006588: 2300 movs r3, #0
800658a: 60fb str r3, [r7, #12]
uint16_t ms_byte = 0;
800658c: 230a movs r3, #10
800658e: 18fb adds r3, r7, r3
8006590: 2200 movs r2, #0
8006592: 801a strh r2, [r3, #0]
if (timeout_mclks > 0)
8006594: 1dbb adds r3, r7, #6
8006596: 881b ldrh r3, [r3, #0]
8006598: 2b00 cmp r3, #0
800659a: d01e beq.n 80065da <encodeTimeout+0x5e>
{
ls_byte = timeout_mclks - 1;
800659c: 1dbb adds r3, r7, #6
800659e: 881b ldrh r3, [r3, #0]
80065a0: 3b01 subs r3, #1
80065a2: 60fb str r3, [r7, #12]
while ((ls_byte & 0xFFFFFF00) > 0)
80065a4: e008 b.n 80065b8 <encodeTimeout+0x3c>
{
ls_byte >>= 1;
80065a6: 68fb ldr r3, [r7, #12]
80065a8: 085b lsrs r3, r3, #1
80065aa: 60fb str r3, [r7, #12]
ms_byte++;
80065ac: 210a movs r1, #10
80065ae: 187b adds r3, r7, r1
80065b0: 881a ldrh r2, [r3, #0]
80065b2: 187b adds r3, r7, r1
80065b4: 3201 adds r2, #1
80065b6: 801a strh r2, [r3, #0]
while ((ls_byte & 0xFFFFFF00) > 0)
80065b8: 68fb ldr r3, [r7, #12]
80065ba: 22ff movs r2, #255 ; 0xff
80065bc: 4393 bics r3, r2
80065be: d1f2 bne.n 80065a6 <encodeTimeout+0x2a>
}
return (ms_byte << 8) | (ls_byte & 0xFF);
80065c0: 230a movs r3, #10
80065c2: 18fb adds r3, r7, r3
80065c4: 881b ldrh r3, [r3, #0]
80065c6: 021b lsls r3, r3, #8
80065c8: b29a uxth r2, r3
80065ca: 68fb ldr r3, [r7, #12]
80065cc: b29b uxth r3, r3
80065ce: 21ff movs r1, #255 ; 0xff
80065d0: 400b ands r3, r1
80065d2: b29b uxth r3, r3
80065d4: 4313 orrs r3, r2
80065d6: b29b uxth r3, r3
80065d8: e000 b.n 80065dc <encodeTimeout+0x60>
}
else { return 0; }
80065da: 2300 movs r3, #0
}
80065dc: 0018 movs r0, r3
80065de: 46bd mov sp, r7
80065e0: b004 add sp, #16
80065e2: bd80 pop {r7, pc}
080065e4 <timeoutMclksToMicroseconds>:
// Convert sequence step timeout from MCLKs to microseconds with given VCSEL period in PCLKs
// based on VL53L0X_calc_timeout_us()
uint32_t timeoutMclksToMicroseconds(uint16_t timeout_period_mclks, uint8_t vcsel_period_pclks)
{
80065e4: b580 push {r7, lr}
80065e6: b084 sub sp, #16
80065e8: af00 add r7, sp, #0
80065ea: 0002 movs r2, r0
80065ec: 1dbb adds r3, r7, #6
80065ee: 801a strh r2, [r3, #0]
80065f0: 1d7b adds r3, r7, #5
80065f2: 1c0a adds r2, r1, #0
80065f4: 701a strb r2, [r3, #0]
uint32_t macro_period_ns = calcMacroPeriod(vcsel_period_pclks);
80065f6: 1d7b adds r3, r7, #5
80065f8: 781a ldrb r2, [r3, #0]
80065fa: 0013 movs r3, r2
80065fc: 015b lsls r3, r3, #5
80065fe: 1a9b subs r3, r3, r2
8006600: 015b lsls r3, r3, #5
8006602: 189b adds r3, r3, r2
8006604: 011a lsls r2, r3, #4
8006606: 1ad2 subs r2, r2, r3
8006608: 0213 lsls r3, r2, #8
800660a: 001a movs r2, r3
800660c: 0013 movs r3, r2
800660e: 33f5 adds r3, #245 ; 0xf5
8006610: 33ff adds r3, #255 ; 0xff
8006612: 22fa movs r2, #250 ; 0xfa
8006614: 0091 lsls r1, r2, #2
8006616: 0018 movs r0, r3
8006618: f7f9 fd76 bl 8000108 <__udivsi3>
800661c: 0003 movs r3, r0
800661e: 60fb str r3, [r7, #12]
return ((timeout_period_mclks * macro_period_ns) + (macro_period_ns / 2)) / 1000;
8006620: 1dbb adds r3, r7, #6
8006622: 881b ldrh r3, [r3, #0]
8006624: 68fa ldr r2, [r7, #12]
8006626: 435a muls r2, r3
8006628: 68fb ldr r3, [r7, #12]
800662a: 085b lsrs r3, r3, #1
800662c: 18d3 adds r3, r2, r3
800662e: 22fa movs r2, #250 ; 0xfa
8006630: 0091 lsls r1, r2, #2
8006632: 0018 movs r0, r3
8006634: f7f9 fd68 bl 8000108 <__udivsi3>
8006638: 0003 movs r3, r0
}
800663a: 0018 movs r0, r3
800663c: 46bd mov sp, r7
800663e: b004 add sp, #16
8006640: bd80 pop {r7, pc}
08006642 <timeoutMicrosecondsToMclks>:
// Convert sequence step timeout from microseconds to MCLKs with given VCSEL period in PCLKs
// based on VL53L0X_calc_timeout_mclks()
uint32_t timeoutMicrosecondsToMclks(uint32_t timeout_period_us, uint8_t vcsel_period_pclks)
{
8006642: b580 push {r7, lr}
8006644: b084 sub sp, #16
8006646: af00 add r7, sp, #0
8006648: 6078 str r0, [r7, #4]
800664a: 000a movs r2, r1
800664c: 1cfb adds r3, r7, #3
800664e: 701a strb r2, [r3, #0]
uint32_t macro_period_ns = calcMacroPeriod(vcsel_period_pclks);
8006650: 1cfb adds r3, r7, #3
8006652: 781a ldrb r2, [r3, #0]
8006654: 0013 movs r3, r2
8006656: 015b lsls r3, r3, #5
8006658: 1a9b subs r3, r3, r2
800665a: 015b lsls r3, r3, #5
800665c: 189b adds r3, r3, r2
800665e: 011a lsls r2, r3, #4
8006660: 1ad2 subs r2, r2, r3
8006662: 0213 lsls r3, r2, #8
8006664: 001a movs r2, r3
8006666: 0013 movs r3, r2
8006668: 33f5 adds r3, #245 ; 0xf5
800666a: 33ff adds r3, #255 ; 0xff
800666c: 22fa movs r2, #250 ; 0xfa
800666e: 0091 lsls r1, r2, #2
8006670: 0018 movs r0, r3
8006672: f7f9 fd49 bl 8000108 <__udivsi3>
8006676: 0003 movs r3, r0
8006678: 60fb str r3, [r7, #12]
return (((timeout_period_us * 1000) + (macro_period_ns / 2)) / macro_period_ns);
800667a: 687a ldr r2, [r7, #4]
800667c: 0013 movs r3, r2
800667e: 015b lsls r3, r3, #5
8006680: 1a9b subs r3, r3, r2
8006682: 009b lsls r3, r3, #2
8006684: 189b adds r3, r3, r2
8006686: 00db lsls r3, r3, #3
8006688: 001a movs r2, r3
800668a: 68fb ldr r3, [r7, #12]
800668c: 085b lsrs r3, r3, #1
800668e: 18d3 adds r3, r2, r3
8006690: 68f9 ldr r1, [r7, #12]
8006692: 0018 movs r0, r3
8006694: f7f9 fd38 bl 8000108 <__udivsi3>
8006698: 0003 movs r3, r0
}
800669a: 0018 movs r0, r3
800669c: 46bd mov sp, r7
800669e: b004 add sp, #16
80066a0: bd80 pop {r7, pc}
...
080066a4 <performSingleRefCalibration>:
// based on VL53L0X_perform_single_ref_calibration()
bool performSingleRefCalibration(uint8_t vhv_init_byte)
{
80066a4: b580 push {r7, lr}
80066a6: b082 sub sp, #8
80066a8: af00 add r7, sp, #0
80066aa: 0002 movs r2, r0
80066ac: 1dfb adds r3, r7, #7
80066ae: 701a strb r2, [r3, #0]
writeReg(SYSRANGE_START, 0x01 | vhv_init_byte); // VL53L0X_REG_SYSRANGE_MODE_START_STOP
80066b0: 1dfb adds r3, r7, #7
80066b2: 781b ldrb r3, [r3, #0]
80066b4: 2201 movs r2, #1
80066b6: 4313 orrs r3, r2
80066b8: b2db uxtb r3, r3
80066ba: 0019 movs r1, r3
80066bc: 2000 movs r0, #0
80066be: f7ff f803 bl 80056c8 <writeReg>
startTimeout();
80066c2: f7fb fb63 bl 8001d8c <HAL_GetTick>
80066c6: 0003 movs r3, r0
80066c8: b29a uxth r2, r3
80066ca: 4b15 ldr r3, [pc, #84] ; (8006720 <performSingleRefCalibration+0x7c>)
80066cc: 801a strh r2, [r3, #0]
while ((readReg(RESULT_INTERRUPT_STATUS) & 0x07) == 0)
80066ce: e011 b.n 80066f4 <performSingleRefCalibration+0x50>
{
if (checkTimeoutExpired()) { return false; }
80066d0: 4b14 ldr r3, [pc, #80] ; (8006724 <performSingleRefCalibration+0x80>)
80066d2: 881b ldrh r3, [r3, #0]
80066d4: 2b00 cmp r3, #0
80066d6: d00d beq.n 80066f4 <performSingleRefCalibration+0x50>
80066d8: f7fb fb58 bl 8001d8c <HAL_GetTick>
80066dc: 0003 movs r3, r0
80066de: b29b uxth r3, r3
80066e0: 001a movs r2, r3
80066e2: 4b0f ldr r3, [pc, #60] ; (8006720 <performSingleRefCalibration+0x7c>)
80066e4: 881b ldrh r3, [r3, #0]
80066e6: 1ad3 subs r3, r2, r3
80066e8: 4a0e ldr r2, [pc, #56] ; (8006724 <performSingleRefCalibration+0x80>)
80066ea: 8812 ldrh r2, [r2, #0]
80066ec: 4293 cmp r3, r2
80066ee: dd01 ble.n 80066f4 <performSingleRefCalibration+0x50>
80066f0: 2300 movs r3, #0
80066f2: e010 b.n 8006716 <performSingleRefCalibration+0x72>
while ((readReg(RESULT_INTERRUPT_STATUS) & 0x07) == 0)
80066f4: 2013 movs r0, #19
80066f6: f7ff f86d bl 80057d4 <readReg>
80066fa: 0003 movs r3, r0
80066fc: 001a movs r2, r3
80066fe: 2307 movs r3, #7
8006700: 4013 ands r3, r2
8006702: d0e5 beq.n 80066d0 <performSingleRefCalibration+0x2c>
}
writeReg(SYSTEM_INTERRUPT_CLEAR, 0x01);
8006704: 2101 movs r1, #1
8006706: 200b movs r0, #11
8006708: f7fe ffde bl 80056c8 <writeReg>
writeReg(SYSRANGE_START, 0x00);
800670c: 2100 movs r1, #0
800670e: 2000 movs r0, #0
8006710: f7fe ffda bl 80056c8 <writeReg>
return true;
8006714: 2301 movs r3, #1
}
8006716: 0018 movs r0, r3
8006718: 46bd mov sp, r7
800671a: b002 add sp, #8
800671c: bd80 pop {r7, pc}
800671e: 46c0 nop ; (mov r8, r8)
8006720: 2000025c .word 0x2000025c
8006724: 20000258 .word 0x20000258
08006728 <__libc_init_array>:
8006728: b570 push {r4, r5, r6, lr}
800672a: 2600 movs r6, #0
800672c: 4d0c ldr r5, [pc, #48] ; (8006760 <__libc_init_array+0x38>)
800672e: 4c0d ldr r4, [pc, #52] ; (8006764 <__libc_init_array+0x3c>)
8006730: 1b64 subs r4, r4, r5
8006732: 10a4 asrs r4, r4, #2
8006734: 42a6 cmp r6, r4
8006736: d109 bne.n 800674c <__libc_init_array+0x24>
8006738: 2600 movs r6, #0
800673a: f000 f821 bl 8006780 <_init>
800673e: 4d0a ldr r5, [pc, #40] ; (8006768 <__libc_init_array+0x40>)
8006740: 4c0a ldr r4, [pc, #40] ; (800676c <__libc_init_array+0x44>)
8006742: 1b64 subs r4, r4, r5
8006744: 10a4 asrs r4, r4, #2
8006746: 42a6 cmp r6, r4
8006748: d105 bne.n 8006756 <__libc_init_array+0x2e>
800674a: bd70 pop {r4, r5, r6, pc}
800674c: 00b3 lsls r3, r6, #2
800674e: 58eb ldr r3, [r5, r3]
8006750: 4798 blx r3
8006752: 3601 adds r6, #1
8006754: e7ee b.n 8006734 <__libc_init_array+0xc>
8006756: 00b3 lsls r3, r6, #2
8006758: 58eb ldr r3, [r5, r3]
800675a: 4798 blx r3
800675c: 3601 adds r6, #1
800675e: e7f2 b.n 8006746 <__libc_init_array+0x1e>
8006760: 0800687c .word 0x0800687c
8006764: 0800687c .word 0x0800687c
8006768: 0800687c .word 0x0800687c
800676c: 08006880 .word 0x08006880
08006770 <memset>:
8006770: 0003 movs r3, r0
8006772: 1882 adds r2, r0, r2
8006774: 4293 cmp r3, r2
8006776: d100 bne.n 800677a <memset+0xa>
8006778: 4770 bx lr
800677a: 7019 strb r1, [r3, #0]
800677c: 3301 adds r3, #1
800677e: e7f9 b.n 8006774 <memset+0x4>
08006780 <_init>:
8006780: b5f8 push {r3, r4, r5, r6, r7, lr}
8006782: 46c0 nop ; (mov r8, r8)
8006784: bcf8 pop {r3, r4, r5, r6, r7}
8006786: bc08 pop {r3}
8006788: 469e mov lr, r3
800678a: 4770 bx lr
0800678c <_fini>:
800678c: b5f8 push {r3, r4, r5, r6, r7, lr}
800678e: 46c0 nop ; (mov r8, r8)
8006790: bcf8 pop {r3, r4, r5, r6, r7}
8006792: bc08 pop {r3}
8006794: 469e mov lr, r3
8006796: 4770 bx lr
08006798 <__FLASH_Program_Fast_veneer>:
8006798: b401 push {r0}
800679a: 4802 ldr r0, [pc, #8] ; (80067a4 <__FLASH_Program_Fast_veneer+0xc>)
800679c: 4684 mov ip, r0
800679e: bc01 pop {r0}
80067a0: 4760 bx ip
80067a2: bf00 nop
80067a4: 20000011 .word 0x20000011
Disassembly of section .data:
20000000 <needConfig>:
20000000: .
20000001 <dLevel>:
20000001: ...
20000004 <SystemCoreClock>:
20000004: 00f42400 .$..
20000008 <uwTickPrio>:
20000008: 00000004 ....
2000000c <uwTickFreq>:
2000000c: .
2000000d <g_i2cAddr>:
2000000d: R..
20000010 <FLASH_Program_Fast>:
* @param Address Specifies the address to be programmed.
* @param DataAddress Specifies the address where the data are stored.
* @retval None
*/
static __RAM_FUNC void FLASH_Program_Fast(uint32_t Address, uint32_t DataAddress)
{
20000010: b580 push {r7, lr}
20000012: b088 sub sp, #32
20000014: af00 add r7, sp, #0
20000016: 6078 str r0, [r7, #4]
20000018: 6039 str r1, [r7, #0]
uint8_t index = 0;
2000001a: 231f movs r3, #31
2000001c: 18fb adds r3, r7, r3
2000001e: 2200 movs r2, #0
20000020: 701a strb r2, [r3, #0]
uint32_t dest = Address;
20000022: 687b ldr r3, [r7, #4]
20000024: 61bb str r3, [r7, #24]
uint32_t src = DataAddress;
20000026: 683b ldr r3, [r7, #0]
20000028: 617b str r3, [r7, #20]
uint32_t primask_bit;
/* Set FSTPG bit */
SET_BIT(FLASH->CR, FLASH_CR_FSTPG);
2000002a: 4b1a ldr r3, [pc, #104] ; (20000094 <FLASH_Program_Fast+0x84>)
2000002c: 695a ldr r2, [r3, #20]
2000002e: 4b19 ldr r3, [pc, #100] ; (20000094 <FLASH_Program_Fast+0x84>)
20000030: 2180 movs r1, #128 ; 0x80
20000032: 02c9 lsls r1, r1, #11
20000034: 430a orrs r2, r1
20000036: 615a str r2, [r3, #20]
__ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
20000038: f3ef 8310 mrs r3, PRIMASK
2000003c: 60fb str r3, [r7, #12]
return(result);
2000003e: 68fb ldr r3, [r7, #12]
/* Enter critical section: row programming should not be longer than 7 ms */
primask_bit = __get_PRIMASK();
20000040: 613b str r3, [r7, #16]
__ASM volatile ("cpsid i" : : : "memory");
20000042: b672 cpsid i
}
20000044: 46c0 nop ; (mov r8, r8)
__disable_irq();
/* Fast Program : 64 words */
while (index < 64U)
20000046: e00f b.n 20000068 <FLASH_Program_Fast+0x58>
{
*(uint32_t *)dest = *(uint32_t *)src;
20000048: 697a ldr r2, [r7, #20]
2000004a: 69bb ldr r3, [r7, #24]
2000004c: 6812 ldr r2, [r2, #0]
2000004e: 601a str r2, [r3, #0]
src += 4U;
20000050: 697b ldr r3, [r7, #20]
20000052: 3304 adds r3, #4
20000054: 617b str r3, [r7, #20]
dest += 4U;
20000056: 69bb ldr r3, [r7, #24]
20000058: 3304 adds r3, #4
2000005a: 61bb str r3, [r7, #24]
index++;
2000005c: 211f movs r1, #31
2000005e: 187b adds r3, r7, r1
20000060: 781a ldrb r2, [r3, #0]
20000062: 187b adds r3, r7, r1
20000064: 3201 adds r2, #1
20000066: 701a strb r2, [r3, #0]
while (index < 64U)
20000068: 231f movs r3, #31
2000006a: 18fb adds r3, r7, r3
2000006c: 781b ldrb r3, [r3, #0]
2000006e: 2b3f cmp r3, #63 ; 0x3f
20000070: d9ea bls.n 20000048 <FLASH_Program_Fast+0x38>
be anyway done later */
#if defined(FLASH_DBANK_SUPPORT)
while ((FLASH->SR & (FLASH_SR_BSY1 | FLASH_SR_BSY2)) != 0x00U)
#else
while ((FLASH->SR & FLASH_SR_BSY1) != 0x00U)
20000072: 46c0 nop ; (mov r8, r8)
20000074: 4b07 ldr r3, [pc, #28] ; (20000094 <FLASH_Program_Fast+0x84>)
20000076: 691a ldr r2, [r3, #16]
20000078: 2380 movs r3, #128 ; 0x80
2000007a: 025b lsls r3, r3, #9
2000007c: 4013 ands r3, r2
2000007e: d1f9 bne.n 20000074 <FLASH_Program_Fast+0x64>
20000080: 693b ldr r3, [r7, #16]
20000082: 60bb str r3, [r7, #8]
__ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
20000084: 68bb ldr r3, [r7, #8]
20000086: f383 8810 msr PRIMASK, r3
}
2000008a: 46c0 nop ; (mov r8, r8)
{
}
/* Exit critical section: restore previous priority mask */
__set_PRIMASK(primask_bit);
}
2000008c: 46c0 nop ; (mov r8, r8)
2000008e: 46bd mov sp, r7
20000090: b008 add sp, #32
20000092: bd80 pop {r7, pc}
20000094: 40022000 .word 0x40022000