Files
TP-STM32-CIPA3/TP4_INIT_TFT/Debug/TP3_PWM_LED.list

8720 lines
321 KiB
Plaintext

TP3_PWM_LED.elf: file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn
0 .isr_vector 0000013c 08000000 08000000 00001000 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .text 000030ec 0800013c 0800013c 0000113c 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .rodata 0000001c 08003228 08003228 00004228 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .ARM.extab 00000000 08003244 08003244 00005010 2**0
CONTENTS, READONLY
4 .ARM 00000008 08003244 08003244 00004244 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .preinit_array 00000000 0800324c 0800324c 00005010 2**0
CONTENTS, ALLOC, LOAD, DATA
6 .init_array 00000004 0800324c 0800324c 0000424c 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .fini_array 00000004 08003250 08003250 00004250 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
8 .data 00000010 20000000 08003254 00005000 2**2
CONTENTS, ALLOC, LOAD, DATA
9 .bss 0000013c 20000010 08003264 00005010 2**2
ALLOC
10 ._user_heap_stack 00000604 2000014c 08003264 0000514c 2**0
ALLOC
11 .ARM.attributes 00000029 00000000 00000000 00005010 2**0
CONTENTS, READONLY
12 .debug_info 0000998e 00000000 00000000 00005039 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
13 .debug_abbrev 000019f6 00000000 00000000 0000e9c7 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
14 .debug_aranges 00000ab0 00000000 00000000 000103c0 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
15 .debug_rnglists 0000081f 00000000 00000000 00010e70 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
16 .debug_macro 000155f9 00000000 00000000 0001168f 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
17 .debug_line 0000ab8c 00000000 00000000 00026c88 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
18 .debug_str 000886ff 00000000 00000000 00031814 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
19 .comment 00000043 00000000 00000000 000b9f13 2**0
CONTENTS, READONLY
20 .debug_frame 00002c2c 00000000 00000000 000b9f58 2**2
CONTENTS, READONLY, DEBUGGING, OCTETS
21 .debug_line_str 00000070 00000000 00000000 000bcb84 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
Disassembly of section .text:
0800013c <__do_global_dtors_aux>:
800013c: b510 push {r4, lr}
800013e: 4c05 ldr r4, [pc, #20] @ (8000154 <__do_global_dtors_aux+0x18>)
8000140: 7823 ldrb r3, [r4, #0]
8000142: b933 cbnz r3, 8000152 <__do_global_dtors_aux+0x16>
8000144: 4b04 ldr r3, [pc, #16] @ (8000158 <__do_global_dtors_aux+0x1c>)
8000146: b113 cbz r3, 800014e <__do_global_dtors_aux+0x12>
8000148: 4804 ldr r0, [pc, #16] @ (800015c <__do_global_dtors_aux+0x20>)
800014a: f3af 8000 nop.w
800014e: 2301 movs r3, #1
8000150: 7023 strb r3, [r4, #0]
8000152: bd10 pop {r4, pc}
8000154: 20000010 .word 0x20000010
8000158: 00000000 .word 0x00000000
800015c: 08003210 .word 0x08003210
08000160 <frame_dummy>:
8000160: b508 push {r3, lr}
8000162: 4b03 ldr r3, [pc, #12] @ (8000170 <frame_dummy+0x10>)
8000164: b11b cbz r3, 800016e <frame_dummy+0xe>
8000166: 4903 ldr r1, [pc, #12] @ (8000174 <frame_dummy+0x14>)
8000168: 4803 ldr r0, [pc, #12] @ (8000178 <frame_dummy+0x18>)
800016a: f3af 8000 nop.w
800016e: bd08 pop {r3, pc}
8000170: 00000000 .word 0x00000000
8000174: 20000014 .word 0x20000014
8000178: 08003210 .word 0x08003210
0800017c <__aeabi_uldivmod>:
800017c: b953 cbnz r3, 8000194 <__aeabi_uldivmod+0x18>
800017e: b94a cbnz r2, 8000194 <__aeabi_uldivmod+0x18>
8000180: 2900 cmp r1, #0
8000182: bf08 it eq
8000184: 2800 cmpeq r0, #0
8000186: bf1c itt ne
8000188: f04f 31ff movne.w r1, #4294967295 @ 0xffffffff
800018c: f04f 30ff movne.w r0, #4294967295 @ 0xffffffff
8000190: f000 b98c b.w 80004ac <__aeabi_idiv0>
8000194: f1ad 0c08 sub.w ip, sp, #8
8000198: e96d ce04 strd ip, lr, [sp, #-16]!
800019c: f000 f806 bl 80001ac <__udivmoddi4>
80001a0: f8dd e004 ldr.w lr, [sp, #4]
80001a4: e9dd 2302 ldrd r2, r3, [sp, #8]
80001a8: b004 add sp, #16
80001aa: 4770 bx lr
080001ac <__udivmoddi4>:
80001ac: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
80001b0: 9d08 ldr r5, [sp, #32]
80001b2: 468e mov lr, r1
80001b4: 4604 mov r4, r0
80001b6: 4688 mov r8, r1
80001b8: 2b00 cmp r3, #0
80001ba: d14a bne.n 8000252 <__udivmoddi4+0xa6>
80001bc: 428a cmp r2, r1
80001be: 4617 mov r7, r2
80001c0: d962 bls.n 8000288 <__udivmoddi4+0xdc>
80001c2: fab2 f682 clz r6, r2
80001c6: b14e cbz r6, 80001dc <__udivmoddi4+0x30>
80001c8: f1c6 0320 rsb r3, r6, #32
80001cc: fa01 f806 lsl.w r8, r1, r6
80001d0: fa20 f303 lsr.w r3, r0, r3
80001d4: 40b7 lsls r7, r6
80001d6: ea43 0808 orr.w r8, r3, r8
80001da: 40b4 lsls r4, r6
80001dc: ea4f 4e17 mov.w lr, r7, lsr #16
80001e0: fbb8 f1fe udiv r1, r8, lr
80001e4: fa1f fc87 uxth.w ip, r7
80001e8: fb0e 8811 mls r8, lr, r1, r8
80001ec: fb01 f20c mul.w r2, r1, ip
80001f0: 0c23 lsrs r3, r4, #16
80001f2: ea43 4308 orr.w r3, r3, r8, lsl #16
80001f6: 429a cmp r2, r3
80001f8: d909 bls.n 800020e <__udivmoddi4+0x62>
80001fa: 18fb adds r3, r7, r3
80001fc: f101 30ff add.w r0, r1, #4294967295 @ 0xffffffff
8000200: f080 80eb bcs.w 80003da <__udivmoddi4+0x22e>
8000204: 429a cmp r2, r3
8000206: f240 80e8 bls.w 80003da <__udivmoddi4+0x22e>
800020a: 3902 subs r1, #2
800020c: 443b add r3, r7
800020e: 1a9a subs r2, r3, r2
8000210: fbb2 f0fe udiv r0, r2, lr
8000214: fb0e 2210 mls r2, lr, r0, r2
8000218: fb00 fc0c mul.w ip, r0, ip
800021c: b2a3 uxth r3, r4
800021e: ea43 4302 orr.w r3, r3, r2, lsl #16
8000222: 459c cmp ip, r3
8000224: d909 bls.n 800023a <__udivmoddi4+0x8e>
8000226: 18fb adds r3, r7, r3
8000228: f100 32ff add.w r2, r0, #4294967295 @ 0xffffffff
800022c: f080 80d7 bcs.w 80003de <__udivmoddi4+0x232>
8000230: 459c cmp ip, r3
8000232: f240 80d4 bls.w 80003de <__udivmoddi4+0x232>
8000236: 443b add r3, r7
8000238: 3802 subs r0, #2
800023a: ea40 4001 orr.w r0, r0, r1, lsl #16
800023e: 2100 movs r1, #0
8000240: eba3 030c sub.w r3, r3, ip
8000244: b11d cbz r5, 800024e <__udivmoddi4+0xa2>
8000246: 2200 movs r2, #0
8000248: 40f3 lsrs r3, r6
800024a: e9c5 3200 strd r3, r2, [r5]
800024e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
8000252: 428b cmp r3, r1
8000254: d905 bls.n 8000262 <__udivmoddi4+0xb6>
8000256: b10d cbz r5, 800025c <__udivmoddi4+0xb0>
8000258: e9c5 0100 strd r0, r1, [r5]
800025c: 2100 movs r1, #0
800025e: 4608 mov r0, r1
8000260: e7f5 b.n 800024e <__udivmoddi4+0xa2>
8000262: fab3 f183 clz r1, r3
8000266: 2900 cmp r1, #0
8000268: d146 bne.n 80002f8 <__udivmoddi4+0x14c>
800026a: 4573 cmp r3, lr
800026c: d302 bcc.n 8000274 <__udivmoddi4+0xc8>
800026e: 4282 cmp r2, r0
8000270: f200 8108 bhi.w 8000484 <__udivmoddi4+0x2d8>
8000274: 1a84 subs r4, r0, r2
8000276: eb6e 0203 sbc.w r2, lr, r3
800027a: 2001 movs r0, #1
800027c: 4690 mov r8, r2
800027e: 2d00 cmp r5, #0
8000280: d0e5 beq.n 800024e <__udivmoddi4+0xa2>
8000282: e9c5 4800 strd r4, r8, [r5]
8000286: e7e2 b.n 800024e <__udivmoddi4+0xa2>
8000288: 2a00 cmp r2, #0
800028a: f000 8091 beq.w 80003b0 <__udivmoddi4+0x204>
800028e: fab2 f682 clz r6, r2
8000292: 2e00 cmp r6, #0
8000294: f040 80a5 bne.w 80003e2 <__udivmoddi4+0x236>
8000298: 1a8a subs r2, r1, r2
800029a: 2101 movs r1, #1
800029c: 0c03 lsrs r3, r0, #16
800029e: ea4f 4e17 mov.w lr, r7, lsr #16
80002a2: b280 uxth r0, r0
80002a4: b2bc uxth r4, r7
80002a6: fbb2 fcfe udiv ip, r2, lr
80002aa: fb0e 221c mls r2, lr, ip, r2
80002ae: ea43 4302 orr.w r3, r3, r2, lsl #16
80002b2: fb04 f20c mul.w r2, r4, ip
80002b6: 429a cmp r2, r3
80002b8: d907 bls.n 80002ca <__udivmoddi4+0x11e>
80002ba: 18fb adds r3, r7, r3
80002bc: f10c 38ff add.w r8, ip, #4294967295 @ 0xffffffff
80002c0: d202 bcs.n 80002c8 <__udivmoddi4+0x11c>
80002c2: 429a cmp r2, r3
80002c4: f200 80e3 bhi.w 800048e <__udivmoddi4+0x2e2>
80002c8: 46c4 mov ip, r8
80002ca: 1a9b subs r3, r3, r2
80002cc: fbb3 f2fe udiv r2, r3, lr
80002d0: fb0e 3312 mls r3, lr, r2, r3
80002d4: fb02 f404 mul.w r4, r2, r4
80002d8: ea40 4303 orr.w r3, r0, r3, lsl #16
80002dc: 429c cmp r4, r3
80002de: d907 bls.n 80002f0 <__udivmoddi4+0x144>
80002e0: 18fb adds r3, r7, r3
80002e2: f102 30ff add.w r0, r2, #4294967295 @ 0xffffffff
80002e6: d202 bcs.n 80002ee <__udivmoddi4+0x142>
80002e8: 429c cmp r4, r3
80002ea: f200 80cd bhi.w 8000488 <__udivmoddi4+0x2dc>
80002ee: 4602 mov r2, r0
80002f0: 1b1b subs r3, r3, r4
80002f2: ea42 400c orr.w r0, r2, ip, lsl #16
80002f6: e7a5 b.n 8000244 <__udivmoddi4+0x98>
80002f8: f1c1 0620 rsb r6, r1, #32
80002fc: 408b lsls r3, r1
80002fe: fa22 f706 lsr.w r7, r2, r6
8000302: 431f orrs r7, r3
8000304: fa2e fa06 lsr.w sl, lr, r6
8000308: ea4f 4917 mov.w r9, r7, lsr #16
800030c: fbba f8f9 udiv r8, sl, r9
8000310: fa0e fe01 lsl.w lr, lr, r1
8000314: fa20 f306 lsr.w r3, r0, r6
8000318: fb09 aa18 mls sl, r9, r8, sl
800031c: fa1f fc87 uxth.w ip, r7
8000320: ea43 030e orr.w r3, r3, lr
8000324: fa00 fe01 lsl.w lr, r0, r1
8000328: fb08 f00c mul.w r0, r8, ip
800032c: 0c1c lsrs r4, r3, #16
800032e: ea44 440a orr.w r4, r4, sl, lsl #16
8000332: 42a0 cmp r0, r4
8000334: fa02 f201 lsl.w r2, r2, r1
8000338: d90a bls.n 8000350 <__udivmoddi4+0x1a4>
800033a: 193c adds r4, r7, r4
800033c: f108 3aff add.w sl, r8, #4294967295 @ 0xffffffff
8000340: f080 809e bcs.w 8000480 <__udivmoddi4+0x2d4>
8000344: 42a0 cmp r0, r4
8000346: f240 809b bls.w 8000480 <__udivmoddi4+0x2d4>
800034a: f1a8 0802 sub.w r8, r8, #2
800034e: 443c add r4, r7
8000350: 1a24 subs r4, r4, r0
8000352: b298 uxth r0, r3
8000354: fbb4 f3f9 udiv r3, r4, r9
8000358: fb09 4413 mls r4, r9, r3, r4
800035c: fb03 fc0c mul.w ip, r3, ip
8000360: ea40 4404 orr.w r4, r0, r4, lsl #16
8000364: 45a4 cmp ip, r4
8000366: d909 bls.n 800037c <__udivmoddi4+0x1d0>
8000368: 193c adds r4, r7, r4
800036a: f103 30ff add.w r0, r3, #4294967295 @ 0xffffffff
800036e: f080 8085 bcs.w 800047c <__udivmoddi4+0x2d0>
8000372: 45a4 cmp ip, r4
8000374: f240 8082 bls.w 800047c <__udivmoddi4+0x2d0>
8000378: 3b02 subs r3, #2
800037a: 443c add r4, r7
800037c: ea43 4008 orr.w r0, r3, r8, lsl #16
8000380: eba4 040c sub.w r4, r4, ip
8000384: fba0 8c02 umull r8, ip, r0, r2
8000388: 4564 cmp r4, ip
800038a: 4643 mov r3, r8
800038c: 46e1 mov r9, ip
800038e: d364 bcc.n 800045a <__udivmoddi4+0x2ae>
8000390: d061 beq.n 8000456 <__udivmoddi4+0x2aa>
8000392: b15d cbz r5, 80003ac <__udivmoddi4+0x200>
8000394: ebbe 0203 subs.w r2, lr, r3
8000398: eb64 0409 sbc.w r4, r4, r9
800039c: fa04 f606 lsl.w r6, r4, r6
80003a0: fa22 f301 lsr.w r3, r2, r1
80003a4: 431e orrs r6, r3
80003a6: 40cc lsrs r4, r1
80003a8: e9c5 6400 strd r6, r4, [r5]
80003ac: 2100 movs r1, #0
80003ae: e74e b.n 800024e <__udivmoddi4+0xa2>
80003b0: fbb1 fcf2 udiv ip, r1, r2
80003b4: 0c01 lsrs r1, r0, #16
80003b6: ea41 410e orr.w r1, r1, lr, lsl #16
80003ba: b280 uxth r0, r0
80003bc: ea40 4201 orr.w r2, r0, r1, lsl #16
80003c0: 463b mov r3, r7
80003c2: fbb1 f1f7 udiv r1, r1, r7
80003c6: 4638 mov r0, r7
80003c8: 463c mov r4, r7
80003ca: 46b8 mov r8, r7
80003cc: 46be mov lr, r7
80003ce: 2620 movs r6, #32
80003d0: eba2 0208 sub.w r2, r2, r8
80003d4: ea41 410c orr.w r1, r1, ip, lsl #16
80003d8: e765 b.n 80002a6 <__udivmoddi4+0xfa>
80003da: 4601 mov r1, r0
80003dc: e717 b.n 800020e <__udivmoddi4+0x62>
80003de: 4610 mov r0, r2
80003e0: e72b b.n 800023a <__udivmoddi4+0x8e>
80003e2: f1c6 0120 rsb r1, r6, #32
80003e6: fa2e fc01 lsr.w ip, lr, r1
80003ea: 40b7 lsls r7, r6
80003ec: fa0e fe06 lsl.w lr, lr, r6
80003f0: fa20 f101 lsr.w r1, r0, r1
80003f4: ea41 010e orr.w r1, r1, lr
80003f8: ea4f 4e17 mov.w lr, r7, lsr #16
80003fc: fbbc f8fe udiv r8, ip, lr
8000400: b2bc uxth r4, r7
8000402: fb0e cc18 mls ip, lr, r8, ip
8000406: fb08 f904 mul.w r9, r8, r4
800040a: 0c0a lsrs r2, r1, #16
800040c: ea42 420c orr.w r2, r2, ip, lsl #16
8000410: 40b0 lsls r0, r6
8000412: 4591 cmp r9, r2
8000414: ea4f 4310 mov.w r3, r0, lsr #16
8000418: b280 uxth r0, r0
800041a: d93e bls.n 800049a <__udivmoddi4+0x2ee>
800041c: 18ba adds r2, r7, r2
800041e: f108 3cff add.w ip, r8, #4294967295 @ 0xffffffff
8000422: d201 bcs.n 8000428 <__udivmoddi4+0x27c>
8000424: 4591 cmp r9, r2
8000426: d81f bhi.n 8000468 <__udivmoddi4+0x2bc>
8000428: eba2 0209 sub.w r2, r2, r9
800042c: fbb2 f9fe udiv r9, r2, lr
8000430: fb09 f804 mul.w r8, r9, r4
8000434: fb0e 2a19 mls sl, lr, r9, r2
8000438: b28a uxth r2, r1
800043a: ea42 420a orr.w r2, r2, sl, lsl #16
800043e: 4542 cmp r2, r8
8000440: d229 bcs.n 8000496 <__udivmoddi4+0x2ea>
8000442: 18ba adds r2, r7, r2
8000444: f109 31ff add.w r1, r9, #4294967295 @ 0xffffffff
8000448: d2c2 bcs.n 80003d0 <__udivmoddi4+0x224>
800044a: 4542 cmp r2, r8
800044c: d2c0 bcs.n 80003d0 <__udivmoddi4+0x224>
800044e: f1a9 0102 sub.w r1, r9, #2
8000452: 443a add r2, r7
8000454: e7bc b.n 80003d0 <__udivmoddi4+0x224>
8000456: 45c6 cmp lr, r8
8000458: d29b bcs.n 8000392 <__udivmoddi4+0x1e6>
800045a: ebb8 0302 subs.w r3, r8, r2
800045e: eb6c 0c07 sbc.w ip, ip, r7
8000462: 3801 subs r0, #1
8000464: 46e1 mov r9, ip
8000466: e794 b.n 8000392 <__udivmoddi4+0x1e6>
8000468: eba7 0909 sub.w r9, r7, r9
800046c: 444a add r2, r9
800046e: fbb2 f9fe udiv r9, r2, lr
8000472: f1a8 0c02 sub.w ip, r8, #2
8000476: fb09 f804 mul.w r8, r9, r4
800047a: e7db b.n 8000434 <__udivmoddi4+0x288>
800047c: 4603 mov r3, r0
800047e: e77d b.n 800037c <__udivmoddi4+0x1d0>
8000480: 46d0 mov r8, sl
8000482: e765 b.n 8000350 <__udivmoddi4+0x1a4>
8000484: 4608 mov r0, r1
8000486: e6fa b.n 800027e <__udivmoddi4+0xd2>
8000488: 443b add r3, r7
800048a: 3a02 subs r2, #2
800048c: e730 b.n 80002f0 <__udivmoddi4+0x144>
800048e: f1ac 0c02 sub.w ip, ip, #2
8000492: 443b add r3, r7
8000494: e719 b.n 80002ca <__udivmoddi4+0x11e>
8000496: 4649 mov r1, r9
8000498: e79a b.n 80003d0 <__udivmoddi4+0x224>
800049a: eba2 0209 sub.w r2, r2, r9
800049e: fbb2 f9fe udiv r9, r2, lr
80004a2: 46c4 mov ip, r8
80004a4: fb09 f804 mul.w r8, r9, r4
80004a8: e7c4 b.n 8000434 <__udivmoddi4+0x288>
80004aa: bf00 nop
080004ac <__aeabi_idiv0>:
80004ac: 4770 bx lr
80004ae: bf00 nop
080004b0 <main>:
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
80004b0: b580 push {r7, lr}
80004b2: af00 add r7, sp, #0
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
80004b4: f000 fca0 bl 8000df8 <HAL_Init>
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
80004b8: f000 f822 bl 8000500 <SystemClock_Config>
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
80004bc: f000 f9be bl 800083c <MX_GPIO_Init>
MX_SPI1_Init();
80004c0: f000 f864 bl 800058c <MX_SPI1_Init>
MX_TIM4_Init();
80004c4: f000 f8e6 bl 8000694 <MX_TIM4_Init>
MX_TIM11_Init();
80004c8: f000 f958 bl 800077c <MX_TIM11_Init>
MX_TIM2_Init();
80004cc: f000 f894 bl 80005f8 <MX_TIM2_Init>
/* USER CODE BEGIN 2 */
MAX7219_Init();
80004d0: f000 fc15 bl 8000cfe <MAX7219_Init>
HAL_TIM_Base_Start_IT(&htim2);
80004d4: 4807 ldr r0, [pc, #28] @ (80004f4 <main+0x44>)
80004d6: f002 f841 bl 800255c <HAL_TIM_Base_Start_IT>
HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_2);
80004da: 2104 movs r1, #4
80004dc: 4806 ldr r0, [pc, #24] @ (80004f8 <main+0x48>)
80004de: f002 f8d7 bl 8002690 <HAL_TIM_PWM_Start>
HAL_TIM_PWM_Start(&htim11, TIM_CHANNEL_1);
80004e2: 2100 movs r1, #0
80004e4: 4805 ldr r0, [pc, #20] @ (80004fc <main+0x4c>)
80004e6: f002 f8d3 bl 8002690 <HAL_TIM_PWM_Start>
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
MAX7219_Clear();
80004ea: f000 fc3f bl 8000d6c <MAX7219_Clear>
while (1)
80004ee: bf00 nop
80004f0: e7fd b.n 80004ee <main+0x3e>
80004f2: bf00 nop
80004f4: 20000084 .word 0x20000084
80004f8: 200000c4 .word 0x200000c4
80004fc: 20000104 .word 0x20000104
08000500 <SystemClock_Config>:
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
8000500: b580 push {r7, lr}
8000502: b092 sub sp, #72 @ 0x48
8000504: af00 add r7, sp, #0
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
8000506: f107 0314 add.w r3, r7, #20
800050a: 2234 movs r2, #52 @ 0x34
800050c: 2100 movs r1, #0
800050e: 4618 mov r0, r3
8000510: f002 fe52 bl 80031b8 <memset>
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
8000514: 463b mov r3, r7
8000516: 2200 movs r2, #0
8000518: 601a str r2, [r3, #0]
800051a: 605a str r2, [r3, #4]
800051c: 609a str r2, [r3, #8]
800051e: 60da str r2, [r3, #12]
8000520: 611a str r2, [r3, #16]
/** Configure the main internal regulator output voltage
*/
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
8000522: 4b19 ldr r3, [pc, #100] @ (8000588 <SystemClock_Config+0x88>)
8000524: 681b ldr r3, [r3, #0]
8000526: f423 53c0 bic.w r3, r3, #6144 @ 0x1800
800052a: 4a17 ldr r2, [pc, #92] @ (8000588 <SystemClock_Config+0x88>)
800052c: f443 6300 orr.w r3, r3, #2048 @ 0x800
8000530: 6013 str r3, [r2, #0]
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
8000532: 2302 movs r3, #2
8000534: 617b str r3, [r7, #20]
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
8000536: 2301 movs r3, #1
8000538: 623b str r3, [r7, #32]
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
800053a: 2310 movs r3, #16
800053c: 627b str r3, [r7, #36] @ 0x24
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
800053e: 2300 movs r3, #0
8000540: 63bb str r3, [r7, #56] @ 0x38
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
8000542: f107 0314 add.w r3, r7, #20
8000546: 4618 mov r0, r3
8000548: f000 ff9c bl 8001484 <HAL_RCC_OscConfig>
800054c: 4603 mov r3, r0
800054e: 2b00 cmp r3, #0
8000550: d001 beq.n 8000556 <SystemClock_Config+0x56>
{
Error_Handler();
8000552: f000 fa23 bl 800099c <Error_Handler>
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
8000556: 230f movs r3, #15
8000558: 603b str r3, [r7, #0]
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
800055a: 2301 movs r3, #1
800055c: 607b str r3, [r7, #4]
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
800055e: 2300 movs r3, #0
8000560: 60bb str r3, [r7, #8]
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
8000562: 2300 movs r3, #0
8000564: 60fb str r3, [r7, #12]
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
8000566: 2300 movs r3, #0
8000568: 613b str r3, [r7, #16]
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
800056a: 463b mov r3, r7
800056c: 2100 movs r1, #0
800056e: 4618 mov r0, r3
8000570: f001 fab8 bl 8001ae4 <HAL_RCC_ClockConfig>
8000574: 4603 mov r3, r0
8000576: 2b00 cmp r3, #0
8000578: d001 beq.n 800057e <SystemClock_Config+0x7e>
{
Error_Handler();
800057a: f000 fa0f bl 800099c <Error_Handler>
}
}
800057e: bf00 nop
8000580: 3748 adds r7, #72 @ 0x48
8000582: 46bd mov sp, r7
8000584: bd80 pop {r7, pc}
8000586: bf00 nop
8000588: 40007000 .word 0x40007000
0800058c <MX_SPI1_Init>:
* @brief SPI1 Initialization Function
* @param None
* @retval None
*/
static void MX_SPI1_Init(void)
{
800058c: b580 push {r7, lr}
800058e: af00 add r7, sp, #0
/* USER CODE BEGIN SPI1_Init 1 */
/* USER CODE END SPI1_Init 1 */
/* SPI1 parameter configuration*/
hspi1.Instance = SPI1;
8000590: 4b17 ldr r3, [pc, #92] @ (80005f0 <MX_SPI1_Init+0x64>)
8000592: 4a18 ldr r2, [pc, #96] @ (80005f4 <MX_SPI1_Init+0x68>)
8000594: 601a str r2, [r3, #0]
hspi1.Init.Mode = SPI_MODE_MASTER;
8000596: 4b16 ldr r3, [pc, #88] @ (80005f0 <MX_SPI1_Init+0x64>)
8000598: f44f 7282 mov.w r2, #260 @ 0x104
800059c: 605a str r2, [r3, #4]
hspi1.Init.Direction = SPI_DIRECTION_2LINES;
800059e: 4b14 ldr r3, [pc, #80] @ (80005f0 <MX_SPI1_Init+0x64>)
80005a0: 2200 movs r2, #0
80005a2: 609a str r2, [r3, #8]
hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
80005a4: 4b12 ldr r3, [pc, #72] @ (80005f0 <MX_SPI1_Init+0x64>)
80005a6: 2200 movs r2, #0
80005a8: 60da str r2, [r3, #12]
hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
80005aa: 4b11 ldr r3, [pc, #68] @ (80005f0 <MX_SPI1_Init+0x64>)
80005ac: 2200 movs r2, #0
80005ae: 611a str r2, [r3, #16]
hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
80005b0: 4b0f ldr r3, [pc, #60] @ (80005f0 <MX_SPI1_Init+0x64>)
80005b2: 2200 movs r2, #0
80005b4: 615a str r2, [r3, #20]
hspi1.Init.NSS = SPI_NSS_SOFT;
80005b6: 4b0e ldr r3, [pc, #56] @ (80005f0 <MX_SPI1_Init+0x64>)
80005b8: f44f 7200 mov.w r2, #512 @ 0x200
80005bc: 619a str r2, [r3, #24]
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
80005be: 4b0c ldr r3, [pc, #48] @ (80005f0 <MX_SPI1_Init+0x64>)
80005c0: 2200 movs r2, #0
80005c2: 61da str r2, [r3, #28]
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
80005c4: 4b0a ldr r3, [pc, #40] @ (80005f0 <MX_SPI1_Init+0x64>)
80005c6: 2200 movs r2, #0
80005c8: 621a str r2, [r3, #32]
hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
80005ca: 4b09 ldr r3, [pc, #36] @ (80005f0 <MX_SPI1_Init+0x64>)
80005cc: 2200 movs r2, #0
80005ce: 625a str r2, [r3, #36] @ 0x24
hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
80005d0: 4b07 ldr r3, [pc, #28] @ (80005f0 <MX_SPI1_Init+0x64>)
80005d2: 2200 movs r2, #0
80005d4: 629a str r2, [r3, #40] @ 0x28
hspi1.Init.CRCPolynomial = 10;
80005d6: 4b06 ldr r3, [pc, #24] @ (80005f0 <MX_SPI1_Init+0x64>)
80005d8: 220a movs r2, #10
80005da: 62da str r2, [r3, #44] @ 0x2c
if (HAL_SPI_Init(&hspi1) != HAL_OK)
80005dc: 4804 ldr r0, [pc, #16] @ (80005f0 <MX_SPI1_Init+0x64>)
80005de: f001 fcd3 bl 8001f88 <HAL_SPI_Init>
80005e2: 4603 mov r3, r0
80005e4: 2b00 cmp r3, #0
80005e6: d001 beq.n 80005ec <MX_SPI1_Init+0x60>
{
Error_Handler();
80005e8: f000 f9d8 bl 800099c <Error_Handler>
}
/* USER CODE BEGIN SPI1_Init 2 */
/* USER CODE END SPI1_Init 2 */
}
80005ec: bf00 nop
80005ee: bd80 pop {r7, pc}
80005f0: 2000002c .word 0x2000002c
80005f4: 40013000 .word 0x40013000
080005f8 <MX_TIM2_Init>:
* @brief TIM2 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM2_Init(void)
{
80005f8: b580 push {r7, lr}
80005fa: b086 sub sp, #24
80005fc: af00 add r7, sp, #0
/* USER CODE BEGIN TIM2_Init 0 */
/* USER CODE END TIM2_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
80005fe: f107 0308 add.w r3, r7, #8
8000602: 2200 movs r2, #0
8000604: 601a str r2, [r3, #0]
8000606: 605a str r2, [r3, #4]
8000608: 609a str r2, [r3, #8]
800060a: 60da str r2, [r3, #12]
TIM_MasterConfigTypeDef sMasterConfig = {0};
800060c: 463b mov r3, r7
800060e: 2200 movs r2, #0
8000610: 601a str r2, [r3, #0]
8000612: 605a str r2, [r3, #4]
/* USER CODE BEGIN TIM2_Init 1 */
/* USER CODE END TIM2_Init 1 */
htim2.Instance = TIM2;
8000614: 4b1e ldr r3, [pc, #120] @ (8000690 <MX_TIM2_Init+0x98>)
8000616: f04f 4280 mov.w r2, #1073741824 @ 0x40000000
800061a: 601a str r2, [r3, #0]
htim2.Init.Prescaler = 1000-1;
800061c: 4b1c ldr r3, [pc, #112] @ (8000690 <MX_TIM2_Init+0x98>)
800061e: f240 32e7 movw r2, #999 @ 0x3e7
8000622: 605a str r2, [r3, #4]
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
8000624: 4b1a ldr r3, [pc, #104] @ (8000690 <MX_TIM2_Init+0x98>)
8000626: 2200 movs r2, #0
8000628: 609a str r2, [r3, #8]
htim2.Init.Period = 16000-1;
800062a: 4b19 ldr r3, [pc, #100] @ (8000690 <MX_TIM2_Init+0x98>)
800062c: f643 627f movw r2, #15999 @ 0x3e7f
8000630: 60da str r2, [r3, #12]
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
8000632: 4b17 ldr r3, [pc, #92] @ (8000690 <MX_TIM2_Init+0x98>)
8000634: 2200 movs r2, #0
8000636: 611a str r2, [r3, #16]
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
8000638: 4b15 ldr r3, [pc, #84] @ (8000690 <MX_TIM2_Init+0x98>)
800063a: 2280 movs r2, #128 @ 0x80
800063c: 615a str r2, [r3, #20]
if (HAL_TIM_Base_Init(&htim2) != HAL_OK)
800063e: 4814 ldr r0, [pc, #80] @ (8000690 <MX_TIM2_Init+0x98>)
8000640: f001 ff4c bl 80024dc <HAL_TIM_Base_Init>
8000644: 4603 mov r3, r0
8000646: 2b00 cmp r3, #0
8000648: d001 beq.n 800064e <MX_TIM2_Init+0x56>
{
Error_Handler();
800064a: f000 f9a7 bl 800099c <Error_Handler>
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
800064e: f44f 5380 mov.w r3, #4096 @ 0x1000
8000652: 60bb str r3, [r7, #8]
if (HAL_TIM_ConfigClockSource(&htim2, &sClockSourceConfig) != HAL_OK)
8000654: f107 0308 add.w r3, r7, #8
8000658: 4619 mov r1, r3
800065a: 480d ldr r0, [pc, #52] @ (8000690 <MX_TIM2_Init+0x98>)
800065c: f002 fa3c bl 8002ad8 <HAL_TIM_ConfigClockSource>
8000660: 4603 mov r3, r0
8000662: 2b00 cmp r3, #0
8000664: d001 beq.n 800066a <MX_TIM2_Init+0x72>
{
Error_Handler();
8000666: f000 f999 bl 800099c <Error_Handler>
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
800066a: 2300 movs r3, #0
800066c: 603b str r3, [r7, #0]
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
800066e: 2300 movs r3, #0
8000670: 607b str r3, [r7, #4]
if (HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig) != HAL_OK)
8000672: 463b mov r3, r7
8000674: 4619 mov r1, r3
8000676: 4806 ldr r0, [pc, #24] @ (8000690 <MX_TIM2_Init+0x98>)
8000678: f002 fd40 bl 80030fc <HAL_TIMEx_MasterConfigSynchronization>
800067c: 4603 mov r3, r0
800067e: 2b00 cmp r3, #0
8000680: d001 beq.n 8000686 <MX_TIM2_Init+0x8e>
{
Error_Handler();
8000682: f000 f98b bl 800099c <Error_Handler>
}
/* USER CODE BEGIN TIM2_Init 2 */
/* USER CODE END TIM2_Init 2 */
}
8000686: bf00 nop
8000688: 3718 adds r7, #24
800068a: 46bd mov sp, r7
800068c: bd80 pop {r7, pc}
800068e: bf00 nop
8000690: 20000084 .word 0x20000084
08000694 <MX_TIM4_Init>:
* @brief TIM4 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM4_Init(void)
{
8000694: b580 push {r7, lr}
8000696: b08a sub sp, #40 @ 0x28
8000698: af00 add r7, sp, #0
/* USER CODE BEGIN TIM4_Init 0 */
/* USER CODE END TIM4_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
800069a: f107 0318 add.w r3, r7, #24
800069e: 2200 movs r2, #0
80006a0: 601a str r2, [r3, #0]
80006a2: 605a str r2, [r3, #4]
80006a4: 609a str r2, [r3, #8]
80006a6: 60da str r2, [r3, #12]
TIM_MasterConfigTypeDef sMasterConfig = {0};
80006a8: f107 0310 add.w r3, r7, #16
80006ac: 2200 movs r2, #0
80006ae: 601a str r2, [r3, #0]
80006b0: 605a str r2, [r3, #4]
TIM_OC_InitTypeDef sConfigOC = {0};
80006b2: 463b mov r3, r7
80006b4: 2200 movs r2, #0
80006b6: 601a str r2, [r3, #0]
80006b8: 605a str r2, [r3, #4]
80006ba: 609a str r2, [r3, #8]
80006bc: 60da str r2, [r3, #12]
/* USER CODE BEGIN TIM4_Init 1 */
/* USER CODE END TIM4_Init 1 */
htim4.Instance = TIM4;
80006be: 4b2d ldr r3, [pc, #180] @ (8000774 <MX_TIM4_Init+0xe0>)
80006c0: 4a2d ldr r2, [pc, #180] @ (8000778 <MX_TIM4_Init+0xe4>)
80006c2: 601a str r2, [r3, #0]
htim4.Init.Prescaler = 20-1;
80006c4: 4b2b ldr r3, [pc, #172] @ (8000774 <MX_TIM4_Init+0xe0>)
80006c6: 2213 movs r2, #19
80006c8: 605a str r2, [r3, #4]
htim4.Init.CounterMode = TIM_COUNTERMODE_UP;
80006ca: 4b2a ldr r3, [pc, #168] @ (8000774 <MX_TIM4_Init+0xe0>)
80006cc: 2200 movs r2, #0
80006ce: 609a str r2, [r3, #8]
htim4.Init.Period = 16000-1;
80006d0: 4b28 ldr r3, [pc, #160] @ (8000774 <MX_TIM4_Init+0xe0>)
80006d2: f643 627f movw r2, #15999 @ 0x3e7f
80006d6: 60da str r2, [r3, #12]
htim4.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
80006d8: 4b26 ldr r3, [pc, #152] @ (8000774 <MX_TIM4_Init+0xe0>)
80006da: 2200 movs r2, #0
80006dc: 611a str r2, [r3, #16]
htim4.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
80006de: 4b25 ldr r3, [pc, #148] @ (8000774 <MX_TIM4_Init+0xe0>)
80006e0: 2280 movs r2, #128 @ 0x80
80006e2: 615a str r2, [r3, #20]
if (HAL_TIM_Base_Init(&htim4) != HAL_OK)
80006e4: 4823 ldr r0, [pc, #140] @ (8000774 <MX_TIM4_Init+0xe0>)
80006e6: f001 fef9 bl 80024dc <HAL_TIM_Base_Init>
80006ea: 4603 mov r3, r0
80006ec: 2b00 cmp r3, #0
80006ee: d001 beq.n 80006f4 <MX_TIM4_Init+0x60>
{
Error_Handler();
80006f0: f000 f954 bl 800099c <Error_Handler>
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
80006f4: f44f 5380 mov.w r3, #4096 @ 0x1000
80006f8: 61bb str r3, [r7, #24]
if (HAL_TIM_ConfigClockSource(&htim4, &sClockSourceConfig) != HAL_OK)
80006fa: f107 0318 add.w r3, r7, #24
80006fe: 4619 mov r1, r3
8000700: 481c ldr r0, [pc, #112] @ (8000774 <MX_TIM4_Init+0xe0>)
8000702: f002 f9e9 bl 8002ad8 <HAL_TIM_ConfigClockSource>
8000706: 4603 mov r3, r0
8000708: 2b00 cmp r3, #0
800070a: d001 beq.n 8000710 <MX_TIM4_Init+0x7c>
{
Error_Handler();
800070c: f000 f946 bl 800099c <Error_Handler>
}
if (HAL_TIM_PWM_Init(&htim4) != HAL_OK)
8000710: 4818 ldr r0, [pc, #96] @ (8000774 <MX_TIM4_Init+0xe0>)
8000712: f001 ff75 bl 8002600 <HAL_TIM_PWM_Init>
8000716: 4603 mov r3, r0
8000718: 2b00 cmp r3, #0
800071a: d001 beq.n 8000720 <MX_TIM4_Init+0x8c>
{
Error_Handler();
800071c: f000 f93e bl 800099c <Error_Handler>
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
8000720: 2300 movs r3, #0
8000722: 613b str r3, [r7, #16]
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
8000724: 2300 movs r3, #0
8000726: 617b str r3, [r7, #20]
if (HAL_TIMEx_MasterConfigSynchronization(&htim4, &sMasterConfig) != HAL_OK)
8000728: f107 0310 add.w r3, r7, #16
800072c: 4619 mov r1, r3
800072e: 4811 ldr r0, [pc, #68] @ (8000774 <MX_TIM4_Init+0xe0>)
8000730: f002 fce4 bl 80030fc <HAL_TIMEx_MasterConfigSynchronization>
8000734: 4603 mov r3, r0
8000736: 2b00 cmp r3, #0
8000738: d001 beq.n 800073e <MX_TIM4_Init+0xaa>
{
Error_Handler();
800073a: f000 f92f bl 800099c <Error_Handler>
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
800073e: 2360 movs r3, #96 @ 0x60
8000740: 603b str r3, [r7, #0]
sConfigOC.Pulse = 800-1;
8000742: f240 331f movw r3, #799 @ 0x31f
8000746: 607b str r3, [r7, #4]
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
8000748: 2300 movs r3, #0
800074a: 60bb str r3, [r7, #8]
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
800074c: 2300 movs r3, #0
800074e: 60fb str r3, [r7, #12]
if (HAL_TIM_PWM_ConfigChannel(&htim4, &sConfigOC, TIM_CHANNEL_2) != HAL_OK)
8000750: 463b mov r3, r7
8000752: 2204 movs r2, #4
8000754: 4619 mov r1, r3
8000756: 4807 ldr r0, [pc, #28] @ (8000774 <MX_TIM4_Init+0xe0>)
8000758: f002 f8fc bl 8002954 <HAL_TIM_PWM_ConfigChannel>
800075c: 4603 mov r3, r0
800075e: 2b00 cmp r3, #0
8000760: d001 beq.n 8000766 <MX_TIM4_Init+0xd2>
{
Error_Handler();
8000762: f000 f91b bl 800099c <Error_Handler>
}
/* USER CODE BEGIN TIM4_Init 2 */
/* USER CODE END TIM4_Init 2 */
HAL_TIM_MspPostInit(&htim4);
8000766: 4803 ldr r0, [pc, #12] @ (8000774 <MX_TIM4_Init+0xe0>)
8000768: f000 f9ec bl 8000b44 <HAL_TIM_MspPostInit>
}
800076c: bf00 nop
800076e: 3728 adds r7, #40 @ 0x28
8000770: 46bd mov sp, r7
8000772: bd80 pop {r7, pc}
8000774: 200000c4 .word 0x200000c4
8000778: 40000800 .word 0x40000800
0800077c <MX_TIM11_Init>:
* @brief TIM11 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM11_Init(void)
{
800077c: b580 push {r7, lr}
800077e: b088 sub sp, #32
8000780: af00 add r7, sp, #0
/* USER CODE BEGIN TIM11_Init 0 */
/* USER CODE END TIM11_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
8000782: f107 0310 add.w r3, r7, #16
8000786: 2200 movs r2, #0
8000788: 601a str r2, [r3, #0]
800078a: 605a str r2, [r3, #4]
800078c: 609a str r2, [r3, #8]
800078e: 60da str r2, [r3, #12]
TIM_OC_InitTypeDef sConfigOC = {0};
8000790: 463b mov r3, r7
8000792: 2200 movs r2, #0
8000794: 601a str r2, [r3, #0]
8000796: 605a str r2, [r3, #4]
8000798: 609a str r2, [r3, #8]
800079a: 60da str r2, [r3, #12]
/* USER CODE BEGIN TIM11_Init 1 */
/* USER CODE END TIM11_Init 1 */
htim11.Instance = TIM11;
800079c: 4b25 ldr r3, [pc, #148] @ (8000834 <MX_TIM11_Init+0xb8>)
800079e: 4a26 ldr r2, [pc, #152] @ (8000838 <MX_TIM11_Init+0xbc>)
80007a0: 601a str r2, [r3, #0]
htim11.Init.Prescaler = 20-1;
80007a2: 4b24 ldr r3, [pc, #144] @ (8000834 <MX_TIM11_Init+0xb8>)
80007a4: 2213 movs r2, #19
80007a6: 605a str r2, [r3, #4]
htim11.Init.CounterMode = TIM_COUNTERMODE_UP;
80007a8: 4b22 ldr r3, [pc, #136] @ (8000834 <MX_TIM11_Init+0xb8>)
80007aa: 2200 movs r2, #0
80007ac: 609a str r2, [r3, #8]
htim11.Init.Period = 16000-1;
80007ae: 4b21 ldr r3, [pc, #132] @ (8000834 <MX_TIM11_Init+0xb8>)
80007b0: f643 627f movw r2, #15999 @ 0x3e7f
80007b4: 60da str r2, [r3, #12]
htim11.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
80007b6: 4b1f ldr r3, [pc, #124] @ (8000834 <MX_TIM11_Init+0xb8>)
80007b8: 2200 movs r2, #0
80007ba: 611a str r2, [r3, #16]
htim11.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
80007bc: 4b1d ldr r3, [pc, #116] @ (8000834 <MX_TIM11_Init+0xb8>)
80007be: 2280 movs r2, #128 @ 0x80
80007c0: 615a str r2, [r3, #20]
if (HAL_TIM_Base_Init(&htim11) != HAL_OK)
80007c2: 481c ldr r0, [pc, #112] @ (8000834 <MX_TIM11_Init+0xb8>)
80007c4: f001 fe8a bl 80024dc <HAL_TIM_Base_Init>
80007c8: 4603 mov r3, r0
80007ca: 2b00 cmp r3, #0
80007cc: d001 beq.n 80007d2 <MX_TIM11_Init+0x56>
{
Error_Handler();
80007ce: f000 f8e5 bl 800099c <Error_Handler>
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
80007d2: f44f 5380 mov.w r3, #4096 @ 0x1000
80007d6: 613b str r3, [r7, #16]
if (HAL_TIM_ConfigClockSource(&htim11, &sClockSourceConfig) != HAL_OK)
80007d8: f107 0310 add.w r3, r7, #16
80007dc: 4619 mov r1, r3
80007de: 4815 ldr r0, [pc, #84] @ (8000834 <MX_TIM11_Init+0xb8>)
80007e0: f002 f97a bl 8002ad8 <HAL_TIM_ConfigClockSource>
80007e4: 4603 mov r3, r0
80007e6: 2b00 cmp r3, #0
80007e8: d001 beq.n 80007ee <MX_TIM11_Init+0x72>
{
Error_Handler();
80007ea: f000 f8d7 bl 800099c <Error_Handler>
}
if (HAL_TIM_PWM_Init(&htim11) != HAL_OK)
80007ee: 4811 ldr r0, [pc, #68] @ (8000834 <MX_TIM11_Init+0xb8>)
80007f0: f001 ff06 bl 8002600 <HAL_TIM_PWM_Init>
80007f4: 4603 mov r3, r0
80007f6: 2b00 cmp r3, #0
80007f8: d001 beq.n 80007fe <MX_TIM11_Init+0x82>
{
Error_Handler();
80007fa: f000 f8cf bl 800099c <Error_Handler>
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
80007fe: 2360 movs r3, #96 @ 0x60
8000800: 603b str r3, [r7, #0]
sConfigOC.Pulse = 800-1;
8000802: f240 331f movw r3, #799 @ 0x31f
8000806: 607b str r3, [r7, #4]
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
8000808: 2300 movs r3, #0
800080a: 60bb str r3, [r7, #8]
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
800080c: 2300 movs r3, #0
800080e: 60fb str r3, [r7, #12]
if (HAL_TIM_PWM_ConfigChannel(&htim11, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
8000810: 463b mov r3, r7
8000812: 2200 movs r2, #0
8000814: 4619 mov r1, r3
8000816: 4807 ldr r0, [pc, #28] @ (8000834 <MX_TIM11_Init+0xb8>)
8000818: f002 f89c bl 8002954 <HAL_TIM_PWM_ConfigChannel>
800081c: 4603 mov r3, r0
800081e: 2b00 cmp r3, #0
8000820: d001 beq.n 8000826 <MX_TIM11_Init+0xaa>
{
Error_Handler();
8000822: f000 f8bb bl 800099c <Error_Handler>
}
/* USER CODE BEGIN TIM11_Init 2 */
/* USER CODE END TIM11_Init 2 */
HAL_TIM_MspPostInit(&htim11);
8000826: 4803 ldr r0, [pc, #12] @ (8000834 <MX_TIM11_Init+0xb8>)
8000828: f000 f98c bl 8000b44 <HAL_TIM_MspPostInit>
}
800082c: bf00 nop
800082e: 3720 adds r7, #32
8000830: 46bd mov sp, r7
8000832: bd80 pop {r7, pc}
8000834: 20000104 .word 0x20000104
8000838: 40011000 .word 0x40011000
0800083c <MX_GPIO_Init>:
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
800083c: b580 push {r7, lr}
800083e: b088 sub sp, #32
8000840: af00 add r7, sp, #0
GPIO_InitTypeDef GPIO_InitStruct = {0};
8000842: f107 030c add.w r3, r7, #12
8000846: 2200 movs r2, #0
8000848: 601a str r2, [r3, #0]
800084a: 605a str r2, [r3, #4]
800084c: 609a str r2, [r3, #8]
800084e: 60da str r2, [r3, #12]
8000850: 611a str r2, [r3, #16]
/* USER CODE BEGIN MX_GPIO_Init_1 */
/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOC_CLK_ENABLE();
8000852: 4b28 ldr r3, [pc, #160] @ (80008f4 <MX_GPIO_Init+0xb8>)
8000854: 69db ldr r3, [r3, #28]
8000856: 4a27 ldr r2, [pc, #156] @ (80008f4 <MX_GPIO_Init+0xb8>)
8000858: f043 0304 orr.w r3, r3, #4
800085c: 61d3 str r3, [r2, #28]
800085e: 4b25 ldr r3, [pc, #148] @ (80008f4 <MX_GPIO_Init+0xb8>)
8000860: 69db ldr r3, [r3, #28]
8000862: f003 0304 and.w r3, r3, #4
8000866: 60bb str r3, [r7, #8]
8000868: 68bb ldr r3, [r7, #8]
__HAL_RCC_GPIOA_CLK_ENABLE();
800086a: 4b22 ldr r3, [pc, #136] @ (80008f4 <MX_GPIO_Init+0xb8>)
800086c: 69db ldr r3, [r3, #28]
800086e: 4a21 ldr r2, [pc, #132] @ (80008f4 <MX_GPIO_Init+0xb8>)
8000870: f043 0301 orr.w r3, r3, #1
8000874: 61d3 str r3, [r2, #28]
8000876: 4b1f ldr r3, [pc, #124] @ (80008f4 <MX_GPIO_Init+0xb8>)
8000878: 69db ldr r3, [r3, #28]
800087a: f003 0301 and.w r3, r3, #1
800087e: 607b str r3, [r7, #4]
8000880: 687b ldr r3, [r7, #4]
__HAL_RCC_GPIOB_CLK_ENABLE();
8000882: 4b1c ldr r3, [pc, #112] @ (80008f4 <MX_GPIO_Init+0xb8>)
8000884: 69db ldr r3, [r3, #28]
8000886: 4a1b ldr r2, [pc, #108] @ (80008f4 <MX_GPIO_Init+0xb8>)
8000888: f043 0302 orr.w r3, r3, #2
800088c: 61d3 str r3, [r2, #28]
800088e: 4b19 ldr r3, [pc, #100] @ (80008f4 <MX_GPIO_Init+0xb8>)
8000890: 69db ldr r3, [r3, #28]
8000892: f003 0302 and.w r3, r3, #2
8000896: 603b str r3, [r7, #0]
8000898: 683b ldr r3, [r7, #0]
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_0, GPIO_PIN_RESET);
800089a: 2200 movs r2, #0
800089c: 2101 movs r1, #1
800089e: 4816 ldr r0, [pc, #88] @ (80008f8 <MX_GPIO_Init+0xbc>)
80008a0: f000 fdb6 bl 8001410 <HAL_GPIO_WritePin>
/*Configure GPIO pin : PC0 */
GPIO_InitStruct.Pin = GPIO_PIN_0;
80008a4: 2301 movs r3, #1
80008a6: 60fb str r3, [r7, #12]
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
80008a8: 2301 movs r3, #1
80008aa: 613b str r3, [r7, #16]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80008ac: 2300 movs r3, #0
80008ae: 617b str r3, [r7, #20]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
80008b0: 2300 movs r3, #0
80008b2: 61bb str r3, [r7, #24]
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
80008b4: f107 030c add.w r3, r7, #12
80008b8: 4619 mov r1, r3
80008ba: 480f ldr r0, [pc, #60] @ (80008f8 <MX_GPIO_Init+0xbc>)
80008bc: f000 fc18 bl 80010f0 <HAL_GPIO_Init>
/*Configure GPIO pins : PA11 PA12 */
GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12;
80008c0: f44f 53c0 mov.w r3, #6144 @ 0x1800
80008c4: 60fb str r3, [r7, #12]
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
80008c6: f44f 1388 mov.w r3, #1114112 @ 0x110000
80008ca: 613b str r3, [r7, #16]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80008cc: 2300 movs r3, #0
80008ce: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
80008d0: f107 030c add.w r3, r7, #12
80008d4: 4619 mov r1, r3
80008d6: 4809 ldr r0, [pc, #36] @ (80008fc <MX_GPIO_Init+0xc0>)
80008d8: f000 fc0a bl 80010f0 <HAL_GPIO_Init>
/* EXTI interrupt init*/
HAL_NVIC_SetPriority(EXTI15_10_IRQn, 0, 0);
80008dc: 2200 movs r2, #0
80008de: 2100 movs r1, #0
80008e0: 2028 movs r0, #40 @ 0x28
80008e2: f000 fbce bl 8001082 <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(EXTI15_10_IRQn);
80008e6: 2028 movs r0, #40 @ 0x28
80008e8: f000 fbe7 bl 80010ba <HAL_NVIC_EnableIRQ>
/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}
80008ec: bf00 nop
80008ee: 3720 adds r7, #32
80008f0: 46bd mov sp, r7
80008f2: bd80 pop {r7, pc}
80008f4: 40023800 .word 0x40023800
80008f8: 40020800 .word 0x40020800
80008fc: 40020000 .word 0x40020000
08000900 <HAL_TIM_PeriodElapsedCallback>:
/* USER CODE BEGIN 4 */
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) {
8000900: b480 push {r7}
8000902: b083 sub sp, #12
8000904: af00 add r7, sp, #0
8000906: 6078 str r0, [r7, #4]
if (htim->Instance == TIM2) {
8000908: 687b ldr r3, [r7, #4]
800090a: 681b ldr r3, [r3, #0]
800090c: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000
8000910: d137 bne.n 8000982 <HAL_TIM_PeriodElapsedCallback+0x82>
if (sens) {
8000912: 4b1e ldr r3, [pc, #120] @ (800098c <HAL_TIM_PeriodElapsedCallback+0x8c>)
8000914: 781b ldrb r3, [r3, #0]
8000916: b2db uxtb r3, r3
8000918: 2b00 cmp r3, #0
800091a: d00f beq.n 800093c <HAL_TIM_PeriodElapsedCallback+0x3c>
angle ++;
800091c: 4b1c ldr r3, [pc, #112] @ (8000990 <HAL_TIM_PeriodElapsedCallback+0x90>)
800091e: 781b ldrb r3, [r3, #0]
8000920: b2db uxtb r3, r3
8000922: 3301 adds r3, #1
8000924: b2da uxtb r2, r3
8000926: 4b1a ldr r3, [pc, #104] @ (8000990 <HAL_TIM_PeriodElapsedCallback+0x90>)
8000928: 701a strb r2, [r3, #0]
if (angle >= 20) {
800092a: 4b19 ldr r3, [pc, #100] @ (8000990 <HAL_TIM_PeriodElapsedCallback+0x90>)
800092c: 781b ldrb r3, [r3, #0]
800092e: b2db uxtb r3, r3
8000930: 2b13 cmp r3, #19
8000932: d912 bls.n 800095a <HAL_TIM_PeriodElapsedCallback+0x5a>
sens = 0;
8000934: 4b15 ldr r3, [pc, #84] @ (800098c <HAL_TIM_PeriodElapsedCallback+0x8c>)
8000936: 2200 movs r2, #0
8000938: 701a strb r2, [r3, #0]
800093a: e00e b.n 800095a <HAL_TIM_PeriodElapsedCallback+0x5a>
}
} else {
angle --;
800093c: 4b14 ldr r3, [pc, #80] @ (8000990 <HAL_TIM_PeriodElapsedCallback+0x90>)
800093e: 781b ldrb r3, [r3, #0]
8000940: b2db uxtb r3, r3
8000942: 3b01 subs r3, #1
8000944: b2da uxtb r2, r3
8000946: 4b12 ldr r3, [pc, #72] @ (8000990 <HAL_TIM_PeriodElapsedCallback+0x90>)
8000948: 701a strb r2, [r3, #0]
if (angle <= 0) {
800094a: 4b11 ldr r3, [pc, #68] @ (8000990 <HAL_TIM_PeriodElapsedCallback+0x90>)
800094c: 781b ldrb r3, [r3, #0]
800094e: b2db uxtb r3, r3
8000950: 2b00 cmp r3, #0
8000952: d102 bne.n 800095a <HAL_TIM_PeriodElapsedCallback+0x5a>
sens = 1;
8000954: 4b0d ldr r3, [pc, #52] @ (800098c <HAL_TIM_PeriodElapsedCallback+0x8c>)
8000956: 2201 movs r2, #1
8000958: 701a strb r2, [r3, #0]
}
}
TIM11 -> CCR1 = angle * 800;
800095a: 4b0d ldr r3, [pc, #52] @ (8000990 <HAL_TIM_PeriodElapsedCallback+0x90>)
800095c: 781b ldrb r3, [r3, #0]
800095e: b2db uxtb r3, r3
8000960: 461a mov r2, r3
8000962: f44f 7348 mov.w r3, #800 @ 0x320
8000966: fb03 f202 mul.w r2, r3, r2
800096a: 4b0a ldr r3, [pc, #40] @ (8000994 <HAL_TIM_PeriodElapsedCallback+0x94>)
800096c: 635a str r2, [r3, #52] @ 0x34
TIM4 -> CCR2 = angle * 800;
800096e: 4b08 ldr r3, [pc, #32] @ (8000990 <HAL_TIM_PeriodElapsedCallback+0x90>)
8000970: 781b ldrb r3, [r3, #0]
8000972: b2db uxtb r3, r3
8000974: 461a mov r2, r3
8000976: f44f 7348 mov.w r3, #800 @ 0x320
800097a: fb03 f202 mul.w r2, r3, r2
800097e: 4b06 ldr r3, [pc, #24] @ (8000998 <HAL_TIM_PeriodElapsedCallback+0x98>)
8000980: 639a str r2, [r3, #56] @ 0x38
}
}
8000982: bf00 nop
8000984: 370c adds r7, #12
8000986: 46bd mov sp, r7
8000988: bc80 pop {r7}
800098a: 4770 bx lr
800098c: 20000000 .word 0x20000000
8000990: 20000144 .word 0x20000144
8000994: 40011000 .word 0x40011000
8000998: 40000800 .word 0x40000800
0800099c <Error_Handler>:
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
800099c: b480 push {r7}
800099e: 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");
80009a0: b672 cpsid i
}
80009a2: bf00 nop
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
80009a4: bf00 nop
80009a6: e7fd b.n 80009a4 <Error_Handler+0x8>
080009a8 <HAL_MspInit>:
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void)
{
80009a8: b480 push {r7}
80009aa: b085 sub sp, #20
80009ac: af00 add r7, sp, #0
/* USER CODE BEGIN MspInit 0 */
/* USER CODE END MspInit 0 */
__HAL_RCC_COMP_CLK_ENABLE();
80009ae: 4b14 ldr r3, [pc, #80] @ (8000a00 <HAL_MspInit+0x58>)
80009b0: 6a5b ldr r3, [r3, #36] @ 0x24
80009b2: 4a13 ldr r2, [pc, #76] @ (8000a00 <HAL_MspInit+0x58>)
80009b4: f043 4300 orr.w r3, r3, #2147483648 @ 0x80000000
80009b8: 6253 str r3, [r2, #36] @ 0x24
80009ba: 4b11 ldr r3, [pc, #68] @ (8000a00 <HAL_MspInit+0x58>)
80009bc: 6a5b ldr r3, [r3, #36] @ 0x24
80009be: f003 4300 and.w r3, r3, #2147483648 @ 0x80000000
80009c2: 60fb str r3, [r7, #12]
80009c4: 68fb ldr r3, [r7, #12]
__HAL_RCC_SYSCFG_CLK_ENABLE();
80009c6: 4b0e ldr r3, [pc, #56] @ (8000a00 <HAL_MspInit+0x58>)
80009c8: 6a1b ldr r3, [r3, #32]
80009ca: 4a0d ldr r2, [pc, #52] @ (8000a00 <HAL_MspInit+0x58>)
80009cc: f043 0301 orr.w r3, r3, #1
80009d0: 6213 str r3, [r2, #32]
80009d2: 4b0b ldr r3, [pc, #44] @ (8000a00 <HAL_MspInit+0x58>)
80009d4: 6a1b ldr r3, [r3, #32]
80009d6: f003 0301 and.w r3, r3, #1
80009da: 60bb str r3, [r7, #8]
80009dc: 68bb ldr r3, [r7, #8]
__HAL_RCC_PWR_CLK_ENABLE();
80009de: 4b08 ldr r3, [pc, #32] @ (8000a00 <HAL_MspInit+0x58>)
80009e0: 6a5b ldr r3, [r3, #36] @ 0x24
80009e2: 4a07 ldr r2, [pc, #28] @ (8000a00 <HAL_MspInit+0x58>)
80009e4: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000
80009e8: 6253 str r3, [r2, #36] @ 0x24
80009ea: 4b05 ldr r3, [pc, #20] @ (8000a00 <HAL_MspInit+0x58>)
80009ec: 6a5b ldr r3, [r3, #36] @ 0x24
80009ee: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
80009f2: 607b str r3, [r7, #4]
80009f4: 687b ldr r3, [r7, #4]
/* System interrupt init*/
/* USER CODE BEGIN MspInit 1 */
/* USER CODE END MspInit 1 */
}
80009f6: bf00 nop
80009f8: 3714 adds r7, #20
80009fa: 46bd mov sp, r7
80009fc: bc80 pop {r7}
80009fe: 4770 bx lr
8000a00: 40023800 .word 0x40023800
08000a04 <HAL_SPI_MspInit>:
* This function configures the hardware resources used in this example
* @param hspi: SPI handle pointer
* @retval None
*/
void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
{
8000a04: b580 push {r7, lr}
8000a06: b08a sub sp, #40 @ 0x28
8000a08: af00 add r7, sp, #0
8000a0a: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
8000a0c: f107 0314 add.w r3, r7, #20
8000a10: 2200 movs r2, #0
8000a12: 601a str r2, [r3, #0]
8000a14: 605a str r2, [r3, #4]
8000a16: 609a str r2, [r3, #8]
8000a18: 60da str r2, [r3, #12]
8000a1a: 611a str r2, [r3, #16]
if(hspi->Instance==SPI1)
8000a1c: 687b ldr r3, [r7, #4]
8000a1e: 681b ldr r3, [r3, #0]
8000a20: 4a17 ldr r2, [pc, #92] @ (8000a80 <HAL_SPI_MspInit+0x7c>)
8000a22: 4293 cmp r3, r2
8000a24: d127 bne.n 8000a76 <HAL_SPI_MspInit+0x72>
{
/* USER CODE BEGIN SPI1_MspInit 0 */
/* USER CODE END SPI1_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_SPI1_CLK_ENABLE();
8000a26: 4b17 ldr r3, [pc, #92] @ (8000a84 <HAL_SPI_MspInit+0x80>)
8000a28: 6a1b ldr r3, [r3, #32]
8000a2a: 4a16 ldr r2, [pc, #88] @ (8000a84 <HAL_SPI_MspInit+0x80>)
8000a2c: f443 5380 orr.w r3, r3, #4096 @ 0x1000
8000a30: 6213 str r3, [r2, #32]
8000a32: 4b14 ldr r3, [pc, #80] @ (8000a84 <HAL_SPI_MspInit+0x80>)
8000a34: 6a1b ldr r3, [r3, #32]
8000a36: f403 5380 and.w r3, r3, #4096 @ 0x1000
8000a3a: 613b str r3, [r7, #16]
8000a3c: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOA_CLK_ENABLE();
8000a3e: 4b11 ldr r3, [pc, #68] @ (8000a84 <HAL_SPI_MspInit+0x80>)
8000a40: 69db ldr r3, [r3, #28]
8000a42: 4a10 ldr r2, [pc, #64] @ (8000a84 <HAL_SPI_MspInit+0x80>)
8000a44: f043 0301 orr.w r3, r3, #1
8000a48: 61d3 str r3, [r2, #28]
8000a4a: 4b0e ldr r3, [pc, #56] @ (8000a84 <HAL_SPI_MspInit+0x80>)
8000a4c: 69db ldr r3, [r3, #28]
8000a4e: f003 0301 and.w r3, r3, #1
8000a52: 60fb str r3, [r7, #12]
8000a54: 68fb ldr r3, [r7, #12]
/**SPI1 GPIO Configuration
PA5 ------> SPI1_SCK
PA6 ------> SPI1_MISO
PA7 ------> SPI1_MOSI
*/
GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7;
8000a56: 23e0 movs r3, #224 @ 0xe0
8000a58: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8000a5a: 2302 movs r3, #2
8000a5c: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8000a5e: 2300 movs r3, #0
8000a60: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8000a62: 2303 movs r3, #3
8000a64: 623b str r3, [r7, #32]
GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
8000a66: 2305 movs r3, #5
8000a68: 627b str r3, [r7, #36] @ 0x24
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
8000a6a: f107 0314 add.w r3, r7, #20
8000a6e: 4619 mov r1, r3
8000a70: 4805 ldr r0, [pc, #20] @ (8000a88 <HAL_SPI_MspInit+0x84>)
8000a72: f000 fb3d bl 80010f0 <HAL_GPIO_Init>
/* USER CODE END SPI1_MspInit 1 */
}
}
8000a76: bf00 nop
8000a78: 3728 adds r7, #40 @ 0x28
8000a7a: 46bd mov sp, r7
8000a7c: bd80 pop {r7, pc}
8000a7e: bf00 nop
8000a80: 40013000 .word 0x40013000
8000a84: 40023800 .word 0x40023800
8000a88: 40020000 .word 0x40020000
08000a8c <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)
{
8000a8c: b580 push {r7, lr}
8000a8e: b086 sub sp, #24
8000a90: af00 add r7, sp, #0
8000a92: 6078 str r0, [r7, #4]
if(htim_base->Instance==TIM2)
8000a94: 687b ldr r3, [r7, #4]
8000a96: 681b ldr r3, [r3, #0]
8000a98: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000
8000a9c: d114 bne.n 8000ac8 <HAL_TIM_Base_MspInit+0x3c>
{
/* USER CODE BEGIN TIM2_MspInit 0 */
/* USER CODE END TIM2_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_TIM2_CLK_ENABLE();
8000a9e: 4b26 ldr r3, [pc, #152] @ (8000b38 <HAL_TIM_Base_MspInit+0xac>)
8000aa0: 6a5b ldr r3, [r3, #36] @ 0x24
8000aa2: 4a25 ldr r2, [pc, #148] @ (8000b38 <HAL_TIM_Base_MspInit+0xac>)
8000aa4: f043 0301 orr.w r3, r3, #1
8000aa8: 6253 str r3, [r2, #36] @ 0x24
8000aaa: 4b23 ldr r3, [pc, #140] @ (8000b38 <HAL_TIM_Base_MspInit+0xac>)
8000aac: 6a5b ldr r3, [r3, #36] @ 0x24
8000aae: f003 0301 and.w r3, r3, #1
8000ab2: 617b str r3, [r7, #20]
8000ab4: 697b ldr r3, [r7, #20]
/* TIM2 interrupt Init */
HAL_NVIC_SetPriority(TIM2_IRQn, 0, 0);
8000ab6: 2200 movs r2, #0
8000ab8: 2100 movs r1, #0
8000aba: 201c movs r0, #28
8000abc: f000 fae1 bl 8001082 <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(TIM2_IRQn);
8000ac0: 201c movs r0, #28
8000ac2: f000 fafa bl 80010ba <HAL_NVIC_EnableIRQ>
/* USER CODE BEGIN TIM11_MspInit 1 */
/* USER CODE END TIM11_MspInit 1 */
}
}
8000ac6: e032 b.n 8000b2e <HAL_TIM_Base_MspInit+0xa2>
else if(htim_base->Instance==TIM4)
8000ac8: 687b ldr r3, [r7, #4]
8000aca: 681b ldr r3, [r3, #0]
8000acc: 4a1b ldr r2, [pc, #108] @ (8000b3c <HAL_TIM_Base_MspInit+0xb0>)
8000ace: 4293 cmp r3, r2
8000ad0: d114 bne.n 8000afc <HAL_TIM_Base_MspInit+0x70>
__HAL_RCC_TIM4_CLK_ENABLE();
8000ad2: 4b19 ldr r3, [pc, #100] @ (8000b38 <HAL_TIM_Base_MspInit+0xac>)
8000ad4: 6a5b ldr r3, [r3, #36] @ 0x24
8000ad6: 4a18 ldr r2, [pc, #96] @ (8000b38 <HAL_TIM_Base_MspInit+0xac>)
8000ad8: f043 0304 orr.w r3, r3, #4
8000adc: 6253 str r3, [r2, #36] @ 0x24
8000ade: 4b16 ldr r3, [pc, #88] @ (8000b38 <HAL_TIM_Base_MspInit+0xac>)
8000ae0: 6a5b ldr r3, [r3, #36] @ 0x24
8000ae2: f003 0304 and.w r3, r3, #4
8000ae6: 613b str r3, [r7, #16]
8000ae8: 693b ldr r3, [r7, #16]
HAL_NVIC_SetPriority(TIM4_IRQn, 0, 0);
8000aea: 2200 movs r2, #0
8000aec: 2100 movs r1, #0
8000aee: 201e movs r0, #30
8000af0: f000 fac7 bl 8001082 <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(TIM4_IRQn);
8000af4: 201e movs r0, #30
8000af6: f000 fae0 bl 80010ba <HAL_NVIC_EnableIRQ>
}
8000afa: e018 b.n 8000b2e <HAL_TIM_Base_MspInit+0xa2>
else if(htim_base->Instance==TIM11)
8000afc: 687b ldr r3, [r7, #4]
8000afe: 681b ldr r3, [r3, #0]
8000b00: 4a0f ldr r2, [pc, #60] @ (8000b40 <HAL_TIM_Base_MspInit+0xb4>)
8000b02: 4293 cmp r3, r2
8000b04: d113 bne.n 8000b2e <HAL_TIM_Base_MspInit+0xa2>
__HAL_RCC_TIM11_CLK_ENABLE();
8000b06: 4b0c ldr r3, [pc, #48] @ (8000b38 <HAL_TIM_Base_MspInit+0xac>)
8000b08: 6a1b ldr r3, [r3, #32]
8000b0a: 4a0b ldr r2, [pc, #44] @ (8000b38 <HAL_TIM_Base_MspInit+0xac>)
8000b0c: f043 0310 orr.w r3, r3, #16
8000b10: 6213 str r3, [r2, #32]
8000b12: 4b09 ldr r3, [pc, #36] @ (8000b38 <HAL_TIM_Base_MspInit+0xac>)
8000b14: 6a1b ldr r3, [r3, #32]
8000b16: f003 0310 and.w r3, r3, #16
8000b1a: 60fb str r3, [r7, #12]
8000b1c: 68fb ldr r3, [r7, #12]
HAL_NVIC_SetPriority(TIM11_IRQn, 0, 0);
8000b1e: 2200 movs r2, #0
8000b20: 2100 movs r1, #0
8000b22: 201b movs r0, #27
8000b24: f000 faad bl 8001082 <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(TIM11_IRQn);
8000b28: 201b movs r0, #27
8000b2a: f000 fac6 bl 80010ba <HAL_NVIC_EnableIRQ>
}
8000b2e: bf00 nop
8000b30: 3718 adds r7, #24
8000b32: 46bd mov sp, r7
8000b34: bd80 pop {r7, pc}
8000b36: bf00 nop
8000b38: 40023800 .word 0x40023800
8000b3c: 40000800 .word 0x40000800
8000b40: 40011000 .word 0x40011000
08000b44 <HAL_TIM_MspPostInit>:
void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
{
8000b44: b580 push {r7, lr}
8000b46: b08a sub sp, #40 @ 0x28
8000b48: af00 add r7, sp, #0
8000b4a: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
8000b4c: f107 0314 add.w r3, r7, #20
8000b50: 2200 movs r2, #0
8000b52: 601a str r2, [r3, #0]
8000b54: 605a str r2, [r3, #4]
8000b56: 609a str r2, [r3, #8]
8000b58: 60da str r2, [r3, #12]
8000b5a: 611a str r2, [r3, #16]
if(htim->Instance==TIM4)
8000b5c: 687b ldr r3, [r7, #4]
8000b5e: 681b ldr r3, [r3, #0]
8000b60: 4a22 ldr r2, [pc, #136] @ (8000bec <HAL_TIM_MspPostInit+0xa8>)
8000b62: 4293 cmp r3, r2
8000b64: d11c bne.n 8000ba0 <HAL_TIM_MspPostInit+0x5c>
{
/* USER CODE BEGIN TIM4_MspPostInit 0 */
/* USER CODE END TIM4_MspPostInit 0 */
__HAL_RCC_GPIOB_CLK_ENABLE();
8000b66: 4b22 ldr r3, [pc, #136] @ (8000bf0 <HAL_TIM_MspPostInit+0xac>)
8000b68: 69db ldr r3, [r3, #28]
8000b6a: 4a21 ldr r2, [pc, #132] @ (8000bf0 <HAL_TIM_MspPostInit+0xac>)
8000b6c: f043 0302 orr.w r3, r3, #2
8000b70: 61d3 str r3, [r2, #28]
8000b72: 4b1f ldr r3, [pc, #124] @ (8000bf0 <HAL_TIM_MspPostInit+0xac>)
8000b74: 69db ldr r3, [r3, #28]
8000b76: f003 0302 and.w r3, r3, #2
8000b7a: 613b str r3, [r7, #16]
8000b7c: 693b ldr r3, [r7, #16]
/**TIM4 GPIO Configuration
PB7 ------> TIM4_CH2
*/
GPIO_InitStruct.Pin = GPIO_PIN_7;
8000b7e: 2380 movs r3, #128 @ 0x80
8000b80: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8000b82: 2302 movs r3, #2
8000b84: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8000b86: 2300 movs r3, #0
8000b88: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8000b8a: 2300 movs r3, #0
8000b8c: 623b str r3, [r7, #32]
GPIO_InitStruct.Alternate = GPIO_AF2_TIM4;
8000b8e: 2302 movs r3, #2
8000b90: 627b str r3, [r7, #36] @ 0x24
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
8000b92: f107 0314 add.w r3, r7, #20
8000b96: 4619 mov r1, r3
8000b98: 4816 ldr r0, [pc, #88] @ (8000bf4 <HAL_TIM_MspPostInit+0xb0>)
8000b9a: f000 faa9 bl 80010f0 <HAL_GPIO_Init>
/* USER CODE BEGIN TIM11_MspPostInit 1 */
/* USER CODE END TIM11_MspPostInit 1 */
}
}
8000b9e: e021 b.n 8000be4 <HAL_TIM_MspPostInit+0xa0>
else if(htim->Instance==TIM11)
8000ba0: 687b ldr r3, [r7, #4]
8000ba2: 681b ldr r3, [r3, #0]
8000ba4: 4a14 ldr r2, [pc, #80] @ (8000bf8 <HAL_TIM_MspPostInit+0xb4>)
8000ba6: 4293 cmp r3, r2
8000ba8: d11c bne.n 8000be4 <HAL_TIM_MspPostInit+0xa0>
__HAL_RCC_GPIOB_CLK_ENABLE();
8000baa: 4b11 ldr r3, [pc, #68] @ (8000bf0 <HAL_TIM_MspPostInit+0xac>)
8000bac: 69db ldr r3, [r3, #28]
8000bae: 4a10 ldr r2, [pc, #64] @ (8000bf0 <HAL_TIM_MspPostInit+0xac>)
8000bb0: f043 0302 orr.w r3, r3, #2
8000bb4: 61d3 str r3, [r2, #28]
8000bb6: 4b0e ldr r3, [pc, #56] @ (8000bf0 <HAL_TIM_MspPostInit+0xac>)
8000bb8: 69db ldr r3, [r3, #28]
8000bba: f003 0302 and.w r3, r3, #2
8000bbe: 60fb str r3, [r7, #12]
8000bc0: 68fb ldr r3, [r7, #12]
GPIO_InitStruct.Pin = GPIO_PIN_15;
8000bc2: f44f 4300 mov.w r3, #32768 @ 0x8000
8000bc6: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8000bc8: 2302 movs r3, #2
8000bca: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8000bcc: 2300 movs r3, #0
8000bce: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8000bd0: 2300 movs r3, #0
8000bd2: 623b str r3, [r7, #32]
GPIO_InitStruct.Alternate = GPIO_AF3_TIM11;
8000bd4: 2303 movs r3, #3
8000bd6: 627b str r3, [r7, #36] @ 0x24
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
8000bd8: f107 0314 add.w r3, r7, #20
8000bdc: 4619 mov r1, r3
8000bde: 4805 ldr r0, [pc, #20] @ (8000bf4 <HAL_TIM_MspPostInit+0xb0>)
8000be0: f000 fa86 bl 80010f0 <HAL_GPIO_Init>
}
8000be4: bf00 nop
8000be6: 3728 adds r7, #40 @ 0x28
8000be8: 46bd mov sp, r7
8000bea: bd80 pop {r7, pc}
8000bec: 40000800 .word 0x40000800
8000bf0: 40023800 .word 0x40023800
8000bf4: 40020400 .word 0x40020400
8000bf8: 40011000 .word 0x40011000
08000bfc <NMI_Handler>:
/******************************************************************************/
/**
* @brief This function handles Non maskable interrupt.
*/
void NMI_Handler(void)
{
8000bfc: b480 push {r7}
8000bfe: 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)
8000c00: bf00 nop
8000c02: e7fd b.n 8000c00 <NMI_Handler+0x4>
08000c04 <HardFault_Handler>:
/**
* @brief This function handles Hard fault interrupt.
*/
void HardFault_Handler(void)
{
8000c04: b480 push {r7}
8000c06: af00 add r7, sp, #0
/* USER CODE BEGIN HardFault_IRQn 0 */
/* USER CODE END HardFault_IRQn 0 */
while (1)
8000c08: bf00 nop
8000c0a: e7fd b.n 8000c08 <HardFault_Handler+0x4>
08000c0c <MemManage_Handler>:
/**
* @brief This function handles Memory management fault.
*/
void MemManage_Handler(void)
{
8000c0c: b480 push {r7}
8000c0e: af00 add r7, sp, #0
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
/* USER CODE END MemoryManagement_IRQn 0 */
while (1)
8000c10: bf00 nop
8000c12: e7fd b.n 8000c10 <MemManage_Handler+0x4>
08000c14 <BusFault_Handler>:
/**
* @brief This function handles Pre-fetch fault, memory access fault.
*/
void BusFault_Handler(void)
{
8000c14: b480 push {r7}
8000c16: af00 add r7, sp, #0
/* USER CODE BEGIN BusFault_IRQn 0 */
/* USER CODE END BusFault_IRQn 0 */
while (1)
8000c18: bf00 nop
8000c1a: e7fd b.n 8000c18 <BusFault_Handler+0x4>
08000c1c <UsageFault_Handler>:
/**
* @brief This function handles Undefined instruction or illegal state.
*/
void UsageFault_Handler(void)
{
8000c1c: b480 push {r7}
8000c1e: af00 add r7, sp, #0
/* USER CODE BEGIN UsageFault_IRQn 0 */
/* USER CODE END UsageFault_IRQn 0 */
while (1)
8000c20: bf00 nop
8000c22: e7fd b.n 8000c20 <UsageFault_Handler+0x4>
08000c24 <SVC_Handler>:
/**
* @brief This function handles System service call via SWI instruction.
*/
void SVC_Handler(void)
{
8000c24: b480 push {r7}
8000c26: af00 add r7, sp, #0
/* USER CODE END SVC_IRQn 0 */
/* USER CODE BEGIN SVC_IRQn 1 */
/* USER CODE END SVC_IRQn 1 */
}
8000c28: bf00 nop
8000c2a: 46bd mov sp, r7
8000c2c: bc80 pop {r7}
8000c2e: 4770 bx lr
08000c30 <DebugMon_Handler>:
/**
* @brief This function handles Debug monitor.
*/
void DebugMon_Handler(void)
{
8000c30: b480 push {r7}
8000c32: af00 add r7, sp, #0
/* USER CODE END DebugMonitor_IRQn 0 */
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
/* USER CODE END DebugMonitor_IRQn 1 */
}
8000c34: bf00 nop
8000c36: 46bd mov sp, r7
8000c38: bc80 pop {r7}
8000c3a: 4770 bx lr
08000c3c <PendSV_Handler>:
/**
* @brief This function handles Pendable request for system service.
*/
void PendSV_Handler(void)
{
8000c3c: b480 push {r7}
8000c3e: af00 add r7, sp, #0
/* USER CODE END PendSV_IRQn 0 */
/* USER CODE BEGIN PendSV_IRQn 1 */
/* USER CODE END PendSV_IRQn 1 */
}
8000c40: bf00 nop
8000c42: 46bd mov sp, r7
8000c44: bc80 pop {r7}
8000c46: 4770 bx lr
08000c48 <SysTick_Handler>:
/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
8000c48: b580 push {r7, lr}
8000c4a: af00 add r7, sp, #0
/* USER CODE BEGIN SysTick_IRQn 0 */
/* USER CODE END SysTick_IRQn 0 */
HAL_IncTick();
8000c4c: f000 f926 bl 8000e9c <HAL_IncTick>
/* USER CODE BEGIN SysTick_IRQn 1 */
/* USER CODE END SysTick_IRQn 1 */
}
8000c50: bf00 nop
8000c52: bd80 pop {r7, pc}
08000c54 <TIM11_IRQHandler>:
/**
* @brief This function handles TIM11 global interrupt.
*/
void TIM11_IRQHandler(void)
{
8000c54: b580 push {r7, lr}
8000c56: af00 add r7, sp, #0
/* USER CODE BEGIN TIM11_IRQn 0 */
/* USER CODE END TIM11_IRQn 0 */
HAL_TIM_IRQHandler(&htim11);
8000c58: 4802 ldr r0, [pc, #8] @ (8000c64 <TIM11_IRQHandler+0x10>)
8000c5a: f001 fdaf bl 80027bc <HAL_TIM_IRQHandler>
/* USER CODE BEGIN TIM11_IRQn 1 */
/* USER CODE END TIM11_IRQn 1 */
}
8000c5e: bf00 nop
8000c60: bd80 pop {r7, pc}
8000c62: bf00 nop
8000c64: 20000104 .word 0x20000104
08000c68 <TIM2_IRQHandler>:
/**
* @brief This function handles TIM2 global interrupt.
*/
void TIM2_IRQHandler(void)
{
8000c68: b580 push {r7, lr}
8000c6a: af00 add r7, sp, #0
/* USER CODE BEGIN TIM2_IRQn 0 */
/* USER CODE END TIM2_IRQn 0 */
HAL_TIM_IRQHandler(&htim2);
8000c6c: 4802 ldr r0, [pc, #8] @ (8000c78 <TIM2_IRQHandler+0x10>)
8000c6e: f001 fda5 bl 80027bc <HAL_TIM_IRQHandler>
/* USER CODE BEGIN TIM2_IRQn 1 */
/* USER CODE END TIM2_IRQn 1 */
}
8000c72: bf00 nop
8000c74: bd80 pop {r7, pc}
8000c76: bf00 nop
8000c78: 20000084 .word 0x20000084
08000c7c <TIM4_IRQHandler>:
/**
* @brief This function handles TIM4 global interrupt.
*/
void TIM4_IRQHandler(void)
{
8000c7c: b580 push {r7, lr}
8000c7e: af00 add r7, sp, #0
/* USER CODE BEGIN TIM4_IRQn 0 */
/* USER CODE END TIM4_IRQn 0 */
HAL_TIM_IRQHandler(&htim4);
8000c80: 4802 ldr r0, [pc, #8] @ (8000c8c <TIM4_IRQHandler+0x10>)
8000c82: f001 fd9b bl 80027bc <HAL_TIM_IRQHandler>
/* USER CODE BEGIN TIM4_IRQn 1 */
/* USER CODE END TIM4_IRQn 1 */
}
8000c86: bf00 nop
8000c88: bd80 pop {r7, pc}
8000c8a: bf00 nop
8000c8c: 200000c4 .word 0x200000c4
08000c90 <EXTI15_10_IRQHandler>:
/**
* @brief This function handles EXTI line[15:10] interrupts.
*/
void EXTI15_10_IRQHandler(void)
{
8000c90: b580 push {r7, lr}
8000c92: af00 add r7, sp, #0
/* USER CODE BEGIN EXTI15_10_IRQn 0 */
/* USER CODE END EXTI15_10_IRQn 0 */
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_11);
8000c94: f44f 6000 mov.w r0, #2048 @ 0x800
8000c98: f000 fbd2 bl 8001440 <HAL_GPIO_EXTI_IRQHandler>
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_12);
8000c9c: f44f 5080 mov.w r0, #4096 @ 0x1000
8000ca0: f000 fbce bl 8001440 <HAL_GPIO_EXTI_IRQHandler>
/* USER CODE BEGIN EXTI15_10_IRQn 1 */
/* USER CODE END EXTI15_10_IRQn 1 */
}
8000ca4: bf00 nop
8000ca6: bd80 pop {r7, pc}
08000ca8 <SystemInit>:
* SystemCoreClock variable.
* @param None
* @retval None
*/
void SystemInit (void)
{
8000ca8: b480 push {r7}
8000caa: 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 in Internal SRAM. */
#endif /* USER_VECT_TAB_ADDRESS */
}
8000cac: bf00 nop
8000cae: 46bd mov sp, r7
8000cb0: bc80 pop {r7}
8000cb2: 4770 bx lr
08000cb4 <Reset_Handler>:
.type Reset_Handler, %function
Reset_Handler:
/* Call the clock system initialization function.*/
bl SystemInit
8000cb4: f7ff fff8 bl 8000ca8 <SystemInit>
/* Copy the data segment initializers from flash to SRAM */
ldr r0, =_sdata
8000cb8: 480b ldr r0, [pc, #44] @ (8000ce8 <LoopFillZerobss+0xe>)
ldr r1, =_edata
8000cba: 490c ldr r1, [pc, #48] @ (8000cec <LoopFillZerobss+0x12>)
ldr r2, =_sidata
8000cbc: 4a0c ldr r2, [pc, #48] @ (8000cf0 <LoopFillZerobss+0x16>)
movs r3, #0
8000cbe: 2300 movs r3, #0
b LoopCopyDataInit
8000cc0: e002 b.n 8000cc8 <LoopCopyDataInit>
08000cc2 <CopyDataInit>:
CopyDataInit:
ldr r4, [r2, r3]
8000cc2: 58d4 ldr r4, [r2, r3]
str r4, [r0, r3]
8000cc4: 50c4 str r4, [r0, r3]
adds r3, r3, #4
8000cc6: 3304 adds r3, #4
08000cc8 <LoopCopyDataInit>:
LoopCopyDataInit:
adds r4, r0, r3
8000cc8: 18c4 adds r4, r0, r3
cmp r4, r1
8000cca: 428c cmp r4, r1
bcc CopyDataInit
8000ccc: d3f9 bcc.n 8000cc2 <CopyDataInit>
/* Zero fill the bss segment. */
ldr r2, =_sbss
8000cce: 4a09 ldr r2, [pc, #36] @ (8000cf4 <LoopFillZerobss+0x1a>)
ldr r4, =_ebss
8000cd0: 4c09 ldr r4, [pc, #36] @ (8000cf8 <LoopFillZerobss+0x1e>)
movs r3, #0
8000cd2: 2300 movs r3, #0
b LoopFillZerobss
8000cd4: e001 b.n 8000cda <LoopFillZerobss>
08000cd6 <FillZerobss>:
FillZerobss:
str r3, [r2]
8000cd6: 6013 str r3, [r2, #0]
adds r2, r2, #4
8000cd8: 3204 adds r2, #4
08000cda <LoopFillZerobss>:
LoopFillZerobss:
cmp r2, r4
8000cda: 42a2 cmp r2, r4
bcc FillZerobss
8000cdc: d3fb bcc.n 8000cd6 <FillZerobss>
/* Call static constructors */
bl __libc_init_array
8000cde: f002 fa73 bl 80031c8 <__libc_init_array>
/* Call the application's entry point.*/
bl main
8000ce2: f7ff fbe5 bl 80004b0 <main>
bx lr
8000ce6: 4770 bx lr
ldr r0, =_sdata
8000ce8: 20000000 .word 0x20000000
ldr r1, =_edata
8000cec: 20000010 .word 0x20000010
ldr r2, =_sidata
8000cf0: 08003254 .word 0x08003254
ldr r2, =_sbss
8000cf4: 20000010 .word 0x20000010
ldr r4, =_ebss
8000cf8: 2000014c .word 0x2000014c
08000cfc <ADC1_IRQHandler>:
* @retval : None
*/
.section .text.Default_Handler,"ax",%progbits
Default_Handler:
Infinite_Loop:
b Infinite_Loop
8000cfc: e7fe b.n 8000cfc <ADC1_IRQHandler>
08000cfe <MAX7219_Init>:
* Arguments : none
* Returns : none
*********************************************************************************************************
*/
void MAX7219_Init (void)
{
8000cfe: b580 push {r7, lr}
8000d00: af00 add r7, sp, #0
// configure "LOAD" as output
MAX7219_Write(REG_SCAN_LIMIT, 7); // set up to scan all eight digits
8000d02: 2107 movs r1, #7
8000d04: 200b movs r0, #11
8000d06: f000 f847 bl 8000d98 <MAX7219_Write>
MAX7219_Write(REG_DECODE, 0x00); // set to "no decode" for all digits
8000d0a: 2100 movs r1, #0
8000d0c: 2009 movs r0, #9
8000d0e: f000 f843 bl 8000d98 <MAX7219_Write>
MAX7219_ShutdownStop(); // select normal operation (i.e. not shutdown)
8000d12: f000 f809 bl 8000d28 <MAX7219_ShutdownStop>
MAX7219_DisplayTestStop(); // select normal operation (i.e. not test mode)
8000d16: f000 f80f bl 8000d38 <MAX7219_DisplayTestStop>
MAX7219_Clear(); // clear all digits
8000d1a: f000 f827 bl 8000d6c <MAX7219_Clear>
MAX7219_SetBrightness(INTENSITY_MAX); // set to maximum intensity
8000d1e: 200f movs r0, #15
8000d20: f000 f812 bl 8000d48 <MAX7219_SetBrightness>
}
8000d24: bf00 nop
8000d26: bd80 pop {r7, pc}
08000d28 <MAX7219_ShutdownStop>:
* Arguments : none
* Returns : none
*********************************************************************************************************
*/
void MAX7219_ShutdownStop (void)
{
8000d28: b580 push {r7, lr}
8000d2a: af00 add r7, sp, #0
MAX7219_Write(REG_SHUTDOWN, 1); // put MAX7219 into "normal" mode
8000d2c: 2101 movs r1, #1
8000d2e: 200c movs r0, #12
8000d30: f000 f832 bl 8000d98 <MAX7219_Write>
}
8000d34: bf00 nop
8000d36: bd80 pop {r7, pc}
08000d38 <MAX7219_DisplayTestStop>:
* Arguments : none
* Returns : none
*********************************************************************************************************
*/
void MAX7219_DisplayTestStop (void)
{
8000d38: b580 push {r7, lr}
8000d3a: af00 add r7, sp, #0
MAX7219_Write(REG_DISPLAY_TEST, 0); // put MAX7219 into "normal" mode
8000d3c: 2100 movs r1, #0
8000d3e: 200f movs r0, #15
8000d40: f000 f82a bl 8000d98 <MAX7219_Write>
}
8000d44: bf00 nop
8000d46: bd80 pop {r7, pc}
08000d48 <MAX7219_SetBrightness>:
* Arguments : brightness (0-15)
* Returns : none
*********************************************************************************************************
*/
void MAX7219_SetBrightness (char brightness)
{
8000d48: b580 push {r7, lr}
8000d4a: b082 sub sp, #8
8000d4c: af00 add r7, sp, #0
8000d4e: 4603 mov r3, r0
8000d50: 71fb strb r3, [r7, #7]
brightness &= 0x0f; // mask off extra bits
8000d52: 79fb ldrb r3, [r7, #7]
8000d54: f003 030f and.w r3, r3, #15
8000d58: 71fb strb r3, [r7, #7]
MAX7219_Write(REG_INTENSITY, brightness); // set brightness
8000d5a: 79fb ldrb r3, [r7, #7]
8000d5c: 4619 mov r1, r3
8000d5e: 200a movs r0, #10
8000d60: f000 f81a bl 8000d98 <MAX7219_Write>
}
8000d64: bf00 nop
8000d66: 3708 adds r7, #8
8000d68: 46bd mov sp, r7
8000d6a: bd80 pop {r7, pc}
08000d6c <MAX7219_Clear>:
* Arguments : none
* Returns : none
*********************************************************************************************************
*/
void MAX7219_Clear (void)
{
8000d6c: b580 push {r7, lr}
8000d6e: b082 sub sp, #8
8000d70: af00 add r7, sp, #0
char i;
for (i=0; i < 8; i++)
8000d72: 2300 movs r3, #0
8000d74: 71fb strb r3, [r7, #7]
8000d76: e007 b.n 8000d88 <MAX7219_Clear+0x1c>
MAX7219_Write(i, 0x00); // turn all segments off
8000d78: 79fb ldrb r3, [r7, #7]
8000d7a: 2100 movs r1, #0
8000d7c: 4618 mov r0, r3
8000d7e: f000 f80b bl 8000d98 <MAX7219_Write>
for (i=0; i < 8; i++)
8000d82: 79fb ldrb r3, [r7, #7]
8000d84: 3301 adds r3, #1
8000d86: 71fb strb r3, [r7, #7]
8000d88: 79fb ldrb r3, [r7, #7]
8000d8a: 2b07 cmp r3, #7
8000d8c: d9f4 bls.n 8000d78 <MAX7219_Clear+0xc>
}
8000d8e: bf00 nop
8000d90: bf00 nop
8000d92: 3708 adds r7, #8
8000d94: 46bd mov sp, r7
8000d96: bd80 pop {r7, pc}
08000d98 <MAX7219_Write>:
* dataout = data to write to MAX7219
* Returns : none
*********************************************************************************************************
*/
void MAX7219_Write (unsigned char reg_number, unsigned char dataout)
{
8000d98: b580 push {r7, lr}
8000d9a: b082 sub sp, #8
8000d9c: af00 add r7, sp, #0
8000d9e: 4603 mov r3, r0
8000da0: 460a mov r2, r1
8000da2: 71fb strb r3, [r7, #7]
8000da4: 4613 mov r3, r2
8000da6: 71bb strb r3, [r7, #6]
MAX7219_nCS_PORT->BSRR = (uint32_t)MAX7219_nCS_PIN<<16;// nCS = 0 // take LOAD high to begin
8000da8: 4b09 ldr r3, [pc, #36] @ (8000dd0 <MAX7219_Write+0x38>)
8000daa: f44f 3280 mov.w r2, #65536 @ 0x10000
8000dae: 619a str r2, [r3, #24]
MAX7219_SendByte(reg_number); // write register number to MAX7219
8000db0: 79fb ldrb r3, [r7, #7]
8000db2: 4618 mov r0, r3
8000db4: f000 f80e bl 8000dd4 <MAX7219_SendByte>
MAX7219_SendByte(dataout); // write data to MAX7219
8000db8: 79bb ldrb r3, [r7, #6]
8000dba: 4618 mov r0, r3
8000dbc: f000 f80a bl 8000dd4 <MAX7219_SendByte>
MAX7219_nCS_PORT->BSRR = (uint32_t)MAX7219_nCS_PIN;// nCS = 1 // take LOAD low to latch in data
8000dc0: 4b03 ldr r3, [pc, #12] @ (8000dd0 <MAX7219_Write+0x38>)
8000dc2: 2201 movs r2, #1
8000dc4: 619a str r2, [r3, #24]
}
8000dc6: bf00 nop
8000dc8: 3708 adds r7, #8
8000dca: 46bd mov sp, r7
8000dcc: bd80 pop {r7, pc}
8000dce: bf00 nop
8000dd0: 40020800 .word 0x40020800
08000dd4 <MAX7219_SendByte>:
* Returns : none
*********************************************************************************************************
*/
static void MAX7219_SendByte (unsigned char dataout)
{
8000dd4: b580 push {r7, lr}
8000dd6: b082 sub sp, #8
8000dd8: af00 add r7, sp, #0
8000dda: 4603 mov r3, r0
8000ddc: 71fb strb r3, [r7, #7]
HAL_SPI_Transmit(&hspi1, &dataout, 1, 1000);
8000dde: 1df9 adds r1, r7, #7
8000de0: f44f 737a mov.w r3, #1000 @ 0x3e8
8000de4: 2201 movs r2, #1
8000de6: 4803 ldr r0, [pc, #12] @ (8000df4 <MAX7219_SendByte+0x20>)
8000de8: f001 f957 bl 800209a <HAL_SPI_Transmit>
}
8000dec: bf00 nop
8000dee: 3708 adds r7, #8
8000df0: 46bd mov sp, r7
8000df2: bd80 pop {r7, pc}
8000df4: 2000002c .word 0x2000002c
08000df8 <HAL_Init>:
* In the default implementation,Systick is used as source of time base.
* the tick variable is incremented each 1ms in its ISR.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_Init(void)
{
8000df8: b580 push {r7, lr}
8000dfa: b082 sub sp, #8
8000dfc: af00 add r7, sp, #0
HAL_StatusTypeDef status = HAL_OK;
8000dfe: 2300 movs r3, #0
8000e00: 71fb strb r3, [r7, #7]
#if (PREFETCH_ENABLE != 0)
__HAL_FLASH_PREFETCH_BUFFER_ENABLE();
#endif /* PREFETCH_ENABLE */
/* Set Interrupt Group Priority */
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
8000e02: 2003 movs r0, #3
8000e04: f000 f932 bl 800106c <HAL_NVIC_SetPriorityGrouping>
/* Use systick as time base source and configure 1ms tick (default clock after Reset is MSI) */
if (HAL_InitTick(TICK_INT_PRIORITY) != HAL_OK)
8000e08: 200f movs r0, #15
8000e0a: f000 f80d bl 8000e28 <HAL_InitTick>
8000e0e: 4603 mov r3, r0
8000e10: 2b00 cmp r3, #0
8000e12: d002 beq.n 8000e1a <HAL_Init+0x22>
{
status = HAL_ERROR;
8000e14: 2301 movs r3, #1
8000e16: 71fb strb r3, [r7, #7]
8000e18: e001 b.n 8000e1e <HAL_Init+0x26>
}
else
{
/* Init the low level hardware */
HAL_MspInit();
8000e1a: f7ff fdc5 bl 80009a8 <HAL_MspInit>
}
/* Return function status */
return status;
8000e1e: 79fb ldrb r3, [r7, #7]
}
8000e20: 4618 mov r0, r3
8000e22: 3708 adds r7, #8
8000e24: 46bd mov sp, r7
8000e26: bd80 pop {r7, pc}
08000e28 <HAL_InitTick>:
* implementation in user file.
* @param TickPriority Tick interrupt priority.
* @retval HAL status
*/
__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
8000e28: b580 push {r7, lr}
8000e2a: b084 sub sp, #16
8000e2c: af00 add r7, sp, #0
8000e2e: 6078 str r0, [r7, #4]
HAL_StatusTypeDef status = HAL_OK;
8000e30: 2300 movs r3, #0
8000e32: 73fb strb r3, [r7, #15]
if (uwTickFreq != 0U)
8000e34: 4b16 ldr r3, [pc, #88] @ (8000e90 <HAL_InitTick+0x68>)
8000e36: 681b ldr r3, [r3, #0]
8000e38: 2b00 cmp r3, #0
8000e3a: d022 beq.n 8000e82 <HAL_InitTick+0x5a>
{
/*Configure the SysTick to have interrupt in 1ms time basis*/
if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) == 0U)
8000e3c: 4b15 ldr r3, [pc, #84] @ (8000e94 <HAL_InitTick+0x6c>)
8000e3e: 681a ldr r2, [r3, #0]
8000e40: 4b13 ldr r3, [pc, #76] @ (8000e90 <HAL_InitTick+0x68>)
8000e42: 681b ldr r3, [r3, #0]
8000e44: f44f 717a mov.w r1, #1000 @ 0x3e8
8000e48: fbb1 f3f3 udiv r3, r1, r3
8000e4c: fbb2 f3f3 udiv r3, r2, r3
8000e50: 4618 mov r0, r3
8000e52: f000 f940 bl 80010d6 <HAL_SYSTICK_Config>
8000e56: 4603 mov r3, r0
8000e58: 2b00 cmp r3, #0
8000e5a: d10f bne.n 8000e7c <HAL_InitTick+0x54>
{
/* Configure the SysTick IRQ priority */
if (TickPriority < (1UL << __NVIC_PRIO_BITS))
8000e5c: 687b ldr r3, [r7, #4]
8000e5e: 2b0f cmp r3, #15
8000e60: d809 bhi.n 8000e76 <HAL_InitTick+0x4e>
{
HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
8000e62: 2200 movs r2, #0
8000e64: 6879 ldr r1, [r7, #4]
8000e66: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
8000e6a: f000 f90a bl 8001082 <HAL_NVIC_SetPriority>
uwTickPrio = TickPriority;
8000e6e: 4a0a ldr r2, [pc, #40] @ (8000e98 <HAL_InitTick+0x70>)
8000e70: 687b ldr r3, [r7, #4]
8000e72: 6013 str r3, [r2, #0]
8000e74: e007 b.n 8000e86 <HAL_InitTick+0x5e>
}
else
{
status = HAL_ERROR;
8000e76: 2301 movs r3, #1
8000e78: 73fb strb r3, [r7, #15]
8000e7a: e004 b.n 8000e86 <HAL_InitTick+0x5e>
}
}
else
{
status = HAL_ERROR;
8000e7c: 2301 movs r3, #1
8000e7e: 73fb strb r3, [r7, #15]
8000e80: e001 b.n 8000e86 <HAL_InitTick+0x5e>
}
}
else
{
status = HAL_ERROR;
8000e82: 2301 movs r3, #1
8000e84: 73fb strb r3, [r7, #15]
}
/* Return function status */
return status;
8000e86: 7bfb ldrb r3, [r7, #15]
}
8000e88: 4618 mov r0, r3
8000e8a: 3710 adds r7, #16
8000e8c: 46bd mov sp, r7
8000e8e: bd80 pop {r7, pc}
8000e90: 2000000c .word 0x2000000c
8000e94: 20000004 .word 0x20000004
8000e98: 20000008 .word 0x20000008
08000e9c <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)
{
8000e9c: b480 push {r7}
8000e9e: af00 add r7, sp, #0
uwTick += uwTickFreq;
8000ea0: 4b05 ldr r3, [pc, #20] @ (8000eb8 <HAL_IncTick+0x1c>)
8000ea2: 681a ldr r2, [r3, #0]
8000ea4: 4b05 ldr r3, [pc, #20] @ (8000ebc <HAL_IncTick+0x20>)
8000ea6: 681b ldr r3, [r3, #0]
8000ea8: 4413 add r3, r2
8000eaa: 4a03 ldr r2, [pc, #12] @ (8000eb8 <HAL_IncTick+0x1c>)
8000eac: 6013 str r3, [r2, #0]
}
8000eae: bf00 nop
8000eb0: 46bd mov sp, r7
8000eb2: bc80 pop {r7}
8000eb4: 4770 bx lr
8000eb6: bf00 nop
8000eb8: 20000148 .word 0x20000148
8000ebc: 2000000c .word 0x2000000c
08000ec0 <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)
{
8000ec0: b480 push {r7}
8000ec2: af00 add r7, sp, #0
return uwTick;
8000ec4: 4b02 ldr r3, [pc, #8] @ (8000ed0 <HAL_GetTick+0x10>)
8000ec6: 681b ldr r3, [r3, #0]
}
8000ec8: 4618 mov r0, r3
8000eca: 46bd mov sp, r7
8000ecc: bc80 pop {r7}
8000ece: 4770 bx lr
8000ed0: 20000148 .word 0x20000148
08000ed4 <__NVIC_SetPriorityGrouping>:
In case of a conflict between priority grouping and available
priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set.
\param [in] PriorityGroup Priority grouping field.
*/
__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
{
8000ed4: b480 push {r7}
8000ed6: b085 sub sp, #20
8000ed8: af00 add r7, sp, #0
8000eda: 6078 str r0, [r7, #4]
uint32_t reg_value;
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
8000edc: 687b ldr r3, [r7, #4]
8000ede: f003 0307 and.w r3, r3, #7
8000ee2: 60fb str r3, [r7, #12]
reg_value = SCB->AIRCR; /* read old register configuration */
8000ee4: 4b0c ldr r3, [pc, #48] @ (8000f18 <__NVIC_SetPriorityGrouping+0x44>)
8000ee6: 68db ldr r3, [r3, #12]
8000ee8: 60bb str r3, [r7, #8]
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
8000eea: 68ba ldr r2, [r7, #8]
8000eec: f64f 03ff movw r3, #63743 @ 0xf8ff
8000ef0: 4013 ands r3, r2
8000ef2: 60bb str r3, [r7, #8]
reg_value = (reg_value |
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
(PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
8000ef4: 68fb ldr r3, [r7, #12]
8000ef6: 021a lsls r2, r3, #8
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
8000ef8: 68bb ldr r3, [r7, #8]
8000efa: 4313 orrs r3, r2
reg_value = (reg_value |
8000efc: f043 63bf orr.w r3, r3, #100139008 @ 0x5f80000
8000f00: f443 3300 orr.w r3, r3, #131072 @ 0x20000
8000f04: 60bb str r3, [r7, #8]
SCB->AIRCR = reg_value;
8000f06: 4a04 ldr r2, [pc, #16] @ (8000f18 <__NVIC_SetPriorityGrouping+0x44>)
8000f08: 68bb ldr r3, [r7, #8]
8000f0a: 60d3 str r3, [r2, #12]
}
8000f0c: bf00 nop
8000f0e: 3714 adds r7, #20
8000f10: 46bd mov sp, r7
8000f12: bc80 pop {r7}
8000f14: 4770 bx lr
8000f16: bf00 nop
8000f18: e000ed00 .word 0xe000ed00
08000f1c <__NVIC_GetPriorityGrouping>:
\brief Get Priority Grouping
\details Reads the priority grouping field from the NVIC Interrupt Controller.
\return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field).
*/
__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void)
{
8000f1c: b480 push {r7}
8000f1e: af00 add r7, sp, #0
return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
8000f20: 4b04 ldr r3, [pc, #16] @ (8000f34 <__NVIC_GetPriorityGrouping+0x18>)
8000f22: 68db ldr r3, [r3, #12]
8000f24: 0a1b lsrs r3, r3, #8
8000f26: f003 0307 and.w r3, r3, #7
}
8000f2a: 4618 mov r0, r3
8000f2c: 46bd mov sp, r7
8000f2e: bc80 pop {r7}
8000f30: 4770 bx lr
8000f32: bf00 nop
8000f34: e000ed00 .word 0xe000ed00
08000f38 <__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)
{
8000f38: b480 push {r7}
8000f3a: b083 sub sp, #12
8000f3c: af00 add r7, sp, #0
8000f3e: 4603 mov r3, r0
8000f40: 71fb strb r3, [r7, #7]
if ((int32_t)(IRQn) >= 0)
8000f42: f997 3007 ldrsb.w r3, [r7, #7]
8000f46: 2b00 cmp r3, #0
8000f48: db0b blt.n 8000f62 <__NVIC_EnableIRQ+0x2a>
{
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
8000f4a: 79fb ldrb r3, [r7, #7]
8000f4c: f003 021f and.w r2, r3, #31
8000f50: 4906 ldr r1, [pc, #24] @ (8000f6c <__NVIC_EnableIRQ+0x34>)
8000f52: f997 3007 ldrsb.w r3, [r7, #7]
8000f56: 095b lsrs r3, r3, #5
8000f58: 2001 movs r0, #1
8000f5a: fa00 f202 lsl.w r2, r0, r2
8000f5e: f841 2023 str.w r2, [r1, r3, lsl #2]
}
}
8000f62: bf00 nop
8000f64: 370c adds r7, #12
8000f66: 46bd mov sp, r7
8000f68: bc80 pop {r7}
8000f6a: 4770 bx lr
8000f6c: e000e100 .word 0xe000e100
08000f70 <__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)
{
8000f70: b480 push {r7}
8000f72: b083 sub sp, #12
8000f74: af00 add r7, sp, #0
8000f76: 4603 mov r3, r0
8000f78: 6039 str r1, [r7, #0]
8000f7a: 71fb strb r3, [r7, #7]
if ((int32_t)(IRQn) >= 0)
8000f7c: f997 3007 ldrsb.w r3, [r7, #7]
8000f80: 2b00 cmp r3, #0
8000f82: db0a blt.n 8000f9a <__NVIC_SetPriority+0x2a>
{
NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
8000f84: 683b ldr r3, [r7, #0]
8000f86: b2da uxtb r2, r3
8000f88: 490c ldr r1, [pc, #48] @ (8000fbc <__NVIC_SetPriority+0x4c>)
8000f8a: f997 3007 ldrsb.w r3, [r7, #7]
8000f8e: 0112 lsls r2, r2, #4
8000f90: b2d2 uxtb r2, r2
8000f92: 440b add r3, r1
8000f94: f883 2300 strb.w r2, [r3, #768] @ 0x300
}
else
{
SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
}
}
8000f98: e00a b.n 8000fb0 <__NVIC_SetPriority+0x40>
SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
8000f9a: 683b ldr r3, [r7, #0]
8000f9c: b2da uxtb r2, r3
8000f9e: 4908 ldr r1, [pc, #32] @ (8000fc0 <__NVIC_SetPriority+0x50>)
8000fa0: 79fb ldrb r3, [r7, #7]
8000fa2: f003 030f and.w r3, r3, #15
8000fa6: 3b04 subs r3, #4
8000fa8: 0112 lsls r2, r2, #4
8000faa: b2d2 uxtb r2, r2
8000fac: 440b add r3, r1
8000fae: 761a strb r2, [r3, #24]
}
8000fb0: bf00 nop
8000fb2: 370c adds r7, #12
8000fb4: 46bd mov sp, r7
8000fb6: bc80 pop {r7}
8000fb8: 4770 bx lr
8000fba: bf00 nop
8000fbc: e000e100 .word 0xe000e100
8000fc0: e000ed00 .word 0xe000ed00
08000fc4 <NVIC_EncodePriority>:
\param [in] PreemptPriority Preemptive priority value (starting from 0).
\param [in] SubPriority Subpriority value (starting from 0).
\return Encoded priority. Value can be used in the function \ref NVIC_SetPriority().
*/
__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
{
8000fc4: b480 push {r7}
8000fc6: b089 sub sp, #36 @ 0x24
8000fc8: af00 add r7, sp, #0
8000fca: 60f8 str r0, [r7, #12]
8000fcc: 60b9 str r1, [r7, #8]
8000fce: 607a str r2, [r7, #4]
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
8000fd0: 68fb ldr r3, [r7, #12]
8000fd2: f003 0307 and.w r3, r3, #7
8000fd6: 61fb str r3, [r7, #28]
uint32_t PreemptPriorityBits;
uint32_t SubPriorityBits;
PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp);
8000fd8: 69fb ldr r3, [r7, #28]
8000fda: f1c3 0307 rsb r3, r3, #7
8000fde: 2b04 cmp r3, #4
8000fe0: bf28 it cs
8000fe2: 2304 movcs r3, #4
8000fe4: 61bb str r3, [r7, #24]
SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
8000fe6: 69fb ldr r3, [r7, #28]
8000fe8: 3304 adds r3, #4
8000fea: 2b06 cmp r3, #6
8000fec: d902 bls.n 8000ff4 <NVIC_EncodePriority+0x30>
8000fee: 69fb ldr r3, [r7, #28]
8000ff0: 3b03 subs r3, #3
8000ff2: e000 b.n 8000ff6 <NVIC_EncodePriority+0x32>
8000ff4: 2300 movs r3, #0
8000ff6: 617b str r3, [r7, #20]
return (
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
8000ff8: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff
8000ffc: 69bb ldr r3, [r7, #24]
8000ffe: fa02 f303 lsl.w r3, r2, r3
8001002: 43da mvns r2, r3
8001004: 68bb ldr r3, [r7, #8]
8001006: 401a ands r2, r3
8001008: 697b ldr r3, [r7, #20]
800100a: 409a lsls r2, r3
((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
800100c: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
8001010: 697b ldr r3, [r7, #20]
8001012: fa01 f303 lsl.w r3, r1, r3
8001016: 43d9 mvns r1, r3
8001018: 687b ldr r3, [r7, #4]
800101a: 400b ands r3, r1
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
800101c: 4313 orrs r3, r2
);
}
800101e: 4618 mov r0, r3
8001020: 3724 adds r7, #36 @ 0x24
8001022: 46bd mov sp, r7
8001024: bc80 pop {r7}
8001026: 4770 bx lr
08001028 <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)
{
8001028: b580 push {r7, lr}
800102a: b082 sub sp, #8
800102c: af00 add r7, sp, #0
800102e: 6078 str r0, [r7, #4]
if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
8001030: 687b ldr r3, [r7, #4]
8001032: 3b01 subs r3, #1
8001034: f1b3 7f80 cmp.w r3, #16777216 @ 0x1000000
8001038: d301 bcc.n 800103e <SysTick_Config+0x16>
{
return (1UL); /* Reload value impossible */
800103a: 2301 movs r3, #1
800103c: e00f b.n 800105e <SysTick_Config+0x36>
}
SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
800103e: 4a0a ldr r2, [pc, #40] @ (8001068 <SysTick_Config+0x40>)
8001040: 687b ldr r3, [r7, #4]
8001042: 3b01 subs r3, #1
8001044: 6053 str r3, [r2, #4]
NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
8001046: 210f movs r1, #15
8001048: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
800104c: f7ff ff90 bl 8000f70 <__NVIC_SetPriority>
SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
8001050: 4b05 ldr r3, [pc, #20] @ (8001068 <SysTick_Config+0x40>)
8001052: 2200 movs r2, #0
8001054: 609a str r2, [r3, #8]
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
8001056: 4b04 ldr r3, [pc, #16] @ (8001068 <SysTick_Config+0x40>)
8001058: 2207 movs r2, #7
800105a: 601a str r2, [r3, #0]
SysTick_CTRL_TICKINT_Msk |
SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
return (0UL); /* Function successful */
800105c: 2300 movs r3, #0
}
800105e: 4618 mov r0, r3
8001060: 3708 adds r7, #8
8001062: 46bd mov sp, r7
8001064: bd80 pop {r7, pc}
8001066: bf00 nop
8001068: e000e010 .word 0xe000e010
0800106c <HAL_NVIC_SetPriorityGrouping>:
* @note When the NVIC_PriorityGroup_0 is selected, IRQ pre-emption is no more possible.
* The pending IRQ priority will be managed only by the subpriority.
* @retval None
*/
void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
{
800106c: b580 push {r7, lr}
800106e: b082 sub sp, #8
8001070: af00 add r7, sp, #0
8001072: 6078 str r0, [r7, #4]
/* Check the parameters */
assert_param(IS_NVIC_PRIORITY_GROUP(PriorityGroup));
/* Set the PRIGROUP[10:8] bits according to the PriorityGroup parameter value */
NVIC_SetPriorityGrouping(PriorityGroup);
8001074: 6878 ldr r0, [r7, #4]
8001076: f7ff ff2d bl 8000ed4 <__NVIC_SetPriorityGrouping>
}
800107a: bf00 nop
800107c: 3708 adds r7, #8
800107e: 46bd mov sp, r7
8001080: bd80 pop {r7, pc}
08001082 <HAL_NVIC_SetPriority>:
* This parameter can be a value between 0 and 15
* A lower priority value indicates a higher priority.
* @retval None
*/
void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
{
8001082: b580 push {r7, lr}
8001084: b086 sub sp, #24
8001086: af00 add r7, sp, #0
8001088: 4603 mov r3, r0
800108a: 60b9 str r1, [r7, #8]
800108c: 607a str r2, [r7, #4]
800108e: 73fb strb r3, [r7, #15]
uint32_t prioritygroup = 0x00;
8001090: 2300 movs r3, #0
8001092: 617b str r3, [r7, #20]
/* Check the parameters */
assert_param(IS_NVIC_SUB_PRIORITY(SubPriority));
assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority));
prioritygroup = NVIC_GetPriorityGrouping();
8001094: f7ff ff42 bl 8000f1c <__NVIC_GetPriorityGrouping>
8001098: 6178 str r0, [r7, #20]
NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority));
800109a: 687a ldr r2, [r7, #4]
800109c: 68b9 ldr r1, [r7, #8]
800109e: 6978 ldr r0, [r7, #20]
80010a0: f7ff ff90 bl 8000fc4 <NVIC_EncodePriority>
80010a4: 4602 mov r2, r0
80010a6: f997 300f ldrsb.w r3, [r7, #15]
80010aa: 4611 mov r1, r2
80010ac: 4618 mov r0, r3
80010ae: f7ff ff5f bl 8000f70 <__NVIC_SetPriority>
}
80010b2: bf00 nop
80010b4: 3718 adds r7, #24
80010b6: 46bd mov sp, r7
80010b8: bd80 pop {r7, pc}
080010ba <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 (stm32l1xx.h))
* @retval None
*/
void HAL_NVIC_EnableIRQ(IRQn_Type IRQn)
{
80010ba: b580 push {r7, lr}
80010bc: b082 sub sp, #8
80010be: af00 add r7, sp, #0
80010c0: 4603 mov r3, r0
80010c2: 71fb strb r3, [r7, #7]
/* Check the parameters */
assert_param(IS_NVIC_DEVICE_IRQ(IRQn));
/* Enable interrupt */
NVIC_EnableIRQ(IRQn);
80010c4: f997 3007 ldrsb.w r3, [r7, #7]
80010c8: 4618 mov r0, r3
80010ca: f7ff ff35 bl 8000f38 <__NVIC_EnableIRQ>
}
80010ce: bf00 nop
80010d0: 3708 adds r7, #8
80010d2: 46bd mov sp, r7
80010d4: bd80 pop {r7, pc}
080010d6 <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)
{
80010d6: b580 push {r7, lr}
80010d8: b082 sub sp, #8
80010da: af00 add r7, sp, #0
80010dc: 6078 str r0, [r7, #4]
return SysTick_Config(TicksNumb);
80010de: 6878 ldr r0, [r7, #4]
80010e0: f7ff ffa2 bl 8001028 <SysTick_Config>
80010e4: 4603 mov r3, r0
}
80010e6: 4618 mov r0, r3
80010e8: 3708 adds r7, #8
80010ea: 46bd mov sp, r7
80010ec: bd80 pop {r7, pc}
...
080010f0 <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)
{
80010f0: b480 push {r7}
80010f2: b087 sub sp, #28
80010f4: af00 add r7, sp, #0
80010f6: 6078 str r0, [r7, #4]
80010f8: 6039 str r1, [r7, #0]
uint32_t position = 0x00;
80010fa: 2300 movs r3, #0
80010fc: 617b str r3, [r7, #20]
uint32_t iocurrent = 0x00;
80010fe: 2300 movs r3, #0
8001100: 60fb str r3, [r7, #12]
uint32_t temp = 0x00;
8001102: 2300 movs r3, #0
8001104: 613b str r3, [r7, #16]
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) != 0)
8001106: e160 b.n 80013ca <HAL_GPIO_Init+0x2da>
{
/* Get current io position */
iocurrent = (GPIO_Init->Pin) & (1U << position);
8001108: 683b ldr r3, [r7, #0]
800110a: 681a ldr r2, [r3, #0]
800110c: 2101 movs r1, #1
800110e: 697b ldr r3, [r7, #20]
8001110: fa01 f303 lsl.w r3, r1, r3
8001114: 4013 ands r3, r2
8001116: 60fb str r3, [r7, #12]
if (iocurrent)
8001118: 68fb ldr r3, [r7, #12]
800111a: 2b00 cmp r3, #0
800111c: f000 8152 beq.w 80013c4 <HAL_GPIO_Init+0x2d4>
{
/*--------------------- GPIO Mode Configuration ------------------------*/
/* In case of Output or Alternate function mode selection */
if (((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) ||
8001120: 683b ldr r3, [r7, #0]
8001122: 685b ldr r3, [r3, #4]
8001124: f003 0303 and.w r3, r3, #3
8001128: 2b01 cmp r3, #1
800112a: d005 beq.n 8001138 <HAL_GPIO_Init+0x48>
((GPIO_Init->Mode & GPIO_MODE) == MODE_AF))
800112c: 683b ldr r3, [r7, #0]
800112e: 685b ldr r3, [r3, #4]
8001130: f003 0303 and.w r3, r3, #3
if (((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) ||
8001134: 2b02 cmp r3, #2
8001136: d130 bne.n 800119a <HAL_GPIO_Init+0xaa>
{
/* Check the Speed parameter */
assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
/* Configure the IO Speed */
temp = GPIOx->OSPEEDR;
8001138: 687b ldr r3, [r7, #4]
800113a: 689b ldr r3, [r3, #8]
800113c: 613b str r3, [r7, #16]
CLEAR_BIT(temp, GPIO_OSPEEDER_OSPEEDR0 << (position * 2));
800113e: 697b ldr r3, [r7, #20]
8001140: 005b lsls r3, r3, #1
8001142: 2203 movs r2, #3
8001144: fa02 f303 lsl.w r3, r2, r3
8001148: 43db mvns r3, r3
800114a: 693a ldr r2, [r7, #16]
800114c: 4013 ands r3, r2
800114e: 613b str r3, [r7, #16]
SET_BIT(temp, GPIO_Init->Speed << (position * 2));
8001150: 683b ldr r3, [r7, #0]
8001152: 68da ldr r2, [r3, #12]
8001154: 697b ldr r3, [r7, #20]
8001156: 005b lsls r3, r3, #1
8001158: fa02 f303 lsl.w r3, r2, r3
800115c: 693a ldr r2, [r7, #16]
800115e: 4313 orrs r3, r2
8001160: 613b str r3, [r7, #16]
GPIOx->OSPEEDR = temp;
8001162: 687b ldr r3, [r7, #4]
8001164: 693a ldr r2, [r7, #16]
8001166: 609a str r2, [r3, #8]
/* Configure the IO Output Type */
temp = GPIOx->OTYPER;
8001168: 687b ldr r3, [r7, #4]
800116a: 685b ldr r3, [r3, #4]
800116c: 613b str r3, [r7, #16]
CLEAR_BIT(temp, GPIO_OTYPER_OT_0 << position) ;
800116e: 2201 movs r2, #1
8001170: 697b ldr r3, [r7, #20]
8001172: fa02 f303 lsl.w r3, r2, r3
8001176: 43db mvns r3, r3
8001178: 693a ldr r2, [r7, #16]
800117a: 4013 ands r3, r2
800117c: 613b str r3, [r7, #16]
SET_BIT(temp, ((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position);
800117e: 683b ldr r3, [r7, #0]
8001180: 685b ldr r3, [r3, #4]
8001182: 091b lsrs r3, r3, #4
8001184: f003 0201 and.w r2, r3, #1
8001188: 697b ldr r3, [r7, #20]
800118a: fa02 f303 lsl.w r3, r2, r3
800118e: 693a ldr r2, [r7, #16]
8001190: 4313 orrs r3, r2
8001192: 613b str r3, [r7, #16]
GPIOx->OTYPER = temp;
8001194: 687b ldr r3, [r7, #4]
8001196: 693a ldr r2, [r7, #16]
8001198: 605a str r2, [r3, #4]
}
if ((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG)
800119a: 683b ldr r3, [r7, #0]
800119c: 685b ldr r3, [r3, #4]
800119e: f003 0303 and.w r3, r3, #3
80011a2: 2b03 cmp r3, #3
80011a4: d017 beq.n 80011d6 <HAL_GPIO_Init+0xe6>
{
/* 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;
80011a6: 687b ldr r3, [r7, #4]
80011a8: 68db ldr r3, [r3, #12]
80011aa: 613b str r3, [r7, #16]
CLEAR_BIT(temp, GPIO_PUPDR_PUPDR0 << (position * 2));
80011ac: 697b ldr r3, [r7, #20]
80011ae: 005b lsls r3, r3, #1
80011b0: 2203 movs r2, #3
80011b2: fa02 f303 lsl.w r3, r2, r3
80011b6: 43db mvns r3, r3
80011b8: 693a ldr r2, [r7, #16]
80011ba: 4013 ands r3, r2
80011bc: 613b str r3, [r7, #16]
SET_BIT(temp, (GPIO_Init->Pull) << (position * 2));
80011be: 683b ldr r3, [r7, #0]
80011c0: 689a ldr r2, [r3, #8]
80011c2: 697b ldr r3, [r7, #20]
80011c4: 005b lsls r3, r3, #1
80011c6: fa02 f303 lsl.w r3, r2, r3
80011ca: 693a ldr r2, [r7, #16]
80011cc: 4313 orrs r3, r2
80011ce: 613b str r3, [r7, #16]
GPIOx->PUPDR = temp;
80011d0: 687b ldr r3, [r7, #4]
80011d2: 693a ldr r2, [r7, #16]
80011d4: 60da str r2, [r3, #12]
}
/* In case of Alternate function mode selection */
if ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
80011d6: 683b ldr r3, [r7, #0]
80011d8: 685b ldr r3, [r3, #4]
80011da: f003 0303 and.w r3, r3, #3
80011de: 2b02 cmp r3, #2
80011e0: d123 bne.n 800122a <HAL_GPIO_Init+0x13a>
assert_param(IS_GPIO_AF_INSTANCE(GPIOx));
assert_param(IS_GPIO_AF(GPIO_Init->Alternate));
/* Configure Alternate function mapped with the current IO */
/* Identify AFRL or AFRH register based on IO position*/
temp = GPIOx->AFR[position >> 3];
80011e2: 697b ldr r3, [r7, #20]
80011e4: 08da lsrs r2, r3, #3
80011e6: 687b ldr r3, [r7, #4]
80011e8: 3208 adds r2, #8
80011ea: f853 3022 ldr.w r3, [r3, r2, lsl #2]
80011ee: 613b str r3, [r7, #16]
CLEAR_BIT(temp, 0xFU << ((uint32_t)(position & 0x07U) * 4));
80011f0: 697b ldr r3, [r7, #20]
80011f2: f003 0307 and.w r3, r3, #7
80011f6: 009b lsls r3, r3, #2
80011f8: 220f movs r2, #15
80011fa: fa02 f303 lsl.w r3, r2, r3
80011fe: 43db mvns r3, r3
8001200: 693a ldr r2, [r7, #16]
8001202: 4013 ands r3, r2
8001204: 613b str r3, [r7, #16]
SET_BIT(temp, (uint32_t)(GPIO_Init->Alternate) << (((uint32_t)position & 0x07U) * 4));
8001206: 683b ldr r3, [r7, #0]
8001208: 691a ldr r2, [r3, #16]
800120a: 697b ldr r3, [r7, #20]
800120c: f003 0307 and.w r3, r3, #7
8001210: 009b lsls r3, r3, #2
8001212: fa02 f303 lsl.w r3, r2, r3
8001216: 693a ldr r2, [r7, #16]
8001218: 4313 orrs r3, r2
800121a: 613b str r3, [r7, #16]
GPIOx->AFR[position >> 3] = temp;
800121c: 697b ldr r3, [r7, #20]
800121e: 08da lsrs r2, r3, #3
8001220: 687b ldr r3, [r7, #4]
8001222: 3208 adds r2, #8
8001224: 6939 ldr r1, [r7, #16]
8001226: f843 1022 str.w r1, [r3, r2, lsl #2]
}
/* Configure IO Direction mode (Input, Output, Alternate or Analog) */
temp = GPIOx->MODER;
800122a: 687b ldr r3, [r7, #4]
800122c: 681b ldr r3, [r3, #0]
800122e: 613b str r3, [r7, #16]
CLEAR_BIT(temp, GPIO_MODER_MODER0 << (position * 2));
8001230: 697b ldr r3, [r7, #20]
8001232: 005b lsls r3, r3, #1
8001234: 2203 movs r2, #3
8001236: fa02 f303 lsl.w r3, r2, r3
800123a: 43db mvns r3, r3
800123c: 693a ldr r2, [r7, #16]
800123e: 4013 ands r3, r2
8001240: 613b str r3, [r7, #16]
SET_BIT(temp, (GPIO_Init->Mode & GPIO_MODE) << (position * 2));
8001242: 683b ldr r3, [r7, #0]
8001244: 685b ldr r3, [r3, #4]
8001246: f003 0203 and.w r2, r3, #3
800124a: 697b ldr r3, [r7, #20]
800124c: 005b lsls r3, r3, #1
800124e: fa02 f303 lsl.w r3, r2, r3
8001252: 693a ldr r2, [r7, #16]
8001254: 4313 orrs r3, r2
8001256: 613b str r3, [r7, #16]
GPIOx->MODER = temp;
8001258: 687b ldr r3, [r7, #4]
800125a: 693a ldr r2, [r7, #16]
800125c: 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)
800125e: 683b ldr r3, [r7, #0]
8001260: 685b ldr r3, [r3, #4]
8001262: f403 3340 and.w r3, r3, #196608 @ 0x30000
8001266: 2b00 cmp r3, #0
8001268: f000 80ac beq.w 80013c4 <HAL_GPIO_Init+0x2d4>
{
/* Enable SYSCFG Clock */
__HAL_RCC_SYSCFG_CLK_ENABLE();
800126c: 4b5e ldr r3, [pc, #376] @ (80013e8 <HAL_GPIO_Init+0x2f8>)
800126e: 6a1b ldr r3, [r3, #32]
8001270: 4a5d ldr r2, [pc, #372] @ (80013e8 <HAL_GPIO_Init+0x2f8>)
8001272: f043 0301 orr.w r3, r3, #1
8001276: 6213 str r3, [r2, #32]
8001278: 4b5b ldr r3, [pc, #364] @ (80013e8 <HAL_GPIO_Init+0x2f8>)
800127a: 6a1b ldr r3, [r3, #32]
800127c: f003 0301 and.w r3, r3, #1
8001280: 60bb str r3, [r7, #8]
8001282: 68bb ldr r3, [r7, #8]
temp = SYSCFG->EXTICR[position >> 2];
8001284: 4a59 ldr r2, [pc, #356] @ (80013ec <HAL_GPIO_Init+0x2fc>)
8001286: 697b ldr r3, [r7, #20]
8001288: 089b lsrs r3, r3, #2
800128a: 3302 adds r3, #2
800128c: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8001290: 613b str r3, [r7, #16]
CLEAR_BIT(temp, (0x0FU) << (4 * (position & 0x03)));
8001292: 697b ldr r3, [r7, #20]
8001294: f003 0303 and.w r3, r3, #3
8001298: 009b lsls r3, r3, #2
800129a: 220f movs r2, #15
800129c: fa02 f303 lsl.w r3, r2, r3
80012a0: 43db mvns r3, r3
80012a2: 693a ldr r2, [r7, #16]
80012a4: 4013 ands r3, r2
80012a6: 613b str r3, [r7, #16]
SET_BIT(temp, (GPIO_GET_INDEX(GPIOx)) << (4 * (position & 0x03)));
80012a8: 687b ldr r3, [r7, #4]
80012aa: 4a51 ldr r2, [pc, #324] @ (80013f0 <HAL_GPIO_Init+0x300>)
80012ac: 4293 cmp r3, r2
80012ae: d025 beq.n 80012fc <HAL_GPIO_Init+0x20c>
80012b0: 687b ldr r3, [r7, #4]
80012b2: 4a50 ldr r2, [pc, #320] @ (80013f4 <HAL_GPIO_Init+0x304>)
80012b4: 4293 cmp r3, r2
80012b6: d01f beq.n 80012f8 <HAL_GPIO_Init+0x208>
80012b8: 687b ldr r3, [r7, #4]
80012ba: 4a4f ldr r2, [pc, #316] @ (80013f8 <HAL_GPIO_Init+0x308>)
80012bc: 4293 cmp r3, r2
80012be: d019 beq.n 80012f4 <HAL_GPIO_Init+0x204>
80012c0: 687b ldr r3, [r7, #4]
80012c2: 4a4e ldr r2, [pc, #312] @ (80013fc <HAL_GPIO_Init+0x30c>)
80012c4: 4293 cmp r3, r2
80012c6: d013 beq.n 80012f0 <HAL_GPIO_Init+0x200>
80012c8: 687b ldr r3, [r7, #4]
80012ca: 4a4d ldr r2, [pc, #308] @ (8001400 <HAL_GPIO_Init+0x310>)
80012cc: 4293 cmp r3, r2
80012ce: d00d beq.n 80012ec <HAL_GPIO_Init+0x1fc>
80012d0: 687b ldr r3, [r7, #4]
80012d2: 4a4c ldr r2, [pc, #304] @ (8001404 <HAL_GPIO_Init+0x314>)
80012d4: 4293 cmp r3, r2
80012d6: d007 beq.n 80012e8 <HAL_GPIO_Init+0x1f8>
80012d8: 687b ldr r3, [r7, #4]
80012da: 4a4b ldr r2, [pc, #300] @ (8001408 <HAL_GPIO_Init+0x318>)
80012dc: 4293 cmp r3, r2
80012de: d101 bne.n 80012e4 <HAL_GPIO_Init+0x1f4>
80012e0: 2306 movs r3, #6
80012e2: e00c b.n 80012fe <HAL_GPIO_Init+0x20e>
80012e4: 2307 movs r3, #7
80012e6: e00a b.n 80012fe <HAL_GPIO_Init+0x20e>
80012e8: 2305 movs r3, #5
80012ea: e008 b.n 80012fe <HAL_GPIO_Init+0x20e>
80012ec: 2304 movs r3, #4
80012ee: e006 b.n 80012fe <HAL_GPIO_Init+0x20e>
80012f0: 2303 movs r3, #3
80012f2: e004 b.n 80012fe <HAL_GPIO_Init+0x20e>
80012f4: 2302 movs r3, #2
80012f6: e002 b.n 80012fe <HAL_GPIO_Init+0x20e>
80012f8: 2301 movs r3, #1
80012fa: e000 b.n 80012fe <HAL_GPIO_Init+0x20e>
80012fc: 2300 movs r3, #0
80012fe: 697a ldr r2, [r7, #20]
8001300: f002 0203 and.w r2, r2, #3
8001304: 0092 lsls r2, r2, #2
8001306: 4093 lsls r3, r2
8001308: 693a ldr r2, [r7, #16]
800130a: 4313 orrs r3, r2
800130c: 613b str r3, [r7, #16]
SYSCFG->EXTICR[position >> 2] = temp;
800130e: 4937 ldr r1, [pc, #220] @ (80013ec <HAL_GPIO_Init+0x2fc>)
8001310: 697b ldr r3, [r7, #20]
8001312: 089b lsrs r3, r3, #2
8001314: 3302 adds r3, #2
8001316: 693a ldr r2, [r7, #16]
8001318: f841 2023 str.w r2, [r1, r3, lsl #2]
/* Clear Rising Falling edge configuration */
temp = EXTI->RTSR;
800131c: 4b3b ldr r3, [pc, #236] @ (800140c <HAL_GPIO_Init+0x31c>)
800131e: 689b ldr r3, [r3, #8]
8001320: 613b str r3, [r7, #16]
CLEAR_BIT(temp, (uint32_t)iocurrent);
8001322: 68fb ldr r3, [r7, #12]
8001324: 43db mvns r3, r3
8001326: 693a ldr r2, [r7, #16]
8001328: 4013 ands r3, r2
800132a: 613b str r3, [r7, #16]
if ((GPIO_Init->Mode & TRIGGER_RISING) != 0x00U)
800132c: 683b ldr r3, [r7, #0]
800132e: 685b ldr r3, [r3, #4]
8001330: f403 1380 and.w r3, r3, #1048576 @ 0x100000
8001334: 2b00 cmp r3, #0
8001336: d003 beq.n 8001340 <HAL_GPIO_Init+0x250>
{
SET_BIT(temp, iocurrent);
8001338: 693a ldr r2, [r7, #16]
800133a: 68fb ldr r3, [r7, #12]
800133c: 4313 orrs r3, r2
800133e: 613b str r3, [r7, #16]
}
EXTI->RTSR = temp;
8001340: 4a32 ldr r2, [pc, #200] @ (800140c <HAL_GPIO_Init+0x31c>)
8001342: 693b ldr r3, [r7, #16]
8001344: 6093 str r3, [r2, #8]
temp = EXTI->FTSR;
8001346: 4b31 ldr r3, [pc, #196] @ (800140c <HAL_GPIO_Init+0x31c>)
8001348: 68db ldr r3, [r3, #12]
800134a: 613b str r3, [r7, #16]
CLEAR_BIT(temp, (uint32_t)iocurrent);
800134c: 68fb ldr r3, [r7, #12]
800134e: 43db mvns r3, r3
8001350: 693a ldr r2, [r7, #16]
8001352: 4013 ands r3, r2
8001354: 613b str r3, [r7, #16]
if ((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00U)
8001356: 683b ldr r3, [r7, #0]
8001358: 685b ldr r3, [r3, #4]
800135a: f403 1300 and.w r3, r3, #2097152 @ 0x200000
800135e: 2b00 cmp r3, #0
8001360: d003 beq.n 800136a <HAL_GPIO_Init+0x27a>
{
SET_BIT(temp, iocurrent);
8001362: 693a ldr r2, [r7, #16]
8001364: 68fb ldr r3, [r7, #12]
8001366: 4313 orrs r3, r2
8001368: 613b str r3, [r7, #16]
}
EXTI->FTSR = temp;
800136a: 4a28 ldr r2, [pc, #160] @ (800140c <HAL_GPIO_Init+0x31c>)
800136c: 693b ldr r3, [r7, #16]
800136e: 60d3 str r3, [r2, #12]
temp = EXTI->EMR;
8001370: 4b26 ldr r3, [pc, #152] @ (800140c <HAL_GPIO_Init+0x31c>)
8001372: 685b ldr r3, [r3, #4]
8001374: 613b str r3, [r7, #16]
CLEAR_BIT(temp, (uint32_t)iocurrent);
8001376: 68fb ldr r3, [r7, #12]
8001378: 43db mvns r3, r3
800137a: 693a ldr r2, [r7, #16]
800137c: 4013 ands r3, r2
800137e: 613b str r3, [r7, #16]
if ((GPIO_Init->Mode & EXTI_EVT) != 0x00U)
8001380: 683b ldr r3, [r7, #0]
8001382: 685b ldr r3, [r3, #4]
8001384: f403 3300 and.w r3, r3, #131072 @ 0x20000
8001388: 2b00 cmp r3, #0
800138a: d003 beq.n 8001394 <HAL_GPIO_Init+0x2a4>
{
SET_BIT(temp, iocurrent);
800138c: 693a ldr r2, [r7, #16]
800138e: 68fb ldr r3, [r7, #12]
8001390: 4313 orrs r3, r2
8001392: 613b str r3, [r7, #16]
}
EXTI->EMR = temp;
8001394: 4a1d ldr r2, [pc, #116] @ (800140c <HAL_GPIO_Init+0x31c>)
8001396: 693b ldr r3, [r7, #16]
8001398: 6053 str r3, [r2, #4]
/* Clear EXTI line configuration */
temp = EXTI->IMR;
800139a: 4b1c ldr r3, [pc, #112] @ (800140c <HAL_GPIO_Init+0x31c>)
800139c: 681b ldr r3, [r3, #0]
800139e: 613b str r3, [r7, #16]
CLEAR_BIT(temp, (uint32_t)iocurrent);
80013a0: 68fb ldr r3, [r7, #12]
80013a2: 43db mvns r3, r3
80013a4: 693a ldr r2, [r7, #16]
80013a6: 4013 ands r3, r2
80013a8: 613b str r3, [r7, #16]
if ((GPIO_Init->Mode & EXTI_IT) != 0x00U)
80013aa: 683b ldr r3, [r7, #0]
80013ac: 685b ldr r3, [r3, #4]
80013ae: f403 3380 and.w r3, r3, #65536 @ 0x10000
80013b2: 2b00 cmp r3, #0
80013b4: d003 beq.n 80013be <HAL_GPIO_Init+0x2ce>
{
SET_BIT(temp, iocurrent);
80013b6: 693a ldr r2, [r7, #16]
80013b8: 68fb ldr r3, [r7, #12]
80013ba: 4313 orrs r3, r2
80013bc: 613b str r3, [r7, #16]
}
EXTI->IMR = temp;
80013be: 4a13 ldr r2, [pc, #76] @ (800140c <HAL_GPIO_Init+0x31c>)
80013c0: 693b ldr r3, [r7, #16]
80013c2: 6013 str r3, [r2, #0]
}
}
position++;
80013c4: 697b ldr r3, [r7, #20]
80013c6: 3301 adds r3, #1
80013c8: 617b str r3, [r7, #20]
while (((GPIO_Init->Pin) >> position) != 0)
80013ca: 683b ldr r3, [r7, #0]
80013cc: 681a ldr r2, [r3, #0]
80013ce: 697b ldr r3, [r7, #20]
80013d0: fa22 f303 lsr.w r3, r2, r3
80013d4: 2b00 cmp r3, #0
80013d6: f47f ae97 bne.w 8001108 <HAL_GPIO_Init+0x18>
}
}
80013da: bf00 nop
80013dc: bf00 nop
80013de: 371c adds r7, #28
80013e0: 46bd mov sp, r7
80013e2: bc80 pop {r7}
80013e4: 4770 bx lr
80013e6: bf00 nop
80013e8: 40023800 .word 0x40023800
80013ec: 40010000 .word 0x40010000
80013f0: 40020000 .word 0x40020000
80013f4: 40020400 .word 0x40020400
80013f8: 40020800 .word 0x40020800
80013fc: 40020c00 .word 0x40020c00
8001400: 40021000 .word 0x40021000
8001404: 40021400 .word 0x40021400
8001408: 40021800 .word 0x40021800
800140c: 40010400 .word 0x40010400
08001410 <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)
{
8001410: b480 push {r7}
8001412: b083 sub sp, #12
8001414: af00 add r7, sp, #0
8001416: 6078 str r0, [r7, #4]
8001418: 460b mov r3, r1
800141a: 807b strh r3, [r7, #2]
800141c: 4613 mov r3, r2
800141e: 707b strb r3, [r7, #1]
/* Check the parameters */
assert_param(IS_GPIO_PIN(GPIO_Pin));
assert_param(IS_GPIO_PIN_ACTION(PinState));
if (PinState != GPIO_PIN_RESET)
8001420: 787b ldrb r3, [r7, #1]
8001422: 2b00 cmp r3, #0
8001424: d003 beq.n 800142e <HAL_GPIO_WritePin+0x1e>
{
GPIOx->BSRR = (uint32_t)GPIO_Pin;
8001426: 887a ldrh r2, [r7, #2]
8001428: 687b ldr r3, [r7, #4]
800142a: 619a str r2, [r3, #24]
}
else
{
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16 ;
}
}
800142c: e003 b.n 8001436 <HAL_GPIO_WritePin+0x26>
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16 ;
800142e: 887b ldrh r3, [r7, #2]
8001430: 041a lsls r2, r3, #16
8001432: 687b ldr r3, [r7, #4]
8001434: 619a str r2, [r3, #24]
}
8001436: bf00 nop
8001438: 370c adds r7, #12
800143a: 46bd mov sp, r7
800143c: bc80 pop {r7}
800143e: 4770 bx lr
08001440 <HAL_GPIO_EXTI_IRQHandler>:
* @brief This function handles 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)
{
8001440: b580 push {r7, lr}
8001442: b082 sub sp, #8
8001444: af00 add r7, sp, #0
8001446: 4603 mov r3, r0
8001448: 80fb strh r3, [r7, #6]
/* EXTI line interrupt detected */
if (__HAL_GPIO_EXTI_GET_IT(GPIO_Pin) != RESET)
800144a: 4b08 ldr r3, [pc, #32] @ (800146c <HAL_GPIO_EXTI_IRQHandler+0x2c>)
800144c: 695a ldr r2, [r3, #20]
800144e: 88fb ldrh r3, [r7, #6]
8001450: 4013 ands r3, r2
8001452: 2b00 cmp r3, #0
8001454: d006 beq.n 8001464 <HAL_GPIO_EXTI_IRQHandler+0x24>
{
__HAL_GPIO_EXTI_CLEAR_IT(GPIO_Pin);
8001456: 4a05 ldr r2, [pc, #20] @ (800146c <HAL_GPIO_EXTI_IRQHandler+0x2c>)
8001458: 88fb ldrh r3, [r7, #6]
800145a: 6153 str r3, [r2, #20]
HAL_GPIO_EXTI_Callback(GPIO_Pin);
800145c: 88fb ldrh r3, [r7, #6]
800145e: 4618 mov r0, r3
8001460: f000 f806 bl 8001470 <HAL_GPIO_EXTI_Callback>
}
}
8001464: bf00 nop
8001466: 3708 adds r7, #8
8001468: 46bd mov sp, r7
800146a: bd80 pop {r7, pc}
800146c: 40010400 .word 0x40010400
08001470 <HAL_GPIO_EXTI_Callback>:
* @brief EXTI line detection callbacks.
* @param GPIO_Pin Specifies the port pin connected to corresponding EXTI line.
* @retval None
*/
__weak void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
8001470: b480 push {r7}
8001472: b083 sub sp, #12
8001474: af00 add r7, sp, #0
8001476: 4603 mov r3, r0
8001478: 80fb strh r3, [r7, #6]
UNUSED(GPIO_Pin);
/* NOTE : This function Should not be modified, when the callback is needed,
the HAL_GPIO_EXTI_Callback could be implemented in the user file
*/
}
800147a: bf00 nop
800147c: 370c adds r7, #12
800147e: 46bd mov sp, r7
8001480: bc80 pop {r7}
8001482: 4770 bx lr
08001484 <HAL_RCC_OscConfig>:
* supported by this macro. User should request a transition to HSE Off
* first and then HSE On or HSE Bypass.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
{
8001484: b580 push {r7, lr}
8001486: b088 sub sp, #32
8001488: af00 add r7, sp, #0
800148a: 6078 str r0, [r7, #4]
uint32_t tickstart;
HAL_StatusTypeDef status;
uint32_t sysclk_source, pll_config;
/* Check the parameters */
if(RCC_OscInitStruct == NULL)
800148c: 687b ldr r3, [r7, #4]
800148e: 2b00 cmp r3, #0
8001490: d101 bne.n 8001496 <HAL_RCC_OscConfig+0x12>
{
return HAL_ERROR;
8001492: 2301 movs r3, #1
8001494: e31d b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
}
assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType));
sysclk_source = __HAL_RCC_GET_SYSCLK_SOURCE();
8001496: 4b94 ldr r3, [pc, #592] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
8001498: 689b ldr r3, [r3, #8]
800149a: f003 030c and.w r3, r3, #12
800149e: 61bb str r3, [r7, #24]
pll_config = __HAL_RCC_GET_PLL_OSCSOURCE();
80014a0: 4b91 ldr r3, [pc, #580] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
80014a2: 689b ldr r3, [r3, #8]
80014a4: f403 3380 and.w r3, r3, #65536 @ 0x10000
80014a8: 617b str r3, [r7, #20]
/*------------------------------- HSE Configuration ------------------------*/
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE)
80014aa: 687b ldr r3, [r7, #4]
80014ac: 681b ldr r3, [r3, #0]
80014ae: f003 0301 and.w r3, r3, #1
80014b2: 2b00 cmp r3, #0
80014b4: d07b beq.n 80015ae <HAL_RCC_OscConfig+0x12a>
{
/* Check the parameters */
assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState));
/* When the HSE is used as system clock or clock source for PLL in these cases it is not allowed to be disabled */
if((sysclk_source == RCC_SYSCLKSOURCE_STATUS_HSE)
80014b6: 69bb ldr r3, [r7, #24]
80014b8: 2b08 cmp r3, #8
80014ba: d006 beq.n 80014ca <HAL_RCC_OscConfig+0x46>
|| ((sysclk_source == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (pll_config == RCC_PLLSOURCE_HSE)))
80014bc: 69bb ldr r3, [r7, #24]
80014be: 2b0c cmp r3, #12
80014c0: d10f bne.n 80014e2 <HAL_RCC_OscConfig+0x5e>
80014c2: 697b ldr r3, [r7, #20]
80014c4: f5b3 3f80 cmp.w r3, #65536 @ 0x10000
80014c8: d10b bne.n 80014e2 <HAL_RCC_OscConfig+0x5e>
{
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
80014ca: 4b87 ldr r3, [pc, #540] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
80014cc: 681b ldr r3, [r3, #0]
80014ce: f403 3300 and.w r3, r3, #131072 @ 0x20000
80014d2: 2b00 cmp r3, #0
80014d4: d06a beq.n 80015ac <HAL_RCC_OscConfig+0x128>
80014d6: 687b ldr r3, [r7, #4]
80014d8: 685b ldr r3, [r3, #4]
80014da: 2b00 cmp r3, #0
80014dc: d166 bne.n 80015ac <HAL_RCC_OscConfig+0x128>
{
return HAL_ERROR;
80014de: 2301 movs r3, #1
80014e0: e2f7 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
}
}
else
{
/* Set the new HSE configuration ---------------------------------------*/
__HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
80014e2: 687b ldr r3, [r7, #4]
80014e4: 685b ldr r3, [r3, #4]
80014e6: 2b01 cmp r3, #1
80014e8: d106 bne.n 80014f8 <HAL_RCC_OscConfig+0x74>
80014ea: 4b7f ldr r3, [pc, #508] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
80014ec: 681b ldr r3, [r3, #0]
80014ee: 4a7e ldr r2, [pc, #504] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
80014f0: f443 3380 orr.w r3, r3, #65536 @ 0x10000
80014f4: 6013 str r3, [r2, #0]
80014f6: e02d b.n 8001554 <HAL_RCC_OscConfig+0xd0>
80014f8: 687b ldr r3, [r7, #4]
80014fa: 685b ldr r3, [r3, #4]
80014fc: 2b00 cmp r3, #0
80014fe: d10c bne.n 800151a <HAL_RCC_OscConfig+0x96>
8001500: 4b79 ldr r3, [pc, #484] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
8001502: 681b ldr r3, [r3, #0]
8001504: 4a78 ldr r2, [pc, #480] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
8001506: f423 3380 bic.w r3, r3, #65536 @ 0x10000
800150a: 6013 str r3, [r2, #0]
800150c: 4b76 ldr r3, [pc, #472] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
800150e: 681b ldr r3, [r3, #0]
8001510: 4a75 ldr r2, [pc, #468] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
8001512: f423 2380 bic.w r3, r3, #262144 @ 0x40000
8001516: 6013 str r3, [r2, #0]
8001518: e01c b.n 8001554 <HAL_RCC_OscConfig+0xd0>
800151a: 687b ldr r3, [r7, #4]
800151c: 685b ldr r3, [r3, #4]
800151e: 2b05 cmp r3, #5
8001520: d10c bne.n 800153c <HAL_RCC_OscConfig+0xb8>
8001522: 4b71 ldr r3, [pc, #452] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
8001524: 681b ldr r3, [r3, #0]
8001526: 4a70 ldr r2, [pc, #448] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
8001528: f443 2380 orr.w r3, r3, #262144 @ 0x40000
800152c: 6013 str r3, [r2, #0]
800152e: 4b6e ldr r3, [pc, #440] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
8001530: 681b ldr r3, [r3, #0]
8001532: 4a6d ldr r2, [pc, #436] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
8001534: f443 3380 orr.w r3, r3, #65536 @ 0x10000
8001538: 6013 str r3, [r2, #0]
800153a: e00b b.n 8001554 <HAL_RCC_OscConfig+0xd0>
800153c: 4b6a ldr r3, [pc, #424] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
800153e: 681b ldr r3, [r3, #0]
8001540: 4a69 ldr r2, [pc, #420] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
8001542: f423 3380 bic.w r3, r3, #65536 @ 0x10000
8001546: 6013 str r3, [r2, #0]
8001548: 4b67 ldr r3, [pc, #412] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
800154a: 681b ldr r3, [r3, #0]
800154c: 4a66 ldr r2, [pc, #408] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
800154e: f423 2380 bic.w r3, r3, #262144 @ 0x40000
8001552: 6013 str r3, [r2, #0]
/* Check the HSE State */
if(RCC_OscInitStruct->HSEState != RCC_HSE_OFF)
8001554: 687b ldr r3, [r7, #4]
8001556: 685b ldr r3, [r3, #4]
8001558: 2b00 cmp r3, #0
800155a: d013 beq.n 8001584 <HAL_RCC_OscConfig+0x100>
{
/* Get Start Tick */
tickstart = HAL_GetTick();
800155c: f7ff fcb0 bl 8000ec0 <HAL_GetTick>
8001560: 6138 str r0, [r7, #16]
/* Wait till HSE is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U)
8001562: e008 b.n 8001576 <HAL_RCC_OscConfig+0xf2>
{
if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
8001564: f7ff fcac bl 8000ec0 <HAL_GetTick>
8001568: 4602 mov r2, r0
800156a: 693b ldr r3, [r7, #16]
800156c: 1ad3 subs r3, r2, r3
800156e: 2b64 cmp r3, #100 @ 0x64
8001570: d901 bls.n 8001576 <HAL_RCC_OscConfig+0xf2>
{
return HAL_TIMEOUT;
8001572: 2303 movs r3, #3
8001574: e2ad b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U)
8001576: 4b5c ldr r3, [pc, #368] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
8001578: 681b ldr r3, [r3, #0]
800157a: f403 3300 and.w r3, r3, #131072 @ 0x20000
800157e: 2b00 cmp r3, #0
8001580: d0f0 beq.n 8001564 <HAL_RCC_OscConfig+0xe0>
8001582: e014 b.n 80015ae <HAL_RCC_OscConfig+0x12a>
}
}
else
{
/* Get Start Tick */
tickstart = HAL_GetTick();
8001584: f7ff fc9c bl 8000ec0 <HAL_GetTick>
8001588: 6138 str r0, [r7, #16]
/* Wait till HSE is disabled */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U)
800158a: e008 b.n 800159e <HAL_RCC_OscConfig+0x11a>
{
if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
800158c: f7ff fc98 bl 8000ec0 <HAL_GetTick>
8001590: 4602 mov r2, r0
8001592: 693b ldr r3, [r7, #16]
8001594: 1ad3 subs r3, r2, r3
8001596: 2b64 cmp r3, #100 @ 0x64
8001598: d901 bls.n 800159e <HAL_RCC_OscConfig+0x11a>
{
return HAL_TIMEOUT;
800159a: 2303 movs r3, #3
800159c: e299 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U)
800159e: 4b52 ldr r3, [pc, #328] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
80015a0: 681b ldr r3, [r3, #0]
80015a2: f403 3300 and.w r3, r3, #131072 @ 0x20000
80015a6: 2b00 cmp r3, #0
80015a8: d1f0 bne.n 800158c <HAL_RCC_OscConfig+0x108>
80015aa: e000 b.n 80015ae <HAL_RCC_OscConfig+0x12a>
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
80015ac: bf00 nop
}
}
}
}
/*----------------------------- HSI Configuration --------------------------*/
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
80015ae: 687b ldr r3, [r7, #4]
80015b0: 681b ldr r3, [r3, #0]
80015b2: f003 0302 and.w r3, r3, #2
80015b6: 2b00 cmp r3, #0
80015b8: d05a beq.n 8001670 <HAL_RCC_OscConfig+0x1ec>
/* Check the parameters */
assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState));
assert_param(IS_RCC_CALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue));
/* Check if HSI is used as system clock or as PLL source when PLL is selected as system clock */
if((sysclk_source == RCC_SYSCLKSOURCE_STATUS_HSI)
80015ba: 69bb ldr r3, [r7, #24]
80015bc: 2b04 cmp r3, #4
80015be: d005 beq.n 80015cc <HAL_RCC_OscConfig+0x148>
|| ((sysclk_source == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (pll_config == RCC_PLLSOURCE_HSI)))
80015c0: 69bb ldr r3, [r7, #24]
80015c2: 2b0c cmp r3, #12
80015c4: d119 bne.n 80015fa <HAL_RCC_OscConfig+0x176>
80015c6: 697b ldr r3, [r7, #20]
80015c8: 2b00 cmp r3, #0
80015ca: d116 bne.n 80015fa <HAL_RCC_OscConfig+0x176>
{
/* When HSI is used as system clock it will not disabled */
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
80015cc: 4b46 ldr r3, [pc, #280] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
80015ce: 681b ldr r3, [r3, #0]
80015d0: f003 0302 and.w r3, r3, #2
80015d4: 2b00 cmp r3, #0
80015d6: d005 beq.n 80015e4 <HAL_RCC_OscConfig+0x160>
80015d8: 687b ldr r3, [r7, #4]
80015da: 68db ldr r3, [r3, #12]
80015dc: 2b01 cmp r3, #1
80015de: d001 beq.n 80015e4 <HAL_RCC_OscConfig+0x160>
{
return HAL_ERROR;
80015e0: 2301 movs r3, #1
80015e2: e276 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
}
/* Otherwise, just the calibration is allowed */
else
{
/* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
80015e4: 4b40 ldr r3, [pc, #256] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
80015e6: 685b ldr r3, [r3, #4]
80015e8: f423 52f8 bic.w r2, r3, #7936 @ 0x1f00
80015ec: 687b ldr r3, [r7, #4]
80015ee: 691b ldr r3, [r3, #16]
80015f0: 021b lsls r3, r3, #8
80015f2: 493d ldr r1, [pc, #244] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
80015f4: 4313 orrs r3, r2
80015f6: 604b str r3, [r1, #4]
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
80015f8: e03a b.n 8001670 <HAL_RCC_OscConfig+0x1ec>
}
}
else
{
/* Check the HSI State */
if(RCC_OscInitStruct->HSIState != RCC_HSI_OFF)
80015fa: 687b ldr r3, [r7, #4]
80015fc: 68db ldr r3, [r3, #12]
80015fe: 2b00 cmp r3, #0
8001600: d020 beq.n 8001644 <HAL_RCC_OscConfig+0x1c0>
{
/* Enable the Internal High Speed oscillator (HSI). */
__HAL_RCC_HSI_ENABLE();
8001602: 4b3a ldr r3, [pc, #232] @ (80016ec <HAL_RCC_OscConfig+0x268>)
8001604: 2201 movs r2, #1
8001606: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8001608: f7ff fc5a bl 8000ec0 <HAL_GetTick>
800160c: 6138 str r0, [r7, #16]
/* Wait till HSI is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U)
800160e: e008 b.n 8001622 <HAL_RCC_OscConfig+0x19e>
{
if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
8001610: f7ff fc56 bl 8000ec0 <HAL_GetTick>
8001614: 4602 mov r2, r0
8001616: 693b ldr r3, [r7, #16]
8001618: 1ad3 subs r3, r2, r3
800161a: 2b02 cmp r3, #2
800161c: d901 bls.n 8001622 <HAL_RCC_OscConfig+0x19e>
{
return HAL_TIMEOUT;
800161e: 2303 movs r3, #3
8001620: e257 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U)
8001622: 4b31 ldr r3, [pc, #196] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
8001624: 681b ldr r3, [r3, #0]
8001626: f003 0302 and.w r3, r3, #2
800162a: 2b00 cmp r3, #0
800162c: d0f0 beq.n 8001610 <HAL_RCC_OscConfig+0x18c>
}
}
/* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
800162e: 4b2e ldr r3, [pc, #184] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
8001630: 685b ldr r3, [r3, #4]
8001632: f423 52f8 bic.w r2, r3, #7936 @ 0x1f00
8001636: 687b ldr r3, [r7, #4]
8001638: 691b ldr r3, [r3, #16]
800163a: 021b lsls r3, r3, #8
800163c: 492a ldr r1, [pc, #168] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
800163e: 4313 orrs r3, r2
8001640: 604b str r3, [r1, #4]
8001642: e015 b.n 8001670 <HAL_RCC_OscConfig+0x1ec>
}
else
{
/* Disable the Internal High Speed oscillator (HSI). */
__HAL_RCC_HSI_DISABLE();
8001644: 4b29 ldr r3, [pc, #164] @ (80016ec <HAL_RCC_OscConfig+0x268>)
8001646: 2200 movs r2, #0
8001648: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
800164a: f7ff fc39 bl 8000ec0 <HAL_GetTick>
800164e: 6138 str r0, [r7, #16]
/* Wait till HSI is disabled */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U)
8001650: e008 b.n 8001664 <HAL_RCC_OscConfig+0x1e0>
{
if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
8001652: f7ff fc35 bl 8000ec0 <HAL_GetTick>
8001656: 4602 mov r2, r0
8001658: 693b ldr r3, [r7, #16]
800165a: 1ad3 subs r3, r2, r3
800165c: 2b02 cmp r3, #2
800165e: d901 bls.n 8001664 <HAL_RCC_OscConfig+0x1e0>
{
return HAL_TIMEOUT;
8001660: 2303 movs r3, #3
8001662: e236 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U)
8001664: 4b20 ldr r3, [pc, #128] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
8001666: 681b ldr r3, [r3, #0]
8001668: f003 0302 and.w r3, r3, #2
800166c: 2b00 cmp r3, #0
800166e: d1f0 bne.n 8001652 <HAL_RCC_OscConfig+0x1ce>
}
}
}
}
/*----------------------------- MSI Configuration --------------------------*/
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_MSI) == RCC_OSCILLATORTYPE_MSI)
8001670: 687b ldr r3, [r7, #4]
8001672: 681b ldr r3, [r3, #0]
8001674: f003 0310 and.w r3, r3, #16
8001678: 2b00 cmp r3, #0
800167a: f000 80b8 beq.w 80017ee <HAL_RCC_OscConfig+0x36a>
{
/* When the MSI is used as system clock it will not be disabled */
if(sysclk_source == RCC_CFGR_SWS_MSI)
800167e: 69bb ldr r3, [r7, #24]
8001680: 2b00 cmp r3, #0
8001682: d170 bne.n 8001766 <HAL_RCC_OscConfig+0x2e2>
{
if((__HAL_RCC_GET_FLAG(RCC_FLAG_MSIRDY) != 0U) && (RCC_OscInitStruct->MSIState == RCC_MSI_OFF))
8001684: 4b18 ldr r3, [pc, #96] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
8001686: 681b ldr r3, [r3, #0]
8001688: f403 7300 and.w r3, r3, #512 @ 0x200
800168c: 2b00 cmp r3, #0
800168e: d005 beq.n 800169c <HAL_RCC_OscConfig+0x218>
8001690: 687b ldr r3, [r7, #4]
8001692: 699b ldr r3, [r3, #24]
8001694: 2b00 cmp r3, #0
8001696: d101 bne.n 800169c <HAL_RCC_OscConfig+0x218>
{
return HAL_ERROR;
8001698: 2301 movs r3, #1
800169a: e21a b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
assert_param(IS_RCC_MSI_CLOCK_RANGE(RCC_OscInitStruct->MSIClockRange));
/* To correctly read data from FLASH memory, the number of wait states (LATENCY)
must be correctly programmed according to the frequency of the CPU clock
(HCLK) and the supply voltage of the device. */
if(RCC_OscInitStruct->MSIClockRange > __HAL_RCC_GET_MSI_RANGE())
800169c: 687b ldr r3, [r7, #4]
800169e: 6a1a ldr r2, [r3, #32]
80016a0: 4b11 ldr r3, [pc, #68] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
80016a2: 685b ldr r3, [r3, #4]
80016a4: f403 4360 and.w r3, r3, #57344 @ 0xe000
80016a8: 429a cmp r2, r3
80016aa: d921 bls.n 80016f0 <HAL_RCC_OscConfig+0x26c>
{
/* First increase number of wait states update if necessary */
if(RCC_SetFlashLatencyFromMSIRange(RCC_OscInitStruct->MSIClockRange) != HAL_OK)
80016ac: 687b ldr r3, [r7, #4]
80016ae: 6a1b ldr r3, [r3, #32]
80016b0: 4618 mov r0, r3
80016b2: f000 fc09 bl 8001ec8 <RCC_SetFlashLatencyFromMSIRange>
80016b6: 4603 mov r3, r0
80016b8: 2b00 cmp r3, #0
80016ba: d001 beq.n 80016c0 <HAL_RCC_OscConfig+0x23c>
{
return HAL_ERROR;
80016bc: 2301 movs r3, #1
80016be: e208 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
}
/* Selects the Multiple Speed oscillator (MSI) clock range .*/
__HAL_RCC_MSI_RANGE_CONFIG(RCC_OscInitStruct->MSIClockRange);
80016c0: 4b09 ldr r3, [pc, #36] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
80016c2: 685b ldr r3, [r3, #4]
80016c4: f423 4260 bic.w r2, r3, #57344 @ 0xe000
80016c8: 687b ldr r3, [r7, #4]
80016ca: 6a1b ldr r3, [r3, #32]
80016cc: 4906 ldr r1, [pc, #24] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
80016ce: 4313 orrs r3, r2
80016d0: 604b str r3, [r1, #4]
/* Adjusts the Multiple Speed oscillator (MSI) calibration value.*/
__HAL_RCC_MSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->MSICalibrationValue);
80016d2: 4b05 ldr r3, [pc, #20] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
80016d4: 685b ldr r3, [r3, #4]
80016d6: f023 427f bic.w r2, r3, #4278190080 @ 0xff000000
80016da: 687b ldr r3, [r7, #4]
80016dc: 69db ldr r3, [r3, #28]
80016de: 061b lsls r3, r3, #24
80016e0: 4901 ldr r1, [pc, #4] @ (80016e8 <HAL_RCC_OscConfig+0x264>)
80016e2: 4313 orrs r3, r2
80016e4: 604b str r3, [r1, #4]
80016e6: e020 b.n 800172a <HAL_RCC_OscConfig+0x2a6>
80016e8: 40023800 .word 0x40023800
80016ec: 42470000 .word 0x42470000
}
else
{
/* Else, keep current flash latency while decreasing applies */
/* Selects the Multiple Speed oscillator (MSI) clock range .*/
__HAL_RCC_MSI_RANGE_CONFIG(RCC_OscInitStruct->MSIClockRange);
80016f0: 4b99 ldr r3, [pc, #612] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
80016f2: 685b ldr r3, [r3, #4]
80016f4: f423 4260 bic.w r2, r3, #57344 @ 0xe000
80016f8: 687b ldr r3, [r7, #4]
80016fa: 6a1b ldr r3, [r3, #32]
80016fc: 4996 ldr r1, [pc, #600] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
80016fe: 4313 orrs r3, r2
8001700: 604b str r3, [r1, #4]
/* Adjusts the Multiple Speed oscillator (MSI) calibration value.*/
__HAL_RCC_MSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->MSICalibrationValue);
8001702: 4b95 ldr r3, [pc, #596] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
8001704: 685b ldr r3, [r3, #4]
8001706: f023 427f bic.w r2, r3, #4278190080 @ 0xff000000
800170a: 687b ldr r3, [r7, #4]
800170c: 69db ldr r3, [r3, #28]
800170e: 061b lsls r3, r3, #24
8001710: 4991 ldr r1, [pc, #580] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
8001712: 4313 orrs r3, r2
8001714: 604b str r3, [r1, #4]
/* Decrease number of wait states update if necessary */
if(RCC_SetFlashLatencyFromMSIRange(RCC_OscInitStruct->MSIClockRange) != HAL_OK)
8001716: 687b ldr r3, [r7, #4]
8001718: 6a1b ldr r3, [r3, #32]
800171a: 4618 mov r0, r3
800171c: f000 fbd4 bl 8001ec8 <RCC_SetFlashLatencyFromMSIRange>
8001720: 4603 mov r3, r0
8001722: 2b00 cmp r3, #0
8001724: d001 beq.n 800172a <HAL_RCC_OscConfig+0x2a6>
{
return HAL_ERROR;
8001726: 2301 movs r3, #1
8001728: e1d3 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
}
}
/* Update the SystemCoreClock global variable */
SystemCoreClock = (32768U * (1UL << ((RCC_OscInitStruct->MSIClockRange >> RCC_ICSCR_MSIRANGE_Pos) + 1U)))
800172a: 687b ldr r3, [r7, #4]
800172c: 6a1b ldr r3, [r3, #32]
800172e: 0b5b lsrs r3, r3, #13
8001730: 3301 adds r3, #1
8001732: f44f 4200 mov.w r2, #32768 @ 0x8000
8001736: fa02 f303 lsl.w r3, r2, r3
>> AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos)];
800173a: 4a87 ldr r2, [pc, #540] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
800173c: 6892 ldr r2, [r2, #8]
800173e: 0912 lsrs r2, r2, #4
8001740: f002 020f and.w r2, r2, #15
8001744: 4985 ldr r1, [pc, #532] @ (800195c <HAL_RCC_OscConfig+0x4d8>)
8001746: 5c8a ldrb r2, [r1, r2]
8001748: 40d3 lsrs r3, r2
SystemCoreClock = (32768U * (1UL << ((RCC_OscInitStruct->MSIClockRange >> RCC_ICSCR_MSIRANGE_Pos) + 1U)))
800174a: 4a85 ldr r2, [pc, #532] @ (8001960 <HAL_RCC_OscConfig+0x4dc>)
800174c: 6013 str r3, [r2, #0]
/* Configure the source of time base considering new system clocks settings*/
status = HAL_InitTick(uwTickPrio);
800174e: 4b85 ldr r3, [pc, #532] @ (8001964 <HAL_RCC_OscConfig+0x4e0>)
8001750: 681b ldr r3, [r3, #0]
8001752: 4618 mov r0, r3
8001754: f7ff fb68 bl 8000e28 <HAL_InitTick>
8001758: 4603 mov r3, r0
800175a: 73fb strb r3, [r7, #15]
if(status != HAL_OK)
800175c: 7bfb ldrb r3, [r7, #15]
800175e: 2b00 cmp r3, #0
8001760: d045 beq.n 80017ee <HAL_RCC_OscConfig+0x36a>
{
return status;
8001762: 7bfb ldrb r3, [r7, #15]
8001764: e1b5 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
{
/* Check MSI State */
assert_param(IS_RCC_MSI(RCC_OscInitStruct->MSIState));
/* Check the MSI State */
if(RCC_OscInitStruct->MSIState != RCC_MSI_OFF)
8001766: 687b ldr r3, [r7, #4]
8001768: 699b ldr r3, [r3, #24]
800176a: 2b00 cmp r3, #0
800176c: d029 beq.n 80017c2 <HAL_RCC_OscConfig+0x33e>
{
/* Enable the Multi Speed oscillator (MSI). */
__HAL_RCC_MSI_ENABLE();
800176e: 4b7e ldr r3, [pc, #504] @ (8001968 <HAL_RCC_OscConfig+0x4e4>)
8001770: 2201 movs r2, #1
8001772: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8001774: f7ff fba4 bl 8000ec0 <HAL_GetTick>
8001778: 6138 str r0, [r7, #16]
/* Wait till MSI is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_MSIRDY) == 0U)
800177a: e008 b.n 800178e <HAL_RCC_OscConfig+0x30a>
{
if((HAL_GetTick() - tickstart) > MSI_TIMEOUT_VALUE)
800177c: f7ff fba0 bl 8000ec0 <HAL_GetTick>
8001780: 4602 mov r2, r0
8001782: 693b ldr r3, [r7, #16]
8001784: 1ad3 subs r3, r2, r3
8001786: 2b02 cmp r3, #2
8001788: d901 bls.n 800178e <HAL_RCC_OscConfig+0x30a>
{
return HAL_TIMEOUT;
800178a: 2303 movs r3, #3
800178c: e1a1 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_MSIRDY) == 0U)
800178e: 4b72 ldr r3, [pc, #456] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
8001790: 681b ldr r3, [r3, #0]
8001792: f403 7300 and.w r3, r3, #512 @ 0x200
8001796: 2b00 cmp r3, #0
8001798: d0f0 beq.n 800177c <HAL_RCC_OscConfig+0x2f8>
/* Check MSICalibrationValue and MSIClockRange input parameters */
assert_param(IS_RCC_MSICALIBRATION_VALUE(RCC_OscInitStruct->MSICalibrationValue));
assert_param(IS_RCC_MSI_CLOCK_RANGE(RCC_OscInitStruct->MSIClockRange));
/* Selects the Multiple Speed oscillator (MSI) clock range .*/
__HAL_RCC_MSI_RANGE_CONFIG(RCC_OscInitStruct->MSIClockRange);
800179a: 4b6f ldr r3, [pc, #444] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
800179c: 685b ldr r3, [r3, #4]
800179e: f423 4260 bic.w r2, r3, #57344 @ 0xe000
80017a2: 687b ldr r3, [r7, #4]
80017a4: 6a1b ldr r3, [r3, #32]
80017a6: 496c ldr r1, [pc, #432] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
80017a8: 4313 orrs r3, r2
80017aa: 604b str r3, [r1, #4]
/* Adjusts the Multiple Speed oscillator (MSI) calibration value.*/
__HAL_RCC_MSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->MSICalibrationValue);
80017ac: 4b6a ldr r3, [pc, #424] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
80017ae: 685b ldr r3, [r3, #4]
80017b0: f023 427f bic.w r2, r3, #4278190080 @ 0xff000000
80017b4: 687b ldr r3, [r7, #4]
80017b6: 69db ldr r3, [r3, #28]
80017b8: 061b lsls r3, r3, #24
80017ba: 4967 ldr r1, [pc, #412] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
80017bc: 4313 orrs r3, r2
80017be: 604b str r3, [r1, #4]
80017c0: e015 b.n 80017ee <HAL_RCC_OscConfig+0x36a>
}
else
{
/* Disable the Multi Speed oscillator (MSI). */
__HAL_RCC_MSI_DISABLE();
80017c2: 4b69 ldr r3, [pc, #420] @ (8001968 <HAL_RCC_OscConfig+0x4e4>)
80017c4: 2200 movs r2, #0
80017c6: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
80017c8: f7ff fb7a bl 8000ec0 <HAL_GetTick>
80017cc: 6138 str r0, [r7, #16]
/* Wait till MSI is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_MSIRDY) != 0U)
80017ce: e008 b.n 80017e2 <HAL_RCC_OscConfig+0x35e>
{
if((HAL_GetTick() - tickstart) > MSI_TIMEOUT_VALUE)
80017d0: f7ff fb76 bl 8000ec0 <HAL_GetTick>
80017d4: 4602 mov r2, r0
80017d6: 693b ldr r3, [r7, #16]
80017d8: 1ad3 subs r3, r2, r3
80017da: 2b02 cmp r3, #2
80017dc: d901 bls.n 80017e2 <HAL_RCC_OscConfig+0x35e>
{
return HAL_TIMEOUT;
80017de: 2303 movs r3, #3
80017e0: e177 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_MSIRDY) != 0U)
80017e2: 4b5d ldr r3, [pc, #372] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
80017e4: 681b ldr r3, [r3, #0]
80017e6: f403 7300 and.w r3, r3, #512 @ 0x200
80017ea: 2b00 cmp r3, #0
80017ec: d1f0 bne.n 80017d0 <HAL_RCC_OscConfig+0x34c>
}
}
}
}
/*------------------------------ LSI Configuration -------------------------*/
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
80017ee: 687b ldr r3, [r7, #4]
80017f0: 681b ldr r3, [r3, #0]
80017f2: f003 0308 and.w r3, r3, #8
80017f6: 2b00 cmp r3, #0
80017f8: d030 beq.n 800185c <HAL_RCC_OscConfig+0x3d8>
{
/* Check the parameters */
assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState));
/* Check the LSI State */
if(RCC_OscInitStruct->LSIState != RCC_LSI_OFF)
80017fa: 687b ldr r3, [r7, #4]
80017fc: 695b ldr r3, [r3, #20]
80017fe: 2b00 cmp r3, #0
8001800: d016 beq.n 8001830 <HAL_RCC_OscConfig+0x3ac>
{
/* Enable the Internal Low Speed oscillator (LSI). */
__HAL_RCC_LSI_ENABLE();
8001802: 4b5a ldr r3, [pc, #360] @ (800196c <HAL_RCC_OscConfig+0x4e8>)
8001804: 2201 movs r2, #1
8001806: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8001808: f7ff fb5a bl 8000ec0 <HAL_GetTick>
800180c: 6138 str r0, [r7, #16]
/* Wait till LSI is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == 0U)
800180e: e008 b.n 8001822 <HAL_RCC_OscConfig+0x39e>
{
if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
8001810: f7ff fb56 bl 8000ec0 <HAL_GetTick>
8001814: 4602 mov r2, r0
8001816: 693b ldr r3, [r7, #16]
8001818: 1ad3 subs r3, r2, r3
800181a: 2b02 cmp r3, #2
800181c: d901 bls.n 8001822 <HAL_RCC_OscConfig+0x39e>
{
return HAL_TIMEOUT;
800181e: 2303 movs r3, #3
8001820: e157 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == 0U)
8001822: 4b4d ldr r3, [pc, #308] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
8001824: 6b5b ldr r3, [r3, #52] @ 0x34
8001826: f003 0302 and.w r3, r3, #2
800182a: 2b00 cmp r3, #0
800182c: d0f0 beq.n 8001810 <HAL_RCC_OscConfig+0x38c>
800182e: e015 b.n 800185c <HAL_RCC_OscConfig+0x3d8>
}
}
else
{
/* Disable the Internal Low Speed oscillator (LSI). */
__HAL_RCC_LSI_DISABLE();
8001830: 4b4e ldr r3, [pc, #312] @ (800196c <HAL_RCC_OscConfig+0x4e8>)
8001832: 2200 movs r2, #0
8001834: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8001836: f7ff fb43 bl 8000ec0 <HAL_GetTick>
800183a: 6138 str r0, [r7, #16]
/* Wait till LSI is disabled */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != 0U)
800183c: e008 b.n 8001850 <HAL_RCC_OscConfig+0x3cc>
{
if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
800183e: f7ff fb3f bl 8000ec0 <HAL_GetTick>
8001842: 4602 mov r2, r0
8001844: 693b ldr r3, [r7, #16]
8001846: 1ad3 subs r3, r2, r3
8001848: 2b02 cmp r3, #2
800184a: d901 bls.n 8001850 <HAL_RCC_OscConfig+0x3cc>
{
return HAL_TIMEOUT;
800184c: 2303 movs r3, #3
800184e: e140 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != 0U)
8001850: 4b41 ldr r3, [pc, #260] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
8001852: 6b5b ldr r3, [r3, #52] @ 0x34
8001854: f003 0302 and.w r3, r3, #2
8001858: 2b00 cmp r3, #0
800185a: d1f0 bne.n 800183e <HAL_RCC_OscConfig+0x3ba>
}
}
}
}
/*------------------------------ LSE Configuration -------------------------*/
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
800185c: 687b ldr r3, [r7, #4]
800185e: 681b ldr r3, [r3, #0]
8001860: f003 0304 and.w r3, r3, #4
8001864: 2b00 cmp r3, #0
8001866: f000 80b5 beq.w 80019d4 <HAL_RCC_OscConfig+0x550>
{
FlagStatus pwrclkchanged = RESET;
800186a: 2300 movs r3, #0
800186c: 77fb strb r3, [r7, #31]
/* Check the parameters */
assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState));
/* 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())
800186e: 4b3a ldr r3, [pc, #232] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
8001870: 6a5b ldr r3, [r3, #36] @ 0x24
8001872: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
8001876: 2b00 cmp r3, #0
8001878: d10d bne.n 8001896 <HAL_RCC_OscConfig+0x412>
{
__HAL_RCC_PWR_CLK_ENABLE();
800187a: 4b37 ldr r3, [pc, #220] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
800187c: 6a5b ldr r3, [r3, #36] @ 0x24
800187e: 4a36 ldr r2, [pc, #216] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
8001880: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000
8001884: 6253 str r3, [r2, #36] @ 0x24
8001886: 4b34 ldr r3, [pc, #208] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
8001888: 6a5b ldr r3, [r3, #36] @ 0x24
800188a: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
800188e: 60bb str r3, [r7, #8]
8001890: 68bb ldr r3, [r7, #8]
pwrclkchanged = SET;
8001892: 2301 movs r3, #1
8001894: 77fb strb r3, [r7, #31]
}
if(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
8001896: 4b36 ldr r3, [pc, #216] @ (8001970 <HAL_RCC_OscConfig+0x4ec>)
8001898: 681b ldr r3, [r3, #0]
800189a: f403 7380 and.w r3, r3, #256 @ 0x100
800189e: 2b00 cmp r3, #0
80018a0: d118 bne.n 80018d4 <HAL_RCC_OscConfig+0x450>
{
/* Enable write access to Backup domain */
SET_BIT(PWR->CR, PWR_CR_DBP);
80018a2: 4b33 ldr r3, [pc, #204] @ (8001970 <HAL_RCC_OscConfig+0x4ec>)
80018a4: 681b ldr r3, [r3, #0]
80018a6: 4a32 ldr r2, [pc, #200] @ (8001970 <HAL_RCC_OscConfig+0x4ec>)
80018a8: f443 7380 orr.w r3, r3, #256 @ 0x100
80018ac: 6013 str r3, [r2, #0]
/* Wait for Backup domain Write protection disable */
tickstart = HAL_GetTick();
80018ae: f7ff fb07 bl 8000ec0 <HAL_GetTick>
80018b2: 6138 str r0, [r7, #16]
while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
80018b4: e008 b.n 80018c8 <HAL_RCC_OscConfig+0x444>
{
if((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
80018b6: f7ff fb03 bl 8000ec0 <HAL_GetTick>
80018ba: 4602 mov r2, r0
80018bc: 693b ldr r3, [r7, #16]
80018be: 1ad3 subs r3, r2, r3
80018c0: 2b64 cmp r3, #100 @ 0x64
80018c2: d901 bls.n 80018c8 <HAL_RCC_OscConfig+0x444>
{
return HAL_TIMEOUT;
80018c4: 2303 movs r3, #3
80018c6: e104 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
80018c8: 4b29 ldr r3, [pc, #164] @ (8001970 <HAL_RCC_OscConfig+0x4ec>)
80018ca: 681b ldr r3, [r3, #0]
80018cc: f403 7380 and.w r3, r3, #256 @ 0x100
80018d0: 2b00 cmp r3, #0
80018d2: d0f0 beq.n 80018b6 <HAL_RCC_OscConfig+0x432>
}
}
}
/* Set the new LSE configuration -----------------------------------------*/
__HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
80018d4: 687b ldr r3, [r7, #4]
80018d6: 689b ldr r3, [r3, #8]
80018d8: 2b01 cmp r3, #1
80018da: d106 bne.n 80018ea <HAL_RCC_OscConfig+0x466>
80018dc: 4b1e ldr r3, [pc, #120] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
80018de: 6b5b ldr r3, [r3, #52] @ 0x34
80018e0: 4a1d ldr r2, [pc, #116] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
80018e2: f443 7380 orr.w r3, r3, #256 @ 0x100
80018e6: 6353 str r3, [r2, #52] @ 0x34
80018e8: e02d b.n 8001946 <HAL_RCC_OscConfig+0x4c2>
80018ea: 687b ldr r3, [r7, #4]
80018ec: 689b ldr r3, [r3, #8]
80018ee: 2b00 cmp r3, #0
80018f0: d10c bne.n 800190c <HAL_RCC_OscConfig+0x488>
80018f2: 4b19 ldr r3, [pc, #100] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
80018f4: 6b5b ldr r3, [r3, #52] @ 0x34
80018f6: 4a18 ldr r2, [pc, #96] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
80018f8: f423 7380 bic.w r3, r3, #256 @ 0x100
80018fc: 6353 str r3, [r2, #52] @ 0x34
80018fe: 4b16 ldr r3, [pc, #88] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
8001900: 6b5b ldr r3, [r3, #52] @ 0x34
8001902: 4a15 ldr r2, [pc, #84] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
8001904: f423 6380 bic.w r3, r3, #1024 @ 0x400
8001908: 6353 str r3, [r2, #52] @ 0x34
800190a: e01c b.n 8001946 <HAL_RCC_OscConfig+0x4c2>
800190c: 687b ldr r3, [r7, #4]
800190e: 689b ldr r3, [r3, #8]
8001910: 2b05 cmp r3, #5
8001912: d10c bne.n 800192e <HAL_RCC_OscConfig+0x4aa>
8001914: 4b10 ldr r3, [pc, #64] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
8001916: 6b5b ldr r3, [r3, #52] @ 0x34
8001918: 4a0f ldr r2, [pc, #60] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
800191a: f443 6380 orr.w r3, r3, #1024 @ 0x400
800191e: 6353 str r3, [r2, #52] @ 0x34
8001920: 4b0d ldr r3, [pc, #52] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
8001922: 6b5b ldr r3, [r3, #52] @ 0x34
8001924: 4a0c ldr r2, [pc, #48] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
8001926: f443 7380 orr.w r3, r3, #256 @ 0x100
800192a: 6353 str r3, [r2, #52] @ 0x34
800192c: e00b b.n 8001946 <HAL_RCC_OscConfig+0x4c2>
800192e: 4b0a ldr r3, [pc, #40] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
8001930: 6b5b ldr r3, [r3, #52] @ 0x34
8001932: 4a09 ldr r2, [pc, #36] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
8001934: f423 7380 bic.w r3, r3, #256 @ 0x100
8001938: 6353 str r3, [r2, #52] @ 0x34
800193a: 4b07 ldr r3, [pc, #28] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
800193c: 6b5b ldr r3, [r3, #52] @ 0x34
800193e: 4a06 ldr r2, [pc, #24] @ (8001958 <HAL_RCC_OscConfig+0x4d4>)
8001940: f423 6380 bic.w r3, r3, #1024 @ 0x400
8001944: 6353 str r3, [r2, #52] @ 0x34
/* Check the LSE State */
if(RCC_OscInitStruct->LSEState != RCC_LSE_OFF)
8001946: 687b ldr r3, [r7, #4]
8001948: 689b ldr r3, [r3, #8]
800194a: 2b00 cmp r3, #0
800194c: d024 beq.n 8001998 <HAL_RCC_OscConfig+0x514>
{
/* Get Start Tick */
tickstart = HAL_GetTick();
800194e: f7ff fab7 bl 8000ec0 <HAL_GetTick>
8001952: 6138 str r0, [r7, #16]
/* Wait till LSE is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U)
8001954: e019 b.n 800198a <HAL_RCC_OscConfig+0x506>
8001956: bf00 nop
8001958: 40023800 .word 0x40023800
800195c: 08003234 .word 0x08003234
8001960: 20000004 .word 0x20000004
8001964: 20000008 .word 0x20000008
8001968: 42470020 .word 0x42470020
800196c: 42470680 .word 0x42470680
8001970: 40007000 .word 0x40007000
{
if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
8001974: f7ff faa4 bl 8000ec0 <HAL_GetTick>
8001978: 4602 mov r2, r0
800197a: 693b ldr r3, [r7, #16]
800197c: 1ad3 subs r3, r2, r3
800197e: f241 3288 movw r2, #5000 @ 0x1388
8001982: 4293 cmp r3, r2
8001984: d901 bls.n 800198a <HAL_RCC_OscConfig+0x506>
{
return HAL_TIMEOUT;
8001986: 2303 movs r3, #3
8001988: e0a3 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U)
800198a: 4b54 ldr r3, [pc, #336] @ (8001adc <HAL_RCC_OscConfig+0x658>)
800198c: 6b5b ldr r3, [r3, #52] @ 0x34
800198e: f403 7300 and.w r3, r3, #512 @ 0x200
8001992: 2b00 cmp r3, #0
8001994: d0ee beq.n 8001974 <HAL_RCC_OscConfig+0x4f0>
8001996: e014 b.n 80019c2 <HAL_RCC_OscConfig+0x53e>
}
}
else
{
/* Get Start Tick */
tickstart = HAL_GetTick();
8001998: f7ff fa92 bl 8000ec0 <HAL_GetTick>
800199c: 6138 str r0, [r7, #16]
/* Wait till LSE is disabled */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != 0U)
800199e: e00a b.n 80019b6 <HAL_RCC_OscConfig+0x532>
{
if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
80019a0: f7ff fa8e bl 8000ec0 <HAL_GetTick>
80019a4: 4602 mov r2, r0
80019a6: 693b ldr r3, [r7, #16]
80019a8: 1ad3 subs r3, r2, r3
80019aa: f241 3288 movw r2, #5000 @ 0x1388
80019ae: 4293 cmp r3, r2
80019b0: d901 bls.n 80019b6 <HAL_RCC_OscConfig+0x532>
{
return HAL_TIMEOUT;
80019b2: 2303 movs r3, #3
80019b4: e08d b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != 0U)
80019b6: 4b49 ldr r3, [pc, #292] @ (8001adc <HAL_RCC_OscConfig+0x658>)
80019b8: 6b5b ldr r3, [r3, #52] @ 0x34
80019ba: f403 7300 and.w r3, r3, #512 @ 0x200
80019be: 2b00 cmp r3, #0
80019c0: d1ee bne.n 80019a0 <HAL_RCC_OscConfig+0x51c>
}
}
}
/* Require to disable power clock if necessary */
if(pwrclkchanged == SET)
80019c2: 7ffb ldrb r3, [r7, #31]
80019c4: 2b01 cmp r3, #1
80019c6: d105 bne.n 80019d4 <HAL_RCC_OscConfig+0x550>
{
__HAL_RCC_PWR_CLK_DISABLE();
80019c8: 4b44 ldr r3, [pc, #272] @ (8001adc <HAL_RCC_OscConfig+0x658>)
80019ca: 6a5b ldr r3, [r3, #36] @ 0x24
80019cc: 4a43 ldr r2, [pc, #268] @ (8001adc <HAL_RCC_OscConfig+0x658>)
80019ce: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000
80019d2: 6253 str r3, [r2, #36] @ 0x24
}
/*-------------------------------- PLL Configuration -----------------------*/
/* Check the parameters */
assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState));
if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE)
80019d4: 687b ldr r3, [r7, #4]
80019d6: 6a5b ldr r3, [r3, #36] @ 0x24
80019d8: 2b00 cmp r3, #0
80019da: d079 beq.n 8001ad0 <HAL_RCC_OscConfig+0x64c>
{
/* Check if the PLL is used as system clock or not */
if(sysclk_source != RCC_SYSCLKSOURCE_STATUS_PLLCLK)
80019dc: 69bb ldr r3, [r7, #24]
80019de: 2b0c cmp r3, #12
80019e0: d056 beq.n 8001a90 <HAL_RCC_OscConfig+0x60c>
{
if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON)
80019e2: 687b ldr r3, [r7, #4]
80019e4: 6a5b ldr r3, [r3, #36] @ 0x24
80019e6: 2b02 cmp r3, #2
80019e8: d13b bne.n 8001a62 <HAL_RCC_OscConfig+0x5de>
assert_param(IS_RCC_PLLSOURCE(RCC_OscInitStruct->PLL.PLLSource));
assert_param(IS_RCC_PLL_MUL(RCC_OscInitStruct->PLL.PLLMUL));
assert_param(IS_RCC_PLL_DIV(RCC_OscInitStruct->PLL.PLLDIV));
/* Disable the main PLL. */
__HAL_RCC_PLL_DISABLE();
80019ea: 4b3d ldr r3, [pc, #244] @ (8001ae0 <HAL_RCC_OscConfig+0x65c>)
80019ec: 2200 movs r2, #0
80019ee: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
80019f0: f7ff fa66 bl 8000ec0 <HAL_GetTick>
80019f4: 6138 str r0, [r7, #16]
/* Wait till PLL is disabled */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U)
80019f6: e008 b.n 8001a0a <HAL_RCC_OscConfig+0x586>
{
if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
80019f8: f7ff fa62 bl 8000ec0 <HAL_GetTick>
80019fc: 4602 mov r2, r0
80019fe: 693b ldr r3, [r7, #16]
8001a00: 1ad3 subs r3, r2, r3
8001a02: 2b02 cmp r3, #2
8001a04: d901 bls.n 8001a0a <HAL_RCC_OscConfig+0x586>
{
return HAL_TIMEOUT;
8001a06: 2303 movs r3, #3
8001a08: e063 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U)
8001a0a: 4b34 ldr r3, [pc, #208] @ (8001adc <HAL_RCC_OscConfig+0x658>)
8001a0c: 681b ldr r3, [r3, #0]
8001a0e: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
8001a12: 2b00 cmp r3, #0
8001a14: d1f0 bne.n 80019f8 <HAL_RCC_OscConfig+0x574>
}
}
/* Configure the main PLL clock source, multiplication and division factors. */
__HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource,
8001a16: 4b31 ldr r3, [pc, #196] @ (8001adc <HAL_RCC_OscConfig+0x658>)
8001a18: 689b ldr r3, [r3, #8]
8001a1a: f423 027d bic.w r2, r3, #16580608 @ 0xfd0000
8001a1e: 687b ldr r3, [r7, #4]
8001a20: 6a99 ldr r1, [r3, #40] @ 0x28
8001a22: 687b ldr r3, [r7, #4]
8001a24: 6adb ldr r3, [r3, #44] @ 0x2c
8001a26: 4319 orrs r1, r3
8001a28: 687b ldr r3, [r7, #4]
8001a2a: 6b1b ldr r3, [r3, #48] @ 0x30
8001a2c: 430b orrs r3, r1
8001a2e: 492b ldr r1, [pc, #172] @ (8001adc <HAL_RCC_OscConfig+0x658>)
8001a30: 4313 orrs r3, r2
8001a32: 608b str r3, [r1, #8]
RCC_OscInitStruct->PLL.PLLMUL,
RCC_OscInitStruct->PLL.PLLDIV);
/* Enable the main PLL. */
__HAL_RCC_PLL_ENABLE();
8001a34: 4b2a ldr r3, [pc, #168] @ (8001ae0 <HAL_RCC_OscConfig+0x65c>)
8001a36: 2201 movs r2, #1
8001a38: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8001a3a: f7ff fa41 bl 8000ec0 <HAL_GetTick>
8001a3e: 6138 str r0, [r7, #16]
/* Wait till PLL is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U)
8001a40: e008 b.n 8001a54 <HAL_RCC_OscConfig+0x5d0>
{
if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
8001a42: f7ff fa3d bl 8000ec0 <HAL_GetTick>
8001a46: 4602 mov r2, r0
8001a48: 693b ldr r3, [r7, #16]
8001a4a: 1ad3 subs r3, r2, r3
8001a4c: 2b02 cmp r3, #2
8001a4e: d901 bls.n 8001a54 <HAL_RCC_OscConfig+0x5d0>
{
return HAL_TIMEOUT;
8001a50: 2303 movs r3, #3
8001a52: e03e b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U)
8001a54: 4b21 ldr r3, [pc, #132] @ (8001adc <HAL_RCC_OscConfig+0x658>)
8001a56: 681b ldr r3, [r3, #0]
8001a58: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
8001a5c: 2b00 cmp r3, #0
8001a5e: d0f0 beq.n 8001a42 <HAL_RCC_OscConfig+0x5be>
8001a60: e036 b.n 8001ad0 <HAL_RCC_OscConfig+0x64c>
}
}
else
{
/* Disable the main PLL. */
__HAL_RCC_PLL_DISABLE();
8001a62: 4b1f ldr r3, [pc, #124] @ (8001ae0 <HAL_RCC_OscConfig+0x65c>)
8001a64: 2200 movs r2, #0
8001a66: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8001a68: f7ff fa2a bl 8000ec0 <HAL_GetTick>
8001a6c: 6138 str r0, [r7, #16]
/* Wait till PLL is disabled */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U)
8001a6e: e008 b.n 8001a82 <HAL_RCC_OscConfig+0x5fe>
{
if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
8001a70: f7ff fa26 bl 8000ec0 <HAL_GetTick>
8001a74: 4602 mov r2, r0
8001a76: 693b ldr r3, [r7, #16]
8001a78: 1ad3 subs r3, r2, r3
8001a7a: 2b02 cmp r3, #2
8001a7c: d901 bls.n 8001a82 <HAL_RCC_OscConfig+0x5fe>
{
return HAL_TIMEOUT;
8001a7e: 2303 movs r3, #3
8001a80: e027 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U)
8001a82: 4b16 ldr r3, [pc, #88] @ (8001adc <HAL_RCC_OscConfig+0x658>)
8001a84: 681b ldr r3, [r3, #0]
8001a86: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
8001a8a: 2b00 cmp r3, #0
8001a8c: d1f0 bne.n 8001a70 <HAL_RCC_OscConfig+0x5ec>
8001a8e: e01f b.n 8001ad0 <HAL_RCC_OscConfig+0x64c>
}
}
else
{
/* Check if there is a request to disable the PLL used as System clock source */
if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF)
8001a90: 687b ldr r3, [r7, #4]
8001a92: 6a5b ldr r3, [r3, #36] @ 0x24
8001a94: 2b01 cmp r3, #1
8001a96: d101 bne.n 8001a9c <HAL_RCC_OscConfig+0x618>
{
return HAL_ERROR;
8001a98: 2301 movs r3, #1
8001a9a: e01a b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
}
else
{
/* Do not return HAL_ERROR if request repeats the current configuration */
pll_config = RCC->CFGR;
8001a9c: 4b0f ldr r3, [pc, #60] @ (8001adc <HAL_RCC_OscConfig+0x658>)
8001a9e: 689b ldr r3, [r3, #8]
8001aa0: 617b str r3, [r7, #20]
if((READ_BIT(pll_config, RCC_CFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
8001aa2: 697b ldr r3, [r7, #20]
8001aa4: f403 3280 and.w r2, r3, #65536 @ 0x10000
8001aa8: 687b ldr r3, [r7, #4]
8001aaa: 6a9b ldr r3, [r3, #40] @ 0x28
8001aac: 429a cmp r2, r3
8001aae: d10d bne.n 8001acc <HAL_RCC_OscConfig+0x648>
(READ_BIT(pll_config, RCC_CFGR_PLLMUL) != RCC_OscInitStruct->PLL.PLLMUL) ||
8001ab0: 697b ldr r3, [r7, #20]
8001ab2: f403 1270 and.w r2, r3, #3932160 @ 0x3c0000
8001ab6: 687b ldr r3, [r7, #4]
8001ab8: 6adb ldr r3, [r3, #44] @ 0x2c
if((READ_BIT(pll_config, RCC_CFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
8001aba: 429a cmp r2, r3
8001abc: d106 bne.n 8001acc <HAL_RCC_OscConfig+0x648>
(READ_BIT(pll_config, RCC_CFGR_PLLDIV) != RCC_OscInitStruct->PLL.PLLDIV))
8001abe: 697b ldr r3, [r7, #20]
8001ac0: f403 0240 and.w r2, r3, #12582912 @ 0xc00000
8001ac4: 687b ldr r3, [r7, #4]
8001ac6: 6b1b ldr r3, [r3, #48] @ 0x30
(READ_BIT(pll_config, RCC_CFGR_PLLMUL) != RCC_OscInitStruct->PLL.PLLMUL) ||
8001ac8: 429a cmp r2, r3
8001aca: d001 beq.n 8001ad0 <HAL_RCC_OscConfig+0x64c>
{
return HAL_ERROR;
8001acc: 2301 movs r3, #1
8001ace: e000 b.n 8001ad2 <HAL_RCC_OscConfig+0x64e>
}
}
}
}
return HAL_OK;
8001ad0: 2300 movs r3, #0
}
8001ad2: 4618 mov r0, r3
8001ad4: 3720 adds r7, #32
8001ad6: 46bd mov sp, r7
8001ad8: bd80 pop {r7, pc}
8001ada: bf00 nop
8001adc: 40023800 .word 0x40023800
8001ae0: 42470060 .word 0x42470060
08001ae4 <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 HAL status
*/
HAL_StatusTypeDef HAL_RCC_ClockConfig(const RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency)
{
8001ae4: b580 push {r7, lr}
8001ae6: b084 sub sp, #16
8001ae8: af00 add r7, sp, #0
8001aea: 6078 str r0, [r7, #4]
8001aec: 6039 str r1, [r7, #0]
uint32_t tickstart;
HAL_StatusTypeDef status;
/* Check the parameters */
if(RCC_ClkInitStruct == NULL)
8001aee: 687b ldr r3, [r7, #4]
8001af0: 2b00 cmp r3, #0
8001af2: d101 bne.n 8001af8 <HAL_RCC_ClockConfig+0x14>
{
return HAL_ERROR;
8001af4: 2301 movs r3, #1
8001af6: e11a b.n 8001d2e <HAL_RCC_ClockConfig+0x24a>
/* To correctly read data from FLASH memory, the number of wait states (LATENCY)
must be correctly programmed according to the frequency of the CPU 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())
8001af8: 4b8f ldr r3, [pc, #572] @ (8001d38 <HAL_RCC_ClockConfig+0x254>)
8001afa: 681b ldr r3, [r3, #0]
8001afc: f003 0301 and.w r3, r3, #1
8001b00: 683a ldr r2, [r7, #0]
8001b02: 429a cmp r2, r3
8001b04: d919 bls.n 8001b3a <HAL_RCC_ClockConfig+0x56>
{
/* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
__HAL_FLASH_SET_LATENCY(FLatency);
8001b06: 683b ldr r3, [r7, #0]
8001b08: 2b01 cmp r3, #1
8001b0a: d105 bne.n 8001b18 <HAL_RCC_ClockConfig+0x34>
8001b0c: 4b8a ldr r3, [pc, #552] @ (8001d38 <HAL_RCC_ClockConfig+0x254>)
8001b0e: 681b ldr r3, [r3, #0]
8001b10: 4a89 ldr r2, [pc, #548] @ (8001d38 <HAL_RCC_ClockConfig+0x254>)
8001b12: f043 0304 orr.w r3, r3, #4
8001b16: 6013 str r3, [r2, #0]
8001b18: 4b87 ldr r3, [pc, #540] @ (8001d38 <HAL_RCC_ClockConfig+0x254>)
8001b1a: 681b ldr r3, [r3, #0]
8001b1c: f023 0201 bic.w r2, r3, #1
8001b20: 4985 ldr r1, [pc, #532] @ (8001d38 <HAL_RCC_ClockConfig+0x254>)
8001b22: 683b ldr r3, [r7, #0]
8001b24: 4313 orrs r3, r2
8001b26: 600b str r3, [r1, #0]
/* Check that the new number of wait states is taken into account to access the Flash
memory by reading the FLASH_ACR register */
if(__HAL_FLASH_GET_LATENCY() != FLatency)
8001b28: 4b83 ldr r3, [pc, #524] @ (8001d38 <HAL_RCC_ClockConfig+0x254>)
8001b2a: 681b ldr r3, [r3, #0]
8001b2c: f003 0301 and.w r3, r3, #1
8001b30: 683a ldr r2, [r7, #0]
8001b32: 429a cmp r2, r3
8001b34: d001 beq.n 8001b3a <HAL_RCC_ClockConfig+0x56>
{
return HAL_ERROR;
8001b36: 2301 movs r3, #1
8001b38: e0f9 b.n 8001d2e <HAL_RCC_ClockConfig+0x24a>
}
}
/*-------------------------- HCLK Configuration --------------------------*/
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
8001b3a: 687b ldr r3, [r7, #4]
8001b3c: 681b ldr r3, [r3, #0]
8001b3e: f003 0302 and.w r3, r3, #2
8001b42: 2b00 cmp r3, #0
8001b44: d008 beq.n 8001b58 <HAL_RCC_ClockConfig+0x74>
{
assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
8001b46: 4b7d ldr r3, [pc, #500] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001b48: 689b ldr r3, [r3, #8]
8001b4a: f023 02f0 bic.w r2, r3, #240 @ 0xf0
8001b4e: 687b ldr r3, [r7, #4]
8001b50: 689b ldr r3, [r3, #8]
8001b52: 497a ldr r1, [pc, #488] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001b54: 4313 orrs r3, r2
8001b56: 608b str r3, [r1, #8]
}
/*------------------------- SYSCLK Configuration ---------------------------*/
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
8001b58: 687b ldr r3, [r7, #4]
8001b5a: 681b ldr r3, [r3, #0]
8001b5c: f003 0301 and.w r3, r3, #1
8001b60: 2b00 cmp r3, #0
8001b62: f000 808e beq.w 8001c82 <HAL_RCC_ClockConfig+0x19e>
{
assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource));
/* HSE is selected as System Clock Source */
if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE)
8001b66: 687b ldr r3, [r7, #4]
8001b68: 685b ldr r3, [r3, #4]
8001b6a: 2b02 cmp r3, #2
8001b6c: d107 bne.n 8001b7e <HAL_RCC_ClockConfig+0x9a>
{
/* Check the HSE ready flag */
if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U)
8001b6e: 4b73 ldr r3, [pc, #460] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001b70: 681b ldr r3, [r3, #0]
8001b72: f403 3300 and.w r3, r3, #131072 @ 0x20000
8001b76: 2b00 cmp r3, #0
8001b78: d121 bne.n 8001bbe <HAL_RCC_ClockConfig+0xda>
{
return HAL_ERROR;
8001b7a: 2301 movs r3, #1
8001b7c: e0d7 b.n 8001d2e <HAL_RCC_ClockConfig+0x24a>
}
}
/* PLL is selected as System Clock Source */
else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK)
8001b7e: 687b ldr r3, [r7, #4]
8001b80: 685b ldr r3, [r3, #4]
8001b82: 2b03 cmp r3, #3
8001b84: d107 bne.n 8001b96 <HAL_RCC_ClockConfig+0xb2>
{
/* Check the PLL ready flag */
if(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U)
8001b86: 4b6d ldr r3, [pc, #436] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001b88: 681b ldr r3, [r3, #0]
8001b8a: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
8001b8e: 2b00 cmp r3, #0
8001b90: d115 bne.n 8001bbe <HAL_RCC_ClockConfig+0xda>
{
return HAL_ERROR;
8001b92: 2301 movs r3, #1
8001b94: e0cb b.n 8001d2e <HAL_RCC_ClockConfig+0x24a>
}
}
/* HSI is selected as System Clock Source */
else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSI)
8001b96: 687b ldr r3, [r7, #4]
8001b98: 685b ldr r3, [r3, #4]
8001b9a: 2b01 cmp r3, #1
8001b9c: d107 bne.n 8001bae <HAL_RCC_ClockConfig+0xca>
{
/* Check the HSI ready flag */
if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U)
8001b9e: 4b67 ldr r3, [pc, #412] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001ba0: 681b ldr r3, [r3, #0]
8001ba2: f003 0302 and.w r3, r3, #2
8001ba6: 2b00 cmp r3, #0
8001ba8: d109 bne.n 8001bbe <HAL_RCC_ClockConfig+0xda>
{
return HAL_ERROR;
8001baa: 2301 movs r3, #1
8001bac: e0bf b.n 8001d2e <HAL_RCC_ClockConfig+0x24a>
}
/* MSI is selected as System Clock Source */
else
{
/* Check the MSI ready flag */
if(__HAL_RCC_GET_FLAG(RCC_FLAG_MSIRDY) == 0U)
8001bae: 4b63 ldr r3, [pc, #396] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001bb0: 681b ldr r3, [r3, #0]
8001bb2: f403 7300 and.w r3, r3, #512 @ 0x200
8001bb6: 2b00 cmp r3, #0
8001bb8: d101 bne.n 8001bbe <HAL_RCC_ClockConfig+0xda>
{
return HAL_ERROR;
8001bba: 2301 movs r3, #1
8001bbc: e0b7 b.n 8001d2e <HAL_RCC_ClockConfig+0x24a>
}
}
__HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource);
8001bbe: 4b5f ldr r3, [pc, #380] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001bc0: 689b ldr r3, [r3, #8]
8001bc2: f023 0203 bic.w r2, r3, #3
8001bc6: 687b ldr r3, [r7, #4]
8001bc8: 685b ldr r3, [r3, #4]
8001bca: 495c ldr r1, [pc, #368] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001bcc: 4313 orrs r3, r2
8001bce: 608b str r3, [r1, #8]
/* Get Start Tick */
tickstart = HAL_GetTick();
8001bd0: f7ff f976 bl 8000ec0 <HAL_GetTick>
8001bd4: 60f8 str r0, [r7, #12]
if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE)
8001bd6: 687b ldr r3, [r7, #4]
8001bd8: 685b ldr r3, [r3, #4]
8001bda: 2b02 cmp r3, #2
8001bdc: d112 bne.n 8001c04 <HAL_RCC_ClockConfig+0x120>
{
while (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_HSE)
8001bde: e00a b.n 8001bf6 <HAL_RCC_ClockConfig+0x112>
{
if((HAL_GetTick() - tickstart ) > CLOCKSWITCH_TIMEOUT_VALUE)
8001be0: f7ff f96e bl 8000ec0 <HAL_GetTick>
8001be4: 4602 mov r2, r0
8001be6: 68fb ldr r3, [r7, #12]
8001be8: 1ad3 subs r3, r2, r3
8001bea: f241 3288 movw r2, #5000 @ 0x1388
8001bee: 4293 cmp r3, r2
8001bf0: d901 bls.n 8001bf6 <HAL_RCC_ClockConfig+0x112>
{
return HAL_TIMEOUT;
8001bf2: 2303 movs r3, #3
8001bf4: e09b b.n 8001d2e <HAL_RCC_ClockConfig+0x24a>
while (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_HSE)
8001bf6: 4b51 ldr r3, [pc, #324] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001bf8: 689b ldr r3, [r3, #8]
8001bfa: f003 030c and.w r3, r3, #12
8001bfe: 2b08 cmp r3, #8
8001c00: d1ee bne.n 8001be0 <HAL_RCC_ClockConfig+0xfc>
8001c02: e03e b.n 8001c82 <HAL_RCC_ClockConfig+0x19e>
}
}
}
else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK)
8001c04: 687b ldr r3, [r7, #4]
8001c06: 685b ldr r3, [r3, #4]
8001c08: 2b03 cmp r3, #3
8001c0a: d112 bne.n 8001c32 <HAL_RCC_ClockConfig+0x14e>
{
while (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_PLLCLK)
8001c0c: e00a b.n 8001c24 <HAL_RCC_ClockConfig+0x140>
{
if((HAL_GetTick() - tickstart ) > CLOCKSWITCH_TIMEOUT_VALUE)
8001c0e: f7ff f957 bl 8000ec0 <HAL_GetTick>
8001c12: 4602 mov r2, r0
8001c14: 68fb ldr r3, [r7, #12]
8001c16: 1ad3 subs r3, r2, r3
8001c18: f241 3288 movw r2, #5000 @ 0x1388
8001c1c: 4293 cmp r3, r2
8001c1e: d901 bls.n 8001c24 <HAL_RCC_ClockConfig+0x140>
{
return HAL_TIMEOUT;
8001c20: 2303 movs r3, #3
8001c22: e084 b.n 8001d2e <HAL_RCC_ClockConfig+0x24a>
while (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_PLLCLK)
8001c24: 4b45 ldr r3, [pc, #276] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001c26: 689b ldr r3, [r3, #8]
8001c28: f003 030c and.w r3, r3, #12
8001c2c: 2b0c cmp r3, #12
8001c2e: d1ee bne.n 8001c0e <HAL_RCC_ClockConfig+0x12a>
8001c30: e027 b.n 8001c82 <HAL_RCC_ClockConfig+0x19e>
}
}
}
else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSI)
8001c32: 687b ldr r3, [r7, #4]
8001c34: 685b ldr r3, [r3, #4]
8001c36: 2b01 cmp r3, #1
8001c38: d11d bne.n 8001c76 <HAL_RCC_ClockConfig+0x192>
{
while (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_HSI)
8001c3a: e00a b.n 8001c52 <HAL_RCC_ClockConfig+0x16e>
{
if((HAL_GetTick() - tickstart ) > CLOCKSWITCH_TIMEOUT_VALUE)
8001c3c: f7ff f940 bl 8000ec0 <HAL_GetTick>
8001c40: 4602 mov r2, r0
8001c42: 68fb ldr r3, [r7, #12]
8001c44: 1ad3 subs r3, r2, r3
8001c46: f241 3288 movw r2, #5000 @ 0x1388
8001c4a: 4293 cmp r3, r2
8001c4c: d901 bls.n 8001c52 <HAL_RCC_ClockConfig+0x16e>
{
return HAL_TIMEOUT;
8001c4e: 2303 movs r3, #3
8001c50: e06d b.n 8001d2e <HAL_RCC_ClockConfig+0x24a>
while (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_HSI)
8001c52: 4b3a ldr r3, [pc, #232] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001c54: 689b ldr r3, [r3, #8]
8001c56: f003 030c and.w r3, r3, #12
8001c5a: 2b04 cmp r3, #4
8001c5c: d1ee bne.n 8001c3c <HAL_RCC_ClockConfig+0x158>
8001c5e: e010 b.n 8001c82 <HAL_RCC_ClockConfig+0x19e>
}
else
{
while(__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_MSI)
{
if((HAL_GetTick() - tickstart ) > CLOCKSWITCH_TIMEOUT_VALUE)
8001c60: f7ff f92e bl 8000ec0 <HAL_GetTick>
8001c64: 4602 mov r2, r0
8001c66: 68fb ldr r3, [r7, #12]
8001c68: 1ad3 subs r3, r2, r3
8001c6a: f241 3288 movw r2, #5000 @ 0x1388
8001c6e: 4293 cmp r3, r2
8001c70: d901 bls.n 8001c76 <HAL_RCC_ClockConfig+0x192>
{
return HAL_TIMEOUT;
8001c72: 2303 movs r3, #3
8001c74: e05b b.n 8001d2e <HAL_RCC_ClockConfig+0x24a>
while(__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_MSI)
8001c76: 4b31 ldr r3, [pc, #196] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001c78: 689b ldr r3, [r3, #8]
8001c7a: f003 030c and.w r3, r3, #12
8001c7e: 2b00 cmp r3, #0
8001c80: d1ee bne.n 8001c60 <HAL_RCC_ClockConfig+0x17c>
}
}
}
}
/* Decreasing the number of wait states because of lower CPU frequency */
if(FLatency < __HAL_FLASH_GET_LATENCY())
8001c82: 4b2d ldr r3, [pc, #180] @ (8001d38 <HAL_RCC_ClockConfig+0x254>)
8001c84: 681b ldr r3, [r3, #0]
8001c86: f003 0301 and.w r3, r3, #1
8001c8a: 683a ldr r2, [r7, #0]
8001c8c: 429a cmp r2, r3
8001c8e: d219 bcs.n 8001cc4 <HAL_RCC_ClockConfig+0x1e0>
{
/* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
__HAL_FLASH_SET_LATENCY(FLatency);
8001c90: 683b ldr r3, [r7, #0]
8001c92: 2b01 cmp r3, #1
8001c94: d105 bne.n 8001ca2 <HAL_RCC_ClockConfig+0x1be>
8001c96: 4b28 ldr r3, [pc, #160] @ (8001d38 <HAL_RCC_ClockConfig+0x254>)
8001c98: 681b ldr r3, [r3, #0]
8001c9a: 4a27 ldr r2, [pc, #156] @ (8001d38 <HAL_RCC_ClockConfig+0x254>)
8001c9c: f043 0304 orr.w r3, r3, #4
8001ca0: 6013 str r3, [r2, #0]
8001ca2: 4b25 ldr r3, [pc, #148] @ (8001d38 <HAL_RCC_ClockConfig+0x254>)
8001ca4: 681b ldr r3, [r3, #0]
8001ca6: f023 0201 bic.w r2, r3, #1
8001caa: 4923 ldr r1, [pc, #140] @ (8001d38 <HAL_RCC_ClockConfig+0x254>)
8001cac: 683b ldr r3, [r7, #0]
8001cae: 4313 orrs r3, r2
8001cb0: 600b str r3, [r1, #0]
/* Check that the new number of wait states is taken into account to access the Flash
memory by reading the FLASH_ACR register */
if(__HAL_FLASH_GET_LATENCY() != FLatency)
8001cb2: 4b21 ldr r3, [pc, #132] @ (8001d38 <HAL_RCC_ClockConfig+0x254>)
8001cb4: 681b ldr r3, [r3, #0]
8001cb6: f003 0301 and.w r3, r3, #1
8001cba: 683a ldr r2, [r7, #0]
8001cbc: 429a cmp r2, r3
8001cbe: d001 beq.n 8001cc4 <HAL_RCC_ClockConfig+0x1e0>
{
return HAL_ERROR;
8001cc0: 2301 movs r3, #1
8001cc2: e034 b.n 8001d2e <HAL_RCC_ClockConfig+0x24a>
}
}
/*-------------------------- PCLK1 Configuration ---------------------------*/
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
8001cc4: 687b ldr r3, [r7, #4]
8001cc6: 681b ldr r3, [r3, #0]
8001cc8: f003 0304 and.w r3, r3, #4
8001ccc: 2b00 cmp r3, #0
8001cce: d008 beq.n 8001ce2 <HAL_RCC_ClockConfig+0x1fe>
{
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider);
8001cd0: 4b1a ldr r3, [pc, #104] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001cd2: 689b ldr r3, [r3, #8]
8001cd4: f423 62e0 bic.w r2, r3, #1792 @ 0x700
8001cd8: 687b ldr r3, [r7, #4]
8001cda: 68db ldr r3, [r3, #12]
8001cdc: 4917 ldr r1, [pc, #92] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001cde: 4313 orrs r3, r2
8001ce0: 608b str r3, [r1, #8]
}
/*-------------------------- PCLK2 Configuration ---------------------------*/
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
8001ce2: 687b ldr r3, [r7, #4]
8001ce4: 681b ldr r3, [r3, #0]
8001ce6: f003 0308 and.w r3, r3, #8
8001cea: 2b00 cmp r3, #0
8001cec: d009 beq.n 8001d02 <HAL_RCC_ClockConfig+0x21e>
{
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3U));
8001cee: 4b13 ldr r3, [pc, #76] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001cf0: 689b ldr r3, [r3, #8]
8001cf2: f423 5260 bic.w r2, r3, #14336 @ 0x3800
8001cf6: 687b ldr r3, [r7, #4]
8001cf8: 691b ldr r3, [r3, #16]
8001cfa: 00db lsls r3, r3, #3
8001cfc: 490f ldr r1, [pc, #60] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001cfe: 4313 orrs r3, r2
8001d00: 608b str r3, [r1, #8]
}
/* Update the SystemCoreClock global variable */
SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE)>> RCC_CFGR_HPRE_Pos];
8001d02: f000 f823 bl 8001d4c <HAL_RCC_GetSysClockFreq>
8001d06: 4602 mov r2, r0
8001d08: 4b0c ldr r3, [pc, #48] @ (8001d3c <HAL_RCC_ClockConfig+0x258>)
8001d0a: 689b ldr r3, [r3, #8]
8001d0c: 091b lsrs r3, r3, #4
8001d0e: f003 030f and.w r3, r3, #15
8001d12: 490b ldr r1, [pc, #44] @ (8001d40 <HAL_RCC_ClockConfig+0x25c>)
8001d14: 5ccb ldrb r3, [r1, r3]
8001d16: fa22 f303 lsr.w r3, r2, r3
8001d1a: 4a0a ldr r2, [pc, #40] @ (8001d44 <HAL_RCC_ClockConfig+0x260>)
8001d1c: 6013 str r3, [r2, #0]
/* Configure the source of time base considering new system clocks settings*/
status = HAL_InitTick(uwTickPrio);
8001d1e: 4b0a ldr r3, [pc, #40] @ (8001d48 <HAL_RCC_ClockConfig+0x264>)
8001d20: 681b ldr r3, [r3, #0]
8001d22: 4618 mov r0, r3
8001d24: f7ff f880 bl 8000e28 <HAL_InitTick>
8001d28: 4603 mov r3, r0
8001d2a: 72fb strb r3, [r7, #11]
return status;
8001d2c: 7afb ldrb r3, [r7, #11]
}
8001d2e: 4618 mov r0, r3
8001d30: 3710 adds r7, #16
8001d32: 46bd mov sp, r7
8001d34: bd80 pop {r7, pc}
8001d36: bf00 nop
8001d38: 40023c00 .word 0x40023c00
8001d3c: 40023800 .word 0x40023800
8001d40: 08003234 .word 0x08003234
8001d44: 20000004 .word 0x20000004
8001d48: 20000008 .word 0x20000008
08001d4c <HAL_RCC_GetSysClockFreq>:
* right SYSCLK value. Otherwise, any configuration based on this function will be incorrect.
*
* @retval SYSCLK frequency
*/
uint32_t HAL_RCC_GetSysClockFreq(void)
{
8001d4c: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr}
8001d50: b08e sub sp, #56 @ 0x38
8001d52: af00 add r7, sp, #0
uint32_t tmpreg, pllm, plld, pllvco, msiclkrange, sysclockfreq;
tmpreg = RCC->CFGR;
8001d54: 4b58 ldr r3, [pc, #352] @ (8001eb8 <HAL_RCC_GetSysClockFreq+0x16c>)
8001d56: 689b ldr r3, [r3, #8]
8001d58: 62fb str r3, [r7, #44] @ 0x2c
/* Get SYSCLK source -------------------------------------------------------*/
switch (tmpreg & RCC_CFGR_SWS)
8001d5a: 6afb ldr r3, [r7, #44] @ 0x2c
8001d5c: f003 030c and.w r3, r3, #12
8001d60: 2b0c cmp r3, #12
8001d62: d00d beq.n 8001d80 <HAL_RCC_GetSysClockFreq+0x34>
8001d64: 2b0c cmp r3, #12
8001d66: f200 8092 bhi.w 8001e8e <HAL_RCC_GetSysClockFreq+0x142>
8001d6a: 2b04 cmp r3, #4
8001d6c: d002 beq.n 8001d74 <HAL_RCC_GetSysClockFreq+0x28>
8001d6e: 2b08 cmp r3, #8
8001d70: d003 beq.n 8001d7a <HAL_RCC_GetSysClockFreq+0x2e>
8001d72: e08c b.n 8001e8e <HAL_RCC_GetSysClockFreq+0x142>
{
case RCC_SYSCLKSOURCE_STATUS_HSI: /* HSI used as system clock source */
{
sysclockfreq = HSI_VALUE;
8001d74: 4b51 ldr r3, [pc, #324] @ (8001ebc <HAL_RCC_GetSysClockFreq+0x170>)
8001d76: 633b str r3, [r7, #48] @ 0x30
break;
8001d78: e097 b.n 8001eaa <HAL_RCC_GetSysClockFreq+0x15e>
}
case RCC_SYSCLKSOURCE_STATUS_HSE: /* HSE used as system clock */
{
sysclockfreq = HSE_VALUE;
8001d7a: 4b51 ldr r3, [pc, #324] @ (8001ec0 <HAL_RCC_GetSysClockFreq+0x174>)
8001d7c: 633b str r3, [r7, #48] @ 0x30
break;
8001d7e: e094 b.n 8001eaa <HAL_RCC_GetSysClockFreq+0x15e>
}
case RCC_SYSCLKSOURCE_STATUS_PLLCLK: /* PLL used as system clock */
{
pllm = PLLMulTable[(uint32_t)(tmpreg & RCC_CFGR_PLLMUL) >> RCC_CFGR_PLLMUL_Pos];
8001d80: 6afb ldr r3, [r7, #44] @ 0x2c
8001d82: 0c9b lsrs r3, r3, #18
8001d84: f003 020f and.w r2, r3, #15
8001d88: 4b4e ldr r3, [pc, #312] @ (8001ec4 <HAL_RCC_GetSysClockFreq+0x178>)
8001d8a: 5c9b ldrb r3, [r3, r2]
8001d8c: 62bb str r3, [r7, #40] @ 0x28
plld = ((uint32_t)(tmpreg & RCC_CFGR_PLLDIV) >> RCC_CFGR_PLLDIV_Pos) + 1U;
8001d8e: 6afb ldr r3, [r7, #44] @ 0x2c
8001d90: 0d9b lsrs r3, r3, #22
8001d92: f003 0303 and.w r3, r3, #3
8001d96: 3301 adds r3, #1
8001d98: 627b str r3, [r7, #36] @ 0x24
if (__HAL_RCC_GET_PLL_OSCSOURCE() != RCC_PLLSOURCE_HSI)
8001d9a: 4b47 ldr r3, [pc, #284] @ (8001eb8 <HAL_RCC_GetSysClockFreq+0x16c>)
8001d9c: 689b ldr r3, [r3, #8]
8001d9e: f403 3380 and.w r3, r3, #65536 @ 0x10000
8001da2: 2b00 cmp r3, #0
8001da4: d021 beq.n 8001dea <HAL_RCC_GetSysClockFreq+0x9e>
{
/* HSE used as PLL clock source */
pllvco = (uint32_t)(((uint64_t)HSE_VALUE * (uint64_t)pllm) / (uint64_t)plld);
8001da6: 6abb ldr r3, [r7, #40] @ 0x28
8001da8: 2200 movs r2, #0
8001daa: 61bb str r3, [r7, #24]
8001dac: 61fa str r2, [r7, #28]
8001dae: 4b44 ldr r3, [pc, #272] @ (8001ec0 <HAL_RCC_GetSysClockFreq+0x174>)
8001db0: e9d7 8906 ldrd r8, r9, [r7, #24]
8001db4: 464a mov r2, r9
8001db6: fb03 f202 mul.w r2, r3, r2
8001dba: 2300 movs r3, #0
8001dbc: 4644 mov r4, r8
8001dbe: fb04 f303 mul.w r3, r4, r3
8001dc2: 4413 add r3, r2
8001dc4: 4a3e ldr r2, [pc, #248] @ (8001ec0 <HAL_RCC_GetSysClockFreq+0x174>)
8001dc6: 4644 mov r4, r8
8001dc8: fba4 0102 umull r0, r1, r4, r2
8001dcc: 440b add r3, r1
8001dce: 4619 mov r1, r3
8001dd0: 6a7b ldr r3, [r7, #36] @ 0x24
8001dd2: 2200 movs r2, #0
8001dd4: 613b str r3, [r7, #16]
8001dd6: 617a str r2, [r7, #20]
8001dd8: e9d7 2304 ldrd r2, r3, [r7, #16]
8001ddc: f7fe f9ce bl 800017c <__aeabi_uldivmod>
8001de0: 4602 mov r2, r0
8001de2: 460b mov r3, r1
8001de4: 4613 mov r3, r2
8001de6: 637b str r3, [r7, #52] @ 0x34
8001de8: e04e b.n 8001e88 <HAL_RCC_GetSysClockFreq+0x13c>
}
else
{
/* HSI used as PLL clock source */
pllvco = (uint32_t)(((uint64_t)HSI_VALUE * (uint64_t)pllm) / (uint64_t)plld);
8001dea: 6abb ldr r3, [r7, #40] @ 0x28
8001dec: 2200 movs r2, #0
8001dee: 469a mov sl, r3
8001df0: 4693 mov fp, r2
8001df2: 4652 mov r2, sl
8001df4: 465b mov r3, fp
8001df6: f04f 0000 mov.w r0, #0
8001dfa: f04f 0100 mov.w r1, #0
8001dfe: 0159 lsls r1, r3, #5
8001e00: ea41 61d2 orr.w r1, r1, r2, lsr #27
8001e04: 0150 lsls r0, r2, #5
8001e06: 4602 mov r2, r0
8001e08: 460b mov r3, r1
8001e0a: ebb2 080a subs.w r8, r2, sl
8001e0e: eb63 090b sbc.w r9, r3, fp
8001e12: f04f 0200 mov.w r2, #0
8001e16: f04f 0300 mov.w r3, #0
8001e1a: ea4f 1389 mov.w r3, r9, lsl #6
8001e1e: ea43 6398 orr.w r3, r3, r8, lsr #26
8001e22: ea4f 1288 mov.w r2, r8, lsl #6
8001e26: ebb2 0408 subs.w r4, r2, r8
8001e2a: eb63 0509 sbc.w r5, r3, r9
8001e2e: f04f 0200 mov.w r2, #0
8001e32: f04f 0300 mov.w r3, #0
8001e36: 00eb lsls r3, r5, #3
8001e38: ea43 7354 orr.w r3, r3, r4, lsr #29
8001e3c: 00e2 lsls r2, r4, #3
8001e3e: 4614 mov r4, r2
8001e40: 461d mov r5, r3
8001e42: eb14 030a adds.w r3, r4, sl
8001e46: 603b str r3, [r7, #0]
8001e48: eb45 030b adc.w r3, r5, fp
8001e4c: 607b str r3, [r7, #4]
8001e4e: f04f 0200 mov.w r2, #0
8001e52: f04f 0300 mov.w r3, #0
8001e56: e9d7 4500 ldrd r4, r5, [r7]
8001e5a: 4629 mov r1, r5
8001e5c: 028b lsls r3, r1, #10
8001e5e: 4620 mov r0, r4
8001e60: 4629 mov r1, r5
8001e62: 4604 mov r4, r0
8001e64: ea43 5394 orr.w r3, r3, r4, lsr #22
8001e68: 4601 mov r1, r0
8001e6a: 028a lsls r2, r1, #10
8001e6c: 4610 mov r0, r2
8001e6e: 4619 mov r1, r3
8001e70: 6a7b ldr r3, [r7, #36] @ 0x24
8001e72: 2200 movs r2, #0
8001e74: 60bb str r3, [r7, #8]
8001e76: 60fa str r2, [r7, #12]
8001e78: e9d7 2302 ldrd r2, r3, [r7, #8]
8001e7c: f7fe f97e bl 800017c <__aeabi_uldivmod>
8001e80: 4602 mov r2, r0
8001e82: 460b mov r3, r1
8001e84: 4613 mov r3, r2
8001e86: 637b str r3, [r7, #52] @ 0x34
}
sysclockfreq = pllvco;
8001e88: 6b7b ldr r3, [r7, #52] @ 0x34
8001e8a: 633b str r3, [r7, #48] @ 0x30
break;
8001e8c: e00d b.n 8001eaa <HAL_RCC_GetSysClockFreq+0x15e>
}
case RCC_SYSCLKSOURCE_STATUS_MSI: /* MSI used as system clock source */
default: /* MSI used as system clock */
{
msiclkrange = (RCC->ICSCR & RCC_ICSCR_MSIRANGE ) >> RCC_ICSCR_MSIRANGE_Pos;
8001e8e: 4b0a ldr r3, [pc, #40] @ (8001eb8 <HAL_RCC_GetSysClockFreq+0x16c>)
8001e90: 685b ldr r3, [r3, #4]
8001e92: 0b5b lsrs r3, r3, #13
8001e94: f003 0307 and.w r3, r3, #7
8001e98: 623b str r3, [r7, #32]
sysclockfreq = (32768U * (1UL << (msiclkrange + 1U)));
8001e9a: 6a3b ldr r3, [r7, #32]
8001e9c: 3301 adds r3, #1
8001e9e: f44f 4200 mov.w r2, #32768 @ 0x8000
8001ea2: fa02 f303 lsl.w r3, r2, r3
8001ea6: 633b str r3, [r7, #48] @ 0x30
break;
8001ea8: bf00 nop
}
}
return sysclockfreq;
8001eaa: 6b3b ldr r3, [r7, #48] @ 0x30
}
8001eac: 4618 mov r0, r3
8001eae: 3738 adds r7, #56 @ 0x38
8001eb0: 46bd mov sp, r7
8001eb2: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc}
8001eb6: bf00 nop
8001eb8: 40023800 .word 0x40023800
8001ebc: 00f42400 .word 0x00f42400
8001ec0: 016e3600 .word 0x016e3600
8001ec4: 08003228 .word 0x08003228
08001ec8 <RCC_SetFlashLatencyFromMSIRange>:
voltage range
* @param MSIrange MSI range value from RCC_MSIRANGE_0 to RCC_MSIRANGE_6
* @retval HAL status
*/
static HAL_StatusTypeDef RCC_SetFlashLatencyFromMSIRange(uint32_t MSIrange)
{
8001ec8: b480 push {r7}
8001eca: b087 sub sp, #28
8001ecc: af00 add r7, sp, #0
8001ece: 6078 str r0, [r7, #4]
uint32_t vos;
uint32_t latency = FLASH_LATENCY_0; /* default value 0WS */
8001ed0: 2300 movs r3, #0
8001ed2: 613b str r3, [r7, #16]
/* HCLK can reach 4 MHz only if AHB prescaler = 1 */
if (READ_BIT(RCC->CFGR, RCC_CFGR_HPRE) == RCC_SYSCLK_DIV1)
8001ed4: 4b29 ldr r3, [pc, #164] @ (8001f7c <RCC_SetFlashLatencyFromMSIRange+0xb4>)
8001ed6: 689b ldr r3, [r3, #8]
8001ed8: f003 03f0 and.w r3, r3, #240 @ 0xf0
8001edc: 2b00 cmp r3, #0
8001ede: d12c bne.n 8001f3a <RCC_SetFlashLatencyFromMSIRange+0x72>
{
if(__HAL_RCC_PWR_IS_CLK_ENABLED())
8001ee0: 4b26 ldr r3, [pc, #152] @ (8001f7c <RCC_SetFlashLatencyFromMSIRange+0xb4>)
8001ee2: 6a5b ldr r3, [r3, #36] @ 0x24
8001ee4: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
8001ee8: 2b00 cmp r3, #0
8001eea: d005 beq.n 8001ef8 <RCC_SetFlashLatencyFromMSIRange+0x30>
{
vos = READ_BIT(PWR->CR, PWR_CR_VOS);
8001eec: 4b24 ldr r3, [pc, #144] @ (8001f80 <RCC_SetFlashLatencyFromMSIRange+0xb8>)
8001eee: 681b ldr r3, [r3, #0]
8001ef0: f403 53c0 and.w r3, r3, #6144 @ 0x1800
8001ef4: 617b str r3, [r7, #20]
8001ef6: e016 b.n 8001f26 <RCC_SetFlashLatencyFromMSIRange+0x5e>
}
else
{
__HAL_RCC_PWR_CLK_ENABLE();
8001ef8: 4b20 ldr r3, [pc, #128] @ (8001f7c <RCC_SetFlashLatencyFromMSIRange+0xb4>)
8001efa: 6a5b ldr r3, [r3, #36] @ 0x24
8001efc: 4a1f ldr r2, [pc, #124] @ (8001f7c <RCC_SetFlashLatencyFromMSIRange+0xb4>)
8001efe: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000
8001f02: 6253 str r3, [r2, #36] @ 0x24
8001f04: 4b1d ldr r3, [pc, #116] @ (8001f7c <RCC_SetFlashLatencyFromMSIRange+0xb4>)
8001f06: 6a5b ldr r3, [r3, #36] @ 0x24
8001f08: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
8001f0c: 60fb str r3, [r7, #12]
8001f0e: 68fb ldr r3, [r7, #12]
vos = READ_BIT(PWR->CR, PWR_CR_VOS);
8001f10: 4b1b ldr r3, [pc, #108] @ (8001f80 <RCC_SetFlashLatencyFromMSIRange+0xb8>)
8001f12: 681b ldr r3, [r3, #0]
8001f14: f403 53c0 and.w r3, r3, #6144 @ 0x1800
8001f18: 617b str r3, [r7, #20]
__HAL_RCC_PWR_CLK_DISABLE();
8001f1a: 4b18 ldr r3, [pc, #96] @ (8001f7c <RCC_SetFlashLatencyFromMSIRange+0xb4>)
8001f1c: 6a5b ldr r3, [r3, #36] @ 0x24
8001f1e: 4a17 ldr r2, [pc, #92] @ (8001f7c <RCC_SetFlashLatencyFromMSIRange+0xb4>)
8001f20: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000
8001f24: 6253 str r3, [r2, #36] @ 0x24
}
/* Check if need to set latency 1 only for Range 3 & HCLK = 4MHz */
if((vos == PWR_REGULATOR_VOLTAGE_SCALE3) && (MSIrange == RCC_MSIRANGE_6))
8001f26: 697b ldr r3, [r7, #20]
8001f28: f5b3 5fc0 cmp.w r3, #6144 @ 0x1800
8001f2c: d105 bne.n 8001f3a <RCC_SetFlashLatencyFromMSIRange+0x72>
8001f2e: 687b ldr r3, [r7, #4]
8001f30: f5b3 4f40 cmp.w r3, #49152 @ 0xc000
8001f34: d101 bne.n 8001f3a <RCC_SetFlashLatencyFromMSIRange+0x72>
{
latency = FLASH_LATENCY_1; /* 1WS */
8001f36: 2301 movs r3, #1
8001f38: 613b str r3, [r7, #16]
}
}
__HAL_FLASH_SET_LATENCY(latency);
8001f3a: 693b ldr r3, [r7, #16]
8001f3c: 2b01 cmp r3, #1
8001f3e: d105 bne.n 8001f4c <RCC_SetFlashLatencyFromMSIRange+0x84>
8001f40: 4b10 ldr r3, [pc, #64] @ (8001f84 <RCC_SetFlashLatencyFromMSIRange+0xbc>)
8001f42: 681b ldr r3, [r3, #0]
8001f44: 4a0f ldr r2, [pc, #60] @ (8001f84 <RCC_SetFlashLatencyFromMSIRange+0xbc>)
8001f46: f043 0304 orr.w r3, r3, #4
8001f4a: 6013 str r3, [r2, #0]
8001f4c: 4b0d ldr r3, [pc, #52] @ (8001f84 <RCC_SetFlashLatencyFromMSIRange+0xbc>)
8001f4e: 681b ldr r3, [r3, #0]
8001f50: f023 0201 bic.w r2, r3, #1
8001f54: 490b ldr r1, [pc, #44] @ (8001f84 <RCC_SetFlashLatencyFromMSIRange+0xbc>)
8001f56: 693b ldr r3, [r7, #16]
8001f58: 4313 orrs r3, r2
8001f5a: 600b str r3, [r1, #0]
/* Check that the new number of wait states is taken into account to access the Flash
memory by reading the FLASH_ACR register */
if(__HAL_FLASH_GET_LATENCY() != latency)
8001f5c: 4b09 ldr r3, [pc, #36] @ (8001f84 <RCC_SetFlashLatencyFromMSIRange+0xbc>)
8001f5e: 681b ldr r3, [r3, #0]
8001f60: f003 0301 and.w r3, r3, #1
8001f64: 693a ldr r2, [r7, #16]
8001f66: 429a cmp r2, r3
8001f68: d001 beq.n 8001f6e <RCC_SetFlashLatencyFromMSIRange+0xa6>
{
return HAL_ERROR;
8001f6a: 2301 movs r3, #1
8001f6c: e000 b.n 8001f70 <RCC_SetFlashLatencyFromMSIRange+0xa8>
}
return HAL_OK;
8001f6e: 2300 movs r3, #0
}
8001f70: 4618 mov r0, r3
8001f72: 371c adds r7, #28
8001f74: 46bd mov sp, r7
8001f76: bc80 pop {r7}
8001f78: 4770 bx lr
8001f7a: bf00 nop
8001f7c: 40023800 .word 0x40023800
8001f80: 40007000 .word 0x40007000
8001f84: 40023c00 .word 0x40023c00
08001f88 <HAL_SPI_Init>:
* @param hspi pointer to a SPI_HandleTypeDef structure that contains
* the configuration information for SPI module.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_SPI_Init(SPI_HandleTypeDef *hspi)
{
8001f88: b580 push {r7, lr}
8001f8a: b082 sub sp, #8
8001f8c: af00 add r7, sp, #0
8001f8e: 6078 str r0, [r7, #4]
/* Check the SPI handle allocation */
if (hspi == NULL)
8001f90: 687b ldr r3, [r7, #4]
8001f92: 2b00 cmp r3, #0
8001f94: d101 bne.n 8001f9a <HAL_SPI_Init+0x12>
{
return HAL_ERROR;
8001f96: 2301 movs r3, #1
8001f98: e07b b.n 8002092 <HAL_SPI_Init+0x10a>
assert_param(IS_SPI_BAUDRATE_PRESCALER(hspi->Init.BaudRatePrescaler));
assert_param(IS_SPI_FIRST_BIT(hspi->Init.FirstBit));
/* TI mode is not supported on all devices in stm32l1xx series.
TIMode parameter is mandatory equal to SPI_TIMODE_DISABLE if TI mode is not supported */
assert_param(IS_SPI_TIMODE(hspi->Init.TIMode));
if (hspi->Init.TIMode == SPI_TIMODE_DISABLE)
8001f9a: 687b ldr r3, [r7, #4]
8001f9c: 6a5b ldr r3, [r3, #36] @ 0x24
8001f9e: 2b00 cmp r3, #0
8001fa0: d108 bne.n 8001fb4 <HAL_SPI_Init+0x2c>
{
assert_param(IS_SPI_CPOL(hspi->Init.CLKPolarity));
assert_param(IS_SPI_CPHA(hspi->Init.CLKPhase));
if (hspi->Init.Mode == SPI_MODE_MASTER)
8001fa2: 687b ldr r3, [r7, #4]
8001fa4: 685b ldr r3, [r3, #4]
8001fa6: f5b3 7f82 cmp.w r3, #260 @ 0x104
8001faa: d009 beq.n 8001fc0 <HAL_SPI_Init+0x38>
assert_param(IS_SPI_BAUDRATE_PRESCALER(hspi->Init.BaudRatePrescaler));
}
else
{
/* Baudrate prescaler not use in Motoraola Slave mode. force to default value */
hspi->Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
8001fac: 687b ldr r3, [r7, #4]
8001fae: 2200 movs r2, #0
8001fb0: 61da str r2, [r3, #28]
8001fb2: e005 b.n 8001fc0 <HAL_SPI_Init+0x38>
else
{
assert_param(IS_SPI_BAUDRATE_PRESCALER(hspi->Init.BaudRatePrescaler));
/* Force polarity and phase to TI protocaol requirements */
hspi->Init.CLKPolarity = SPI_POLARITY_LOW;
8001fb4: 687b ldr r3, [r7, #4]
8001fb6: 2200 movs r2, #0
8001fb8: 611a str r2, [r3, #16]
hspi->Init.CLKPhase = SPI_PHASE_1EDGE;
8001fba: 687b ldr r3, [r7, #4]
8001fbc: 2200 movs r2, #0
8001fbe: 615a str r2, [r3, #20]
if (hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE)
{
assert_param(IS_SPI_CRC_POLYNOMIAL(hspi->Init.CRCPolynomial));
}
#else
hspi->Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
8001fc0: 687b ldr r3, [r7, #4]
8001fc2: 2200 movs r2, #0
8001fc4: 629a str r2, [r3, #40] @ 0x28
#endif /* USE_SPI_CRC */
if (hspi->State == HAL_SPI_STATE_RESET)
8001fc6: 687b ldr r3, [r7, #4]
8001fc8: f893 3051 ldrb.w r3, [r3, #81] @ 0x51
8001fcc: b2db uxtb r3, r3
8001fce: 2b00 cmp r3, #0
8001fd0: d106 bne.n 8001fe0 <HAL_SPI_Init+0x58>
{
/* Allocate lock resource and initialize it */
hspi->Lock = HAL_UNLOCKED;
8001fd2: 687b ldr r3, [r7, #4]
8001fd4: 2200 movs r2, #0
8001fd6: f883 2050 strb.w r2, [r3, #80] @ 0x50
/* Init the low level hardware : GPIO, CLOCK, NVIC... */
hspi->MspInitCallback(hspi);
#else
/* Init the low level hardware : GPIO, CLOCK, NVIC... */
HAL_SPI_MspInit(hspi);
8001fda: 6878 ldr r0, [r7, #4]
8001fdc: f7fe fd12 bl 8000a04 <HAL_SPI_MspInit>
#endif /* USE_HAL_SPI_REGISTER_CALLBACKS */
}
hspi->State = HAL_SPI_STATE_BUSY;
8001fe0: 687b ldr r3, [r7, #4]
8001fe2: 2202 movs r2, #2
8001fe4: f883 2051 strb.w r2, [r3, #81] @ 0x51
/* Disable the selected SPI peripheral */
__HAL_SPI_DISABLE(hspi);
8001fe8: 687b ldr r3, [r7, #4]
8001fea: 681b ldr r3, [r3, #0]
8001fec: 681a ldr r2, [r3, #0]
8001fee: 687b ldr r3, [r7, #4]
8001ff0: 681b ldr r3, [r3, #0]
8001ff2: f022 0240 bic.w r2, r2, #64 @ 0x40
8001ff6: 601a str r2, [r3, #0]
/*----------------------- SPIx CR1 & CR2 Configuration ---------------------*/
/* Configure : SPI Mode, Communication Mode, Data size, Clock polarity and phase, NSS management,
Communication speed, First bit and CRC calculation state */
WRITE_REG(hspi->Instance->CR1, ((hspi->Init.Mode & (SPI_CR1_MSTR | SPI_CR1_SSI)) |
8001ff8: 687b ldr r3, [r7, #4]
8001ffa: 685b ldr r3, [r3, #4]
8001ffc: f403 7282 and.w r2, r3, #260 @ 0x104
8002000: 687b ldr r3, [r7, #4]
8002002: 689b ldr r3, [r3, #8]
8002004: f403 4304 and.w r3, r3, #33792 @ 0x8400
8002008: 431a orrs r2, r3
800200a: 687b ldr r3, [r7, #4]
800200c: 68db ldr r3, [r3, #12]
800200e: f403 6300 and.w r3, r3, #2048 @ 0x800
8002012: 431a orrs r2, r3
8002014: 687b ldr r3, [r7, #4]
8002016: 691b ldr r3, [r3, #16]
8002018: f003 0302 and.w r3, r3, #2
800201c: 431a orrs r2, r3
800201e: 687b ldr r3, [r7, #4]
8002020: 695b ldr r3, [r3, #20]
8002022: f003 0301 and.w r3, r3, #1
8002026: 431a orrs r2, r3
8002028: 687b ldr r3, [r7, #4]
800202a: 699b ldr r3, [r3, #24]
800202c: f403 7300 and.w r3, r3, #512 @ 0x200
8002030: 431a orrs r2, r3
8002032: 687b ldr r3, [r7, #4]
8002034: 69db ldr r3, [r3, #28]
8002036: f003 0338 and.w r3, r3, #56 @ 0x38
800203a: 431a orrs r2, r3
800203c: 687b ldr r3, [r7, #4]
800203e: 6a1b ldr r3, [r3, #32]
8002040: f003 0380 and.w r3, r3, #128 @ 0x80
8002044: ea42 0103 orr.w r1, r2, r3
8002048: 687b ldr r3, [r7, #4]
800204a: 6a9b ldr r3, [r3, #40] @ 0x28
800204c: f403 5200 and.w r2, r3, #8192 @ 0x2000
8002050: 687b ldr r3, [r7, #4]
8002052: 681b ldr r3, [r3, #0]
8002054: 430a orrs r2, r1
8002056: 601a str r2, [r3, #0]
(hspi->Init.FirstBit & SPI_CR1_LSBFIRST) |
(hspi->Init.CRCCalculation & SPI_CR1_CRCEN)));
#if defined(SPI_CR2_FRF)
/* Configure : NSS management, TI Mode */
WRITE_REG(hspi->Instance->CR2, (((hspi->Init.NSS >> 16U) & SPI_CR2_SSOE) | (hspi->Init.TIMode & SPI_CR2_FRF)));
8002058: 687b ldr r3, [r7, #4]
800205a: 699b ldr r3, [r3, #24]
800205c: 0c1b lsrs r3, r3, #16
800205e: f003 0104 and.w r1, r3, #4
8002062: 687b ldr r3, [r7, #4]
8002064: 6a5b ldr r3, [r3, #36] @ 0x24
8002066: f003 0210 and.w r2, r3, #16
800206a: 687b ldr r3, [r7, #4]
800206c: 681b ldr r3, [r3, #0]
800206e: 430a orrs r2, r1
8002070: 605a str r2, [r3, #4]
}
#endif /* USE_SPI_CRC */
#if defined(SPI_I2SCFGR_I2SMOD)
/* Activate the SPI mode (Make sure that I2SMOD bit in I2SCFGR register is reset) */
CLEAR_BIT(hspi->Instance->I2SCFGR, SPI_I2SCFGR_I2SMOD);
8002072: 687b ldr r3, [r7, #4]
8002074: 681b ldr r3, [r3, #0]
8002076: 69da ldr r2, [r3, #28]
8002078: 687b ldr r3, [r7, #4]
800207a: 681b ldr r3, [r3, #0]
800207c: f422 6200 bic.w r2, r2, #2048 @ 0x800
8002080: 61da str r2, [r3, #28]
#endif /* SPI_I2SCFGR_I2SMOD */
hspi->ErrorCode = HAL_SPI_ERROR_NONE;
8002082: 687b ldr r3, [r7, #4]
8002084: 2200 movs r2, #0
8002086: 655a str r2, [r3, #84] @ 0x54
hspi->State = HAL_SPI_STATE_READY;
8002088: 687b ldr r3, [r7, #4]
800208a: 2201 movs r2, #1
800208c: f883 2051 strb.w r2, [r3, #81] @ 0x51
return HAL_OK;
8002090: 2300 movs r3, #0
}
8002092: 4618 mov r0, r3
8002094: 3708 adds r7, #8
8002096: 46bd mov sp, r7
8002098: bd80 pop {r7, pc}
0800209a <HAL_SPI_Transmit>:
* @param Size amount of data elements (u8 or u16) to be sent
* @param Timeout Timeout duration in ms
* @retval HAL status
*/
HAL_StatusTypeDef HAL_SPI_Transmit(SPI_HandleTypeDef *hspi, const uint8_t *pData, uint16_t Size, uint32_t Timeout)
{
800209a: b580 push {r7, lr}
800209c: b088 sub sp, #32
800209e: af00 add r7, sp, #0
80020a0: 60f8 str r0, [r7, #12]
80020a2: 60b9 str r1, [r7, #8]
80020a4: 603b str r3, [r7, #0]
80020a6: 4613 mov r3, r2
80020a8: 80fb strh r3, [r7, #6]
/* Check Direction parameter */
assert_param(IS_SPI_DIRECTION_2LINES_OR_1LINE(hspi->Init.Direction));
/* Init tickstart for timeout management*/
tickstart = HAL_GetTick();
80020aa: f7fe ff09 bl 8000ec0 <HAL_GetTick>
80020ae: 61f8 str r0, [r7, #28]
initial_TxXferCount = Size;
80020b0: 88fb ldrh r3, [r7, #6]
80020b2: 837b strh r3, [r7, #26]
if (hspi->State != HAL_SPI_STATE_READY)
80020b4: 68fb ldr r3, [r7, #12]
80020b6: f893 3051 ldrb.w r3, [r3, #81] @ 0x51
80020ba: b2db uxtb r3, r3
80020bc: 2b01 cmp r3, #1
80020be: d001 beq.n 80020c4 <HAL_SPI_Transmit+0x2a>
{
return HAL_BUSY;
80020c0: 2302 movs r3, #2
80020c2: e12a b.n 800231a <HAL_SPI_Transmit+0x280>
}
if ((pData == NULL) || (Size == 0U))
80020c4: 68bb ldr r3, [r7, #8]
80020c6: 2b00 cmp r3, #0
80020c8: d002 beq.n 80020d0 <HAL_SPI_Transmit+0x36>
80020ca: 88fb ldrh r3, [r7, #6]
80020cc: 2b00 cmp r3, #0
80020ce: d101 bne.n 80020d4 <HAL_SPI_Transmit+0x3a>
{
return HAL_ERROR;
80020d0: 2301 movs r3, #1
80020d2: e122 b.n 800231a <HAL_SPI_Transmit+0x280>
}
/* Process Locked */
__HAL_LOCK(hspi);
80020d4: 68fb ldr r3, [r7, #12]
80020d6: f893 3050 ldrb.w r3, [r3, #80] @ 0x50
80020da: 2b01 cmp r3, #1
80020dc: d101 bne.n 80020e2 <HAL_SPI_Transmit+0x48>
80020de: 2302 movs r3, #2
80020e0: e11b b.n 800231a <HAL_SPI_Transmit+0x280>
80020e2: 68fb ldr r3, [r7, #12]
80020e4: 2201 movs r2, #1
80020e6: f883 2050 strb.w r2, [r3, #80] @ 0x50
/* Set the transaction information */
hspi->State = HAL_SPI_STATE_BUSY_TX;
80020ea: 68fb ldr r3, [r7, #12]
80020ec: 2203 movs r2, #3
80020ee: f883 2051 strb.w r2, [r3, #81] @ 0x51
hspi->ErrorCode = HAL_SPI_ERROR_NONE;
80020f2: 68fb ldr r3, [r7, #12]
80020f4: 2200 movs r2, #0
80020f6: 655a str r2, [r3, #84] @ 0x54
hspi->pTxBuffPtr = (const uint8_t *)pData;
80020f8: 68fb ldr r3, [r7, #12]
80020fa: 68ba ldr r2, [r7, #8]
80020fc: 631a str r2, [r3, #48] @ 0x30
hspi->TxXferSize = Size;
80020fe: 68fb ldr r3, [r7, #12]
8002100: 88fa ldrh r2, [r7, #6]
8002102: 869a strh r2, [r3, #52] @ 0x34
hspi->TxXferCount = Size;
8002104: 68fb ldr r3, [r7, #12]
8002106: 88fa ldrh r2, [r7, #6]
8002108: 86da strh r2, [r3, #54] @ 0x36
/*Init field not used in handle to zero */
hspi->pRxBuffPtr = (uint8_t *)NULL;
800210a: 68fb ldr r3, [r7, #12]
800210c: 2200 movs r2, #0
800210e: 639a str r2, [r3, #56] @ 0x38
hspi->RxXferSize = 0U;
8002110: 68fb ldr r3, [r7, #12]
8002112: 2200 movs r2, #0
8002114: 879a strh r2, [r3, #60] @ 0x3c
hspi->RxXferCount = 0U;
8002116: 68fb ldr r3, [r7, #12]
8002118: 2200 movs r2, #0
800211a: 87da strh r2, [r3, #62] @ 0x3e
hspi->TxISR = NULL;
800211c: 68fb ldr r3, [r7, #12]
800211e: 2200 movs r2, #0
8002120: 645a str r2, [r3, #68] @ 0x44
hspi->RxISR = NULL;
8002122: 68fb ldr r3, [r7, #12]
8002124: 2200 movs r2, #0
8002126: 641a str r2, [r3, #64] @ 0x40
/* Configure communication direction : 1Line */
if (hspi->Init.Direction == SPI_DIRECTION_1LINE)
8002128: 68fb ldr r3, [r7, #12]
800212a: 689b ldr r3, [r3, #8]
800212c: f5b3 4f00 cmp.w r3, #32768 @ 0x8000
8002130: d10f bne.n 8002152 <HAL_SPI_Transmit+0xb8>
{
/* Disable SPI Peripheral before set 1Line direction (BIDIOE bit) */
__HAL_SPI_DISABLE(hspi);
8002132: 68fb ldr r3, [r7, #12]
8002134: 681b ldr r3, [r3, #0]
8002136: 681a ldr r2, [r3, #0]
8002138: 68fb ldr r3, [r7, #12]
800213a: 681b ldr r3, [r3, #0]
800213c: f022 0240 bic.w r2, r2, #64 @ 0x40
8002140: 601a str r2, [r3, #0]
SPI_1LINE_TX(hspi);
8002142: 68fb ldr r3, [r7, #12]
8002144: 681b ldr r3, [r3, #0]
8002146: 681a ldr r2, [r3, #0]
8002148: 68fb ldr r3, [r7, #12]
800214a: 681b ldr r3, [r3, #0]
800214c: f442 4280 orr.w r2, r2, #16384 @ 0x4000
8002150: 601a str r2, [r3, #0]
SPI_RESET_CRC(hspi);
}
#endif /* USE_SPI_CRC */
/* Check if the SPI is already enabled */
if ((hspi->Instance->CR1 & SPI_CR1_SPE) != SPI_CR1_SPE)
8002152: 68fb ldr r3, [r7, #12]
8002154: 681b ldr r3, [r3, #0]
8002156: 681b ldr r3, [r3, #0]
8002158: f003 0340 and.w r3, r3, #64 @ 0x40
800215c: 2b40 cmp r3, #64 @ 0x40
800215e: d007 beq.n 8002170 <HAL_SPI_Transmit+0xd6>
{
/* Enable SPI peripheral */
__HAL_SPI_ENABLE(hspi);
8002160: 68fb ldr r3, [r7, #12]
8002162: 681b ldr r3, [r3, #0]
8002164: 681a ldr r2, [r3, #0]
8002166: 68fb ldr r3, [r7, #12]
8002168: 681b ldr r3, [r3, #0]
800216a: f042 0240 orr.w r2, r2, #64 @ 0x40
800216e: 601a str r2, [r3, #0]
}
/* Transmit data in 16 Bit mode */
if (hspi->Init.DataSize == SPI_DATASIZE_16BIT)
8002170: 68fb ldr r3, [r7, #12]
8002172: 68db ldr r3, [r3, #12]
8002174: f5b3 6f00 cmp.w r3, #2048 @ 0x800
8002178: d152 bne.n 8002220 <HAL_SPI_Transmit+0x186>
{
if ((hspi->Init.Mode == SPI_MODE_SLAVE) || (initial_TxXferCount == 0x01U))
800217a: 68fb ldr r3, [r7, #12]
800217c: 685b ldr r3, [r3, #4]
800217e: 2b00 cmp r3, #0
8002180: d002 beq.n 8002188 <HAL_SPI_Transmit+0xee>
8002182: 8b7b ldrh r3, [r7, #26]
8002184: 2b01 cmp r3, #1
8002186: d145 bne.n 8002214 <HAL_SPI_Transmit+0x17a>
{
hspi->Instance->DR = *((const uint16_t *)hspi->pTxBuffPtr);
8002188: 68fb ldr r3, [r7, #12]
800218a: 6b1b ldr r3, [r3, #48] @ 0x30
800218c: 881a ldrh r2, [r3, #0]
800218e: 68fb ldr r3, [r7, #12]
8002190: 681b ldr r3, [r3, #0]
8002192: 60da str r2, [r3, #12]
hspi->pTxBuffPtr += sizeof(uint16_t);
8002194: 68fb ldr r3, [r7, #12]
8002196: 6b1b ldr r3, [r3, #48] @ 0x30
8002198: 1c9a adds r2, r3, #2
800219a: 68fb ldr r3, [r7, #12]
800219c: 631a str r2, [r3, #48] @ 0x30
hspi->TxXferCount--;
800219e: 68fb ldr r3, [r7, #12]
80021a0: 8edb ldrh r3, [r3, #54] @ 0x36
80021a2: b29b uxth r3, r3
80021a4: 3b01 subs r3, #1
80021a6: b29a uxth r2, r3
80021a8: 68fb ldr r3, [r7, #12]
80021aa: 86da strh r2, [r3, #54] @ 0x36
}
/* Transmit data in 16 Bit mode */
while (hspi->TxXferCount > 0U)
80021ac: e032 b.n 8002214 <HAL_SPI_Transmit+0x17a>
{
/* Wait until TXE flag is set to send data */
if (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_TXE))
80021ae: 68fb ldr r3, [r7, #12]
80021b0: 681b ldr r3, [r3, #0]
80021b2: 689b ldr r3, [r3, #8]
80021b4: f003 0302 and.w r3, r3, #2
80021b8: 2b02 cmp r3, #2
80021ba: d112 bne.n 80021e2 <HAL_SPI_Transmit+0x148>
{
hspi->Instance->DR = *((const uint16_t *)hspi->pTxBuffPtr);
80021bc: 68fb ldr r3, [r7, #12]
80021be: 6b1b ldr r3, [r3, #48] @ 0x30
80021c0: 881a ldrh r2, [r3, #0]
80021c2: 68fb ldr r3, [r7, #12]
80021c4: 681b ldr r3, [r3, #0]
80021c6: 60da str r2, [r3, #12]
hspi->pTxBuffPtr += sizeof(uint16_t);
80021c8: 68fb ldr r3, [r7, #12]
80021ca: 6b1b ldr r3, [r3, #48] @ 0x30
80021cc: 1c9a adds r2, r3, #2
80021ce: 68fb ldr r3, [r7, #12]
80021d0: 631a str r2, [r3, #48] @ 0x30
hspi->TxXferCount--;
80021d2: 68fb ldr r3, [r7, #12]
80021d4: 8edb ldrh r3, [r3, #54] @ 0x36
80021d6: b29b uxth r3, r3
80021d8: 3b01 subs r3, #1
80021da: b29a uxth r2, r3
80021dc: 68fb ldr r3, [r7, #12]
80021de: 86da strh r2, [r3, #54] @ 0x36
80021e0: e018 b.n 8002214 <HAL_SPI_Transmit+0x17a>
}
else
{
/* Timeout management */
if ((((HAL_GetTick() - tickstart) >= Timeout) && (Timeout != HAL_MAX_DELAY)) || (Timeout == 0U))
80021e2: f7fe fe6d bl 8000ec0 <HAL_GetTick>
80021e6: 4602 mov r2, r0
80021e8: 69fb ldr r3, [r7, #28]
80021ea: 1ad3 subs r3, r2, r3
80021ec: 683a ldr r2, [r7, #0]
80021ee: 429a cmp r2, r3
80021f0: d803 bhi.n 80021fa <HAL_SPI_Transmit+0x160>
80021f2: 683b ldr r3, [r7, #0]
80021f4: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
80021f8: d102 bne.n 8002200 <HAL_SPI_Transmit+0x166>
80021fa: 683b ldr r3, [r7, #0]
80021fc: 2b00 cmp r3, #0
80021fe: d109 bne.n 8002214 <HAL_SPI_Transmit+0x17a>
{
hspi->State = HAL_SPI_STATE_READY;
8002200: 68fb ldr r3, [r7, #12]
8002202: 2201 movs r2, #1
8002204: f883 2051 strb.w r2, [r3, #81] @ 0x51
__HAL_UNLOCK(hspi);
8002208: 68fb ldr r3, [r7, #12]
800220a: 2200 movs r2, #0
800220c: f883 2050 strb.w r2, [r3, #80] @ 0x50
return HAL_TIMEOUT;
8002210: 2303 movs r3, #3
8002212: e082 b.n 800231a <HAL_SPI_Transmit+0x280>
while (hspi->TxXferCount > 0U)
8002214: 68fb ldr r3, [r7, #12]
8002216: 8edb ldrh r3, [r3, #54] @ 0x36
8002218: b29b uxth r3, r3
800221a: 2b00 cmp r3, #0
800221c: d1c7 bne.n 80021ae <HAL_SPI_Transmit+0x114>
800221e: e053 b.n 80022c8 <HAL_SPI_Transmit+0x22e>
}
}
/* Transmit data in 8 Bit mode */
else
{
if ((hspi->Init.Mode == SPI_MODE_SLAVE) || (initial_TxXferCount == 0x01U))
8002220: 68fb ldr r3, [r7, #12]
8002222: 685b ldr r3, [r3, #4]
8002224: 2b00 cmp r3, #0
8002226: d002 beq.n 800222e <HAL_SPI_Transmit+0x194>
8002228: 8b7b ldrh r3, [r7, #26]
800222a: 2b01 cmp r3, #1
800222c: d147 bne.n 80022be <HAL_SPI_Transmit+0x224>
{
*((__IO uint8_t *)&hspi->Instance->DR) = *((const uint8_t *)hspi->pTxBuffPtr);
800222e: 68fb ldr r3, [r7, #12]
8002230: 6b1a ldr r2, [r3, #48] @ 0x30
8002232: 68fb ldr r3, [r7, #12]
8002234: 681b ldr r3, [r3, #0]
8002236: 330c adds r3, #12
8002238: 7812 ldrb r2, [r2, #0]
800223a: 701a strb r2, [r3, #0]
hspi->pTxBuffPtr += sizeof(uint8_t);
800223c: 68fb ldr r3, [r7, #12]
800223e: 6b1b ldr r3, [r3, #48] @ 0x30
8002240: 1c5a adds r2, r3, #1
8002242: 68fb ldr r3, [r7, #12]
8002244: 631a str r2, [r3, #48] @ 0x30
hspi->TxXferCount--;
8002246: 68fb ldr r3, [r7, #12]
8002248: 8edb ldrh r3, [r3, #54] @ 0x36
800224a: b29b uxth r3, r3
800224c: 3b01 subs r3, #1
800224e: b29a uxth r2, r3
8002250: 68fb ldr r3, [r7, #12]
8002252: 86da strh r2, [r3, #54] @ 0x36
}
while (hspi->TxXferCount > 0U)
8002254: e033 b.n 80022be <HAL_SPI_Transmit+0x224>
{
/* Wait until TXE flag is set to send data */
if (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_TXE))
8002256: 68fb ldr r3, [r7, #12]
8002258: 681b ldr r3, [r3, #0]
800225a: 689b ldr r3, [r3, #8]
800225c: f003 0302 and.w r3, r3, #2
8002260: 2b02 cmp r3, #2
8002262: d113 bne.n 800228c <HAL_SPI_Transmit+0x1f2>
{
*((__IO uint8_t *)&hspi->Instance->DR) = *((const uint8_t *)hspi->pTxBuffPtr);
8002264: 68fb ldr r3, [r7, #12]
8002266: 6b1a ldr r2, [r3, #48] @ 0x30
8002268: 68fb ldr r3, [r7, #12]
800226a: 681b ldr r3, [r3, #0]
800226c: 330c adds r3, #12
800226e: 7812 ldrb r2, [r2, #0]
8002270: 701a strb r2, [r3, #0]
hspi->pTxBuffPtr += sizeof(uint8_t);
8002272: 68fb ldr r3, [r7, #12]
8002274: 6b1b ldr r3, [r3, #48] @ 0x30
8002276: 1c5a adds r2, r3, #1
8002278: 68fb ldr r3, [r7, #12]
800227a: 631a str r2, [r3, #48] @ 0x30
hspi->TxXferCount--;
800227c: 68fb ldr r3, [r7, #12]
800227e: 8edb ldrh r3, [r3, #54] @ 0x36
8002280: b29b uxth r3, r3
8002282: 3b01 subs r3, #1
8002284: b29a uxth r2, r3
8002286: 68fb ldr r3, [r7, #12]
8002288: 86da strh r2, [r3, #54] @ 0x36
800228a: e018 b.n 80022be <HAL_SPI_Transmit+0x224>
}
else
{
/* Timeout management */
if ((((HAL_GetTick() - tickstart) >= Timeout) && (Timeout != HAL_MAX_DELAY)) || (Timeout == 0U))
800228c: f7fe fe18 bl 8000ec0 <HAL_GetTick>
8002290: 4602 mov r2, r0
8002292: 69fb ldr r3, [r7, #28]
8002294: 1ad3 subs r3, r2, r3
8002296: 683a ldr r2, [r7, #0]
8002298: 429a cmp r2, r3
800229a: d803 bhi.n 80022a4 <HAL_SPI_Transmit+0x20a>
800229c: 683b ldr r3, [r7, #0]
800229e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
80022a2: d102 bne.n 80022aa <HAL_SPI_Transmit+0x210>
80022a4: 683b ldr r3, [r7, #0]
80022a6: 2b00 cmp r3, #0
80022a8: d109 bne.n 80022be <HAL_SPI_Transmit+0x224>
{
hspi->State = HAL_SPI_STATE_READY;
80022aa: 68fb ldr r3, [r7, #12]
80022ac: 2201 movs r2, #1
80022ae: f883 2051 strb.w r2, [r3, #81] @ 0x51
__HAL_UNLOCK(hspi);
80022b2: 68fb ldr r3, [r7, #12]
80022b4: 2200 movs r2, #0
80022b6: f883 2050 strb.w r2, [r3, #80] @ 0x50
return HAL_TIMEOUT;
80022ba: 2303 movs r3, #3
80022bc: e02d b.n 800231a <HAL_SPI_Transmit+0x280>
while (hspi->TxXferCount > 0U)
80022be: 68fb ldr r3, [r7, #12]
80022c0: 8edb ldrh r3, [r3, #54] @ 0x36
80022c2: b29b uxth r3, r3
80022c4: 2b00 cmp r3, #0
80022c6: d1c6 bne.n 8002256 <HAL_SPI_Transmit+0x1bc>
SET_BIT(hspi->Instance->CR1, SPI_CR1_CRCNEXT);
}
#endif /* USE_SPI_CRC */
/* Check the end of the transaction */
if (SPI_EndRxTxTransaction(hspi, Timeout, tickstart) != HAL_OK)
80022c8: 69fa ldr r2, [r7, #28]
80022ca: 6839 ldr r1, [r7, #0]
80022cc: 68f8 ldr r0, [r7, #12]
80022ce: f000 f8b1 bl 8002434 <SPI_EndRxTxTransaction>
80022d2: 4603 mov r3, r0
80022d4: 2b00 cmp r3, #0
80022d6: d002 beq.n 80022de <HAL_SPI_Transmit+0x244>
{
hspi->ErrorCode = HAL_SPI_ERROR_FLAG;
80022d8: 68fb ldr r3, [r7, #12]
80022da: 2220 movs r2, #32
80022dc: 655a str r2, [r3, #84] @ 0x54
}
/* Clear overrun flag in 2 Lines communication mode because received is not read */
if (hspi->Init.Direction == SPI_DIRECTION_2LINES)
80022de: 68fb ldr r3, [r7, #12]
80022e0: 689b ldr r3, [r3, #8]
80022e2: 2b00 cmp r3, #0
80022e4: d10a bne.n 80022fc <HAL_SPI_Transmit+0x262>
{
__HAL_SPI_CLEAR_OVRFLAG(hspi);
80022e6: 2300 movs r3, #0
80022e8: 617b str r3, [r7, #20]
80022ea: 68fb ldr r3, [r7, #12]
80022ec: 681b ldr r3, [r3, #0]
80022ee: 68db ldr r3, [r3, #12]
80022f0: 617b str r3, [r7, #20]
80022f2: 68fb ldr r3, [r7, #12]
80022f4: 681b ldr r3, [r3, #0]
80022f6: 689b ldr r3, [r3, #8]
80022f8: 617b str r3, [r7, #20]
80022fa: 697b ldr r3, [r7, #20]
}
hspi->State = HAL_SPI_STATE_READY;
80022fc: 68fb ldr r3, [r7, #12]
80022fe: 2201 movs r2, #1
8002300: f883 2051 strb.w r2, [r3, #81] @ 0x51
/* Process Unlocked */
__HAL_UNLOCK(hspi);
8002304: 68fb ldr r3, [r7, #12]
8002306: 2200 movs r2, #0
8002308: f883 2050 strb.w r2, [r3, #80] @ 0x50
if (hspi->ErrorCode != HAL_SPI_ERROR_NONE)
800230c: 68fb ldr r3, [r7, #12]
800230e: 6d5b ldr r3, [r3, #84] @ 0x54
8002310: 2b00 cmp r3, #0
8002312: d001 beq.n 8002318 <HAL_SPI_Transmit+0x27e>
{
return HAL_ERROR;
8002314: 2301 movs r3, #1
8002316: e000 b.n 800231a <HAL_SPI_Transmit+0x280>
}
else
{
return HAL_OK;
8002318: 2300 movs r3, #0
}
}
800231a: 4618 mov r0, r3
800231c: 3720 adds r7, #32
800231e: 46bd mov sp, r7
8002320: bd80 pop {r7, pc}
...
08002324 <SPI_WaitFlagStateUntilTimeout>:
* @param Tickstart tick start value
* @retval HAL status
*/
static HAL_StatusTypeDef SPI_WaitFlagStateUntilTimeout(SPI_HandleTypeDef *hspi, uint32_t Flag, FlagStatus State,
uint32_t Timeout, uint32_t Tickstart)
{
8002324: b580 push {r7, lr}
8002326: b088 sub sp, #32
8002328: af00 add r7, sp, #0
800232a: 60f8 str r0, [r7, #12]
800232c: 60b9 str r1, [r7, #8]
800232e: 603b str r3, [r7, #0]
8002330: 4613 mov r3, r2
8002332: 71fb strb r3, [r7, #7]
__IO uint32_t count;
uint32_t tmp_timeout;
uint32_t tmp_tickstart;
/* Adjust Timeout value in case of end of transfer */
tmp_timeout = Timeout - (HAL_GetTick() - Tickstart);
8002334: f7fe fdc4 bl 8000ec0 <HAL_GetTick>
8002338: 4602 mov r2, r0
800233a: 6abb ldr r3, [r7, #40] @ 0x28
800233c: 1a9b subs r3, r3, r2
800233e: 683a ldr r2, [r7, #0]
8002340: 4413 add r3, r2
8002342: 61fb str r3, [r7, #28]
tmp_tickstart = HAL_GetTick();
8002344: f7fe fdbc bl 8000ec0 <HAL_GetTick>
8002348: 61b8 str r0, [r7, #24]
/* Calculate Timeout based on a software loop to avoid blocking issue if Systick is disabled */
count = tmp_timeout * ((SystemCoreClock * 32U) >> 20U);
800234a: 4b39 ldr r3, [pc, #228] @ (8002430 <SPI_WaitFlagStateUntilTimeout+0x10c>)
800234c: 681b ldr r3, [r3, #0]
800234e: 015b lsls r3, r3, #5
8002350: 0d1b lsrs r3, r3, #20
8002352: 69fa ldr r2, [r7, #28]
8002354: fb02 f303 mul.w r3, r2, r3
8002358: 617b str r3, [r7, #20]
while ((__HAL_SPI_GET_FLAG(hspi, Flag) ? SET : RESET) != State)
800235a: e054 b.n 8002406 <SPI_WaitFlagStateUntilTimeout+0xe2>
{
if (Timeout != HAL_MAX_DELAY)
800235c: 683b ldr r3, [r7, #0]
800235e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
8002362: d050 beq.n 8002406 <SPI_WaitFlagStateUntilTimeout+0xe2>
{
if (((HAL_GetTick() - tmp_tickstart) >= tmp_timeout) || (tmp_timeout == 0U))
8002364: f7fe fdac bl 8000ec0 <HAL_GetTick>
8002368: 4602 mov r2, r0
800236a: 69bb ldr r3, [r7, #24]
800236c: 1ad3 subs r3, r2, r3
800236e: 69fa ldr r2, [r7, #28]
8002370: 429a cmp r2, r3
8002372: d902 bls.n 800237a <SPI_WaitFlagStateUntilTimeout+0x56>
8002374: 69fb ldr r3, [r7, #28]
8002376: 2b00 cmp r3, #0
8002378: d13d bne.n 80023f6 <SPI_WaitFlagStateUntilTimeout+0xd2>
/* Disable the SPI and reset the CRC: the CRC value should be cleared
on both master and slave sides in order to resynchronize the master
and slave for their respective CRC calculation */
/* Disable TXE, RXNE and ERR interrupts for the interrupt process */
__HAL_SPI_DISABLE_IT(hspi, (SPI_IT_TXE | SPI_IT_RXNE | SPI_IT_ERR));
800237a: 68fb ldr r3, [r7, #12]
800237c: 681b ldr r3, [r3, #0]
800237e: 685a ldr r2, [r3, #4]
8002380: 68fb ldr r3, [r7, #12]
8002382: 681b ldr r3, [r3, #0]
8002384: f022 02e0 bic.w r2, r2, #224 @ 0xe0
8002388: 605a str r2, [r3, #4]
if ((hspi->Init.Mode == SPI_MODE_MASTER) && ((hspi->Init.Direction == SPI_DIRECTION_1LINE)
800238a: 68fb ldr r3, [r7, #12]
800238c: 685b ldr r3, [r3, #4]
800238e: f5b3 7f82 cmp.w r3, #260 @ 0x104
8002392: d111 bne.n 80023b8 <SPI_WaitFlagStateUntilTimeout+0x94>
8002394: 68fb ldr r3, [r7, #12]
8002396: 689b ldr r3, [r3, #8]
8002398: f5b3 4f00 cmp.w r3, #32768 @ 0x8000
800239c: d004 beq.n 80023a8 <SPI_WaitFlagStateUntilTimeout+0x84>
|| (hspi->Init.Direction == SPI_DIRECTION_2LINES_RXONLY)))
800239e: 68fb ldr r3, [r7, #12]
80023a0: 689b ldr r3, [r3, #8]
80023a2: f5b3 6f80 cmp.w r3, #1024 @ 0x400
80023a6: d107 bne.n 80023b8 <SPI_WaitFlagStateUntilTimeout+0x94>
{
/* Disable SPI peripheral */
__HAL_SPI_DISABLE(hspi);
80023a8: 68fb ldr r3, [r7, #12]
80023aa: 681b ldr r3, [r3, #0]
80023ac: 681a ldr r2, [r3, #0]
80023ae: 68fb ldr r3, [r7, #12]
80023b0: 681b ldr r3, [r3, #0]
80023b2: f022 0240 bic.w r2, r2, #64 @ 0x40
80023b6: 601a str r2, [r3, #0]
}
/* Reset CRC Calculation */
if (hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE)
80023b8: 68fb ldr r3, [r7, #12]
80023ba: 6a9b ldr r3, [r3, #40] @ 0x28
80023bc: f5b3 5f00 cmp.w r3, #8192 @ 0x2000
80023c0: d10f bne.n 80023e2 <SPI_WaitFlagStateUntilTimeout+0xbe>
{
SPI_RESET_CRC(hspi);
80023c2: 68fb ldr r3, [r7, #12]
80023c4: 681b ldr r3, [r3, #0]
80023c6: 681a ldr r2, [r3, #0]
80023c8: 68fb ldr r3, [r7, #12]
80023ca: 681b ldr r3, [r3, #0]
80023cc: f422 5200 bic.w r2, r2, #8192 @ 0x2000
80023d0: 601a str r2, [r3, #0]
80023d2: 68fb ldr r3, [r7, #12]
80023d4: 681b ldr r3, [r3, #0]
80023d6: 681a ldr r2, [r3, #0]
80023d8: 68fb ldr r3, [r7, #12]
80023da: 681b ldr r3, [r3, #0]
80023dc: f442 5200 orr.w r2, r2, #8192 @ 0x2000
80023e0: 601a str r2, [r3, #0]
}
hspi->State = HAL_SPI_STATE_READY;
80023e2: 68fb ldr r3, [r7, #12]
80023e4: 2201 movs r2, #1
80023e6: f883 2051 strb.w r2, [r3, #81] @ 0x51
/* Process Unlocked */
__HAL_UNLOCK(hspi);
80023ea: 68fb ldr r3, [r7, #12]
80023ec: 2200 movs r2, #0
80023ee: f883 2050 strb.w r2, [r3, #80] @ 0x50
return HAL_TIMEOUT;
80023f2: 2303 movs r3, #3
80023f4: e017 b.n 8002426 <SPI_WaitFlagStateUntilTimeout+0x102>
}
/* If Systick is disabled or not incremented, deactivate timeout to go in disable loop procedure */
if (count == 0U)
80023f6: 697b ldr r3, [r7, #20]
80023f8: 2b00 cmp r3, #0
80023fa: d101 bne.n 8002400 <SPI_WaitFlagStateUntilTimeout+0xdc>
{
tmp_timeout = 0U;
80023fc: 2300 movs r3, #0
80023fe: 61fb str r3, [r7, #28]
}
count--;
8002400: 697b ldr r3, [r7, #20]
8002402: 3b01 subs r3, #1
8002404: 617b str r3, [r7, #20]
while ((__HAL_SPI_GET_FLAG(hspi, Flag) ? SET : RESET) != State)
8002406: 68fb ldr r3, [r7, #12]
8002408: 681b ldr r3, [r3, #0]
800240a: 689a ldr r2, [r3, #8]
800240c: 68bb ldr r3, [r7, #8]
800240e: 4013 ands r3, r2
8002410: 68ba ldr r2, [r7, #8]
8002412: 429a cmp r2, r3
8002414: bf0c ite eq
8002416: 2301 moveq r3, #1
8002418: 2300 movne r3, #0
800241a: b2db uxtb r3, r3
800241c: 461a mov r2, r3
800241e: 79fb ldrb r3, [r7, #7]
8002420: 429a cmp r2, r3
8002422: d19b bne.n 800235c <SPI_WaitFlagStateUntilTimeout+0x38>
}
}
return HAL_OK;
8002424: 2300 movs r3, #0
}
8002426: 4618 mov r0, r3
8002428: 3720 adds r7, #32
800242a: 46bd mov sp, r7
800242c: bd80 pop {r7, pc}
800242e: bf00 nop
8002430: 20000004 .word 0x20000004
08002434 <SPI_EndRxTxTransaction>:
* @param Timeout Timeout duration
* @param Tickstart tick start value
* @retval HAL status
*/
static HAL_StatusTypeDef SPI_EndRxTxTransaction(SPI_HandleTypeDef *hspi, uint32_t Timeout, uint32_t Tickstart)
{
8002434: b580 push {r7, lr}
8002436: b088 sub sp, #32
8002438: af02 add r7, sp, #8
800243a: 60f8 str r0, [r7, #12]
800243c: 60b9 str r1, [r7, #8]
800243e: 607a str r2, [r7, #4]
/* Wait until TXE flag */
if (SPI_WaitFlagStateUntilTimeout(hspi, SPI_FLAG_TXE, SET, Timeout, Tickstart) != HAL_OK)
8002440: 687b ldr r3, [r7, #4]
8002442: 9300 str r3, [sp, #0]
8002444: 68bb ldr r3, [r7, #8]
8002446: 2201 movs r2, #1
8002448: 2102 movs r1, #2
800244a: 68f8 ldr r0, [r7, #12]
800244c: f7ff ff6a bl 8002324 <SPI_WaitFlagStateUntilTimeout>
8002450: 4603 mov r3, r0
8002452: 2b00 cmp r3, #0
8002454: d007 beq.n 8002466 <SPI_EndRxTxTransaction+0x32>
{
SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG);
8002456: 68fb ldr r3, [r7, #12]
8002458: 6d5b ldr r3, [r3, #84] @ 0x54
800245a: f043 0220 orr.w r2, r3, #32
800245e: 68fb ldr r3, [r7, #12]
8002460: 655a str r2, [r3, #84] @ 0x54
return HAL_TIMEOUT;
8002462: 2303 movs r3, #3
8002464: e032 b.n 80024cc <SPI_EndRxTxTransaction+0x98>
}
/* Timeout in us */
__IO uint32_t count = SPI_BSY_FLAG_WORKAROUND_TIMEOUT * (SystemCoreClock / 24U / 1000000U);
8002466: 4b1b ldr r3, [pc, #108] @ (80024d4 <SPI_EndRxTxTransaction+0xa0>)
8002468: 681b ldr r3, [r3, #0]
800246a: 4a1b ldr r2, [pc, #108] @ (80024d8 <SPI_EndRxTxTransaction+0xa4>)
800246c: fba2 2303 umull r2, r3, r2, r3
8002470: 0d5b lsrs r3, r3, #21
8002472: f44f 727a mov.w r2, #1000 @ 0x3e8
8002476: fb02 f303 mul.w r3, r2, r3
800247a: 617b str r3, [r7, #20]
/* Erratasheet: BSY bit may stay high at the end of a data transfer in Slave mode */
if (hspi->Init.Mode == SPI_MODE_MASTER)
800247c: 68fb ldr r3, [r7, #12]
800247e: 685b ldr r3, [r3, #4]
8002480: f5b3 7f82 cmp.w r3, #260 @ 0x104
8002484: d112 bne.n 80024ac <SPI_EndRxTxTransaction+0x78>
{
/* Control the BSY flag */
if (SPI_WaitFlagStateUntilTimeout(hspi, SPI_FLAG_BSY, RESET, Timeout, Tickstart) != HAL_OK)
8002486: 687b ldr r3, [r7, #4]
8002488: 9300 str r3, [sp, #0]
800248a: 68bb ldr r3, [r7, #8]
800248c: 2200 movs r2, #0
800248e: 2180 movs r1, #128 @ 0x80
8002490: 68f8 ldr r0, [r7, #12]
8002492: f7ff ff47 bl 8002324 <SPI_WaitFlagStateUntilTimeout>
8002496: 4603 mov r3, r0
8002498: 2b00 cmp r3, #0
800249a: d016 beq.n 80024ca <SPI_EndRxTxTransaction+0x96>
{
SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG);
800249c: 68fb ldr r3, [r7, #12]
800249e: 6d5b ldr r3, [r3, #84] @ 0x54
80024a0: f043 0220 orr.w r2, r3, #32
80024a4: 68fb ldr r3, [r7, #12]
80024a6: 655a str r2, [r3, #84] @ 0x54
return HAL_TIMEOUT;
80024a8: 2303 movs r3, #3
80024aa: e00f b.n 80024cc <SPI_EndRxTxTransaction+0x98>
* User have to calculate the timeout value to fit with the time of 1 byte transfer.
* This time is directly link with the SPI clock from Master device.
*/
do
{
if (count == 0U)
80024ac: 697b ldr r3, [r7, #20]
80024ae: 2b00 cmp r3, #0
80024b0: d00a beq.n 80024c8 <SPI_EndRxTxTransaction+0x94>
{
break;
}
count--;
80024b2: 697b ldr r3, [r7, #20]
80024b4: 3b01 subs r3, #1
80024b6: 617b str r3, [r7, #20]
} while (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_BSY) != RESET);
80024b8: 68fb ldr r3, [r7, #12]
80024ba: 681b ldr r3, [r3, #0]
80024bc: 689b ldr r3, [r3, #8]
80024be: f003 0380 and.w r3, r3, #128 @ 0x80
80024c2: 2b80 cmp r3, #128 @ 0x80
80024c4: d0f2 beq.n 80024ac <SPI_EndRxTxTransaction+0x78>
80024c6: e000 b.n 80024ca <SPI_EndRxTxTransaction+0x96>
break;
80024c8: bf00 nop
}
return HAL_OK;
80024ca: 2300 movs r3, #0
}
80024cc: 4618 mov r0, r3
80024ce: 3718 adds r7, #24
80024d0: 46bd mov sp, r7
80024d2: bd80 pop {r7, pc}
80024d4: 20000004 .word 0x20000004
80024d8: 165e9f81 .word 0x165e9f81
080024dc <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)
{
80024dc: b580 push {r7, lr}
80024de: b082 sub sp, #8
80024e0: af00 add r7, sp, #0
80024e2: 6078 str r0, [r7, #4]
/* Check the TIM handle allocation */
if (htim == NULL)
80024e4: 687b ldr r3, [r7, #4]
80024e6: 2b00 cmp r3, #0
80024e8: d101 bne.n 80024ee <HAL_TIM_Base_Init+0x12>
{
return HAL_ERROR;
80024ea: 2301 movs r3, #1
80024ec: e031 b.n 8002552 <HAL_TIM_Base_Init+0x76>
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)
80024ee: 687b ldr r3, [r7, #4]
80024f0: f893 3039 ldrb.w r3, [r3, #57] @ 0x39
80024f4: b2db uxtb r3, r3
80024f6: 2b00 cmp r3, #0
80024f8: d106 bne.n 8002508 <HAL_TIM_Base_Init+0x2c>
{
/* Allocate lock resource and initialize it */
htim->Lock = HAL_UNLOCKED;
80024fa: 687b ldr r3, [r7, #4]
80024fc: 2200 movs r2, #0
80024fe: f883 2038 strb.w r2, [r3, #56] @ 0x38
}
/* 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);
8002502: 6878 ldr r0, [r7, #4]
8002504: f7fe fac2 bl 8000a8c <HAL_TIM_Base_MspInit>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
/* Set the TIM state */
htim->State = HAL_TIM_STATE_BUSY;
8002508: 687b ldr r3, [r7, #4]
800250a: 2202 movs r2, #2
800250c: f883 2039 strb.w r2, [r3, #57] @ 0x39
/* Set the Time Base configuration */
TIM_Base_SetConfig(htim->Instance, &htim->Init);
8002510: 687b ldr r3, [r7, #4]
8002512: 681a ldr r2, [r3, #0]
8002514: 687b ldr r3, [r7, #4]
8002516: 3304 adds r3, #4
8002518: 4619 mov r1, r3
800251a: 4610 mov r0, r2
800251c: f000 fbc8 bl 8002cb0 <TIM_Base_SetConfig>
/* Initialize the DMA burst operation state */
htim->DMABurstState = HAL_DMA_BURST_STATE_READY;
8002520: 687b ldr r3, [r7, #4]
8002522: 2201 movs r2, #1
8002524: f883 203e strb.w r2, [r3, #62] @ 0x3e
/* Initialize the TIM channels state */
TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
8002528: 687b ldr r3, [r7, #4]
800252a: 2201 movs r2, #1
800252c: f883 203a strb.w r2, [r3, #58] @ 0x3a
8002530: 687b ldr r3, [r7, #4]
8002532: 2201 movs r2, #1
8002534: f883 203b strb.w r2, [r3, #59] @ 0x3b
8002538: 687b ldr r3, [r7, #4]
800253a: 2201 movs r2, #1
800253c: f883 203c strb.w r2, [r3, #60] @ 0x3c
8002540: 687b ldr r3, [r7, #4]
8002542: 2201 movs r2, #1
8002544: f883 203d strb.w r2, [r3, #61] @ 0x3d
/* Initialize the TIM state*/
htim->State = HAL_TIM_STATE_READY;
8002548: 687b ldr r3, [r7, #4]
800254a: 2201 movs r2, #1
800254c: f883 2039 strb.w r2, [r3, #57] @ 0x39
return HAL_OK;
8002550: 2300 movs r3, #0
}
8002552: 4618 mov r0, r3
8002554: 3708 adds r7, #8
8002556: 46bd mov sp, r7
8002558: bd80 pop {r7, pc}
...
0800255c <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)
{
800255c: b480 push {r7}
800255e: b085 sub sp, #20
8002560: af00 add r7, sp, #0
8002562: 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)
8002564: 687b ldr r3, [r7, #4]
8002566: f893 3039 ldrb.w r3, [r3, #57] @ 0x39
800256a: b2db uxtb r3, r3
800256c: 2b01 cmp r3, #1
800256e: d001 beq.n 8002574 <HAL_TIM_Base_Start_IT+0x18>
{
return HAL_ERROR;
8002570: 2301 movs r3, #1
8002572: e03a b.n 80025ea <HAL_TIM_Base_Start_IT+0x8e>
}
/* Set the TIM state */
htim->State = HAL_TIM_STATE_BUSY;
8002574: 687b ldr r3, [r7, #4]
8002576: 2202 movs r2, #2
8002578: f883 2039 strb.w r2, [r3, #57] @ 0x39
/* Enable the TIM Update interrupt */
__HAL_TIM_ENABLE_IT(htim, TIM_IT_UPDATE);
800257c: 687b ldr r3, [r7, #4]
800257e: 681b ldr r3, [r3, #0]
8002580: 68da ldr r2, [r3, #12]
8002582: 687b ldr r3, [r7, #4]
8002584: 681b ldr r3, [r3, #0]
8002586: f042 0201 orr.w r2, r2, #1
800258a: 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))
800258c: 687b ldr r3, [r7, #4]
800258e: 681b ldr r3, [r3, #0]
8002590: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000
8002594: d00e beq.n 80025b4 <HAL_TIM_Base_Start_IT+0x58>
8002596: 687b ldr r3, [r7, #4]
8002598: 681b ldr r3, [r3, #0]
800259a: 4a16 ldr r2, [pc, #88] @ (80025f4 <HAL_TIM_Base_Start_IT+0x98>)
800259c: 4293 cmp r3, r2
800259e: d009 beq.n 80025b4 <HAL_TIM_Base_Start_IT+0x58>
80025a0: 687b ldr r3, [r7, #4]
80025a2: 681b ldr r3, [r3, #0]
80025a4: 4a14 ldr r2, [pc, #80] @ (80025f8 <HAL_TIM_Base_Start_IT+0x9c>)
80025a6: 4293 cmp r3, r2
80025a8: d004 beq.n 80025b4 <HAL_TIM_Base_Start_IT+0x58>
80025aa: 687b ldr r3, [r7, #4]
80025ac: 681b ldr r3, [r3, #0]
80025ae: 4a13 ldr r2, [pc, #76] @ (80025fc <HAL_TIM_Base_Start_IT+0xa0>)
80025b0: 4293 cmp r3, r2
80025b2: d111 bne.n 80025d8 <HAL_TIM_Base_Start_IT+0x7c>
{
tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
80025b4: 687b ldr r3, [r7, #4]
80025b6: 681b ldr r3, [r3, #0]
80025b8: 689b ldr r3, [r3, #8]
80025ba: f003 0307 and.w r3, r3, #7
80025be: 60fb str r3, [r7, #12]
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
80025c0: 68fb ldr r3, [r7, #12]
80025c2: 2b06 cmp r3, #6
80025c4: d010 beq.n 80025e8 <HAL_TIM_Base_Start_IT+0x8c>
{
__HAL_TIM_ENABLE(htim);
80025c6: 687b ldr r3, [r7, #4]
80025c8: 681b ldr r3, [r3, #0]
80025ca: 681a ldr r2, [r3, #0]
80025cc: 687b ldr r3, [r7, #4]
80025ce: 681b ldr r3, [r3, #0]
80025d0: f042 0201 orr.w r2, r2, #1
80025d4: 601a str r2, [r3, #0]
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
80025d6: e007 b.n 80025e8 <HAL_TIM_Base_Start_IT+0x8c>
}
}
else
{
__HAL_TIM_ENABLE(htim);
80025d8: 687b ldr r3, [r7, #4]
80025da: 681b ldr r3, [r3, #0]
80025dc: 681a ldr r2, [r3, #0]
80025de: 687b ldr r3, [r7, #4]
80025e0: 681b ldr r3, [r3, #0]
80025e2: f042 0201 orr.w r2, r2, #1
80025e6: 601a str r2, [r3, #0]
}
/* Return function status */
return HAL_OK;
80025e8: 2300 movs r3, #0
}
80025ea: 4618 mov r0, r3
80025ec: 3714 adds r7, #20
80025ee: 46bd mov sp, r7
80025f0: bc80 pop {r7}
80025f2: 4770 bx lr
80025f4: 40000400 .word 0x40000400
80025f8: 40000800 .word 0x40000800
80025fc: 40010800 .word 0x40010800
08002600 <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)
{
8002600: b580 push {r7, lr}
8002602: b082 sub sp, #8
8002604: af00 add r7, sp, #0
8002606: 6078 str r0, [r7, #4]
/* Check the TIM handle allocation */
if (htim == NULL)
8002608: 687b ldr r3, [r7, #4]
800260a: 2b00 cmp r3, #0
800260c: d101 bne.n 8002612 <HAL_TIM_PWM_Init+0x12>
{
return HAL_ERROR;
800260e: 2301 movs r3, #1
8002610: e031 b.n 8002676 <HAL_TIM_PWM_Init+0x76>
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)
8002612: 687b ldr r3, [r7, #4]
8002614: f893 3039 ldrb.w r3, [r3, #57] @ 0x39
8002618: b2db uxtb r3, r3
800261a: 2b00 cmp r3, #0
800261c: d106 bne.n 800262c <HAL_TIM_PWM_Init+0x2c>
{
/* Allocate lock resource and initialize it */
htim->Lock = HAL_UNLOCKED;
800261e: 687b ldr r3, [r7, #4]
8002620: 2200 movs r2, #0
8002622: f883 2038 strb.w r2, [r3, #56] @ 0x38
}
/* 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);
8002626: 6878 ldr r0, [r7, #4]
8002628: f000 f829 bl 800267e <HAL_TIM_PWM_MspInit>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
/* Set the TIM state */
htim->State = HAL_TIM_STATE_BUSY;
800262c: 687b ldr r3, [r7, #4]
800262e: 2202 movs r2, #2
8002630: f883 2039 strb.w r2, [r3, #57] @ 0x39
/* Init the base time for the PWM */
TIM_Base_SetConfig(htim->Instance, &htim->Init);
8002634: 687b ldr r3, [r7, #4]
8002636: 681a ldr r2, [r3, #0]
8002638: 687b ldr r3, [r7, #4]
800263a: 3304 adds r3, #4
800263c: 4619 mov r1, r3
800263e: 4610 mov r0, r2
8002640: f000 fb36 bl 8002cb0 <TIM_Base_SetConfig>
/* Initialize the DMA burst operation state */
htim->DMABurstState = HAL_DMA_BURST_STATE_READY;
8002644: 687b ldr r3, [r7, #4]
8002646: 2201 movs r2, #1
8002648: f883 203e strb.w r2, [r3, #62] @ 0x3e
/* Initialize the TIM channels state */
TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
800264c: 687b ldr r3, [r7, #4]
800264e: 2201 movs r2, #1
8002650: f883 203a strb.w r2, [r3, #58] @ 0x3a
8002654: 687b ldr r3, [r7, #4]
8002656: 2201 movs r2, #1
8002658: f883 203b strb.w r2, [r3, #59] @ 0x3b
800265c: 687b ldr r3, [r7, #4]
800265e: 2201 movs r2, #1
8002660: f883 203c strb.w r2, [r3, #60] @ 0x3c
8002664: 687b ldr r3, [r7, #4]
8002666: 2201 movs r2, #1
8002668: f883 203d strb.w r2, [r3, #61] @ 0x3d
/* Initialize the TIM state*/
htim->State = HAL_TIM_STATE_READY;
800266c: 687b ldr r3, [r7, #4]
800266e: 2201 movs r2, #1
8002670: f883 2039 strb.w r2, [r3, #57] @ 0x39
return HAL_OK;
8002674: 2300 movs r3, #0
}
8002676: 4618 mov r0, r3
8002678: 3708 adds r7, #8
800267a: 46bd mov sp, r7
800267c: bd80 pop {r7, pc}
0800267e <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)
{
800267e: b480 push {r7}
8002680: b083 sub sp, #12
8002682: af00 add r7, sp, #0
8002684: 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
*/
}
8002686: bf00 nop
8002688: 370c adds r7, #12
800268a: 46bd mov sp, r7
800268c: bc80 pop {r7}
800268e: 4770 bx lr
08002690 <HAL_TIM_PWM_Start>:
* @arg TIM_CHANNEL_3: TIM Channel 3 selected
* @arg TIM_CHANNEL_4: TIM Channel 4 selected
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_PWM_Start(TIM_HandleTypeDef *htim, uint32_t Channel)
{
8002690: b580 push {r7, lr}
8002692: b084 sub sp, #16
8002694: af00 add r7, sp, #0
8002696: 6078 str r0, [r7, #4]
8002698: 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)
800269a: 683b ldr r3, [r7, #0]
800269c: 2b00 cmp r3, #0
800269e: d109 bne.n 80026b4 <HAL_TIM_PWM_Start+0x24>
80026a0: 687b ldr r3, [r7, #4]
80026a2: f893 303a ldrb.w r3, [r3, #58] @ 0x3a
80026a6: b2db uxtb r3, r3
80026a8: 2b01 cmp r3, #1
80026aa: bf14 ite ne
80026ac: 2301 movne r3, #1
80026ae: 2300 moveq r3, #0
80026b0: b2db uxtb r3, r3
80026b2: e022 b.n 80026fa <HAL_TIM_PWM_Start+0x6a>
80026b4: 683b ldr r3, [r7, #0]
80026b6: 2b04 cmp r3, #4
80026b8: d109 bne.n 80026ce <HAL_TIM_PWM_Start+0x3e>
80026ba: 687b ldr r3, [r7, #4]
80026bc: f893 303b ldrb.w r3, [r3, #59] @ 0x3b
80026c0: b2db uxtb r3, r3
80026c2: 2b01 cmp r3, #1
80026c4: bf14 ite ne
80026c6: 2301 movne r3, #1
80026c8: 2300 moveq r3, #0
80026ca: b2db uxtb r3, r3
80026cc: e015 b.n 80026fa <HAL_TIM_PWM_Start+0x6a>
80026ce: 683b ldr r3, [r7, #0]
80026d0: 2b08 cmp r3, #8
80026d2: d109 bne.n 80026e8 <HAL_TIM_PWM_Start+0x58>
80026d4: 687b ldr r3, [r7, #4]
80026d6: f893 303c ldrb.w r3, [r3, #60] @ 0x3c
80026da: b2db uxtb r3, r3
80026dc: 2b01 cmp r3, #1
80026de: bf14 ite ne
80026e0: 2301 movne r3, #1
80026e2: 2300 moveq r3, #0
80026e4: b2db uxtb r3, r3
80026e6: e008 b.n 80026fa <HAL_TIM_PWM_Start+0x6a>
80026e8: 687b ldr r3, [r7, #4]
80026ea: f893 303d ldrb.w r3, [r3, #61] @ 0x3d
80026ee: b2db uxtb r3, r3
80026f0: 2b01 cmp r3, #1
80026f2: bf14 ite ne
80026f4: 2301 movne r3, #1
80026f6: 2300 moveq r3, #0
80026f8: b2db uxtb r3, r3
80026fa: 2b00 cmp r3, #0
80026fc: d001 beq.n 8002702 <HAL_TIM_PWM_Start+0x72>
{
return HAL_ERROR;
80026fe: 2301 movs r3, #1
8002700: e051 b.n 80027a6 <HAL_TIM_PWM_Start+0x116>
}
/* Set the TIM channel state */
TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY);
8002702: 683b ldr r3, [r7, #0]
8002704: 2b00 cmp r3, #0
8002706: d104 bne.n 8002712 <HAL_TIM_PWM_Start+0x82>
8002708: 687b ldr r3, [r7, #4]
800270a: 2202 movs r2, #2
800270c: f883 203a strb.w r2, [r3, #58] @ 0x3a
8002710: e013 b.n 800273a <HAL_TIM_PWM_Start+0xaa>
8002712: 683b ldr r3, [r7, #0]
8002714: 2b04 cmp r3, #4
8002716: d104 bne.n 8002722 <HAL_TIM_PWM_Start+0x92>
8002718: 687b ldr r3, [r7, #4]
800271a: 2202 movs r2, #2
800271c: f883 203b strb.w r2, [r3, #59] @ 0x3b
8002720: e00b b.n 800273a <HAL_TIM_PWM_Start+0xaa>
8002722: 683b ldr r3, [r7, #0]
8002724: 2b08 cmp r3, #8
8002726: d104 bne.n 8002732 <HAL_TIM_PWM_Start+0xa2>
8002728: 687b ldr r3, [r7, #4]
800272a: 2202 movs r2, #2
800272c: f883 203c strb.w r2, [r3, #60] @ 0x3c
8002730: e003 b.n 800273a <HAL_TIM_PWM_Start+0xaa>
8002732: 687b ldr r3, [r7, #4]
8002734: 2202 movs r2, #2
8002736: f883 203d strb.w r2, [r3, #61] @ 0x3d
/* Enable the Capture compare channel */
TIM_CCxChannelCmd(htim->Instance, Channel, TIM_CCx_ENABLE);
800273a: 687b ldr r3, [r7, #4]
800273c: 681b ldr r3, [r3, #0]
800273e: 2201 movs r2, #1
8002740: 6839 ldr r1, [r7, #0]
8002742: 4618 mov r0, r3
8002744: f000 fcb5 bl 80030b2 <TIM_CCxChannelCmd>
/* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
8002748: 687b ldr r3, [r7, #4]
800274a: 681b ldr r3, [r3, #0]
800274c: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000
8002750: d00e beq.n 8002770 <HAL_TIM_PWM_Start+0xe0>
8002752: 687b ldr r3, [r7, #4]
8002754: 681b ldr r3, [r3, #0]
8002756: 4a16 ldr r2, [pc, #88] @ (80027b0 <HAL_TIM_PWM_Start+0x120>)
8002758: 4293 cmp r3, r2
800275a: d009 beq.n 8002770 <HAL_TIM_PWM_Start+0xe0>
800275c: 687b ldr r3, [r7, #4]
800275e: 681b ldr r3, [r3, #0]
8002760: 4a14 ldr r2, [pc, #80] @ (80027b4 <HAL_TIM_PWM_Start+0x124>)
8002762: 4293 cmp r3, r2
8002764: d004 beq.n 8002770 <HAL_TIM_PWM_Start+0xe0>
8002766: 687b ldr r3, [r7, #4]
8002768: 681b ldr r3, [r3, #0]
800276a: 4a13 ldr r2, [pc, #76] @ (80027b8 <HAL_TIM_PWM_Start+0x128>)
800276c: 4293 cmp r3, r2
800276e: d111 bne.n 8002794 <HAL_TIM_PWM_Start+0x104>
{
tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
8002770: 687b ldr r3, [r7, #4]
8002772: 681b ldr r3, [r3, #0]
8002774: 689b ldr r3, [r3, #8]
8002776: f003 0307 and.w r3, r3, #7
800277a: 60fb str r3, [r7, #12]
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
800277c: 68fb ldr r3, [r7, #12]
800277e: 2b06 cmp r3, #6
8002780: d010 beq.n 80027a4 <HAL_TIM_PWM_Start+0x114>
{
__HAL_TIM_ENABLE(htim);
8002782: 687b ldr r3, [r7, #4]
8002784: 681b ldr r3, [r3, #0]
8002786: 681a ldr r2, [r3, #0]
8002788: 687b ldr r3, [r7, #4]
800278a: 681b ldr r3, [r3, #0]
800278c: f042 0201 orr.w r2, r2, #1
8002790: 601a str r2, [r3, #0]
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
8002792: e007 b.n 80027a4 <HAL_TIM_PWM_Start+0x114>
}
}
else
{
__HAL_TIM_ENABLE(htim);
8002794: 687b ldr r3, [r7, #4]
8002796: 681b ldr r3, [r3, #0]
8002798: 681a ldr r2, [r3, #0]
800279a: 687b ldr r3, [r7, #4]
800279c: 681b ldr r3, [r3, #0]
800279e: f042 0201 orr.w r2, r2, #1
80027a2: 601a str r2, [r3, #0]
}
/* Return function status */
return HAL_OK;
80027a4: 2300 movs r3, #0
}
80027a6: 4618 mov r0, r3
80027a8: 3710 adds r7, #16
80027aa: 46bd mov sp, r7
80027ac: bd80 pop {r7, pc}
80027ae: bf00 nop
80027b0: 40000400 .word 0x40000400
80027b4: 40000800 .word 0x40000800
80027b8: 40010800 .word 0x40010800
080027bc <HAL_TIM_IRQHandler>:
* @brief This function handles TIM interrupts requests.
* @param htim TIM handle
* @retval None
*/
void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
{
80027bc: b580 push {r7, lr}
80027be: b084 sub sp, #16
80027c0: af00 add r7, sp, #0
80027c2: 6078 str r0, [r7, #4]
uint32_t itsource = htim->Instance->DIER;
80027c4: 687b ldr r3, [r7, #4]
80027c6: 681b ldr r3, [r3, #0]
80027c8: 68db ldr r3, [r3, #12]
80027ca: 60fb str r3, [r7, #12]
uint32_t itflag = htim->Instance->SR;
80027cc: 687b ldr r3, [r7, #4]
80027ce: 681b ldr r3, [r3, #0]
80027d0: 691b ldr r3, [r3, #16]
80027d2: 60bb str r3, [r7, #8]
/* Capture compare 1 event */
if ((itflag & (TIM_FLAG_CC1)) == (TIM_FLAG_CC1))
80027d4: 68bb ldr r3, [r7, #8]
80027d6: f003 0302 and.w r3, r3, #2
80027da: 2b00 cmp r3, #0
80027dc: d020 beq.n 8002820 <HAL_TIM_IRQHandler+0x64>
{
if ((itsource & (TIM_IT_CC1)) == (TIM_IT_CC1))
80027de: 68fb ldr r3, [r7, #12]
80027e0: f003 0302 and.w r3, r3, #2
80027e4: 2b00 cmp r3, #0
80027e6: d01b beq.n 8002820 <HAL_TIM_IRQHandler+0x64>
{
{
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC1);
80027e8: 687b ldr r3, [r7, #4]
80027ea: 681b ldr r3, [r3, #0]
80027ec: f06f 0202 mvn.w r2, #2
80027f0: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1;
80027f2: 687b ldr r3, [r7, #4]
80027f4: 2201 movs r2, #1
80027f6: 761a strb r2, [r3, #24]
/* Input capture event */
if ((htim->Instance->CCMR1 & TIM_CCMR1_CC1S) != 0x00U)
80027f8: 687b ldr r3, [r7, #4]
80027fa: 681b ldr r3, [r3, #0]
80027fc: 699b ldr r3, [r3, #24]
80027fe: f003 0303 and.w r3, r3, #3
8002802: 2b00 cmp r3, #0
8002804: d003 beq.n 800280e <HAL_TIM_IRQHandler+0x52>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
8002806: 6878 ldr r0, [r7, #4]
8002808: f000 fa36 bl 8002c78 <HAL_TIM_IC_CaptureCallback>
800280c: e005 b.n 800281a <HAL_TIM_IRQHandler+0x5e>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->OC_DelayElapsedCallback(htim);
htim->PWM_PulseFinishedCallback(htim);
#else
HAL_TIM_OC_DelayElapsedCallback(htim);
800280e: 6878 ldr r0, [r7, #4]
8002810: f000 fa29 bl 8002c66 <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
8002814: 6878 ldr r0, [r7, #4]
8002816: f000 fa38 bl 8002c8a <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
800281a: 687b ldr r3, [r7, #4]
800281c: 2200 movs r2, #0
800281e: 761a strb r2, [r3, #24]
}
}
}
/* Capture compare 2 event */
if ((itflag & (TIM_FLAG_CC2)) == (TIM_FLAG_CC2))
8002820: 68bb ldr r3, [r7, #8]
8002822: f003 0304 and.w r3, r3, #4
8002826: 2b00 cmp r3, #0
8002828: d020 beq.n 800286c <HAL_TIM_IRQHandler+0xb0>
{
if ((itsource & (TIM_IT_CC2)) == (TIM_IT_CC2))
800282a: 68fb ldr r3, [r7, #12]
800282c: f003 0304 and.w r3, r3, #4
8002830: 2b00 cmp r3, #0
8002832: d01b beq.n 800286c <HAL_TIM_IRQHandler+0xb0>
{
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC2);
8002834: 687b ldr r3, [r7, #4]
8002836: 681b ldr r3, [r3, #0]
8002838: f06f 0204 mvn.w r2, #4
800283c: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2;
800283e: 687b ldr r3, [r7, #4]
8002840: 2202 movs r2, #2
8002842: 761a strb r2, [r3, #24]
/* Input capture event */
if ((htim->Instance->CCMR1 & TIM_CCMR1_CC2S) != 0x00U)
8002844: 687b ldr r3, [r7, #4]
8002846: 681b ldr r3, [r3, #0]
8002848: 699b ldr r3, [r3, #24]
800284a: f403 7340 and.w r3, r3, #768 @ 0x300
800284e: 2b00 cmp r3, #0
8002850: d003 beq.n 800285a <HAL_TIM_IRQHandler+0x9e>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
8002852: 6878 ldr r0, [r7, #4]
8002854: f000 fa10 bl 8002c78 <HAL_TIM_IC_CaptureCallback>
8002858: e005 b.n 8002866 <HAL_TIM_IRQHandler+0xaa>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->OC_DelayElapsedCallback(htim);
htim->PWM_PulseFinishedCallback(htim);
#else
HAL_TIM_OC_DelayElapsedCallback(htim);
800285a: 6878 ldr r0, [r7, #4]
800285c: f000 fa03 bl 8002c66 <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
8002860: 6878 ldr r0, [r7, #4]
8002862: f000 fa12 bl 8002c8a <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
8002866: 687b ldr r3, [r7, #4]
8002868: 2200 movs r2, #0
800286a: 761a strb r2, [r3, #24]
}
}
/* Capture compare 3 event */
if ((itflag & (TIM_FLAG_CC3)) == (TIM_FLAG_CC3))
800286c: 68bb ldr r3, [r7, #8]
800286e: f003 0308 and.w r3, r3, #8
8002872: 2b00 cmp r3, #0
8002874: d020 beq.n 80028b8 <HAL_TIM_IRQHandler+0xfc>
{
if ((itsource & (TIM_IT_CC3)) == (TIM_IT_CC3))
8002876: 68fb ldr r3, [r7, #12]
8002878: f003 0308 and.w r3, r3, #8
800287c: 2b00 cmp r3, #0
800287e: d01b beq.n 80028b8 <HAL_TIM_IRQHandler+0xfc>
{
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC3);
8002880: 687b ldr r3, [r7, #4]
8002882: 681b ldr r3, [r3, #0]
8002884: f06f 0208 mvn.w r2, #8
8002888: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3;
800288a: 687b ldr r3, [r7, #4]
800288c: 2204 movs r2, #4
800288e: 761a strb r2, [r3, #24]
/* Input capture event */
if ((htim->Instance->CCMR2 & TIM_CCMR2_CC3S) != 0x00U)
8002890: 687b ldr r3, [r7, #4]
8002892: 681b ldr r3, [r3, #0]
8002894: 69db ldr r3, [r3, #28]
8002896: f003 0303 and.w r3, r3, #3
800289a: 2b00 cmp r3, #0
800289c: d003 beq.n 80028a6 <HAL_TIM_IRQHandler+0xea>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
800289e: 6878 ldr r0, [r7, #4]
80028a0: f000 f9ea bl 8002c78 <HAL_TIM_IC_CaptureCallback>
80028a4: e005 b.n 80028b2 <HAL_TIM_IRQHandler+0xf6>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->OC_DelayElapsedCallback(htim);
htim->PWM_PulseFinishedCallback(htim);
#else
HAL_TIM_OC_DelayElapsedCallback(htim);
80028a6: 6878 ldr r0, [r7, #4]
80028a8: f000 f9dd bl 8002c66 <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
80028ac: 6878 ldr r0, [r7, #4]
80028ae: f000 f9ec bl 8002c8a <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
80028b2: 687b ldr r3, [r7, #4]
80028b4: 2200 movs r2, #0
80028b6: 761a strb r2, [r3, #24]
}
}
/* Capture compare 4 event */
if ((itflag & (TIM_FLAG_CC4)) == (TIM_FLAG_CC4))
80028b8: 68bb ldr r3, [r7, #8]
80028ba: f003 0310 and.w r3, r3, #16
80028be: 2b00 cmp r3, #0
80028c0: d020 beq.n 8002904 <HAL_TIM_IRQHandler+0x148>
{
if ((itsource & (TIM_IT_CC4)) == (TIM_IT_CC4))
80028c2: 68fb ldr r3, [r7, #12]
80028c4: f003 0310 and.w r3, r3, #16
80028c8: 2b00 cmp r3, #0
80028ca: d01b beq.n 8002904 <HAL_TIM_IRQHandler+0x148>
{
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC4);
80028cc: 687b ldr r3, [r7, #4]
80028ce: 681b ldr r3, [r3, #0]
80028d0: f06f 0210 mvn.w r2, #16
80028d4: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4;
80028d6: 687b ldr r3, [r7, #4]
80028d8: 2208 movs r2, #8
80028da: 761a strb r2, [r3, #24]
/* Input capture event */
if ((htim->Instance->CCMR2 & TIM_CCMR2_CC4S) != 0x00U)
80028dc: 687b ldr r3, [r7, #4]
80028de: 681b ldr r3, [r3, #0]
80028e0: 69db ldr r3, [r3, #28]
80028e2: f403 7340 and.w r3, r3, #768 @ 0x300
80028e6: 2b00 cmp r3, #0
80028e8: d003 beq.n 80028f2 <HAL_TIM_IRQHandler+0x136>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
80028ea: 6878 ldr r0, [r7, #4]
80028ec: f000 f9c4 bl 8002c78 <HAL_TIM_IC_CaptureCallback>
80028f0: e005 b.n 80028fe <HAL_TIM_IRQHandler+0x142>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->OC_DelayElapsedCallback(htim);
htim->PWM_PulseFinishedCallback(htim);
#else
HAL_TIM_OC_DelayElapsedCallback(htim);
80028f2: 6878 ldr r0, [r7, #4]
80028f4: f000 f9b7 bl 8002c66 <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
80028f8: 6878 ldr r0, [r7, #4]
80028fa: f000 f9c6 bl 8002c8a <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
80028fe: 687b ldr r3, [r7, #4]
8002900: 2200 movs r2, #0
8002902: 761a strb r2, [r3, #24]
}
}
/* TIM Update event */
if ((itflag & (TIM_FLAG_UPDATE)) == (TIM_FLAG_UPDATE))
8002904: 68bb ldr r3, [r7, #8]
8002906: f003 0301 and.w r3, r3, #1
800290a: 2b00 cmp r3, #0
800290c: d00c beq.n 8002928 <HAL_TIM_IRQHandler+0x16c>
{
if ((itsource & (TIM_IT_UPDATE)) == (TIM_IT_UPDATE))
800290e: 68fb ldr r3, [r7, #12]
8002910: f003 0301 and.w r3, r3, #1
8002914: 2b00 cmp r3, #0
8002916: d007 beq.n 8002928 <HAL_TIM_IRQHandler+0x16c>
{
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_UPDATE);
8002918: 687b ldr r3, [r7, #4]
800291a: 681b ldr r3, [r3, #0]
800291c: f06f 0201 mvn.w r2, #1
8002920: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->PeriodElapsedCallback(htim);
#else
HAL_TIM_PeriodElapsedCallback(htim);
8002922: 6878 ldr r0, [r7, #4]
8002924: f7fd ffec bl 8000900 <HAL_TIM_PeriodElapsedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
/* TIM Trigger detection event */
if ((itflag & (TIM_FLAG_TRIGGER)) == (TIM_FLAG_TRIGGER))
8002928: 68bb ldr r3, [r7, #8]
800292a: f003 0340 and.w r3, r3, #64 @ 0x40
800292e: 2b00 cmp r3, #0
8002930: d00c beq.n 800294c <HAL_TIM_IRQHandler+0x190>
{
if ((itsource & (TIM_IT_TRIGGER)) == (TIM_IT_TRIGGER))
8002932: 68fb ldr r3, [r7, #12]
8002934: f003 0340 and.w r3, r3, #64 @ 0x40
8002938: 2b00 cmp r3, #0
800293a: d007 beq.n 800294c <HAL_TIM_IRQHandler+0x190>
{
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_TRIGGER);
800293c: 687b ldr r3, [r7, #4]
800293e: 681b ldr r3, [r3, #0]
8002940: f06f 0240 mvn.w r2, #64 @ 0x40
8002944: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->TriggerCallback(htim);
#else
HAL_TIM_TriggerCallback(htim);
8002946: 6878 ldr r0, [r7, #4]
8002948: f000 f9a8 bl 8002c9c <HAL_TIM_TriggerCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
}
800294c: bf00 nop
800294e: 3710 adds r7, #16
8002950: 46bd mov sp, r7
8002952: bd80 pop {r7, pc}
08002954 <HAL_TIM_PWM_ConfigChannel>:
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim,
const TIM_OC_InitTypeDef *sConfig,
uint32_t Channel)
{
8002954: b580 push {r7, lr}
8002956: b086 sub sp, #24
8002958: af00 add r7, sp, #0
800295a: 60f8 str r0, [r7, #12]
800295c: 60b9 str r1, [r7, #8]
800295e: 607a str r2, [r7, #4]
HAL_StatusTypeDef status = HAL_OK;
8002960: 2300 movs r3, #0
8002962: 75fb strb r3, [r7, #23]
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);
8002964: 68fb ldr r3, [r7, #12]
8002966: f893 3038 ldrb.w r3, [r3, #56] @ 0x38
800296a: 2b01 cmp r3, #1
800296c: d101 bne.n 8002972 <HAL_TIM_PWM_ConfigChannel+0x1e>
800296e: 2302 movs r3, #2
8002970: e0ae b.n 8002ad0 <HAL_TIM_PWM_ConfigChannel+0x17c>
8002972: 68fb ldr r3, [r7, #12]
8002974: 2201 movs r2, #1
8002976: f883 2038 strb.w r2, [r3, #56] @ 0x38
switch (Channel)
800297a: 687b ldr r3, [r7, #4]
800297c: 2b0c cmp r3, #12
800297e: f200 809f bhi.w 8002ac0 <HAL_TIM_PWM_ConfigChannel+0x16c>
8002982: a201 add r2, pc, #4 @ (adr r2, 8002988 <HAL_TIM_PWM_ConfigChannel+0x34>)
8002984: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8002988: 080029bd .word 0x080029bd
800298c: 08002ac1 .word 0x08002ac1
8002990: 08002ac1 .word 0x08002ac1
8002994: 08002ac1 .word 0x08002ac1
8002998: 080029fd .word 0x080029fd
800299c: 08002ac1 .word 0x08002ac1
80029a0: 08002ac1 .word 0x08002ac1
80029a4: 08002ac1 .word 0x08002ac1
80029a8: 08002a3f .word 0x08002a3f
80029ac: 08002ac1 .word 0x08002ac1
80029b0: 08002ac1 .word 0x08002ac1
80029b4: 08002ac1 .word 0x08002ac1
80029b8: 08002a7f .word 0x08002a7f
{
/* Check the parameters */
assert_param(IS_TIM_CC1_INSTANCE(htim->Instance));
/* Configure the Channel 1 in PWM mode */
TIM_OC1_SetConfig(htim->Instance, sConfig);
80029bc: 68fb ldr r3, [r7, #12]
80029be: 681b ldr r3, [r3, #0]
80029c0: 68b9 ldr r1, [r7, #8]
80029c2: 4618 mov r0, r3
80029c4: f000 f9ea bl 8002d9c <TIM_OC1_SetConfig>
/* Set the Preload enable bit for channel1 */
htim->Instance->CCMR1 |= TIM_CCMR1_OC1PE;
80029c8: 68fb ldr r3, [r7, #12]
80029ca: 681b ldr r3, [r3, #0]
80029cc: 699a ldr r2, [r3, #24]
80029ce: 68fb ldr r3, [r7, #12]
80029d0: 681b ldr r3, [r3, #0]
80029d2: f042 0208 orr.w r2, r2, #8
80029d6: 619a str r2, [r3, #24]
/* Configure the Output Fast mode */
htim->Instance->CCMR1 &= ~TIM_CCMR1_OC1FE;
80029d8: 68fb ldr r3, [r7, #12]
80029da: 681b ldr r3, [r3, #0]
80029dc: 699a ldr r2, [r3, #24]
80029de: 68fb ldr r3, [r7, #12]
80029e0: 681b ldr r3, [r3, #0]
80029e2: f022 0204 bic.w r2, r2, #4
80029e6: 619a str r2, [r3, #24]
htim->Instance->CCMR1 |= sConfig->OCFastMode;
80029e8: 68fb ldr r3, [r7, #12]
80029ea: 681b ldr r3, [r3, #0]
80029ec: 6999 ldr r1, [r3, #24]
80029ee: 68bb ldr r3, [r7, #8]
80029f0: 68da ldr r2, [r3, #12]
80029f2: 68fb ldr r3, [r7, #12]
80029f4: 681b ldr r3, [r3, #0]
80029f6: 430a orrs r2, r1
80029f8: 619a str r2, [r3, #24]
break;
80029fa: e064 b.n 8002ac6 <HAL_TIM_PWM_ConfigChannel+0x172>
{
/* Check the parameters */
assert_param(IS_TIM_CC2_INSTANCE(htim->Instance));
/* Configure the Channel 2 in PWM mode */
TIM_OC2_SetConfig(htim->Instance, sConfig);
80029fc: 68fb ldr r3, [r7, #12]
80029fe: 681b ldr r3, [r3, #0]
8002a00: 68b9 ldr r1, [r7, #8]
8002a02: 4618 mov r0, r3
8002a04: f000 fa06 bl 8002e14 <TIM_OC2_SetConfig>
/* Set the Preload enable bit for channel2 */
htim->Instance->CCMR1 |= TIM_CCMR1_OC2PE;
8002a08: 68fb ldr r3, [r7, #12]
8002a0a: 681b ldr r3, [r3, #0]
8002a0c: 699a ldr r2, [r3, #24]
8002a0e: 68fb ldr r3, [r7, #12]
8002a10: 681b ldr r3, [r3, #0]
8002a12: f442 6200 orr.w r2, r2, #2048 @ 0x800
8002a16: 619a str r2, [r3, #24]
/* Configure the Output Fast mode */
htim->Instance->CCMR1 &= ~TIM_CCMR1_OC2FE;
8002a18: 68fb ldr r3, [r7, #12]
8002a1a: 681b ldr r3, [r3, #0]
8002a1c: 699a ldr r2, [r3, #24]
8002a1e: 68fb ldr r3, [r7, #12]
8002a20: 681b ldr r3, [r3, #0]
8002a22: f422 6280 bic.w r2, r2, #1024 @ 0x400
8002a26: 619a str r2, [r3, #24]
htim->Instance->CCMR1 |= sConfig->OCFastMode << 8U;
8002a28: 68fb ldr r3, [r7, #12]
8002a2a: 681b ldr r3, [r3, #0]
8002a2c: 6999 ldr r1, [r3, #24]
8002a2e: 68bb ldr r3, [r7, #8]
8002a30: 68db ldr r3, [r3, #12]
8002a32: 021a lsls r2, r3, #8
8002a34: 68fb ldr r3, [r7, #12]
8002a36: 681b ldr r3, [r3, #0]
8002a38: 430a orrs r2, r1
8002a3a: 619a str r2, [r3, #24]
break;
8002a3c: e043 b.n 8002ac6 <HAL_TIM_PWM_ConfigChannel+0x172>
{
/* Check the parameters */
assert_param(IS_TIM_CC3_INSTANCE(htim->Instance));
/* Configure the Channel 3 in PWM mode */
TIM_OC3_SetConfig(htim->Instance, sConfig);
8002a3e: 68fb ldr r3, [r7, #12]
8002a40: 681b ldr r3, [r3, #0]
8002a42: 68b9 ldr r1, [r7, #8]
8002a44: 4618 mov r0, r3
8002a46: f000 fa23 bl 8002e90 <TIM_OC3_SetConfig>
/* Set the Preload enable bit for channel3 */
htim->Instance->CCMR2 |= TIM_CCMR2_OC3PE;
8002a4a: 68fb ldr r3, [r7, #12]
8002a4c: 681b ldr r3, [r3, #0]
8002a4e: 69da ldr r2, [r3, #28]
8002a50: 68fb ldr r3, [r7, #12]
8002a52: 681b ldr r3, [r3, #0]
8002a54: f042 0208 orr.w r2, r2, #8
8002a58: 61da str r2, [r3, #28]
/* Configure the Output Fast mode */
htim->Instance->CCMR2 &= ~TIM_CCMR2_OC3FE;
8002a5a: 68fb ldr r3, [r7, #12]
8002a5c: 681b ldr r3, [r3, #0]
8002a5e: 69da ldr r2, [r3, #28]
8002a60: 68fb ldr r3, [r7, #12]
8002a62: 681b ldr r3, [r3, #0]
8002a64: f022 0204 bic.w r2, r2, #4
8002a68: 61da str r2, [r3, #28]
htim->Instance->CCMR2 |= sConfig->OCFastMode;
8002a6a: 68fb ldr r3, [r7, #12]
8002a6c: 681b ldr r3, [r3, #0]
8002a6e: 69d9 ldr r1, [r3, #28]
8002a70: 68bb ldr r3, [r7, #8]
8002a72: 68da ldr r2, [r3, #12]
8002a74: 68fb ldr r3, [r7, #12]
8002a76: 681b ldr r3, [r3, #0]
8002a78: 430a orrs r2, r1
8002a7a: 61da str r2, [r3, #28]
break;
8002a7c: e023 b.n 8002ac6 <HAL_TIM_PWM_ConfigChannel+0x172>
{
/* Check the parameters */
assert_param(IS_TIM_CC4_INSTANCE(htim->Instance));
/* Configure the Channel 4 in PWM mode */
TIM_OC4_SetConfig(htim->Instance, sConfig);
8002a7e: 68fb ldr r3, [r7, #12]
8002a80: 681b ldr r3, [r3, #0]
8002a82: 68b9 ldr r1, [r7, #8]
8002a84: 4618 mov r0, r3
8002a86: f000 fa40 bl 8002f0a <TIM_OC4_SetConfig>
/* Set the Preload enable bit for channel4 */
htim->Instance->CCMR2 |= TIM_CCMR2_OC4PE;
8002a8a: 68fb ldr r3, [r7, #12]
8002a8c: 681b ldr r3, [r3, #0]
8002a8e: 69da ldr r2, [r3, #28]
8002a90: 68fb ldr r3, [r7, #12]
8002a92: 681b ldr r3, [r3, #0]
8002a94: f442 6200 orr.w r2, r2, #2048 @ 0x800
8002a98: 61da str r2, [r3, #28]
/* Configure the Output Fast mode */
htim->Instance->CCMR2 &= ~TIM_CCMR2_OC4FE;
8002a9a: 68fb ldr r3, [r7, #12]
8002a9c: 681b ldr r3, [r3, #0]
8002a9e: 69da ldr r2, [r3, #28]
8002aa0: 68fb ldr r3, [r7, #12]
8002aa2: 681b ldr r3, [r3, #0]
8002aa4: f422 6280 bic.w r2, r2, #1024 @ 0x400
8002aa8: 61da str r2, [r3, #28]
htim->Instance->CCMR2 |= sConfig->OCFastMode << 8U;
8002aaa: 68fb ldr r3, [r7, #12]
8002aac: 681b ldr r3, [r3, #0]
8002aae: 69d9 ldr r1, [r3, #28]
8002ab0: 68bb ldr r3, [r7, #8]
8002ab2: 68db ldr r3, [r3, #12]
8002ab4: 021a lsls r2, r3, #8
8002ab6: 68fb ldr r3, [r7, #12]
8002ab8: 681b ldr r3, [r3, #0]
8002aba: 430a orrs r2, r1
8002abc: 61da str r2, [r3, #28]
break;
8002abe: e002 b.n 8002ac6 <HAL_TIM_PWM_ConfigChannel+0x172>
}
default:
status = HAL_ERROR;
8002ac0: 2301 movs r3, #1
8002ac2: 75fb strb r3, [r7, #23]
break;
8002ac4: bf00 nop
}
__HAL_UNLOCK(htim);
8002ac6: 68fb ldr r3, [r7, #12]
8002ac8: 2200 movs r2, #0
8002aca: f883 2038 strb.w r2, [r3, #56] @ 0x38
return status;
8002ace: 7dfb ldrb r3, [r7, #23]
}
8002ad0: 4618 mov r0, r3
8002ad2: 3718 adds r7, #24
8002ad4: 46bd mov sp, r7
8002ad6: bd80 pop {r7, pc}
08002ad8 <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)
{
8002ad8: b580 push {r7, lr}
8002ada: b084 sub sp, #16
8002adc: af00 add r7, sp, #0
8002ade: 6078 str r0, [r7, #4]
8002ae0: 6039 str r1, [r7, #0]
HAL_StatusTypeDef status = HAL_OK;
8002ae2: 2300 movs r3, #0
8002ae4: 73fb strb r3, [r7, #15]
uint32_t tmpsmcr;
/* Process Locked */
__HAL_LOCK(htim);
8002ae6: 687b ldr r3, [r7, #4]
8002ae8: f893 3038 ldrb.w r3, [r3, #56] @ 0x38
8002aec: 2b01 cmp r3, #1
8002aee: d101 bne.n 8002af4 <HAL_TIM_ConfigClockSource+0x1c>
8002af0: 2302 movs r3, #2
8002af2: e0b4 b.n 8002c5e <HAL_TIM_ConfigClockSource+0x186>
8002af4: 687b ldr r3, [r7, #4]
8002af6: 2201 movs r2, #1
8002af8: f883 2038 strb.w r2, [r3, #56] @ 0x38
htim->State = HAL_TIM_STATE_BUSY;
8002afc: 687b ldr r3, [r7, #4]
8002afe: 2202 movs r2, #2
8002b00: f883 2039 strb.w r2, [r3, #57] @ 0x39
/* Check the parameters */
assert_param(IS_TIM_CLOCKSOURCE(sClockSourceConfig->ClockSource));
/* Reset the SMS, TS, ECE, ETPS and ETRF bits */
tmpsmcr = htim->Instance->SMCR;
8002b04: 687b ldr r3, [r7, #4]
8002b06: 681b ldr r3, [r3, #0]
8002b08: 689b ldr r3, [r3, #8]
8002b0a: 60bb str r3, [r7, #8]
tmpsmcr &= ~(TIM_SMCR_SMS | TIM_SMCR_TS);
8002b0c: 68bb ldr r3, [r7, #8]
8002b0e: f023 0377 bic.w r3, r3, #119 @ 0x77
8002b12: 60bb str r3, [r7, #8]
tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP);
8002b14: 68bb ldr r3, [r7, #8]
8002b16: f423 437f bic.w r3, r3, #65280 @ 0xff00
8002b1a: 60bb str r3, [r7, #8]
htim->Instance->SMCR = tmpsmcr;
8002b1c: 687b ldr r3, [r7, #4]
8002b1e: 681b ldr r3, [r3, #0]
8002b20: 68ba ldr r2, [r7, #8]
8002b22: 609a str r2, [r3, #8]
switch (sClockSourceConfig->ClockSource)
8002b24: 683b ldr r3, [r7, #0]
8002b26: 681b ldr r3, [r3, #0]
8002b28: f5b3 5f00 cmp.w r3, #8192 @ 0x2000
8002b2c: d03e beq.n 8002bac <HAL_TIM_ConfigClockSource+0xd4>
8002b2e: f5b3 5f00 cmp.w r3, #8192 @ 0x2000
8002b32: f200 8087 bhi.w 8002c44 <HAL_TIM_ConfigClockSource+0x16c>
8002b36: f5b3 5f80 cmp.w r3, #4096 @ 0x1000
8002b3a: f000 8086 beq.w 8002c4a <HAL_TIM_ConfigClockSource+0x172>
8002b3e: f5b3 5f80 cmp.w r3, #4096 @ 0x1000
8002b42: d87f bhi.n 8002c44 <HAL_TIM_ConfigClockSource+0x16c>
8002b44: 2b70 cmp r3, #112 @ 0x70
8002b46: d01a beq.n 8002b7e <HAL_TIM_ConfigClockSource+0xa6>
8002b48: 2b70 cmp r3, #112 @ 0x70
8002b4a: d87b bhi.n 8002c44 <HAL_TIM_ConfigClockSource+0x16c>
8002b4c: 2b60 cmp r3, #96 @ 0x60
8002b4e: d050 beq.n 8002bf2 <HAL_TIM_ConfigClockSource+0x11a>
8002b50: 2b60 cmp r3, #96 @ 0x60
8002b52: d877 bhi.n 8002c44 <HAL_TIM_ConfigClockSource+0x16c>
8002b54: 2b50 cmp r3, #80 @ 0x50
8002b56: d03c beq.n 8002bd2 <HAL_TIM_ConfigClockSource+0xfa>
8002b58: 2b50 cmp r3, #80 @ 0x50
8002b5a: d873 bhi.n 8002c44 <HAL_TIM_ConfigClockSource+0x16c>
8002b5c: 2b40 cmp r3, #64 @ 0x40
8002b5e: d058 beq.n 8002c12 <HAL_TIM_ConfigClockSource+0x13a>
8002b60: 2b40 cmp r3, #64 @ 0x40
8002b62: d86f bhi.n 8002c44 <HAL_TIM_ConfigClockSource+0x16c>
8002b64: 2b30 cmp r3, #48 @ 0x30
8002b66: d064 beq.n 8002c32 <HAL_TIM_ConfigClockSource+0x15a>
8002b68: 2b30 cmp r3, #48 @ 0x30
8002b6a: d86b bhi.n 8002c44 <HAL_TIM_ConfigClockSource+0x16c>
8002b6c: 2b20 cmp r3, #32
8002b6e: d060 beq.n 8002c32 <HAL_TIM_ConfigClockSource+0x15a>
8002b70: 2b20 cmp r3, #32
8002b72: d867 bhi.n 8002c44 <HAL_TIM_ConfigClockSource+0x16c>
8002b74: 2b00 cmp r3, #0
8002b76: d05c beq.n 8002c32 <HAL_TIM_ConfigClockSource+0x15a>
8002b78: 2b10 cmp r3, #16
8002b7a: d05a beq.n 8002c32 <HAL_TIM_ConfigClockSource+0x15a>
8002b7c: e062 b.n 8002c44 <HAL_TIM_ConfigClockSource+0x16c>
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,
8002b7e: 687b ldr r3, [r7, #4]
8002b80: 6818 ldr r0, [r3, #0]
sClockSourceConfig->ClockPrescaler,
8002b82: 683b ldr r3, [r7, #0]
8002b84: 6899 ldr r1, [r3, #8]
sClockSourceConfig->ClockPolarity,
8002b86: 683b ldr r3, [r7, #0]
8002b88: 685a ldr r2, [r3, #4]
sClockSourceConfig->ClockFilter);
8002b8a: 683b ldr r3, [r7, #0]
8002b8c: 68db ldr r3, [r3, #12]
TIM_ETR_SetConfig(htim->Instance,
8002b8e: f000 fa71 bl 8003074 <TIM_ETR_SetConfig>
/* Select the External clock mode1 and the ETRF trigger */
tmpsmcr = htim->Instance->SMCR;
8002b92: 687b ldr r3, [r7, #4]
8002b94: 681b ldr r3, [r3, #0]
8002b96: 689b ldr r3, [r3, #8]
8002b98: 60bb str r3, [r7, #8]
tmpsmcr |= (TIM_SLAVEMODE_EXTERNAL1 | TIM_CLOCKSOURCE_ETRMODE1);
8002b9a: 68bb ldr r3, [r7, #8]
8002b9c: f043 0377 orr.w r3, r3, #119 @ 0x77
8002ba0: 60bb str r3, [r7, #8]
/* Write to TIMx SMCR */
htim->Instance->SMCR = tmpsmcr;
8002ba2: 687b ldr r3, [r7, #4]
8002ba4: 681b ldr r3, [r3, #0]
8002ba6: 68ba ldr r2, [r7, #8]
8002ba8: 609a str r2, [r3, #8]
break;
8002baa: e04f b.n 8002c4c <HAL_TIM_ConfigClockSource+0x174>
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,
8002bac: 687b ldr r3, [r7, #4]
8002bae: 6818 ldr r0, [r3, #0]
sClockSourceConfig->ClockPrescaler,
8002bb0: 683b ldr r3, [r7, #0]
8002bb2: 6899 ldr r1, [r3, #8]
sClockSourceConfig->ClockPolarity,
8002bb4: 683b ldr r3, [r7, #0]
8002bb6: 685a ldr r2, [r3, #4]
sClockSourceConfig->ClockFilter);
8002bb8: 683b ldr r3, [r7, #0]
8002bba: 68db ldr r3, [r3, #12]
TIM_ETR_SetConfig(htim->Instance,
8002bbc: f000 fa5a bl 8003074 <TIM_ETR_SetConfig>
/* Enable the External clock mode2 */
htim->Instance->SMCR |= TIM_SMCR_ECE;
8002bc0: 687b ldr r3, [r7, #4]
8002bc2: 681b ldr r3, [r3, #0]
8002bc4: 689a ldr r2, [r3, #8]
8002bc6: 687b ldr r3, [r7, #4]
8002bc8: 681b ldr r3, [r3, #0]
8002bca: f442 4280 orr.w r2, r2, #16384 @ 0x4000
8002bce: 609a str r2, [r3, #8]
break;
8002bd0: e03c b.n 8002c4c <HAL_TIM_ConfigClockSource+0x174>
/* 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,
8002bd2: 687b ldr r3, [r7, #4]
8002bd4: 6818 ldr r0, [r3, #0]
sClockSourceConfig->ClockPolarity,
8002bd6: 683b ldr r3, [r7, #0]
8002bd8: 6859 ldr r1, [r3, #4]
sClockSourceConfig->ClockFilter);
8002bda: 683b ldr r3, [r7, #0]
8002bdc: 68db ldr r3, [r3, #12]
TIM_TI1_ConfigInputStage(htim->Instance,
8002bde: 461a mov r2, r3
8002be0: f000 f9d1 bl 8002f86 <TIM_TI1_ConfigInputStage>
TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI1);
8002be4: 687b ldr r3, [r7, #4]
8002be6: 681b ldr r3, [r3, #0]
8002be8: 2150 movs r1, #80 @ 0x50
8002bea: 4618 mov r0, r3
8002bec: f000 fa28 bl 8003040 <TIM_ITRx_SetConfig>
break;
8002bf0: e02c b.n 8002c4c <HAL_TIM_ConfigClockSource+0x174>
/* 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,
8002bf2: 687b ldr r3, [r7, #4]
8002bf4: 6818 ldr r0, [r3, #0]
sClockSourceConfig->ClockPolarity,
8002bf6: 683b ldr r3, [r7, #0]
8002bf8: 6859 ldr r1, [r3, #4]
sClockSourceConfig->ClockFilter);
8002bfa: 683b ldr r3, [r7, #0]
8002bfc: 68db ldr r3, [r3, #12]
TIM_TI2_ConfigInputStage(htim->Instance,
8002bfe: 461a mov r2, r3
8002c00: f000 f9ef bl 8002fe2 <TIM_TI2_ConfigInputStage>
TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI2);
8002c04: 687b ldr r3, [r7, #4]
8002c06: 681b ldr r3, [r3, #0]
8002c08: 2160 movs r1, #96 @ 0x60
8002c0a: 4618 mov r0, r3
8002c0c: f000 fa18 bl 8003040 <TIM_ITRx_SetConfig>
break;
8002c10: e01c b.n 8002c4c <HAL_TIM_ConfigClockSource+0x174>
/* 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,
8002c12: 687b ldr r3, [r7, #4]
8002c14: 6818 ldr r0, [r3, #0]
sClockSourceConfig->ClockPolarity,
8002c16: 683b ldr r3, [r7, #0]
8002c18: 6859 ldr r1, [r3, #4]
sClockSourceConfig->ClockFilter);
8002c1a: 683b ldr r3, [r7, #0]
8002c1c: 68db ldr r3, [r3, #12]
TIM_TI1_ConfigInputStage(htim->Instance,
8002c1e: 461a mov r2, r3
8002c20: f000 f9b1 bl 8002f86 <TIM_TI1_ConfigInputStage>
TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI1ED);
8002c24: 687b ldr r3, [r7, #4]
8002c26: 681b ldr r3, [r3, #0]
8002c28: 2140 movs r1, #64 @ 0x40
8002c2a: 4618 mov r0, r3
8002c2c: f000 fa08 bl 8003040 <TIM_ITRx_SetConfig>
break;
8002c30: e00c b.n 8002c4c <HAL_TIM_ConfigClockSource+0x174>
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);
8002c32: 687b ldr r3, [r7, #4]
8002c34: 681a ldr r2, [r3, #0]
8002c36: 683b ldr r3, [r7, #0]
8002c38: 681b ldr r3, [r3, #0]
8002c3a: 4619 mov r1, r3
8002c3c: 4610 mov r0, r2
8002c3e: f000 f9ff bl 8003040 <TIM_ITRx_SetConfig>
break;
8002c42: e003 b.n 8002c4c <HAL_TIM_ConfigClockSource+0x174>
}
default:
status = HAL_ERROR;
8002c44: 2301 movs r3, #1
8002c46: 73fb strb r3, [r7, #15]
break;
8002c48: e000 b.n 8002c4c <HAL_TIM_ConfigClockSource+0x174>
break;
8002c4a: bf00 nop
}
htim->State = HAL_TIM_STATE_READY;
8002c4c: 687b ldr r3, [r7, #4]
8002c4e: 2201 movs r2, #1
8002c50: f883 2039 strb.w r2, [r3, #57] @ 0x39
__HAL_UNLOCK(htim);
8002c54: 687b ldr r3, [r7, #4]
8002c56: 2200 movs r2, #0
8002c58: f883 2038 strb.w r2, [r3, #56] @ 0x38
return status;
8002c5c: 7bfb ldrb r3, [r7, #15]
}
8002c5e: 4618 mov r0, r3
8002c60: 3710 adds r7, #16
8002c62: 46bd mov sp, r7
8002c64: bd80 pop {r7, pc}
08002c66 <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)
{
8002c66: b480 push {r7}
8002c68: b083 sub sp, #12
8002c6a: af00 add r7, sp, #0
8002c6c: 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
*/
}
8002c6e: bf00 nop
8002c70: 370c adds r7, #12
8002c72: 46bd mov sp, r7
8002c74: bc80 pop {r7}
8002c76: 4770 bx lr
08002c78 <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)
{
8002c78: b480 push {r7}
8002c7a: b083 sub sp, #12
8002c7c: af00 add r7, sp, #0
8002c7e: 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
*/
}
8002c80: bf00 nop
8002c82: 370c adds r7, #12
8002c84: 46bd mov sp, r7
8002c86: bc80 pop {r7}
8002c88: 4770 bx lr
08002c8a <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)
{
8002c8a: b480 push {r7}
8002c8c: b083 sub sp, #12
8002c8e: af00 add r7, sp, #0
8002c90: 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
*/
}
8002c92: bf00 nop
8002c94: 370c adds r7, #12
8002c96: 46bd mov sp, r7
8002c98: bc80 pop {r7}
8002c9a: 4770 bx lr
08002c9c <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)
{
8002c9c: b480 push {r7}
8002c9e: b083 sub sp, #12
8002ca0: af00 add r7, sp, #0
8002ca2: 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
*/
}
8002ca4: bf00 nop
8002ca6: 370c adds r7, #12
8002ca8: 46bd mov sp, r7
8002caa: bc80 pop {r7}
8002cac: 4770 bx lr
...
08002cb0 <TIM_Base_SetConfig>:
* @param TIMx TIM peripheral
* @param Structure TIM Base configuration structure
* @retval None
*/
static void TIM_Base_SetConfig(TIM_TypeDef *TIMx, const TIM_Base_InitTypeDef *Structure)
{
8002cb0: b480 push {r7}
8002cb2: b085 sub sp, #20
8002cb4: af00 add r7, sp, #0
8002cb6: 6078 str r0, [r7, #4]
8002cb8: 6039 str r1, [r7, #0]
uint32_t tmpcr1;
tmpcr1 = TIMx->CR1;
8002cba: 687b ldr r3, [r7, #4]
8002cbc: 681b ldr r3, [r3, #0]
8002cbe: 60fb str r3, [r7, #12]
/* Set TIM Time Base Unit parameters ---------------------------------------*/
if (IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx))
8002cc0: 687b ldr r3, [r7, #4]
8002cc2: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000
8002cc6: d00f beq.n 8002ce8 <TIM_Base_SetConfig+0x38>
8002cc8: 687b ldr r3, [r7, #4]
8002cca: 4a2e ldr r2, [pc, #184] @ (8002d84 <TIM_Base_SetConfig+0xd4>)
8002ccc: 4293 cmp r3, r2
8002cce: d00b beq.n 8002ce8 <TIM_Base_SetConfig+0x38>
8002cd0: 687b ldr r3, [r7, #4]
8002cd2: 4a2d ldr r2, [pc, #180] @ (8002d88 <TIM_Base_SetConfig+0xd8>)
8002cd4: 4293 cmp r3, r2
8002cd6: d007 beq.n 8002ce8 <TIM_Base_SetConfig+0x38>
8002cd8: 687b ldr r3, [r7, #4]
8002cda: 4a2c ldr r2, [pc, #176] @ (8002d8c <TIM_Base_SetConfig+0xdc>)
8002cdc: 4293 cmp r3, r2
8002cde: d003 beq.n 8002ce8 <TIM_Base_SetConfig+0x38>
8002ce0: 687b ldr r3, [r7, #4]
8002ce2: 4a2b ldr r2, [pc, #172] @ (8002d90 <TIM_Base_SetConfig+0xe0>)
8002ce4: 4293 cmp r3, r2
8002ce6: d108 bne.n 8002cfa <TIM_Base_SetConfig+0x4a>
{
/* Select the Counter Mode */
tmpcr1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS);
8002ce8: 68fb ldr r3, [r7, #12]
8002cea: f023 0370 bic.w r3, r3, #112 @ 0x70
8002cee: 60fb str r3, [r7, #12]
tmpcr1 |= Structure->CounterMode;
8002cf0: 683b ldr r3, [r7, #0]
8002cf2: 685b ldr r3, [r3, #4]
8002cf4: 68fa ldr r2, [r7, #12]
8002cf6: 4313 orrs r3, r2
8002cf8: 60fb str r3, [r7, #12]
}
if (IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx))
8002cfa: 687b ldr r3, [r7, #4]
8002cfc: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000
8002d00: d017 beq.n 8002d32 <TIM_Base_SetConfig+0x82>
8002d02: 687b ldr r3, [r7, #4]
8002d04: 4a1f ldr r2, [pc, #124] @ (8002d84 <TIM_Base_SetConfig+0xd4>)
8002d06: 4293 cmp r3, r2
8002d08: d013 beq.n 8002d32 <TIM_Base_SetConfig+0x82>
8002d0a: 687b ldr r3, [r7, #4]
8002d0c: 4a1e ldr r2, [pc, #120] @ (8002d88 <TIM_Base_SetConfig+0xd8>)
8002d0e: 4293 cmp r3, r2
8002d10: d00f beq.n 8002d32 <TIM_Base_SetConfig+0x82>
8002d12: 687b ldr r3, [r7, #4]
8002d14: 4a1d ldr r2, [pc, #116] @ (8002d8c <TIM_Base_SetConfig+0xdc>)
8002d16: 4293 cmp r3, r2
8002d18: d00b beq.n 8002d32 <TIM_Base_SetConfig+0x82>
8002d1a: 687b ldr r3, [r7, #4]
8002d1c: 4a1c ldr r2, [pc, #112] @ (8002d90 <TIM_Base_SetConfig+0xe0>)
8002d1e: 4293 cmp r3, r2
8002d20: d007 beq.n 8002d32 <TIM_Base_SetConfig+0x82>
8002d22: 687b ldr r3, [r7, #4]
8002d24: 4a1b ldr r2, [pc, #108] @ (8002d94 <TIM_Base_SetConfig+0xe4>)
8002d26: 4293 cmp r3, r2
8002d28: d003 beq.n 8002d32 <TIM_Base_SetConfig+0x82>
8002d2a: 687b ldr r3, [r7, #4]
8002d2c: 4a1a ldr r2, [pc, #104] @ (8002d98 <TIM_Base_SetConfig+0xe8>)
8002d2e: 4293 cmp r3, r2
8002d30: d108 bne.n 8002d44 <TIM_Base_SetConfig+0x94>
{
/* Set the clock division */
tmpcr1 &= ~TIM_CR1_CKD;
8002d32: 68fb ldr r3, [r7, #12]
8002d34: f423 7340 bic.w r3, r3, #768 @ 0x300
8002d38: 60fb str r3, [r7, #12]
tmpcr1 |= (uint32_t)Structure->ClockDivision;
8002d3a: 683b ldr r3, [r7, #0]
8002d3c: 68db ldr r3, [r3, #12]
8002d3e: 68fa ldr r2, [r7, #12]
8002d40: 4313 orrs r3, r2
8002d42: 60fb str r3, [r7, #12]
}
/* Set the auto-reload preload */
MODIFY_REG(tmpcr1, TIM_CR1_ARPE, Structure->AutoReloadPreload);
8002d44: 68fb ldr r3, [r7, #12]
8002d46: f023 0280 bic.w r2, r3, #128 @ 0x80
8002d4a: 683b ldr r3, [r7, #0]
8002d4c: 691b ldr r3, [r3, #16]
8002d4e: 4313 orrs r3, r2
8002d50: 60fb str r3, [r7, #12]
/* Set the Autoreload value */
TIMx->ARR = (uint32_t)Structure->Period ;
8002d52: 683b ldr r3, [r7, #0]
8002d54: 689a ldr r2, [r3, #8]
8002d56: 687b ldr r3, [r7, #4]
8002d58: 62da str r2, [r3, #44] @ 0x2c
/* Set the Prescaler value */
TIMx->PSC = Structure->Prescaler;
8002d5a: 683b ldr r3, [r7, #0]
8002d5c: 681a ldr r2, [r3, #0]
8002d5e: 687b ldr r3, [r7, #4]
8002d60: 629a str r2, [r3, #40] @ 0x28
/* Disable Update Event (UEV) with Update Generation (UG)
by changing Update Request Source (URS) to avoid Update flag (UIF) */
SET_BIT(TIMx->CR1, TIM_CR1_URS);
8002d62: 687b ldr r3, [r7, #4]
8002d64: 681b ldr r3, [r3, #0]
8002d66: f043 0204 orr.w r2, r3, #4
8002d6a: 687b ldr r3, [r7, #4]
8002d6c: 601a str r2, [r3, #0]
/* Generate an update event to reload the Prescaler
and the repetition counter (only for advanced timer) value immediately */
TIMx->EGR = TIM_EGR_UG;
8002d6e: 687b ldr r3, [r7, #4]
8002d70: 2201 movs r2, #1
8002d72: 615a str r2, [r3, #20]
TIMx->CR1 = tmpcr1;
8002d74: 687b ldr r3, [r7, #4]
8002d76: 68fa ldr r2, [r7, #12]
8002d78: 601a str r2, [r3, #0]
}
8002d7a: bf00 nop
8002d7c: 3714 adds r7, #20
8002d7e: 46bd mov sp, r7
8002d80: bc80 pop {r7}
8002d82: 4770 bx lr
8002d84: 40000400 .word 0x40000400
8002d88: 40000800 .word 0x40000800
8002d8c: 40000c00 .word 0x40000c00
8002d90: 40010800 .word 0x40010800
8002d94: 40010c00 .word 0x40010c00
8002d98: 40011000 .word 0x40011000
08002d9c <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)
{
8002d9c: b480 push {r7}
8002d9e: b087 sub sp, #28
8002da0: af00 add r7, sp, #0
8002da2: 6078 str r0, [r7, #4]
8002da4: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
8002da6: 687b ldr r3, [r7, #4]
8002da8: 6a1b ldr r3, [r3, #32]
8002daa: 617b str r3, [r7, #20]
/* Disable the Channel 1: Reset the CC1E Bit */
TIMx->CCER &= ~TIM_CCER_CC1E;
8002dac: 687b ldr r3, [r7, #4]
8002dae: 6a1b ldr r3, [r3, #32]
8002db0: f023 0201 bic.w r2, r3, #1
8002db4: 687b ldr r3, [r7, #4]
8002db6: 621a str r2, [r3, #32]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
8002db8: 687b ldr r3, [r7, #4]
8002dba: 685b ldr r3, [r3, #4]
8002dbc: 613b str r3, [r7, #16]
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR1;
8002dbe: 687b ldr r3, [r7, #4]
8002dc0: 699b ldr r3, [r3, #24]
8002dc2: 60fb str r3, [r7, #12]
/* Reset the Output Compare Mode Bits */
tmpccmrx &= ~TIM_CCMR1_OC1M;
8002dc4: 68fb ldr r3, [r7, #12]
8002dc6: f023 0370 bic.w r3, r3, #112 @ 0x70
8002dca: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR1_CC1S;
8002dcc: 68fb ldr r3, [r7, #12]
8002dce: f023 0303 bic.w r3, r3, #3
8002dd2: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= OC_Config->OCMode;
8002dd4: 683b ldr r3, [r7, #0]
8002dd6: 681b ldr r3, [r3, #0]
8002dd8: 68fa ldr r2, [r7, #12]
8002dda: 4313 orrs r3, r2
8002ddc: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC1P;
8002dde: 697b ldr r3, [r7, #20]
8002de0: f023 0302 bic.w r3, r3, #2
8002de4: 617b str r3, [r7, #20]
/* Set the Output Compare Polarity */
tmpccer |= OC_Config->OCPolarity;
8002de6: 683b ldr r3, [r7, #0]
8002de8: 689b ldr r3, [r3, #8]
8002dea: 697a ldr r2, [r7, #20]
8002dec: 4313 orrs r3, r2
8002dee: 617b str r3, [r7, #20]
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
8002df0: 687b ldr r3, [r7, #4]
8002df2: 693a ldr r2, [r7, #16]
8002df4: 605a str r2, [r3, #4]
/* Write to TIMx CCMR1 */
TIMx->CCMR1 = tmpccmrx;
8002df6: 687b ldr r3, [r7, #4]
8002df8: 68fa ldr r2, [r7, #12]
8002dfa: 619a str r2, [r3, #24]
/* Set the Capture Compare Register value */
TIMx->CCR1 = OC_Config->Pulse;
8002dfc: 683b ldr r3, [r7, #0]
8002dfe: 685a ldr r2, [r3, #4]
8002e00: 687b ldr r3, [r7, #4]
8002e02: 635a str r2, [r3, #52] @ 0x34
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
8002e04: 687b ldr r3, [r7, #4]
8002e06: 697a ldr r2, [r7, #20]
8002e08: 621a str r2, [r3, #32]
}
8002e0a: bf00 nop
8002e0c: 371c adds r7, #28
8002e0e: 46bd mov sp, r7
8002e10: bc80 pop {r7}
8002e12: 4770 bx lr
08002e14 <TIM_OC2_SetConfig>:
* @param TIMx to select the TIM peripheral
* @param OC_Config The output configuration structure
* @retval None
*/
static void TIM_OC2_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
{
8002e14: b480 push {r7}
8002e16: b087 sub sp, #28
8002e18: af00 add r7, sp, #0
8002e1a: 6078 str r0, [r7, #4]
8002e1c: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
8002e1e: 687b ldr r3, [r7, #4]
8002e20: 6a1b ldr r3, [r3, #32]
8002e22: 617b str r3, [r7, #20]
/* Disable the Channel 2: Reset the CC2E Bit */
TIMx->CCER &= ~TIM_CCER_CC2E;
8002e24: 687b ldr r3, [r7, #4]
8002e26: 6a1b ldr r3, [r3, #32]
8002e28: f023 0210 bic.w r2, r3, #16
8002e2c: 687b ldr r3, [r7, #4]
8002e2e: 621a str r2, [r3, #32]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
8002e30: 687b ldr r3, [r7, #4]
8002e32: 685b ldr r3, [r3, #4]
8002e34: 613b str r3, [r7, #16]
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR1;
8002e36: 687b ldr r3, [r7, #4]
8002e38: 699b ldr r3, [r3, #24]
8002e3a: 60fb str r3, [r7, #12]
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= ~TIM_CCMR1_OC2M;
8002e3c: 68fb ldr r3, [r7, #12]
8002e3e: f423 43e0 bic.w r3, r3, #28672 @ 0x7000
8002e42: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR1_CC2S;
8002e44: 68fb ldr r3, [r7, #12]
8002e46: f423 7340 bic.w r3, r3, #768 @ 0x300
8002e4a: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= (OC_Config->OCMode << 8U);
8002e4c: 683b ldr r3, [r7, #0]
8002e4e: 681b ldr r3, [r3, #0]
8002e50: 021b lsls r3, r3, #8
8002e52: 68fa ldr r2, [r7, #12]
8002e54: 4313 orrs r3, r2
8002e56: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC2P;
8002e58: 697b ldr r3, [r7, #20]
8002e5a: f023 0320 bic.w r3, r3, #32
8002e5e: 617b str r3, [r7, #20]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 4U);
8002e60: 683b ldr r3, [r7, #0]
8002e62: 689b ldr r3, [r3, #8]
8002e64: 011b lsls r3, r3, #4
8002e66: 697a ldr r2, [r7, #20]
8002e68: 4313 orrs r3, r2
8002e6a: 617b str r3, [r7, #20]
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
8002e6c: 687b ldr r3, [r7, #4]
8002e6e: 693a ldr r2, [r7, #16]
8002e70: 605a str r2, [r3, #4]
/* Write to TIMx CCMR1 */
TIMx->CCMR1 = tmpccmrx;
8002e72: 687b ldr r3, [r7, #4]
8002e74: 68fa ldr r2, [r7, #12]
8002e76: 619a str r2, [r3, #24]
/* Set the Capture Compare Register value */
TIMx->CCR2 = OC_Config->Pulse;
8002e78: 683b ldr r3, [r7, #0]
8002e7a: 685a ldr r2, [r3, #4]
8002e7c: 687b ldr r3, [r7, #4]
8002e7e: 639a str r2, [r3, #56] @ 0x38
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
8002e80: 687b ldr r3, [r7, #4]
8002e82: 697a ldr r2, [r7, #20]
8002e84: 621a str r2, [r3, #32]
}
8002e86: bf00 nop
8002e88: 371c adds r7, #28
8002e8a: 46bd mov sp, r7
8002e8c: bc80 pop {r7}
8002e8e: 4770 bx lr
08002e90 <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)
{
8002e90: b480 push {r7}
8002e92: b087 sub sp, #28
8002e94: af00 add r7, sp, #0
8002e96: 6078 str r0, [r7, #4]
8002e98: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
8002e9a: 687b ldr r3, [r7, #4]
8002e9c: 6a1b ldr r3, [r3, #32]
8002e9e: 617b str r3, [r7, #20]
/* Disable the Channel 3: Reset the CC2E Bit */
TIMx->CCER &= ~TIM_CCER_CC3E;
8002ea0: 687b ldr r3, [r7, #4]
8002ea2: 6a1b ldr r3, [r3, #32]
8002ea4: f423 7280 bic.w r2, r3, #256 @ 0x100
8002ea8: 687b ldr r3, [r7, #4]
8002eaa: 621a str r2, [r3, #32]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
8002eac: 687b ldr r3, [r7, #4]
8002eae: 685b ldr r3, [r3, #4]
8002eb0: 613b str r3, [r7, #16]
/* Get the TIMx CCMR2 register value */
tmpccmrx = TIMx->CCMR2;
8002eb2: 687b ldr r3, [r7, #4]
8002eb4: 69db ldr r3, [r3, #28]
8002eb6: 60fb str r3, [r7, #12]
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= ~TIM_CCMR2_OC3M;
8002eb8: 68fb ldr r3, [r7, #12]
8002eba: f023 0370 bic.w r3, r3, #112 @ 0x70
8002ebe: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR2_CC3S;
8002ec0: 68fb ldr r3, [r7, #12]
8002ec2: f023 0303 bic.w r3, r3, #3
8002ec6: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= OC_Config->OCMode;
8002ec8: 683b ldr r3, [r7, #0]
8002eca: 681b ldr r3, [r3, #0]
8002ecc: 68fa ldr r2, [r7, #12]
8002ece: 4313 orrs r3, r2
8002ed0: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC3P;
8002ed2: 697b ldr r3, [r7, #20]
8002ed4: f423 7300 bic.w r3, r3, #512 @ 0x200
8002ed8: 617b str r3, [r7, #20]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 8U);
8002eda: 683b ldr r3, [r7, #0]
8002edc: 689b ldr r3, [r3, #8]
8002ede: 021b lsls r3, r3, #8
8002ee0: 697a ldr r2, [r7, #20]
8002ee2: 4313 orrs r3, r2
8002ee4: 617b str r3, [r7, #20]
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
8002ee6: 687b ldr r3, [r7, #4]
8002ee8: 693a ldr r2, [r7, #16]
8002eea: 605a str r2, [r3, #4]
/* Write to TIMx CCMR2 */
TIMx->CCMR2 = tmpccmrx;
8002eec: 687b ldr r3, [r7, #4]
8002eee: 68fa ldr r2, [r7, #12]
8002ef0: 61da str r2, [r3, #28]
/* Set the Capture Compare Register value */
TIMx->CCR3 = OC_Config->Pulse;
8002ef2: 683b ldr r3, [r7, #0]
8002ef4: 685a ldr r2, [r3, #4]
8002ef6: 687b ldr r3, [r7, #4]
8002ef8: 63da str r2, [r3, #60] @ 0x3c
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
8002efa: 687b ldr r3, [r7, #4]
8002efc: 697a ldr r2, [r7, #20]
8002efe: 621a str r2, [r3, #32]
}
8002f00: bf00 nop
8002f02: 371c adds r7, #28
8002f04: 46bd mov sp, r7
8002f06: bc80 pop {r7}
8002f08: 4770 bx lr
08002f0a <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)
{
8002f0a: b480 push {r7}
8002f0c: b087 sub sp, #28
8002f0e: af00 add r7, sp, #0
8002f10: 6078 str r0, [r7, #4]
8002f12: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
8002f14: 687b ldr r3, [r7, #4]
8002f16: 6a1b ldr r3, [r3, #32]
8002f18: 617b str r3, [r7, #20]
/* Disable the Channel 4: Reset the CC4E Bit */
TIMx->CCER &= ~TIM_CCER_CC4E;
8002f1a: 687b ldr r3, [r7, #4]
8002f1c: 6a1b ldr r3, [r3, #32]
8002f1e: f423 5280 bic.w r2, r3, #4096 @ 0x1000
8002f22: 687b ldr r3, [r7, #4]
8002f24: 621a str r2, [r3, #32]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
8002f26: 687b ldr r3, [r7, #4]
8002f28: 685b ldr r3, [r3, #4]
8002f2a: 613b str r3, [r7, #16]
/* Get the TIMx CCMR2 register value */
tmpccmrx = TIMx->CCMR2;
8002f2c: 687b ldr r3, [r7, #4]
8002f2e: 69db ldr r3, [r3, #28]
8002f30: 60fb str r3, [r7, #12]
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= ~TIM_CCMR2_OC4M;
8002f32: 68fb ldr r3, [r7, #12]
8002f34: f423 43e0 bic.w r3, r3, #28672 @ 0x7000
8002f38: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR2_CC4S;
8002f3a: 68fb ldr r3, [r7, #12]
8002f3c: f423 7340 bic.w r3, r3, #768 @ 0x300
8002f40: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= (OC_Config->OCMode << 8U);
8002f42: 683b ldr r3, [r7, #0]
8002f44: 681b ldr r3, [r3, #0]
8002f46: 021b lsls r3, r3, #8
8002f48: 68fa ldr r2, [r7, #12]
8002f4a: 4313 orrs r3, r2
8002f4c: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC4P;
8002f4e: 697b ldr r3, [r7, #20]
8002f50: f423 5300 bic.w r3, r3, #8192 @ 0x2000
8002f54: 617b str r3, [r7, #20]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 12U);
8002f56: 683b ldr r3, [r7, #0]
8002f58: 689b ldr r3, [r3, #8]
8002f5a: 031b lsls r3, r3, #12
8002f5c: 697a ldr r2, [r7, #20]
8002f5e: 4313 orrs r3, r2
8002f60: 617b str r3, [r7, #20]
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
8002f62: 687b ldr r3, [r7, #4]
8002f64: 693a ldr r2, [r7, #16]
8002f66: 605a str r2, [r3, #4]
/* Write to TIMx CCMR2 */
TIMx->CCMR2 = tmpccmrx;
8002f68: 687b ldr r3, [r7, #4]
8002f6a: 68fa ldr r2, [r7, #12]
8002f6c: 61da str r2, [r3, #28]
/* Set the Capture Compare Register value */
TIMx->CCR4 = OC_Config->Pulse;
8002f6e: 683b ldr r3, [r7, #0]
8002f70: 685a ldr r2, [r3, #4]
8002f72: 687b ldr r3, [r7, #4]
8002f74: 641a str r2, [r3, #64] @ 0x40
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
8002f76: 687b ldr r3, [r7, #4]
8002f78: 697a ldr r2, [r7, #20]
8002f7a: 621a str r2, [r3, #32]
}
8002f7c: bf00 nop
8002f7e: 371c adds r7, #28
8002f80: 46bd mov sp, r7
8002f82: bc80 pop {r7}
8002f84: 4770 bx lr
08002f86 <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)
{
8002f86: b480 push {r7}
8002f88: b087 sub sp, #28
8002f8a: af00 add r7, sp, #0
8002f8c: 60f8 str r0, [r7, #12]
8002f8e: 60b9 str r1, [r7, #8]
8002f90: 607a str r2, [r7, #4]
uint32_t tmpccmr1;
uint32_t tmpccer;
/* Disable the Channel 1: Reset the CC1E Bit */
tmpccer = TIMx->CCER;
8002f92: 68fb ldr r3, [r7, #12]
8002f94: 6a1b ldr r3, [r3, #32]
8002f96: 617b str r3, [r7, #20]
TIMx->CCER &= ~TIM_CCER_CC1E;
8002f98: 68fb ldr r3, [r7, #12]
8002f9a: 6a1b ldr r3, [r3, #32]
8002f9c: f023 0201 bic.w r2, r3, #1
8002fa0: 68fb ldr r3, [r7, #12]
8002fa2: 621a str r2, [r3, #32]
tmpccmr1 = TIMx->CCMR1;
8002fa4: 68fb ldr r3, [r7, #12]
8002fa6: 699b ldr r3, [r3, #24]
8002fa8: 613b str r3, [r7, #16]
/* Set the filter */
tmpccmr1 &= ~TIM_CCMR1_IC1F;
8002faa: 693b ldr r3, [r7, #16]
8002fac: f023 03f0 bic.w r3, r3, #240 @ 0xf0
8002fb0: 613b str r3, [r7, #16]
tmpccmr1 |= (TIM_ICFilter << 4U);
8002fb2: 687b ldr r3, [r7, #4]
8002fb4: 011b lsls r3, r3, #4
8002fb6: 693a ldr r2, [r7, #16]
8002fb8: 4313 orrs r3, r2
8002fba: 613b str r3, [r7, #16]
/* Select the Polarity and set the CC1E Bit */
tmpccer &= ~(TIM_CCER_CC1P | TIM_CCER_CC1NP);
8002fbc: 697b ldr r3, [r7, #20]
8002fbe: f023 030a bic.w r3, r3, #10
8002fc2: 617b str r3, [r7, #20]
tmpccer |= TIM_ICPolarity;
8002fc4: 697a ldr r2, [r7, #20]
8002fc6: 68bb ldr r3, [r7, #8]
8002fc8: 4313 orrs r3, r2
8002fca: 617b str r3, [r7, #20]
/* Write to TIMx CCMR1 and CCER registers */
TIMx->CCMR1 = tmpccmr1;
8002fcc: 68fb ldr r3, [r7, #12]
8002fce: 693a ldr r2, [r7, #16]
8002fd0: 619a str r2, [r3, #24]
TIMx->CCER = tmpccer;
8002fd2: 68fb ldr r3, [r7, #12]
8002fd4: 697a ldr r2, [r7, #20]
8002fd6: 621a str r2, [r3, #32]
}
8002fd8: bf00 nop
8002fda: 371c adds r7, #28
8002fdc: 46bd mov sp, r7
8002fde: bc80 pop {r7}
8002fe0: 4770 bx lr
08002fe2 <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)
{
8002fe2: b480 push {r7}
8002fe4: b087 sub sp, #28
8002fe6: af00 add r7, sp, #0
8002fe8: 60f8 str r0, [r7, #12]
8002fea: 60b9 str r1, [r7, #8]
8002fec: 607a str r2, [r7, #4]
uint32_t tmpccmr1;
uint32_t tmpccer;
/* Disable the Channel 2: Reset the CC2E Bit */
tmpccer = TIMx->CCER;
8002fee: 68fb ldr r3, [r7, #12]
8002ff0: 6a1b ldr r3, [r3, #32]
8002ff2: 617b str r3, [r7, #20]
TIMx->CCER &= ~TIM_CCER_CC2E;
8002ff4: 68fb ldr r3, [r7, #12]
8002ff6: 6a1b ldr r3, [r3, #32]
8002ff8: f023 0210 bic.w r2, r3, #16
8002ffc: 68fb ldr r3, [r7, #12]
8002ffe: 621a str r2, [r3, #32]
tmpccmr1 = TIMx->CCMR1;
8003000: 68fb ldr r3, [r7, #12]
8003002: 699b ldr r3, [r3, #24]
8003004: 613b str r3, [r7, #16]
/* Set the filter */
tmpccmr1 &= ~TIM_CCMR1_IC2F;
8003006: 693b ldr r3, [r7, #16]
8003008: f423 4370 bic.w r3, r3, #61440 @ 0xf000
800300c: 613b str r3, [r7, #16]
tmpccmr1 |= (TIM_ICFilter << 12U);
800300e: 687b ldr r3, [r7, #4]
8003010: 031b lsls r3, r3, #12
8003012: 693a ldr r2, [r7, #16]
8003014: 4313 orrs r3, r2
8003016: 613b str r3, [r7, #16]
/* Select the Polarity and set the CC2E Bit */
tmpccer &= ~(TIM_CCER_CC2P | TIM_CCER_CC2NP);
8003018: 697b ldr r3, [r7, #20]
800301a: f023 03a0 bic.w r3, r3, #160 @ 0xa0
800301e: 617b str r3, [r7, #20]
tmpccer |= (TIM_ICPolarity << 4U);
8003020: 68bb ldr r3, [r7, #8]
8003022: 011b lsls r3, r3, #4
8003024: 697a ldr r2, [r7, #20]
8003026: 4313 orrs r3, r2
8003028: 617b str r3, [r7, #20]
/* Write to TIMx CCMR1 and CCER registers */
TIMx->CCMR1 = tmpccmr1 ;
800302a: 68fb ldr r3, [r7, #12]
800302c: 693a ldr r2, [r7, #16]
800302e: 619a str r2, [r3, #24]
TIMx->CCER = tmpccer;
8003030: 68fb ldr r3, [r7, #12]
8003032: 697a ldr r2, [r7, #20]
8003034: 621a str r2, [r3, #32]
}
8003036: bf00 nop
8003038: 371c adds r7, #28
800303a: 46bd mov sp, r7
800303c: bc80 pop {r7}
800303e: 4770 bx lr
08003040 <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)
{
8003040: b480 push {r7}
8003042: b085 sub sp, #20
8003044: af00 add r7, sp, #0
8003046: 6078 str r0, [r7, #4]
8003048: 6039 str r1, [r7, #0]
uint32_t tmpsmcr;
/* Get the TIMx SMCR register value */
tmpsmcr = TIMx->SMCR;
800304a: 687b ldr r3, [r7, #4]
800304c: 689b ldr r3, [r3, #8]
800304e: 60fb str r3, [r7, #12]
/* Reset the TS Bits */
tmpsmcr &= ~TIM_SMCR_TS;
8003050: 68fb ldr r3, [r7, #12]
8003052: f023 0370 bic.w r3, r3, #112 @ 0x70
8003056: 60fb str r3, [r7, #12]
/* Set the Input Trigger source and the slave mode*/
tmpsmcr |= (InputTriggerSource | TIM_SLAVEMODE_EXTERNAL1);
8003058: 683a ldr r2, [r7, #0]
800305a: 68fb ldr r3, [r7, #12]
800305c: 4313 orrs r3, r2
800305e: f043 0307 orr.w r3, r3, #7
8003062: 60fb str r3, [r7, #12]
/* Write to TIMx SMCR */
TIMx->SMCR = tmpsmcr;
8003064: 687b ldr r3, [r7, #4]
8003066: 68fa ldr r2, [r7, #12]
8003068: 609a str r2, [r3, #8]
}
800306a: bf00 nop
800306c: 3714 adds r7, #20
800306e: 46bd mov sp, r7
8003070: bc80 pop {r7}
8003072: 4770 bx lr
08003074 <TIM_ETR_SetConfig>:
* This parameter must be a value between 0x00 and 0x0F
* @retval None
*/
static void TIM_ETR_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ExtTRGPrescaler,
uint32_t TIM_ExtTRGPolarity, uint32_t ExtTRGFilter)
{
8003074: b480 push {r7}
8003076: b087 sub sp, #28
8003078: af00 add r7, sp, #0
800307a: 60f8 str r0, [r7, #12]
800307c: 60b9 str r1, [r7, #8]
800307e: 607a str r2, [r7, #4]
8003080: 603b str r3, [r7, #0]
uint32_t tmpsmcr;
tmpsmcr = TIMx->SMCR;
8003082: 68fb ldr r3, [r7, #12]
8003084: 689b ldr r3, [r3, #8]
8003086: 617b str r3, [r7, #20]
/* Reset the ETR Bits */
tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP);
8003088: 697b ldr r3, [r7, #20]
800308a: f423 437f bic.w r3, r3, #65280 @ 0xff00
800308e: 617b str r3, [r7, #20]
/* Set the Prescaler, the Filter value and the Polarity */
tmpsmcr |= (uint32_t)(TIM_ExtTRGPrescaler | (TIM_ExtTRGPolarity | (ExtTRGFilter << 8U)));
8003090: 683b ldr r3, [r7, #0]
8003092: 021a lsls r2, r3, #8
8003094: 687b ldr r3, [r7, #4]
8003096: 431a orrs r2, r3
8003098: 68bb ldr r3, [r7, #8]
800309a: 4313 orrs r3, r2
800309c: 697a ldr r2, [r7, #20]
800309e: 4313 orrs r3, r2
80030a0: 617b str r3, [r7, #20]
/* Write to TIMx SMCR */
TIMx->SMCR = tmpsmcr;
80030a2: 68fb ldr r3, [r7, #12]
80030a4: 697a ldr r2, [r7, #20]
80030a6: 609a str r2, [r3, #8]
}
80030a8: bf00 nop
80030aa: 371c adds r7, #28
80030ac: 46bd mov sp, r7
80030ae: bc80 pop {r7}
80030b0: 4770 bx lr
080030b2 <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
*/
static void TIM_CCxChannelCmd(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ChannelState)
{
80030b2: b480 push {r7}
80030b4: b087 sub sp, #28
80030b6: af00 add r7, sp, #0
80030b8: 60f8 str r0, [r7, #12]
80030ba: 60b9 str r1, [r7, #8]
80030bc: 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 */
80030be: 68bb ldr r3, [r7, #8]
80030c0: f003 031f and.w r3, r3, #31
80030c4: 2201 movs r2, #1
80030c6: fa02 f303 lsl.w r3, r2, r3
80030ca: 617b str r3, [r7, #20]
/* Reset the CCxE Bit */
TIMx->CCER &= ~tmp;
80030cc: 68fb ldr r3, [r7, #12]
80030ce: 6a1a ldr r2, [r3, #32]
80030d0: 697b ldr r3, [r7, #20]
80030d2: 43db mvns r3, r3
80030d4: 401a ands r2, r3
80030d6: 68fb ldr r3, [r7, #12]
80030d8: 621a str r2, [r3, #32]
/* Set or reset the CCxE Bit */
TIMx->CCER |= (uint32_t)(ChannelState << (Channel & 0x1FU)); /* 0x1FU = 31 bits max shift */
80030da: 68fb ldr r3, [r7, #12]
80030dc: 6a1a ldr r2, [r3, #32]
80030de: 68bb ldr r3, [r7, #8]
80030e0: f003 031f and.w r3, r3, #31
80030e4: 6879 ldr r1, [r7, #4]
80030e6: fa01 f303 lsl.w r3, r1, r3
80030ea: 431a orrs r2, r3
80030ec: 68fb ldr r3, [r7, #12]
80030ee: 621a str r2, [r3, #32]
}
80030f0: bf00 nop
80030f2: 371c adds r7, #28
80030f4: 46bd mov sp, r7
80030f6: bc80 pop {r7}
80030f8: 4770 bx lr
...
080030fc <HAL_TIMEx_MasterConfigSynchronization>:
* mode.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
const TIM_MasterConfigTypeDef *sMasterConfig)
{
80030fc: b480 push {r7}
80030fe: b085 sub sp, #20
8003100: af00 add r7, sp, #0
8003102: 6078 str r0, [r7, #4]
8003104: 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);
8003106: 687b ldr r3, [r7, #4]
8003108: f893 3038 ldrb.w r3, [r3, #56] @ 0x38
800310c: 2b01 cmp r3, #1
800310e: d101 bne.n 8003114 <HAL_TIMEx_MasterConfigSynchronization+0x18>
8003110: 2302 movs r3, #2
8003112: e046 b.n 80031a2 <HAL_TIMEx_MasterConfigSynchronization+0xa6>
8003114: 687b ldr r3, [r7, #4]
8003116: 2201 movs r2, #1
8003118: f883 2038 strb.w r2, [r3, #56] @ 0x38
/* Change the handler state */
htim->State = HAL_TIM_STATE_BUSY;
800311c: 687b ldr r3, [r7, #4]
800311e: 2202 movs r2, #2
8003120: f883 2039 strb.w r2, [r3, #57] @ 0x39
/* Get the TIMx CR2 register value */
tmpcr2 = htim->Instance->CR2;
8003124: 687b ldr r3, [r7, #4]
8003126: 681b ldr r3, [r3, #0]
8003128: 685b ldr r3, [r3, #4]
800312a: 60fb str r3, [r7, #12]
/* Get the TIMx SMCR register value */
tmpsmcr = htim->Instance->SMCR;
800312c: 687b ldr r3, [r7, #4]
800312e: 681b ldr r3, [r3, #0]
8003130: 689b ldr r3, [r3, #8]
8003132: 60bb str r3, [r7, #8]
/* Reset the MMS Bits */
tmpcr2 &= ~TIM_CR2_MMS;
8003134: 68fb ldr r3, [r7, #12]
8003136: f023 0370 bic.w r3, r3, #112 @ 0x70
800313a: 60fb str r3, [r7, #12]
/* Select the TRGO source */
tmpcr2 |= sMasterConfig->MasterOutputTrigger;
800313c: 683b ldr r3, [r7, #0]
800313e: 681b ldr r3, [r3, #0]
8003140: 68fa ldr r2, [r7, #12]
8003142: 4313 orrs r3, r2
8003144: 60fb str r3, [r7, #12]
/* Update TIMx CR2 */
htim->Instance->CR2 = tmpcr2;
8003146: 687b ldr r3, [r7, #4]
8003148: 681b ldr r3, [r3, #0]
800314a: 68fa ldr r2, [r7, #12]
800314c: 605a str r2, [r3, #4]
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
800314e: 687b ldr r3, [r7, #4]
8003150: 681b ldr r3, [r3, #0]
8003152: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000
8003156: d00e beq.n 8003176 <HAL_TIMEx_MasterConfigSynchronization+0x7a>
8003158: 687b ldr r3, [r7, #4]
800315a: 681b ldr r3, [r3, #0]
800315c: 4a13 ldr r2, [pc, #76] @ (80031ac <HAL_TIMEx_MasterConfigSynchronization+0xb0>)
800315e: 4293 cmp r3, r2
8003160: d009 beq.n 8003176 <HAL_TIMEx_MasterConfigSynchronization+0x7a>
8003162: 687b ldr r3, [r7, #4]
8003164: 681b ldr r3, [r3, #0]
8003166: 4a12 ldr r2, [pc, #72] @ (80031b0 <HAL_TIMEx_MasterConfigSynchronization+0xb4>)
8003168: 4293 cmp r3, r2
800316a: d004 beq.n 8003176 <HAL_TIMEx_MasterConfigSynchronization+0x7a>
800316c: 687b ldr r3, [r7, #4]
800316e: 681b ldr r3, [r3, #0]
8003170: 4a10 ldr r2, [pc, #64] @ (80031b4 <HAL_TIMEx_MasterConfigSynchronization+0xb8>)
8003172: 4293 cmp r3, r2
8003174: d10c bne.n 8003190 <HAL_TIMEx_MasterConfigSynchronization+0x94>
{
/* Reset the MSM Bit */
tmpsmcr &= ~TIM_SMCR_MSM;
8003176: 68bb ldr r3, [r7, #8]
8003178: f023 0380 bic.w r3, r3, #128 @ 0x80
800317c: 60bb str r3, [r7, #8]
/* Set master mode */
tmpsmcr |= sMasterConfig->MasterSlaveMode;
800317e: 683b ldr r3, [r7, #0]
8003180: 685b ldr r3, [r3, #4]
8003182: 68ba ldr r2, [r7, #8]
8003184: 4313 orrs r3, r2
8003186: 60bb str r3, [r7, #8]
/* Update TIMx SMCR */
htim->Instance->SMCR = tmpsmcr;
8003188: 687b ldr r3, [r7, #4]
800318a: 681b ldr r3, [r3, #0]
800318c: 68ba ldr r2, [r7, #8]
800318e: 609a str r2, [r3, #8]
}
/* Change the htim state */
htim->State = HAL_TIM_STATE_READY;
8003190: 687b ldr r3, [r7, #4]
8003192: 2201 movs r2, #1
8003194: f883 2039 strb.w r2, [r3, #57] @ 0x39
__HAL_UNLOCK(htim);
8003198: 687b ldr r3, [r7, #4]
800319a: 2200 movs r2, #0
800319c: f883 2038 strb.w r2, [r3, #56] @ 0x38
return HAL_OK;
80031a0: 2300 movs r3, #0
}
80031a2: 4618 mov r0, r3
80031a4: 3714 adds r7, #20
80031a6: 46bd mov sp, r7
80031a8: bc80 pop {r7}
80031aa: 4770 bx lr
80031ac: 40000400 .word 0x40000400
80031b0: 40000800 .word 0x40000800
80031b4: 40010800 .word 0x40010800
080031b8 <memset>:
80031b8: 4603 mov r3, r0
80031ba: 4402 add r2, r0
80031bc: 4293 cmp r3, r2
80031be: d100 bne.n 80031c2 <memset+0xa>
80031c0: 4770 bx lr
80031c2: f803 1b01 strb.w r1, [r3], #1
80031c6: e7f9 b.n 80031bc <memset+0x4>
080031c8 <__libc_init_array>:
80031c8: b570 push {r4, r5, r6, lr}
80031ca: 2600 movs r6, #0
80031cc: 4d0c ldr r5, [pc, #48] @ (8003200 <__libc_init_array+0x38>)
80031ce: 4c0d ldr r4, [pc, #52] @ (8003204 <__libc_init_array+0x3c>)
80031d0: 1b64 subs r4, r4, r5
80031d2: 10a4 asrs r4, r4, #2
80031d4: 42a6 cmp r6, r4
80031d6: d109 bne.n 80031ec <__libc_init_array+0x24>
80031d8: f000 f81a bl 8003210 <_init>
80031dc: 2600 movs r6, #0
80031de: 4d0a ldr r5, [pc, #40] @ (8003208 <__libc_init_array+0x40>)
80031e0: 4c0a ldr r4, [pc, #40] @ (800320c <__libc_init_array+0x44>)
80031e2: 1b64 subs r4, r4, r5
80031e4: 10a4 asrs r4, r4, #2
80031e6: 42a6 cmp r6, r4
80031e8: d105 bne.n 80031f6 <__libc_init_array+0x2e>
80031ea: bd70 pop {r4, r5, r6, pc}
80031ec: f855 3b04 ldr.w r3, [r5], #4
80031f0: 4798 blx r3
80031f2: 3601 adds r6, #1
80031f4: e7ee b.n 80031d4 <__libc_init_array+0xc>
80031f6: f855 3b04 ldr.w r3, [r5], #4
80031fa: 4798 blx r3
80031fc: 3601 adds r6, #1
80031fe: e7f2 b.n 80031e6 <__libc_init_array+0x1e>
8003200: 0800324c .word 0x0800324c
8003204: 0800324c .word 0x0800324c
8003208: 0800324c .word 0x0800324c
800320c: 08003250 .word 0x08003250
08003210 <_init>:
8003210: b5f8 push {r3, r4, r5, r6, r7, lr}
8003212: bf00 nop
8003214: bcf8 pop {r3, r4, r5, r6, r7}
8003216: bc08 pop {r3}
8003218: 469e mov lr, r3
800321a: 4770 bx lr
0800321c <_fini>:
800321c: b5f8 push {r3, r4, r5, r6, r7, lr}
800321e: bf00 nop
8003220: bcf8 pop {r3, r4, r5, r6, r7}
8003222: bc08 pop {r3}
8003224: 469e mov lr, r3
8003226: 4770 bx lr