2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
access_control_stm32.elf: file format elf32-littlearm
|
|
|
|
|
|
|
|
Sections:
|
|
|
|
Idx Name Size VMA LMA File off Algn
|
|
|
|
0 .isr_vector 00000198 08000000 08000000 00010000 2**0
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, DATA
|
2023-09-17 10:40:31 +00:00
|
|
|
1 .text 00002074 08000198 08000198 00010198 2**2
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
2023-09-17 10:40:31 +00:00
|
|
|
2 .rodata 00000018 0800220c 0800220c 0001220c 2**2
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, DATA
|
2023-09-17 10:40:31 +00:00
|
|
|
3 .ARM.extab 00000000 08002224 08002224 0002000c 2**0
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS
|
2023-09-17 10:40:31 +00:00
|
|
|
4 .ARM 00000008 08002224 08002224 00012224 2**2
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, DATA
|
2023-09-17 10:40:31 +00:00
|
|
|
5 .preinit_array 00000000 0800222c 0800222c 0002000c 2**0
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS, ALLOC, LOAD, DATA
|
2023-09-17 10:40:31 +00:00
|
|
|
6 .init_array 00000004 0800222c 0800222c 0001222c 2**2
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS, ALLOC, LOAD, DATA
|
2023-09-17 10:40:31 +00:00
|
|
|
7 .fini_array 00000004 08002230 08002230 00012230 2**2
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS, ALLOC, LOAD, DATA
|
2023-09-17 10:40:31 +00:00
|
|
|
8 .data 0000000c 20000000 08002234 00020000 2**2
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS, ALLOC, LOAD, DATA
|
2023-09-17 10:40:31 +00:00
|
|
|
9 .bss 00000070 2000000c 08002240 0002000c 2**2
|
2023-09-17 08:27:41 +00:00
|
|
|
ALLOC
|
2023-09-17 10:40:31 +00:00
|
|
|
10 ._user_heap_stack 00000604 2000007c 08002240 0002007c 2**0
|
2023-09-17 08:27:41 +00:00
|
|
|
ALLOC
|
|
|
|
11 .ARM.attributes 00000030 00000000 00000000 0002000c 2**0
|
|
|
|
CONTENTS, READONLY
|
|
|
|
12 .comment 00000043 00000000 00000000 0002003c 2**0
|
|
|
|
CONTENTS, READONLY
|
2023-09-17 10:40:31 +00:00
|
|
|
13 .debug_info 0000712d 00000000 00000000 0002007f 2**0
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
2023-09-17 10:40:31 +00:00
|
|
|
14 .debug_abbrev 000012ea 00000000 00000000 000271ac 2**0
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
2023-09-17 10:40:31 +00:00
|
|
|
15 .debug_aranges 00000608 00000000 00000000 00028498 2**3
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
2023-09-17 10:40:31 +00:00
|
|
|
16 .debug_rnglists 0000049d 00000000 00000000 00028aa0 2**0
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
2023-09-17 10:40:31 +00:00
|
|
|
17 .debug_macro 0001529b 00000000 00000000 00028f3d 2**0
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
2023-09-17 10:40:31 +00:00
|
|
|
18 .debug_line 00007af4 00000000 00000000 0003e1d8 2**0
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
2023-09-17 10:40:31 +00:00
|
|
|
19 .debug_str 0008506e 00000000 00000000 00045ccc 2**0
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
2023-09-17 10:40:31 +00:00
|
|
|
20 .debug_frame 000017a8 00000000 00000000 000cad3c 2**2
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
2023-09-17 10:40:31 +00:00
|
|
|
21 .debug_line_str 00000059 00000000 00000000 000cc4e4 2**0
|
2023-09-17 08:27:41 +00:00
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
|
|
|
|
|
|
Disassembly of section .text:
|
|
|
|
|
|
|
|
08000198 <__do_global_dtors_aux>:
|
|
|
|
8000198: b510 push {r4, lr}
|
|
|
|
800019a: 4c05 ldr r4, [pc, #20] ; (80001b0 <__do_global_dtors_aux+0x18>)
|
|
|
|
800019c: 7823 ldrb r3, [r4, #0]
|
|
|
|
800019e: b933 cbnz r3, 80001ae <__do_global_dtors_aux+0x16>
|
|
|
|
80001a0: 4b04 ldr r3, [pc, #16] ; (80001b4 <__do_global_dtors_aux+0x1c>)
|
|
|
|
80001a2: b113 cbz r3, 80001aa <__do_global_dtors_aux+0x12>
|
|
|
|
80001a4: 4804 ldr r0, [pc, #16] ; (80001b8 <__do_global_dtors_aux+0x20>)
|
|
|
|
80001a6: f3af 8000 nop.w
|
|
|
|
80001aa: 2301 movs r3, #1
|
|
|
|
80001ac: 7023 strb r3, [r4, #0]
|
|
|
|
80001ae: bd10 pop {r4, pc}
|
|
|
|
80001b0: 2000000c .word 0x2000000c
|
|
|
|
80001b4: 00000000 .word 0x00000000
|
2023-09-17 10:40:31 +00:00
|
|
|
80001b8: 080021f4 .word 0x080021f4
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
080001bc <frame_dummy>:
|
|
|
|
80001bc: b508 push {r3, lr}
|
|
|
|
80001be: 4b03 ldr r3, [pc, #12] ; (80001cc <frame_dummy+0x10>)
|
|
|
|
80001c0: b11b cbz r3, 80001ca <frame_dummy+0xe>
|
|
|
|
80001c2: 4903 ldr r1, [pc, #12] ; (80001d0 <frame_dummy+0x14>)
|
|
|
|
80001c4: 4803 ldr r0, [pc, #12] ; (80001d4 <frame_dummy+0x18>)
|
|
|
|
80001c6: f3af 8000 nop.w
|
|
|
|
80001ca: bd08 pop {r3, pc}
|
|
|
|
80001cc: 00000000 .word 0x00000000
|
|
|
|
80001d0: 20000010 .word 0x20000010
|
2023-09-17 10:40:31 +00:00
|
|
|
80001d4: 080021f4 .word 0x080021f4
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
080001d8 <__aeabi_uldivmod>:
|
|
|
|
80001d8: b953 cbnz r3, 80001f0 <__aeabi_uldivmod+0x18>
|
|
|
|
80001da: b94a cbnz r2, 80001f0 <__aeabi_uldivmod+0x18>
|
|
|
|
80001dc: 2900 cmp r1, #0
|
|
|
|
80001de: bf08 it eq
|
|
|
|
80001e0: 2800 cmpeq r0, #0
|
|
|
|
80001e2: bf1c itt ne
|
|
|
|
80001e4: f04f 31ff movne.w r1, #4294967295
|
|
|
|
80001e8: f04f 30ff movne.w r0, #4294967295
|
|
|
|
80001ec: f000 b970 b.w 80004d0 <__aeabi_idiv0>
|
|
|
|
80001f0: f1ad 0c08 sub.w ip, sp, #8
|
|
|
|
80001f4: e96d ce04 strd ip, lr, [sp, #-16]!
|
|
|
|
80001f8: f000 f806 bl 8000208 <__udivmoddi4>
|
|
|
|
80001fc: f8dd e004 ldr.w lr, [sp, #4]
|
|
|
|
8000200: e9dd 2302 ldrd r2, r3, [sp, #8]
|
|
|
|
8000204: b004 add sp, #16
|
|
|
|
8000206: 4770 bx lr
|
|
|
|
|
|
|
|
08000208 <__udivmoddi4>:
|
|
|
|
8000208: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
|
|
|
|
800020c: 9e08 ldr r6, [sp, #32]
|
|
|
|
800020e: 460d mov r5, r1
|
|
|
|
8000210: 4604 mov r4, r0
|
|
|
|
8000212: 460f mov r7, r1
|
|
|
|
8000214: 2b00 cmp r3, #0
|
|
|
|
8000216: d14a bne.n 80002ae <__udivmoddi4+0xa6>
|
|
|
|
8000218: 428a cmp r2, r1
|
|
|
|
800021a: 4694 mov ip, r2
|
|
|
|
800021c: d965 bls.n 80002ea <__udivmoddi4+0xe2>
|
|
|
|
800021e: fab2 f382 clz r3, r2
|
|
|
|
8000222: b143 cbz r3, 8000236 <__udivmoddi4+0x2e>
|
|
|
|
8000224: fa02 fc03 lsl.w ip, r2, r3
|
|
|
|
8000228: f1c3 0220 rsb r2, r3, #32
|
|
|
|
800022c: 409f lsls r7, r3
|
|
|
|
800022e: fa20 f202 lsr.w r2, r0, r2
|
|
|
|
8000232: 4317 orrs r7, r2
|
|
|
|
8000234: 409c lsls r4, r3
|
|
|
|
8000236: ea4f 4e1c mov.w lr, ip, lsr #16
|
|
|
|
800023a: fa1f f58c uxth.w r5, ip
|
|
|
|
800023e: fbb7 f1fe udiv r1, r7, lr
|
|
|
|
8000242: 0c22 lsrs r2, r4, #16
|
|
|
|
8000244: fb0e 7711 mls r7, lr, r1, r7
|
|
|
|
8000248: ea42 4207 orr.w r2, r2, r7, lsl #16
|
|
|
|
800024c: fb01 f005 mul.w r0, r1, r5
|
|
|
|
8000250: 4290 cmp r0, r2
|
|
|
|
8000252: d90a bls.n 800026a <__udivmoddi4+0x62>
|
|
|
|
8000254: eb1c 0202 adds.w r2, ip, r2
|
|
|
|
8000258: f101 37ff add.w r7, r1, #4294967295
|
|
|
|
800025c: f080 811c bcs.w 8000498 <__udivmoddi4+0x290>
|
|
|
|
8000260: 4290 cmp r0, r2
|
|
|
|
8000262: f240 8119 bls.w 8000498 <__udivmoddi4+0x290>
|
|
|
|
8000266: 3902 subs r1, #2
|
|
|
|
8000268: 4462 add r2, ip
|
|
|
|
800026a: 1a12 subs r2, r2, r0
|
|
|
|
800026c: b2a4 uxth r4, r4
|
|
|
|
800026e: fbb2 f0fe udiv r0, r2, lr
|
|
|
|
8000272: fb0e 2210 mls r2, lr, r0, r2
|
|
|
|
8000276: ea44 4402 orr.w r4, r4, r2, lsl #16
|
|
|
|
800027a: fb00 f505 mul.w r5, r0, r5
|
|
|
|
800027e: 42a5 cmp r5, r4
|
|
|
|
8000280: d90a bls.n 8000298 <__udivmoddi4+0x90>
|
|
|
|
8000282: eb1c 0404 adds.w r4, ip, r4
|
|
|
|
8000286: f100 32ff add.w r2, r0, #4294967295
|
|
|
|
800028a: f080 8107 bcs.w 800049c <__udivmoddi4+0x294>
|
|
|
|
800028e: 42a5 cmp r5, r4
|
|
|
|
8000290: f240 8104 bls.w 800049c <__udivmoddi4+0x294>
|
|
|
|
8000294: 4464 add r4, ip
|
|
|
|
8000296: 3802 subs r0, #2
|
|
|
|
8000298: ea40 4001 orr.w r0, r0, r1, lsl #16
|
|
|
|
800029c: 1b64 subs r4, r4, r5
|
|
|
|
800029e: 2100 movs r1, #0
|
|
|
|
80002a0: b11e cbz r6, 80002aa <__udivmoddi4+0xa2>
|
|
|
|
80002a2: 40dc lsrs r4, r3
|
|
|
|
80002a4: 2300 movs r3, #0
|
|
|
|
80002a6: e9c6 4300 strd r4, r3, [r6]
|
|
|
|
80002aa: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
|
|
|
|
80002ae: 428b cmp r3, r1
|
|
|
|
80002b0: d908 bls.n 80002c4 <__udivmoddi4+0xbc>
|
|
|
|
80002b2: 2e00 cmp r6, #0
|
|
|
|
80002b4: f000 80ed beq.w 8000492 <__udivmoddi4+0x28a>
|
|
|
|
80002b8: 2100 movs r1, #0
|
|
|
|
80002ba: e9c6 0500 strd r0, r5, [r6]
|
|
|
|
80002be: 4608 mov r0, r1
|
|
|
|
80002c0: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
|
|
|
|
80002c4: fab3 f183 clz r1, r3
|
|
|
|
80002c8: 2900 cmp r1, #0
|
|
|
|
80002ca: d149 bne.n 8000360 <__udivmoddi4+0x158>
|
|
|
|
80002cc: 42ab cmp r3, r5
|
|
|
|
80002ce: d302 bcc.n 80002d6 <__udivmoddi4+0xce>
|
|
|
|
80002d0: 4282 cmp r2, r0
|
|
|
|
80002d2: f200 80f8 bhi.w 80004c6 <__udivmoddi4+0x2be>
|
|
|
|
80002d6: 1a84 subs r4, r0, r2
|
|
|
|
80002d8: eb65 0203 sbc.w r2, r5, r3
|
|
|
|
80002dc: 2001 movs r0, #1
|
|
|
|
80002de: 4617 mov r7, r2
|
|
|
|
80002e0: 2e00 cmp r6, #0
|
|
|
|
80002e2: d0e2 beq.n 80002aa <__udivmoddi4+0xa2>
|
|
|
|
80002e4: e9c6 4700 strd r4, r7, [r6]
|
|
|
|
80002e8: e7df b.n 80002aa <__udivmoddi4+0xa2>
|
|
|
|
80002ea: b902 cbnz r2, 80002ee <__udivmoddi4+0xe6>
|
|
|
|
80002ec: deff udf #255 ; 0xff
|
|
|
|
80002ee: fab2 f382 clz r3, r2
|
|
|
|
80002f2: 2b00 cmp r3, #0
|
|
|
|
80002f4: f040 8090 bne.w 8000418 <__udivmoddi4+0x210>
|
|
|
|
80002f8: 1a8a subs r2, r1, r2
|
|
|
|
80002fa: ea4f 471c mov.w r7, ip, lsr #16
|
|
|
|
80002fe: fa1f fe8c uxth.w lr, ip
|
|
|
|
8000302: 2101 movs r1, #1
|
|
|
|
8000304: fbb2 f5f7 udiv r5, r2, r7
|
|
|
|
8000308: fb07 2015 mls r0, r7, r5, r2
|
|
|
|
800030c: 0c22 lsrs r2, r4, #16
|
|
|
|
800030e: ea42 4200 orr.w r2, r2, r0, lsl #16
|
|
|
|
8000312: fb0e f005 mul.w r0, lr, r5
|
|
|
|
8000316: 4290 cmp r0, r2
|
|
|
|
8000318: d908 bls.n 800032c <__udivmoddi4+0x124>
|
|
|
|
800031a: eb1c 0202 adds.w r2, ip, r2
|
|
|
|
800031e: f105 38ff add.w r8, r5, #4294967295
|
|
|
|
8000322: d202 bcs.n 800032a <__udivmoddi4+0x122>
|
|
|
|
8000324: 4290 cmp r0, r2
|
|
|
|
8000326: f200 80cb bhi.w 80004c0 <__udivmoddi4+0x2b8>
|
|
|
|
800032a: 4645 mov r5, r8
|
|
|
|
800032c: 1a12 subs r2, r2, r0
|
|
|
|
800032e: b2a4 uxth r4, r4
|
|
|
|
8000330: fbb2 f0f7 udiv r0, r2, r7
|
|
|
|
8000334: fb07 2210 mls r2, r7, r0, r2
|
|
|
|
8000338: ea44 4402 orr.w r4, r4, r2, lsl #16
|
|
|
|
800033c: fb0e fe00 mul.w lr, lr, r0
|
|
|
|
8000340: 45a6 cmp lr, r4
|
|
|
|
8000342: d908 bls.n 8000356 <__udivmoddi4+0x14e>
|
|
|
|
8000344: eb1c 0404 adds.w r4, ip, r4
|
|
|
|
8000348: f100 32ff add.w r2, r0, #4294967295
|
|
|
|
800034c: d202 bcs.n 8000354 <__udivmoddi4+0x14c>
|
|
|
|
800034e: 45a6 cmp lr, r4
|
|
|
|
8000350: f200 80bb bhi.w 80004ca <__udivmoddi4+0x2c2>
|
|
|
|
8000354: 4610 mov r0, r2
|
|
|
|
8000356: eba4 040e sub.w r4, r4, lr
|
|
|
|
800035a: ea40 4005 orr.w r0, r0, r5, lsl #16
|
|
|
|
800035e: e79f b.n 80002a0 <__udivmoddi4+0x98>
|
|
|
|
8000360: f1c1 0720 rsb r7, r1, #32
|
|
|
|
8000364: 408b lsls r3, r1
|
|
|
|
8000366: fa22 fc07 lsr.w ip, r2, r7
|
|
|
|
800036a: ea4c 0c03 orr.w ip, ip, r3
|
|
|
|
800036e: fa05 f401 lsl.w r4, r5, r1
|
|
|
|
8000372: fa20 f307 lsr.w r3, r0, r7
|
|
|
|
8000376: 40fd lsrs r5, r7
|
|
|
|
8000378: ea4f 491c mov.w r9, ip, lsr #16
|
|
|
|
800037c: 4323 orrs r3, r4
|
|
|
|
800037e: fbb5 f8f9 udiv r8, r5, r9
|
|
|
|
8000382: fa1f fe8c uxth.w lr, ip
|
|
|
|
8000386: fb09 5518 mls r5, r9, r8, r5
|
|
|
|
800038a: 0c1c lsrs r4, r3, #16
|
|
|
|
800038c: ea44 4405 orr.w r4, r4, r5, lsl #16
|
|
|
|
8000390: fb08 f50e mul.w r5, r8, lr
|
|
|
|
8000394: 42a5 cmp r5, r4
|
|
|
|
8000396: fa02 f201 lsl.w r2, r2, r1
|
|
|
|
800039a: fa00 f001 lsl.w r0, r0, r1
|
|
|
|
800039e: d90b bls.n 80003b8 <__udivmoddi4+0x1b0>
|
|
|
|
80003a0: eb1c 0404 adds.w r4, ip, r4
|
|
|
|
80003a4: f108 3aff add.w sl, r8, #4294967295
|
|
|
|
80003a8: f080 8088 bcs.w 80004bc <__udivmoddi4+0x2b4>
|
|
|
|
80003ac: 42a5 cmp r5, r4
|
|
|
|
80003ae: f240 8085 bls.w 80004bc <__udivmoddi4+0x2b4>
|
|
|
|
80003b2: f1a8 0802 sub.w r8, r8, #2
|
|
|
|
80003b6: 4464 add r4, ip
|
|
|
|
80003b8: 1b64 subs r4, r4, r5
|
|
|
|
80003ba: b29d uxth r5, r3
|
|
|
|
80003bc: fbb4 f3f9 udiv r3, r4, r9
|
|
|
|
80003c0: fb09 4413 mls r4, r9, r3, r4
|
|
|
|
80003c4: ea45 4404 orr.w r4, r5, r4, lsl #16
|
|
|
|
80003c8: fb03 fe0e mul.w lr, r3, lr
|
|
|
|
80003cc: 45a6 cmp lr, r4
|
|
|
|
80003ce: d908 bls.n 80003e2 <__udivmoddi4+0x1da>
|
|
|
|
80003d0: eb1c 0404 adds.w r4, ip, r4
|
|
|
|
80003d4: f103 35ff add.w r5, r3, #4294967295
|
|
|
|
80003d8: d26c bcs.n 80004b4 <__udivmoddi4+0x2ac>
|
|
|
|
80003da: 45a6 cmp lr, r4
|
|
|
|
80003dc: d96a bls.n 80004b4 <__udivmoddi4+0x2ac>
|
|
|
|
80003de: 3b02 subs r3, #2
|
|
|
|
80003e0: 4464 add r4, ip
|
|
|
|
80003e2: ea43 4308 orr.w r3, r3, r8, lsl #16
|
|
|
|
80003e6: fba3 9502 umull r9, r5, r3, r2
|
|
|
|
80003ea: eba4 040e sub.w r4, r4, lr
|
|
|
|
80003ee: 42ac cmp r4, r5
|
|
|
|
80003f0: 46c8 mov r8, r9
|
|
|
|
80003f2: 46ae mov lr, r5
|
|
|
|
80003f4: d356 bcc.n 80004a4 <__udivmoddi4+0x29c>
|
|
|
|
80003f6: d053 beq.n 80004a0 <__udivmoddi4+0x298>
|
|
|
|
80003f8: b156 cbz r6, 8000410 <__udivmoddi4+0x208>
|
|
|
|
80003fa: ebb0 0208 subs.w r2, r0, r8
|
|
|
|
80003fe: eb64 040e sbc.w r4, r4, lr
|
|
|
|
8000402: fa04 f707 lsl.w r7, r4, r7
|
|
|
|
8000406: 40ca lsrs r2, r1
|
|
|
|
8000408: 40cc lsrs r4, r1
|
|
|
|
800040a: 4317 orrs r7, r2
|
|
|
|
800040c: e9c6 7400 strd r7, r4, [r6]
|
|
|
|
8000410: 4618 mov r0, r3
|
|
|
|
8000412: 2100 movs r1, #0
|
|
|
|
8000414: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
|
|
|
|
8000418: f1c3 0120 rsb r1, r3, #32
|
|
|
|
800041c: fa02 fc03 lsl.w ip, r2, r3
|
|
|
|
8000420: fa20 f201 lsr.w r2, r0, r1
|
|
|
|
8000424: fa25 f101 lsr.w r1, r5, r1
|
|
|
|
8000428: 409d lsls r5, r3
|
|
|
|
800042a: 432a orrs r2, r5
|
|
|
|
800042c: ea4f 471c mov.w r7, ip, lsr #16
|
|
|
|
8000430: fa1f fe8c uxth.w lr, ip
|
|
|
|
8000434: fbb1 f0f7 udiv r0, r1, r7
|
|
|
|
8000438: fb07 1510 mls r5, r7, r0, r1
|
|
|
|
800043c: 0c11 lsrs r1, r2, #16
|
|
|
|
800043e: ea41 4105 orr.w r1, r1, r5, lsl #16
|
|
|
|
8000442: fb00 f50e mul.w r5, r0, lr
|
|
|
|
8000446: 428d cmp r5, r1
|
|
|
|
8000448: fa04 f403 lsl.w r4, r4, r3
|
|
|
|
800044c: d908 bls.n 8000460 <__udivmoddi4+0x258>
|
|
|
|
800044e: eb1c 0101 adds.w r1, ip, r1
|
|
|
|
8000452: f100 38ff add.w r8, r0, #4294967295
|
|
|
|
8000456: d22f bcs.n 80004b8 <__udivmoddi4+0x2b0>
|
|
|
|
8000458: 428d cmp r5, r1
|
|
|
|
800045a: d92d bls.n 80004b8 <__udivmoddi4+0x2b0>
|
|
|
|
800045c: 3802 subs r0, #2
|
|
|
|
800045e: 4461 add r1, ip
|
|
|
|
8000460: 1b49 subs r1, r1, r5
|
|
|
|
8000462: b292 uxth r2, r2
|
|
|
|
8000464: fbb1 f5f7 udiv r5, r1, r7
|
|
|
|
8000468: fb07 1115 mls r1, r7, r5, r1
|
|
|
|
800046c: ea42 4201 orr.w r2, r2, r1, lsl #16
|
|
|
|
8000470: fb05 f10e mul.w r1, r5, lr
|
|
|
|
8000474: 4291 cmp r1, r2
|
|
|
|
8000476: d908 bls.n 800048a <__udivmoddi4+0x282>
|
|
|
|
8000478: eb1c 0202 adds.w r2, ip, r2
|
|
|
|
800047c: f105 38ff add.w r8, r5, #4294967295
|
|
|
|
8000480: d216 bcs.n 80004b0 <__udivmoddi4+0x2a8>
|
|
|
|
8000482: 4291 cmp r1, r2
|
|
|
|
8000484: d914 bls.n 80004b0 <__udivmoddi4+0x2a8>
|
|
|
|
8000486: 3d02 subs r5, #2
|
|
|
|
8000488: 4462 add r2, ip
|
|
|
|
800048a: 1a52 subs r2, r2, r1
|
|
|
|
800048c: ea45 4100 orr.w r1, r5, r0, lsl #16
|
|
|
|
8000490: e738 b.n 8000304 <__udivmoddi4+0xfc>
|
|
|
|
8000492: 4631 mov r1, r6
|
|
|
|
8000494: 4630 mov r0, r6
|
|
|
|
8000496: e708 b.n 80002aa <__udivmoddi4+0xa2>
|
|
|
|
8000498: 4639 mov r1, r7
|
|
|
|
800049a: e6e6 b.n 800026a <__udivmoddi4+0x62>
|
|
|
|
800049c: 4610 mov r0, r2
|
|
|
|
800049e: e6fb b.n 8000298 <__udivmoddi4+0x90>
|
|
|
|
80004a0: 4548 cmp r0, r9
|
|
|
|
80004a2: d2a9 bcs.n 80003f8 <__udivmoddi4+0x1f0>
|
|
|
|
80004a4: ebb9 0802 subs.w r8, r9, r2
|
|
|
|
80004a8: eb65 0e0c sbc.w lr, r5, ip
|
|
|
|
80004ac: 3b01 subs r3, #1
|
|
|
|
80004ae: e7a3 b.n 80003f8 <__udivmoddi4+0x1f0>
|
|
|
|
80004b0: 4645 mov r5, r8
|
|
|
|
80004b2: e7ea b.n 800048a <__udivmoddi4+0x282>
|
|
|
|
80004b4: 462b mov r3, r5
|
|
|
|
80004b6: e794 b.n 80003e2 <__udivmoddi4+0x1da>
|
|
|
|
80004b8: 4640 mov r0, r8
|
|
|
|
80004ba: e7d1 b.n 8000460 <__udivmoddi4+0x258>
|
|
|
|
80004bc: 46d0 mov r8, sl
|
|
|
|
80004be: e77b b.n 80003b8 <__udivmoddi4+0x1b0>
|
|
|
|
80004c0: 3d02 subs r5, #2
|
|
|
|
80004c2: 4462 add r2, ip
|
|
|
|
80004c4: e732 b.n 800032c <__udivmoddi4+0x124>
|
|
|
|
80004c6: 4608 mov r0, r1
|
|
|
|
80004c8: e70a b.n 80002e0 <__udivmoddi4+0xd8>
|
|
|
|
80004ca: 4464 add r4, ip
|
|
|
|
80004cc: 3802 subs r0, #2
|
|
|
|
80004ce: e742 b.n 8000356 <__udivmoddi4+0x14e>
|
|
|
|
|
|
|
|
080004d0 <__aeabi_idiv0>:
|
|
|
|
80004d0: 4770 bx lr
|
|
|
|
80004d2: bf00 nop
|
|
|
|
|
|
|
|
080004d4 <main>:
|
2023-09-17 09:18:33 +00:00
|
|
|
|
2023-09-17 08:27:41 +00:00
|
|
|
/**
|
2023-09-17 09:18:33 +00:00
|
|
|
* @brief The application entry point.
|
|
|
|
* @retval int
|
|
|
|
*/
|
|
|
|
int main(void) {
|
2023-09-17 08:27:41 +00:00
|
|
|
80004d4: b580 push {r7, lr}
|
2023-09-17 09:57:40 +00:00
|
|
|
80004d6: b082 sub sp, #8
|
|
|
|
80004d8: af00 add r7, sp, #0
|
2023-09-17 09:18:33 +00:00
|
|
|
/* USER CODE END 1 */
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 09:18:33 +00:00
|
|
|
/* MCU Configuration--------------------------------------------------------*/
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 09:18:33 +00:00
|
|
|
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
|
|
|
|
HAL_Init();
|
2023-09-17 10:40:31 +00:00
|
|
|
80004da: f000 fa55 bl 8000988 <HAL_Init>
|
2023-09-17 09:18:33 +00:00
|
|
|
/* USER CODE BEGIN Init */
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 09:18:33 +00:00
|
|
|
/* USER CODE END Init */
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 09:18:33 +00:00
|
|
|
/* Configure the system clock */
|
|
|
|
SystemClock_Config();
|
2023-09-17 10:40:31 +00:00
|
|
|
80004de: f000 f867 bl 80005b0 <SystemClock_Config>
|
2023-09-17 09:18:33 +00:00
|
|
|
/* USER CODE BEGIN SysInit */
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 09:18:33 +00:00
|
|
|
/* USER CODE END SysInit */
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 09:18:33 +00:00
|
|
|
/* Initialize all configured peripherals */
|
|
|
|
MX_GPIO_Init();
|
2023-09-17 10:40:31 +00:00
|
|
|
80004e2: f000 f8f9 bl 80006d8 <MX_GPIO_Init>
|
2023-09-17 09:18:33 +00:00
|
|
|
MX_USART2_UART_Init();
|
2023-09-17 10:40:31 +00:00
|
|
|
80004e6: f000 f8cd bl 8000684 <MX_USART2_UART_Init>
|
2023-09-17 09:18:33 +00:00
|
|
|
/* USER CODE BEGIN 2 */
|
|
|
|
memset(uart_buffer, 0, 10);
|
2023-09-17 09:57:40 +00:00
|
|
|
80004ea: 220a movs r2, #10
|
|
|
|
80004ec: 2100 movs r1, #0
|
2023-09-17 10:40:31 +00:00
|
|
|
80004ee: 482c ldr r0, [pc, #176] ; (80005a0 <main+0xcc>)
|
|
|
|
80004f0: f001 fe54 bl 800219c <memset>
|
2023-09-17 09:57:40 +00:00
|
|
|
|
|
|
|
/* Infinite loop */
|
|
|
|
/* USER CODE BEGIN WHILE */
|
|
|
|
while (1) {
|
|
|
|
|
|
|
|
if (HAL_UART_Receive(&huart2, uart_buffer + uart_index, 1, 250)
|
2023-09-17 10:40:31 +00:00
|
|
|
80004f4: 4b2b ldr r3, [pc, #172] ; (80005a4 <main+0xd0>)
|
2023-09-17 09:57:40 +00:00
|
|
|
80004f6: 781b ldrb r3, [r3, #0]
|
|
|
|
80004f8: 461a mov r2, r3
|
2023-09-17 10:40:31 +00:00
|
|
|
80004fa: 4b29 ldr r3, [pc, #164] ; (80005a0 <main+0xcc>)
|
2023-09-17 09:57:40 +00:00
|
|
|
80004fc: 18d1 adds r1, r2, r3
|
|
|
|
80004fe: 23fa movs r3, #250 ; 0xfa
|
|
|
|
8000500: 2201 movs r2, #1
|
2023-09-17 10:40:31 +00:00
|
|
|
8000502: 4829 ldr r0, [pc, #164] ; (80005a8 <main+0xd4>)
|
|
|
|
8000504: f001 fac5 bl 8001a92 <HAL_UART_Receive>
|
2023-09-17 09:57:40 +00:00
|
|
|
8000508: 4603 mov r3, r0
|
|
|
|
800050a: 2b00 cmp r3, #0
|
|
|
|
800050c: d1f2 bne.n 80004f4 <main+0x20>
|
|
|
|
== HAL_OK) {
|
|
|
|
uart_index++;
|
2023-09-17 10:40:31 +00:00
|
|
|
800050e: 4b25 ldr r3, [pc, #148] ; (80005a4 <main+0xd0>)
|
2023-09-17 09:57:40 +00:00
|
|
|
8000510: 781b ldrb r3, [r3, #0]
|
|
|
|
8000512: 3301 adds r3, #1
|
|
|
|
8000514: b2da uxtb r2, r3
|
2023-09-17 10:40:31 +00:00
|
|
|
8000516: 4b23 ldr r3, [pc, #140] ; (80005a4 <main+0xd0>)
|
2023-09-17 09:57:40 +00:00
|
|
|
8000518: 701a strb r2, [r3, #0]
|
|
|
|
if (uart_buffer[uart_index - 1] == 0xFF) {
|
2023-09-17 10:40:31 +00:00
|
|
|
800051a: 4b22 ldr r3, [pc, #136] ; (80005a4 <main+0xd0>)
|
2023-09-17 09:57:40 +00:00
|
|
|
800051c: 781b ldrb r3, [r3, #0]
|
|
|
|
800051e: 3b01 subs r3, #1
|
2023-09-17 10:40:31 +00:00
|
|
|
8000520: 4a1f ldr r2, [pc, #124] ; (80005a0 <main+0xcc>)
|
2023-09-17 09:57:40 +00:00
|
|
|
8000522: 5cd3 ldrb r3, [r2, r3]
|
|
|
|
8000524: 2bff cmp r3, #255 ; 0xff
|
|
|
|
8000526: d1e5 bne.n 80004f4 <main+0x20>
|
|
|
|
if (uart_index > 1) {
|
2023-09-17 10:40:31 +00:00
|
|
|
8000528: 4b1e ldr r3, [pc, #120] ; (80005a4 <main+0xd0>)
|
2023-09-17 09:57:40 +00:00
|
|
|
800052a: 781b ldrb r3, [r3, #0]
|
|
|
|
800052c: 2b01 cmp r3, #1
|
2023-09-17 10:40:31 +00:00
|
|
|
800052e: d92d bls.n 800058c <main+0xb8>
|
2023-09-17 09:57:40 +00:00
|
|
|
if (uart_buffer[0] == 0x00) {
|
2023-09-17 10:40:31 +00:00
|
|
|
8000530: 4b1b ldr r3, [pc, #108] ; (80005a0 <main+0xcc>)
|
2023-09-17 09:57:40 +00:00
|
|
|
8000532: 781b ldrb r3, [r3, #0]
|
|
|
|
8000534: 2b00 cmp r3, #0
|
|
|
|
8000536: d107 bne.n 8000548 <main+0x74>
|
|
|
|
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, uart_buffer[1]);
|
2023-09-17 10:40:31 +00:00
|
|
|
8000538: 4b19 ldr r3, [pc, #100] ; (80005a0 <main+0xcc>)
|
2023-09-17 09:57:40 +00:00
|
|
|
800053a: 785b ldrb r3, [r3, #1]
|
|
|
|
800053c: 461a mov r2, r3
|
|
|
|
800053e: 2120 movs r1, #32
|
2023-09-17 10:40:31 +00:00
|
|
|
8000540: 481a ldr r0, [pc, #104] ; (80005ac <main+0xd8>)
|
|
|
|
8000542: f000 fd15 bl 8000f70 <HAL_GPIO_WritePin>
|
|
|
|
8000546: e021 b.n 800058c <main+0xb8>
|
2023-09-17 09:57:40 +00:00
|
|
|
} else if (uart_buffer[0] == 0x01) {
|
2023-09-17 10:40:31 +00:00
|
|
|
8000548: 4b15 ldr r3, [pc, #84] ; (80005a0 <main+0xcc>)
|
2023-09-17 09:57:40 +00:00
|
|
|
800054a: 781b ldrb r3, [r3, #0]
|
|
|
|
800054c: 2b01 cmp r3, #1
|
2023-09-17 10:40:31 +00:00
|
|
|
800054e: d111 bne.n 8000574 <main+0xa0>
|
2023-09-17 09:57:40 +00:00
|
|
|
uint8_t payload[3] = { 0x01, HAL_GPIO_ReadPin(GPIOA,
|
|
|
|
8000550: 2301 movs r3, #1
|
|
|
|
8000552: 713b strb r3, [r7, #4]
|
|
|
|
8000554: 2180 movs r1, #128 ; 0x80
|
2023-09-17 10:40:31 +00:00
|
|
|
8000556: 4815 ldr r0, [pc, #84] ; (80005ac <main+0xd8>)
|
|
|
|
8000558: f000 fcf2 bl 8000f40 <HAL_GPIO_ReadPin>
|
2023-09-17 09:57:40 +00:00
|
|
|
800055c: 4603 mov r3, r0
|
|
|
|
800055e: 717b strb r3, [r7, #5]
|
|
|
|
8000560: 23ff movs r3, #255 ; 0xff
|
|
|
|
8000562: 71bb strb r3, [r7, #6]
|
|
|
|
GPIO_PIN_7), 0xFF };
|
|
|
|
HAL_UART_Transmit(&huart2, payload, 3, 1500);
|
|
|
|
8000564: 1d39 adds r1, r7, #4
|
|
|
|
8000566: f240 53dc movw r3, #1500 ; 0x5dc
|
|
|
|
800056a: 2203 movs r2, #3
|
2023-09-17 10:40:31 +00:00
|
|
|
800056c: 480e ldr r0, [pc, #56] ; (80005a8 <main+0xd4>)
|
|
|
|
800056e: f001 f9fe bl 800196e <HAL_UART_Transmit>
|
|
|
|
8000572: e00b b.n 800058c <main+0xb8>
|
|
|
|
} else if (uart_buffer[0] == 0x02) {
|
|
|
|
8000574: 4b0a ldr r3, [pc, #40] ; (80005a0 <main+0xcc>)
|
|
|
|
8000576: 781b ldrb r3, [r3, #0]
|
|
|
|
8000578: 2b02 cmp r3, #2
|
|
|
|
800057a: d107 bne.n 800058c <main+0xb8>
|
|
|
|
//HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_9);
|
|
|
|
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_9, uart_buffer[1]);
|
|
|
|
800057c: 4b08 ldr r3, [pc, #32] ; (80005a0 <main+0xcc>)
|
|
|
|
800057e: 785b ldrb r3, [r3, #1]
|
|
|
|
8000580: 461a mov r2, r3
|
|
|
|
8000582: f44f 7100 mov.w r1, #512 ; 0x200
|
|
|
|
8000586: 4809 ldr r0, [pc, #36] ; (80005ac <main+0xd8>)
|
|
|
|
8000588: f000 fcf2 bl 8000f70 <HAL_GPIO_WritePin>
|
2023-09-17 09:57:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
uart_index = 0;
|
2023-09-17 10:40:31 +00:00
|
|
|
800058c: 4b05 ldr r3, [pc, #20] ; (80005a4 <main+0xd0>)
|
|
|
|
800058e: 2200 movs r2, #0
|
|
|
|
8000590: 701a strb r2, [r3, #0]
|
2023-09-17 09:57:40 +00:00
|
|
|
memset(uart_buffer, 0, 10);
|
2023-09-17 10:40:31 +00:00
|
|
|
8000592: 220a movs r2, #10
|
|
|
|
8000594: 2100 movs r1, #0
|
|
|
|
8000596: 4802 ldr r0, [pc, #8] ; (80005a0 <main+0xcc>)
|
|
|
|
8000598: f001 fe00 bl 800219c <memset>
|
2023-09-17 09:57:40 +00:00
|
|
|
if (HAL_UART_Receive(&huart2, uart_buffer + uart_index, 1, 250)
|
2023-09-17 10:40:31 +00:00
|
|
|
800059c: e7aa b.n 80004f4 <main+0x20>
|
|
|
|
800059e: bf00 nop
|
|
|
|
80005a0: 2000006c .word 0x2000006c
|
|
|
|
80005a4: 20000076 .word 0x20000076
|
|
|
|
80005a8: 20000028 .word 0x20000028
|
|
|
|
80005ac: 40020000 .word 0x40020000
|
2023-09-17 09:57:40 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
080005b0 <SystemClock_Config>:
|
2023-09-17 09:18:33 +00:00
|
|
|
|
2023-09-17 08:27:41 +00:00
|
|
|
/**
|
2023-09-17 09:18:33 +00:00
|
|
|
* @brief System Clock Configuration
|
|
|
|
* @retval None
|
|
|
|
*/
|
|
|
|
void SystemClock_Config(void) {
|
2023-09-17 10:40:31 +00:00
|
|
|
80005b0: b580 push {r7, lr}
|
|
|
|
80005b2: b094 sub sp, #80 ; 0x50
|
|
|
|
80005b4: af00 add r7, sp, #0
|
2023-09-17 09:18:33 +00:00
|
|
|
RCC_OscInitTypeDef RCC_OscInitStruct = { 0 };
|
2023-09-17 10:40:31 +00:00
|
|
|
80005b6: f107 0320 add.w r3, r7, #32
|
|
|
|
80005ba: 2230 movs r2, #48 ; 0x30
|
|
|
|
80005bc: 2100 movs r1, #0
|
|
|
|
80005be: 4618 mov r0, r3
|
|
|
|
80005c0: f001 fdec bl 800219c <memset>
|
2023-09-17 09:18:33 +00:00
|
|
|
RCC_ClkInitTypeDef RCC_ClkInitStruct = { 0 };
|
2023-09-17 10:40:31 +00:00
|
|
|
80005c4: f107 030c add.w r3, r7, #12
|
|
|
|
80005c8: 2200 movs r2, #0
|
|
|
|
80005ca: 601a str r2, [r3, #0]
|
|
|
|
80005cc: 605a str r2, [r3, #4]
|
|
|
|
80005ce: 609a str r2, [r3, #8]
|
|
|
|
80005d0: 60da str r2, [r3, #12]
|
|
|
|
80005d2: 611a str r2, [r3, #16]
|
2023-09-17 09:18:33 +00:00
|
|
|
|
|
|
|
/** Configure the main internal regulator output voltage
|
|
|
|
*/
|
|
|
|
__HAL_RCC_PWR_CLK_ENABLE();
|
2023-09-17 09:57:40 +00:00
|
|
|
80005d4: 2300 movs r3, #0
|
2023-09-17 10:40:31 +00:00
|
|
|
80005d6: 60bb str r3, [r7, #8]
|
|
|
|
80005d8: 4b28 ldr r3, [pc, #160] ; (800067c <SystemClock_Config+0xcc>)
|
|
|
|
80005da: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
|
|
80005dc: 4a27 ldr r2, [pc, #156] ; (800067c <SystemClock_Config+0xcc>)
|
|
|
|
80005de: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
|
|
|
|
80005e2: 6413 str r3, [r2, #64] ; 0x40
|
|
|
|
80005e4: 4b25 ldr r3, [pc, #148] ; (800067c <SystemClock_Config+0xcc>)
|
|
|
|
80005e6: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
|
|
80005e8: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
|
|
|
|
80005ec: 60bb str r3, [r7, #8]
|
|
|
|
80005ee: 68bb ldr r3, [r7, #8]
|
|
|
|
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
|
|
|
|
80005f0: 2300 movs r3, #0
|
|
|
|
80005f2: 607b str r3, [r7, #4]
|
|
|
|
80005f4: 4b22 ldr r3, [pc, #136] ; (8000680 <SystemClock_Config+0xd0>)
|
|
|
|
80005f6: 681b ldr r3, [r3, #0]
|
|
|
|
80005f8: 4a21 ldr r2, [pc, #132] ; (8000680 <SystemClock_Config+0xd0>)
|
|
|
|
80005fa: f443 4340 orr.w r3, r3, #49152 ; 0xc000
|
|
|
|
80005fe: 6013 str r3, [r2, #0]
|
|
|
|
8000600: 4b1f ldr r3, [pc, #124] ; (8000680 <SystemClock_Config+0xd0>)
|
|
|
|
8000602: 681b ldr r3, [r3, #0]
|
|
|
|
8000604: f403 4340 and.w r3, r3, #49152 ; 0xc000
|
|
|
|
8000608: 607b str r3, [r7, #4]
|
|
|
|
800060a: 687b ldr r3, [r7, #4]
|
2023-09-17 09:18:33 +00:00
|
|
|
|
|
|
|
/** Initializes the RCC Oscillators according to the specified parameters
|
|
|
|
* in the RCC_OscInitTypeDef structure.
|
|
|
|
*/
|
|
|
|
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
|
2023-09-17 10:40:31 +00:00
|
|
|
800060c: 2302 movs r3, #2
|
|
|
|
800060e: 623b str r3, [r7, #32]
|
2023-09-17 09:18:33 +00:00
|
|
|
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000610: 2301 movs r3, #1
|
|
|
|
8000612: 62fb str r3, [r7, #44] ; 0x2c
|
2023-09-17 09:18:33 +00:00
|
|
|
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000614: 2310 movs r3, #16
|
|
|
|
8000616: 633b str r3, [r7, #48] ; 0x30
|
2023-09-17 09:18:33 +00:00
|
|
|
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000618: 2302 movs r3, #2
|
|
|
|
800061a: 63bb str r3, [r7, #56] ; 0x38
|
2023-09-17 09:18:33 +00:00
|
|
|
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
|
2023-09-17 10:40:31 +00:00
|
|
|
800061c: 2300 movs r3, #0
|
|
|
|
800061e: 63fb str r3, [r7, #60] ; 0x3c
|
2023-09-17 09:18:33 +00:00
|
|
|
RCC_OscInitStruct.PLL.PLLM = 16;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000620: 2310 movs r3, #16
|
|
|
|
8000622: 643b str r3, [r7, #64] ; 0x40
|
2023-09-17 09:18:33 +00:00
|
|
|
RCC_OscInitStruct.PLL.PLLN = 336;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000624: f44f 73a8 mov.w r3, #336 ; 0x150
|
|
|
|
8000628: 647b str r3, [r7, #68] ; 0x44
|
2023-09-17 09:18:33 +00:00
|
|
|
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4;
|
2023-09-17 10:40:31 +00:00
|
|
|
800062a: 2304 movs r3, #4
|
|
|
|
800062c: 64bb str r3, [r7, #72] ; 0x48
|
2023-09-17 09:18:33 +00:00
|
|
|
RCC_OscInitStruct.PLL.PLLQ = 4;
|
2023-09-17 10:40:31 +00:00
|
|
|
800062e: 2304 movs r3, #4
|
|
|
|
8000630: 64fb str r3, [r7, #76] ; 0x4c
|
2023-09-17 09:18:33 +00:00
|
|
|
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
|
2023-09-17 10:40:31 +00:00
|
|
|
8000632: f107 0320 add.w r3, r7, #32
|
|
|
|
8000636: 4618 mov r0, r3
|
|
|
|
8000638: f000 fcb4 bl 8000fa4 <HAL_RCC_OscConfig>
|
|
|
|
800063c: 4603 mov r3, r0
|
|
|
|
800063e: 2b00 cmp r3, #0
|
|
|
|
8000640: d001 beq.n 8000646 <SystemClock_Config+0x96>
|
2023-09-17 09:18:33 +00:00
|
|
|
Error_Handler();
|
2023-09-17 10:40:31 +00:00
|
|
|
8000642: f000 f8c5 bl 80007d0 <Error_Handler>
|
2023-09-17 09:18:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/** Initializes the CPU, AHB and APB buses clocks
|
|
|
|
*/
|
|
|
|
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
|
2023-09-17 10:40:31 +00:00
|
|
|
8000646: 230f movs r3, #15
|
|
|
|
8000648: 60fb str r3, [r7, #12]
|
2023-09-17 09:18:33 +00:00
|
|
|
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
|
|
|
|
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
2023-09-17 10:40:31 +00:00
|
|
|
800064a: 2302 movs r3, #2
|
|
|
|
800064c: 613b str r3, [r7, #16]
|
2023-09-17 09:18:33 +00:00
|
|
|
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
|
2023-09-17 10:40:31 +00:00
|
|
|
800064e: 2300 movs r3, #0
|
|
|
|
8000650: 617b str r3, [r7, #20]
|
2023-09-17 09:18:33 +00:00
|
|
|
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000652: f44f 5380 mov.w r3, #4096 ; 0x1000
|
|
|
|
8000656: 61bb str r3, [r7, #24]
|
2023-09-17 09:18:33 +00:00
|
|
|
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000658: 2300 movs r3, #0
|
|
|
|
800065a: 61fb str r3, [r7, #28]
|
2023-09-17 09:18:33 +00:00
|
|
|
|
|
|
|
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) {
|
2023-09-17 10:40:31 +00:00
|
|
|
800065c: f107 030c add.w r3, r7, #12
|
|
|
|
8000660: 2102 movs r1, #2
|
|
|
|
8000662: 4618 mov r0, r3
|
|
|
|
8000664: f000 ff16 bl 8001494 <HAL_RCC_ClockConfig>
|
|
|
|
8000668: 4603 mov r3, r0
|
|
|
|
800066a: 2b00 cmp r3, #0
|
|
|
|
800066c: d001 beq.n 8000672 <SystemClock_Config+0xc2>
|
2023-09-17 09:18:33 +00:00
|
|
|
Error_Handler();
|
2023-09-17 10:40:31 +00:00
|
|
|
800066e: f000 f8af bl 80007d0 <Error_Handler>
|
2023-09-17 09:18:33 +00:00
|
|
|
}
|
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000672: bf00 nop
|
|
|
|
8000674: 3750 adds r7, #80 ; 0x50
|
|
|
|
8000676: 46bd mov sp, r7
|
|
|
|
8000678: bd80 pop {r7, pc}
|
|
|
|
800067a: bf00 nop
|
|
|
|
800067c: 40023800 .word 0x40023800
|
|
|
|
8000680: 40007000 .word 0x40007000
|
|
|
|
|
|
|
|
08000684 <MX_USART2_UART_Init>:
|
2023-09-17 09:18:33 +00:00
|
|
|
/**
|
|
|
|
* @brief USART2 Initialization Function
|
|
|
|
* @param None
|
|
|
|
* @retval None
|
|
|
|
*/
|
|
|
|
static void MX_USART2_UART_Init(void) {
|
2023-09-17 10:40:31 +00:00
|
|
|
8000684: b580 push {r7, lr}
|
|
|
|
8000686: af00 add r7, sp, #0
|
2023-09-17 09:18:33 +00:00
|
|
|
/* USER CODE END USART2_Init 0 */
|
|
|
|
|
|
|
|
/* USER CODE BEGIN USART2_Init 1 */
|
|
|
|
|
|
|
|
/* USER CODE END USART2_Init 1 */
|
|
|
|
huart2.Instance = USART2;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000688: 4b11 ldr r3, [pc, #68] ; (80006d0 <MX_USART2_UART_Init+0x4c>)
|
|
|
|
800068a: 4a12 ldr r2, [pc, #72] ; (80006d4 <MX_USART2_UART_Init+0x50>)
|
|
|
|
800068c: 601a str r2, [r3, #0]
|
2023-09-17 09:18:33 +00:00
|
|
|
huart2.Init.BaudRate = 115200;
|
2023-09-17 10:40:31 +00:00
|
|
|
800068e: 4b10 ldr r3, [pc, #64] ; (80006d0 <MX_USART2_UART_Init+0x4c>)
|
|
|
|
8000690: f44f 32e1 mov.w r2, #115200 ; 0x1c200
|
|
|
|
8000694: 605a str r2, [r3, #4]
|
2023-09-17 09:18:33 +00:00
|
|
|
huart2.Init.WordLength = UART_WORDLENGTH_8B;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000696: 4b0e ldr r3, [pc, #56] ; (80006d0 <MX_USART2_UART_Init+0x4c>)
|
|
|
|
8000698: 2200 movs r2, #0
|
|
|
|
800069a: 609a str r2, [r3, #8]
|
2023-09-17 09:18:33 +00:00
|
|
|
huart2.Init.StopBits = UART_STOPBITS_1;
|
2023-09-17 10:40:31 +00:00
|
|
|
800069c: 4b0c ldr r3, [pc, #48] ; (80006d0 <MX_USART2_UART_Init+0x4c>)
|
|
|
|
800069e: 2200 movs r2, #0
|
|
|
|
80006a0: 60da str r2, [r3, #12]
|
2023-09-17 09:18:33 +00:00
|
|
|
huart2.Init.Parity = UART_PARITY_NONE;
|
2023-09-17 10:40:31 +00:00
|
|
|
80006a2: 4b0b ldr r3, [pc, #44] ; (80006d0 <MX_USART2_UART_Init+0x4c>)
|
|
|
|
80006a4: 2200 movs r2, #0
|
|
|
|
80006a6: 611a str r2, [r3, #16]
|
2023-09-17 09:18:33 +00:00
|
|
|
huart2.Init.Mode = UART_MODE_TX_RX;
|
2023-09-17 10:40:31 +00:00
|
|
|
80006a8: 4b09 ldr r3, [pc, #36] ; (80006d0 <MX_USART2_UART_Init+0x4c>)
|
|
|
|
80006aa: 220c movs r2, #12
|
|
|
|
80006ac: 615a str r2, [r3, #20]
|
2023-09-17 09:18:33 +00:00
|
|
|
huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
|
2023-09-17 10:40:31 +00:00
|
|
|
80006ae: 4b08 ldr r3, [pc, #32] ; (80006d0 <MX_USART2_UART_Init+0x4c>)
|
|
|
|
80006b0: 2200 movs r2, #0
|
|
|
|
80006b2: 619a str r2, [r3, #24]
|
2023-09-17 09:18:33 +00:00
|
|
|
huart2.Init.OverSampling = UART_OVERSAMPLING_16;
|
2023-09-17 10:40:31 +00:00
|
|
|
80006b4: 4b06 ldr r3, [pc, #24] ; (80006d0 <MX_USART2_UART_Init+0x4c>)
|
|
|
|
80006b6: 2200 movs r2, #0
|
|
|
|
80006b8: 61da str r2, [r3, #28]
|
2023-09-17 09:18:33 +00:00
|
|
|
if (HAL_UART_Init(&huart2) != HAL_OK) {
|
2023-09-17 10:40:31 +00:00
|
|
|
80006ba: 4805 ldr r0, [pc, #20] ; (80006d0 <MX_USART2_UART_Init+0x4c>)
|
|
|
|
80006bc: f001 f90a bl 80018d4 <HAL_UART_Init>
|
|
|
|
80006c0: 4603 mov r3, r0
|
|
|
|
80006c2: 2b00 cmp r3, #0
|
|
|
|
80006c4: d001 beq.n 80006ca <MX_USART2_UART_Init+0x46>
|
2023-09-17 09:18:33 +00:00
|
|
|
Error_Handler();
|
2023-09-17 10:40:31 +00:00
|
|
|
80006c6: f000 f883 bl 80007d0 <Error_Handler>
|
2023-09-17 09:18:33 +00:00
|
|
|
}
|
|
|
|
/* USER CODE BEGIN USART2_Init 2 */
|
|
|
|
|
|
|
|
/* USER CODE END USART2_Init 2 */
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
80006ca: bf00 nop
|
|
|
|
80006cc: bd80 pop {r7, pc}
|
|
|
|
80006ce: bf00 nop
|
|
|
|
80006d0: 20000028 .word 0x20000028
|
|
|
|
80006d4: 40004400 .word 0x40004400
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
080006d8 <MX_GPIO_Init>:
|
2023-09-17 09:18:33 +00:00
|
|
|
/**
|
|
|
|
* @brief GPIO Initialization Function
|
|
|
|
* @param None
|
|
|
|
* @retval None
|
|
|
|
*/
|
|
|
|
static void MX_GPIO_Init(void) {
|
2023-09-17 10:40:31 +00:00
|
|
|
80006d8: b580 push {r7, lr}
|
|
|
|
80006da: b08a sub sp, #40 ; 0x28
|
|
|
|
80006dc: af00 add r7, sp, #0
|
2023-09-17 09:18:33 +00:00
|
|
|
GPIO_InitTypeDef GPIO_InitStruct = { 0 };
|
2023-09-17 10:40:31 +00:00
|
|
|
80006de: f107 0314 add.w r3, r7, #20
|
|
|
|
80006e2: 2200 movs r2, #0
|
|
|
|
80006e4: 601a str r2, [r3, #0]
|
|
|
|
80006e6: 605a str r2, [r3, #4]
|
|
|
|
80006e8: 609a str r2, [r3, #8]
|
|
|
|
80006ea: 60da str r2, [r3, #12]
|
|
|
|
80006ec: 611a str r2, [r3, #16]
|
2023-09-17 09:18:33 +00:00
|
|
|
/* USER CODE BEGIN MX_GPIO_Init_1 */
|
|
|
|
/* USER CODE END MX_GPIO_Init_1 */
|
|
|
|
|
|
|
|
/* GPIO Ports Clock Enable */
|
|
|
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
2023-09-17 09:57:40 +00:00
|
|
|
80006ee: 2300 movs r3, #0
|
2023-09-17 10:40:31 +00:00
|
|
|
80006f0: 613b str r3, [r7, #16]
|
|
|
|
80006f2: 4b34 ldr r3, [pc, #208] ; (80007c4 <MX_GPIO_Init+0xec>)
|
2023-09-17 09:57:40 +00:00
|
|
|
80006f4: 6b1b ldr r3, [r3, #48] ; 0x30
|
2023-09-17 10:40:31 +00:00
|
|
|
80006f6: 4a33 ldr r2, [pc, #204] ; (80007c4 <MX_GPIO_Init+0xec>)
|
|
|
|
80006f8: f043 0304 orr.w r3, r3, #4
|
2023-09-17 09:57:40 +00:00
|
|
|
80006fc: 6313 str r3, [r2, #48] ; 0x30
|
2023-09-17 10:40:31 +00:00
|
|
|
80006fe: 4b31 ldr r3, [pc, #196] ; (80007c4 <MX_GPIO_Init+0xec>)
|
2023-09-17 09:57:40 +00:00
|
|
|
8000700: 6b1b ldr r3, [r3, #48] ; 0x30
|
2023-09-17 10:40:31 +00:00
|
|
|
8000702: f003 0304 and.w r3, r3, #4
|
|
|
|
8000706: 613b str r3, [r7, #16]
|
|
|
|
8000708: 693b ldr r3, [r7, #16]
|
|
|
|
__HAL_RCC_GPIOH_CLK_ENABLE();
|
2023-09-17 09:57:40 +00:00
|
|
|
800070a: 2300 movs r3, #0
|
2023-09-17 10:40:31 +00:00
|
|
|
800070c: 60fb str r3, [r7, #12]
|
|
|
|
800070e: 4b2d ldr r3, [pc, #180] ; (80007c4 <MX_GPIO_Init+0xec>)
|
2023-09-17 09:57:40 +00:00
|
|
|
8000710: 6b1b ldr r3, [r3, #48] ; 0x30
|
2023-09-17 10:40:31 +00:00
|
|
|
8000712: 4a2c ldr r2, [pc, #176] ; (80007c4 <MX_GPIO_Init+0xec>)
|
|
|
|
8000714: f043 0380 orr.w r3, r3, #128 ; 0x80
|
2023-09-17 09:57:40 +00:00
|
|
|
8000718: 6313 str r3, [r2, #48] ; 0x30
|
2023-09-17 10:40:31 +00:00
|
|
|
800071a: 4b2a ldr r3, [pc, #168] ; (80007c4 <MX_GPIO_Init+0xec>)
|
2023-09-17 09:57:40 +00:00
|
|
|
800071c: 6b1b ldr r3, [r3, #48] ; 0x30
|
2023-09-17 10:40:31 +00:00
|
|
|
800071e: f003 0380 and.w r3, r3, #128 ; 0x80
|
|
|
|
8000722: 60fb str r3, [r7, #12]
|
|
|
|
8000724: 68fb ldr r3, [r7, #12]
|
|
|
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
2023-09-17 09:57:40 +00:00
|
|
|
8000726: 2300 movs r3, #0
|
2023-09-17 10:40:31 +00:00
|
|
|
8000728: 60bb str r3, [r7, #8]
|
|
|
|
800072a: 4b26 ldr r3, [pc, #152] ; (80007c4 <MX_GPIO_Init+0xec>)
|
2023-09-17 09:57:40 +00:00
|
|
|
800072c: 6b1b ldr r3, [r3, #48] ; 0x30
|
2023-09-17 10:40:31 +00:00
|
|
|
800072e: 4a25 ldr r2, [pc, #148] ; (80007c4 <MX_GPIO_Init+0xec>)
|
|
|
|
8000730: f043 0301 orr.w r3, r3, #1
|
2023-09-17 09:57:40 +00:00
|
|
|
8000734: 6313 str r3, [r2, #48] ; 0x30
|
2023-09-17 10:40:31 +00:00
|
|
|
8000736: 4b23 ldr r3, [pc, #140] ; (80007c4 <MX_GPIO_Init+0xec>)
|
2023-09-17 09:57:40 +00:00
|
|
|
8000738: 6b1b ldr r3, [r3, #48] ; 0x30
|
2023-09-17 10:40:31 +00:00
|
|
|
800073a: f003 0301 and.w r3, r3, #1
|
|
|
|
800073e: 60bb str r3, [r7, #8]
|
|
|
|
8000740: 68bb ldr r3, [r7, #8]
|
|
|
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
|
|
|
8000742: 2300 movs r3, #0
|
|
|
|
8000744: 607b str r3, [r7, #4]
|
|
|
|
8000746: 4b1f ldr r3, [pc, #124] ; (80007c4 <MX_GPIO_Init+0xec>)
|
|
|
|
8000748: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
|
|
800074a: 4a1e ldr r2, [pc, #120] ; (80007c4 <MX_GPIO_Init+0xec>)
|
|
|
|
800074c: f043 0302 orr.w r3, r3, #2
|
|
|
|
8000750: 6313 str r3, [r2, #48] ; 0x30
|
|
|
|
8000752: 4b1c ldr r3, [pc, #112] ; (80007c4 <MX_GPIO_Init+0xec>)
|
|
|
|
8000754: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
|
|
8000756: f003 0302 and.w r3, r3, #2
|
|
|
|
800075a: 607b str r3, [r7, #4]
|
|
|
|
800075c: 687b ldr r3, [r7, #4]
|
2023-09-17 09:18:33 +00:00
|
|
|
|
|
|
|
/*Configure GPIO pin Output Level */
|
2023-09-17 10:40:31 +00:00
|
|
|
HAL_GPIO_WritePin(GPIOA, LD2_Pin | Door_Lock_Pin, GPIO_PIN_RESET);
|
|
|
|
800075e: 2200 movs r2, #0
|
|
|
|
8000760: f44f 7108 mov.w r1, #544 ; 0x220
|
|
|
|
8000764: 4818 ldr r0, [pc, #96] ; (80007c8 <MX_GPIO_Init+0xf0>)
|
|
|
|
8000766: f000 fc03 bl 8000f70 <HAL_GPIO_WritePin>
|
2023-09-17 09:18:33 +00:00
|
|
|
|
|
|
|
/*Configure GPIO pin : B1_Pin */
|
|
|
|
GPIO_InitStruct.Pin = B1_Pin;
|
2023-09-17 10:40:31 +00:00
|
|
|
800076a: f44f 5300 mov.w r3, #8192 ; 0x2000
|
|
|
|
800076e: 617b str r3, [r7, #20]
|
2023-09-17 09:18:33 +00:00
|
|
|
GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000770: f44f 1304 mov.w r3, #2162688 ; 0x210000
|
|
|
|
8000774: 61bb str r3, [r7, #24]
|
2023-09-17 09:18:33 +00:00
|
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000776: 2300 movs r3, #0
|
|
|
|
8000778: 61fb str r3, [r7, #28]
|
2023-09-17 09:18:33 +00:00
|
|
|
HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct);
|
2023-09-17 10:40:31 +00:00
|
|
|
800077a: f107 0314 add.w r3, r7, #20
|
|
|
|
800077e: 4619 mov r1, r3
|
|
|
|
8000780: 4812 ldr r0, [pc, #72] ; (80007cc <MX_GPIO_Init+0xf4>)
|
|
|
|
8000782: f000 fa59 bl 8000c38 <HAL_GPIO_Init>
|
|
|
|
|
|
|
|
/*Configure GPIO pins : LD2_Pin Door_Lock_Pin */
|
|
|
|
GPIO_InitStruct.Pin = LD2_Pin | Door_Lock_Pin;
|
|
|
|
8000786: f44f 7308 mov.w r3, #544 ; 0x220
|
|
|
|
800078a: 617b str r3, [r7, #20]
|
2023-09-17 09:18:33 +00:00
|
|
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
2023-09-17 10:40:31 +00:00
|
|
|
800078c: 2301 movs r3, #1
|
|
|
|
800078e: 61bb str r3, [r7, #24]
|
2023-09-17 09:18:33 +00:00
|
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000790: 2300 movs r3, #0
|
|
|
|
8000792: 61fb str r3, [r7, #28]
|
2023-09-17 09:18:33 +00:00
|
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000794: 2300 movs r3, #0
|
|
|
|
8000796: 623b str r3, [r7, #32]
|
|
|
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
|
|
|
8000798: f107 0314 add.w r3, r7, #20
|
|
|
|
800079c: 4619 mov r1, r3
|
|
|
|
800079e: 480a ldr r0, [pc, #40] ; (80007c8 <MX_GPIO_Init+0xf0>)
|
|
|
|
80007a0: f000 fa4a bl 8000c38 <HAL_GPIO_Init>
|
2023-09-17 09:18:33 +00:00
|
|
|
|
|
|
|
/*Configure GPIO pin : Door_Sensor_Pin */
|
|
|
|
GPIO_InitStruct.Pin = Door_Sensor_Pin;
|
2023-09-17 10:40:31 +00:00
|
|
|
80007a4: 2380 movs r3, #128 ; 0x80
|
|
|
|
80007a6: 617b str r3, [r7, #20]
|
2023-09-17 09:18:33 +00:00
|
|
|
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
80007a8: 2300 movs r3, #0
|
|
|
|
80007aa: 61bb str r3, [r7, #24]
|
2023-09-17 09:18:33 +00:00
|
|
|
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
2023-09-17 10:40:31 +00:00
|
|
|
80007ac: 2301 movs r3, #1
|
|
|
|
80007ae: 61fb str r3, [r7, #28]
|
2023-09-17 09:18:33 +00:00
|
|
|
HAL_GPIO_Init(Door_Sensor_GPIO_Port, &GPIO_InitStruct);
|
2023-09-17 10:40:31 +00:00
|
|
|
80007b0: f107 0314 add.w r3, r7, #20
|
|
|
|
80007b4: 4619 mov r1, r3
|
|
|
|
80007b6: 4804 ldr r0, [pc, #16] ; (80007c8 <MX_GPIO_Init+0xf0>)
|
|
|
|
80007b8: f000 fa3e bl 8000c38 <HAL_GPIO_Init>
|
2023-09-17 09:18:33 +00:00
|
|
|
|
|
|
|
/* USER CODE BEGIN MX_GPIO_Init_2 */
|
|
|
|
/* USER CODE END MX_GPIO_Init_2 */
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
80007bc: bf00 nop
|
|
|
|
80007be: 3728 adds r7, #40 ; 0x28
|
|
|
|
80007c0: 46bd mov sp, r7
|
|
|
|
80007c2: bd80 pop {r7, pc}
|
|
|
|
80007c4: 40023800 .word 0x40023800
|
|
|
|
80007c8: 40020000 .word 0x40020000
|
|
|
|
80007cc: 40020800 .word 0x40020800
|
2023-09-17 09:18:33 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
080007d0 <Error_Handler>:
|
2023-09-17 09:18:33 +00:00
|
|
|
|
2023-09-17 08:27:41 +00:00
|
|
|
/**
|
2023-09-17 09:18:33 +00:00
|
|
|
* @brief This function is executed in case of error occurrence.
|
|
|
|
* @retval None
|
|
|
|
*/
|
|
|
|
void Error_Handler(void) {
|
2023-09-17 10:40:31 +00:00
|
|
|
80007d0: b480 push {r7}
|
|
|
|
80007d2: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
\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");
|
2023-09-17 10:40:31 +00:00
|
|
|
80007d4: b672 cpsid i
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
80007d6: bf00 nop
|
2023-09-17 09:18:33 +00:00
|
|
|
/* USER CODE BEGIN Error_Handler_Debug */
|
|
|
|
/* User can add his own implementation to report the HAL error return state */
|
|
|
|
__disable_irq();
|
|
|
|
while (1) {
|
2023-09-17 10:40:31 +00:00
|
|
|
80007d8: e7fe b.n 80007d8 <Error_Handler+0x8>
|
2023-09-17 08:27:41 +00:00
|
|
|
...
|
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
080007dc <HAL_MspInit>:
|
2023-09-17 08:27:41 +00:00
|
|
|
/* USER CODE END 0 */
|
|
|
|
/**
|
|
|
|
* Initializes the Global MSP.
|
|
|
|
*/
|
|
|
|
void HAL_MspInit(void)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
80007dc: b580 push {r7, lr}
|
|
|
|
80007de: b082 sub sp, #8
|
|
|
|
80007e0: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
/* USER CODE BEGIN MspInit 0 */
|
|
|
|
|
|
|
|
/* USER CODE END MspInit 0 */
|
|
|
|
|
|
|
|
__HAL_RCC_SYSCFG_CLK_ENABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
80007e2: 2300 movs r3, #0
|
|
|
|
80007e4: 607b str r3, [r7, #4]
|
|
|
|
80007e6: 4b10 ldr r3, [pc, #64] ; (8000828 <HAL_MspInit+0x4c>)
|
|
|
|
80007e8: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
|
|
80007ea: 4a0f ldr r2, [pc, #60] ; (8000828 <HAL_MspInit+0x4c>)
|
|
|
|
80007ec: f443 4380 orr.w r3, r3, #16384 ; 0x4000
|
|
|
|
80007f0: 6453 str r3, [r2, #68] ; 0x44
|
|
|
|
80007f2: 4b0d ldr r3, [pc, #52] ; (8000828 <HAL_MspInit+0x4c>)
|
|
|
|
80007f4: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
|
|
80007f6: f403 4380 and.w r3, r3, #16384 ; 0x4000
|
|
|
|
80007fa: 607b str r3, [r7, #4]
|
|
|
|
80007fc: 687b ldr r3, [r7, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
__HAL_RCC_PWR_CLK_ENABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
80007fe: 2300 movs r3, #0
|
|
|
|
8000800: 603b str r3, [r7, #0]
|
|
|
|
8000802: 4b09 ldr r3, [pc, #36] ; (8000828 <HAL_MspInit+0x4c>)
|
|
|
|
8000804: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
|
|
8000806: 4a08 ldr r2, [pc, #32] ; (8000828 <HAL_MspInit+0x4c>)
|
|
|
|
8000808: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
|
|
|
|
800080c: 6413 str r3, [r2, #64] ; 0x40
|
|
|
|
800080e: 4b06 ldr r3, [pc, #24] ; (8000828 <HAL_MspInit+0x4c>)
|
|
|
|
8000810: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
|
|
8000812: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
|
|
|
|
8000816: 603b str r3, [r7, #0]
|
|
|
|
8000818: 683b ldr r3, [r7, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_0);
|
2023-09-17 10:40:31 +00:00
|
|
|
800081a: 2007 movs r0, #7
|
|
|
|
800081c: f000 f9d8 bl 8000bd0 <HAL_NVIC_SetPriorityGrouping>
|
2023-09-17 08:27:41 +00:00
|
|
|
/* System interrupt init*/
|
|
|
|
|
|
|
|
/* USER CODE BEGIN MspInit 1 */
|
|
|
|
|
|
|
|
/* USER CODE END MspInit 1 */
|
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000820: bf00 nop
|
|
|
|
8000822: 3708 adds r7, #8
|
|
|
|
8000824: 46bd mov sp, r7
|
|
|
|
8000826: bd80 pop {r7, pc}
|
|
|
|
8000828: 40023800 .word 0x40023800
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
0800082c <HAL_UART_MspInit>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* This function configures the hardware resources used in this example
|
|
|
|
* @param huart: UART handle pointer
|
|
|
|
* @retval None
|
|
|
|
*/
|
|
|
|
void HAL_UART_MspInit(UART_HandleTypeDef* huart)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
800082c: b580 push {r7, lr}
|
|
|
|
800082e: b08a sub sp, #40 ; 0x28
|
|
|
|
8000830: af00 add r7, sp, #0
|
|
|
|
8000832: 6078 str r0, [r7, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
2023-09-17 10:40:31 +00:00
|
|
|
8000834: f107 0314 add.w r3, r7, #20
|
|
|
|
8000838: 2200 movs r2, #0
|
|
|
|
800083a: 601a str r2, [r3, #0]
|
|
|
|
800083c: 605a str r2, [r3, #4]
|
|
|
|
800083e: 609a str r2, [r3, #8]
|
|
|
|
8000840: 60da str r2, [r3, #12]
|
|
|
|
8000842: 611a str r2, [r3, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
if(huart->Instance==USART2)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000844: 687b ldr r3, [r7, #4]
|
|
|
|
8000846: 681b ldr r3, [r3, #0]
|
|
|
|
8000848: 4a19 ldr r2, [pc, #100] ; (80008b0 <HAL_UART_MspInit+0x84>)
|
|
|
|
800084a: 4293 cmp r3, r2
|
|
|
|
800084c: d12b bne.n 80008a6 <HAL_UART_MspInit+0x7a>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* USER CODE BEGIN USART2_MspInit 0 */
|
|
|
|
|
|
|
|
/* USER CODE END USART2_MspInit 0 */
|
|
|
|
/* Peripheral clock enable */
|
|
|
|
__HAL_RCC_USART2_CLK_ENABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
800084e: 2300 movs r3, #0
|
|
|
|
8000850: 613b str r3, [r7, #16]
|
|
|
|
8000852: 4b18 ldr r3, [pc, #96] ; (80008b4 <HAL_UART_MspInit+0x88>)
|
|
|
|
8000854: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
|
|
8000856: 4a17 ldr r2, [pc, #92] ; (80008b4 <HAL_UART_MspInit+0x88>)
|
|
|
|
8000858: f443 3300 orr.w r3, r3, #131072 ; 0x20000
|
|
|
|
800085c: 6413 str r3, [r2, #64] ; 0x40
|
|
|
|
800085e: 4b15 ldr r3, [pc, #84] ; (80008b4 <HAL_UART_MspInit+0x88>)
|
|
|
|
8000860: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
|
|
8000862: f403 3300 and.w r3, r3, #131072 ; 0x20000
|
|
|
|
8000866: 613b str r3, [r7, #16]
|
|
|
|
8000868: 693b ldr r3, [r7, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
800086a: 2300 movs r3, #0
|
|
|
|
800086c: 60fb str r3, [r7, #12]
|
|
|
|
800086e: 4b11 ldr r3, [pc, #68] ; (80008b4 <HAL_UART_MspInit+0x88>)
|
|
|
|
8000870: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
|
|
8000872: 4a10 ldr r2, [pc, #64] ; (80008b4 <HAL_UART_MspInit+0x88>)
|
|
|
|
8000874: f043 0301 orr.w r3, r3, #1
|
|
|
|
8000878: 6313 str r3, [r2, #48] ; 0x30
|
|
|
|
800087a: 4b0e ldr r3, [pc, #56] ; (80008b4 <HAL_UART_MspInit+0x88>)
|
|
|
|
800087c: 6b1b ldr r3, [r3, #48] ; 0x30
|
|
|
|
800087e: f003 0301 and.w r3, r3, #1
|
|
|
|
8000882: 60fb str r3, [r7, #12]
|
|
|
|
8000884: 68fb ldr r3, [r7, #12]
|
2023-09-17 08:27:41 +00:00
|
|
|
/**USART2 GPIO Configuration
|
|
|
|
PA2 ------> USART2_TX
|
|
|
|
PA3 ------> USART2_RX
|
|
|
|
*/
|
|
|
|
GPIO_InitStruct.Pin = USART_TX_Pin|USART_RX_Pin;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000886: 230c movs r3, #12
|
|
|
|
8000888: 617b str r3, [r7, #20]
|
2023-09-17 08:27:41 +00:00
|
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
2023-09-17 10:40:31 +00:00
|
|
|
800088a: 2302 movs r3, #2
|
|
|
|
800088c: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
2023-09-17 10:40:31 +00:00
|
|
|
800088e: 2300 movs r3, #0
|
|
|
|
8000890: 61fb str r3, [r7, #28]
|
2023-09-17 08:27:41 +00:00
|
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000892: 2303 movs r3, #3
|
|
|
|
8000894: 623b str r3, [r7, #32]
|
2023-09-17 08:27:41 +00:00
|
|
|
GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000896: 2307 movs r3, #7
|
|
|
|
8000898: 627b str r3, [r7, #36] ; 0x24
|
2023-09-17 08:27:41 +00:00
|
|
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
2023-09-17 10:40:31 +00:00
|
|
|
800089a: f107 0314 add.w r3, r7, #20
|
|
|
|
800089e: 4619 mov r1, r3
|
|
|
|
80008a0: 4805 ldr r0, [pc, #20] ; (80008b8 <HAL_UART_MspInit+0x8c>)
|
|
|
|
80008a2: f000 f9c9 bl 8000c38 <HAL_GPIO_Init>
|
2023-09-17 08:27:41 +00:00
|
|
|
/* USER CODE BEGIN USART2_MspInit 1 */
|
|
|
|
|
|
|
|
/* USER CODE END USART2_MspInit 1 */
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
80008a6: bf00 nop
|
|
|
|
80008a8: 3728 adds r7, #40 ; 0x28
|
|
|
|
80008aa: 46bd mov sp, r7
|
|
|
|
80008ac: bd80 pop {r7, pc}
|
|
|
|
80008ae: bf00 nop
|
|
|
|
80008b0: 40004400 .word 0x40004400
|
|
|
|
80008b4: 40023800 .word 0x40023800
|
|
|
|
80008b8: 40020000 .word 0x40020000
|
|
|
|
|
|
|
|
080008bc <NMI_Handler>:
|
2023-09-17 08:27:41 +00:00
|
|
|
/******************************************************************************/
|
|
|
|
/**
|
|
|
|
* @brief This function handles Non maskable interrupt.
|
|
|
|
*/
|
|
|
|
void NMI_Handler(void)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
80008bc: b480 push {r7}
|
|
|
|
80008be: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
/* USER CODE BEGIN NonMaskableInt_IRQn 0 */
|
|
|
|
|
|
|
|
/* USER CODE END NonMaskableInt_IRQn 0 */
|
|
|
|
/* USER CODE BEGIN NonMaskableInt_IRQn 1 */
|
|
|
|
while (1)
|
2023-09-17 10:40:31 +00:00
|
|
|
80008c0: e7fe b.n 80008c0 <NMI_Handler+0x4>
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
080008c2 <HardFault_Handler>:
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief This function handles Hard fault interrupt.
|
|
|
|
*/
|
|
|
|
void HardFault_Handler(void)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
80008c2: b480 push {r7}
|
|
|
|
80008c4: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
/* USER CODE BEGIN HardFault_IRQn 0 */
|
|
|
|
|
|
|
|
/* USER CODE END HardFault_IRQn 0 */
|
|
|
|
while (1)
|
2023-09-17 10:40:31 +00:00
|
|
|
80008c6: e7fe b.n 80008c6 <HardFault_Handler+0x4>
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
080008c8 <MemManage_Handler>:
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief This function handles Memory management fault.
|
|
|
|
*/
|
|
|
|
void MemManage_Handler(void)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
80008c8: b480 push {r7}
|
|
|
|
80008ca: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
|
|
|
|
|
|
|
|
/* USER CODE END MemoryManagement_IRQn 0 */
|
|
|
|
while (1)
|
2023-09-17 10:40:31 +00:00
|
|
|
80008cc: e7fe b.n 80008cc <MemManage_Handler+0x4>
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
080008ce <BusFault_Handler>:
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief This function handles Pre-fetch fault, memory access fault.
|
|
|
|
*/
|
|
|
|
void BusFault_Handler(void)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
80008ce: b480 push {r7}
|
|
|
|
80008d0: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
/* USER CODE BEGIN BusFault_IRQn 0 */
|
|
|
|
|
|
|
|
/* USER CODE END BusFault_IRQn 0 */
|
|
|
|
while (1)
|
2023-09-17 10:40:31 +00:00
|
|
|
80008d2: e7fe b.n 80008d2 <BusFault_Handler+0x4>
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
080008d4 <UsageFault_Handler>:
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief This function handles Undefined instruction or illegal state.
|
|
|
|
*/
|
|
|
|
void UsageFault_Handler(void)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
80008d4: b480 push {r7}
|
|
|
|
80008d6: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
/* USER CODE BEGIN UsageFault_IRQn 0 */
|
|
|
|
|
|
|
|
/* USER CODE END UsageFault_IRQn 0 */
|
|
|
|
while (1)
|
2023-09-17 10:40:31 +00:00
|
|
|
80008d8: e7fe b.n 80008d8 <UsageFault_Handler+0x4>
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
080008da <SVC_Handler>:
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief This function handles System service call via SWI instruction.
|
|
|
|
*/
|
|
|
|
void SVC_Handler(void)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
80008da: b480 push {r7}
|
|
|
|
80008dc: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* USER CODE END SVCall_IRQn 0 */
|
|
|
|
/* USER CODE BEGIN SVCall_IRQn 1 */
|
|
|
|
|
|
|
|
/* USER CODE END SVCall_IRQn 1 */
|
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
80008de: bf00 nop
|
|
|
|
80008e0: 46bd mov sp, r7
|
|
|
|
80008e2: f85d 7b04 ldr.w r7, [sp], #4
|
|
|
|
80008e6: 4770 bx lr
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
080008e8 <DebugMon_Handler>:
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief This function handles Debug monitor.
|
|
|
|
*/
|
|
|
|
void DebugMon_Handler(void)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
80008e8: b480 push {r7}
|
|
|
|
80008ea: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* USER CODE END DebugMonitor_IRQn 0 */
|
|
|
|
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
|
|
|
|
|
|
|
|
/* USER CODE END DebugMonitor_IRQn 1 */
|
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
80008ec: bf00 nop
|
|
|
|
80008ee: 46bd mov sp, r7
|
|
|
|
80008f0: f85d 7b04 ldr.w r7, [sp], #4
|
|
|
|
80008f4: 4770 bx lr
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
080008f6 <PendSV_Handler>:
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief This function handles Pendable request for system service.
|
|
|
|
*/
|
|
|
|
void PendSV_Handler(void)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
80008f6: b480 push {r7}
|
|
|
|
80008f8: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* USER CODE END PendSV_IRQn 0 */
|
|
|
|
/* USER CODE BEGIN PendSV_IRQn 1 */
|
|
|
|
|
|
|
|
/* USER CODE END PendSV_IRQn 1 */
|
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
80008fa: bf00 nop
|
|
|
|
80008fc: 46bd mov sp, r7
|
|
|
|
80008fe: f85d 7b04 ldr.w r7, [sp], #4
|
|
|
|
8000902: 4770 bx lr
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08000904 <SysTick_Handler>:
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief This function handles System tick timer.
|
|
|
|
*/
|
|
|
|
void SysTick_Handler(void)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000904: b580 push {r7, lr}
|
|
|
|
8000906: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
/* USER CODE BEGIN SysTick_IRQn 0 */
|
|
|
|
|
|
|
|
/* USER CODE END SysTick_IRQn 0 */
|
|
|
|
HAL_IncTick();
|
2023-09-17 10:40:31 +00:00
|
|
|
8000908: f000 f890 bl 8000a2c <HAL_IncTick>
|
2023-09-17 08:27:41 +00:00
|
|
|
/* USER CODE BEGIN SysTick_IRQn 1 */
|
|
|
|
|
|
|
|
/* USER CODE END SysTick_IRQn 1 */
|
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
800090c: bf00 nop
|
|
|
|
800090e: bd80 pop {r7, pc}
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08000910 <SystemInit>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* configuration.
|
|
|
|
* @param None
|
|
|
|
* @retval None
|
|
|
|
*/
|
|
|
|
void SystemInit(void)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000910: b480 push {r7}
|
|
|
|
8000912: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
/* FPU settings ------------------------------------------------------------*/
|
|
|
|
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
|
|
|
|
SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */
|
2023-09-17 10:40:31 +00:00
|
|
|
8000914: 4b06 ldr r3, [pc, #24] ; (8000930 <SystemInit+0x20>)
|
|
|
|
8000916: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
|
|
|
|
800091a: 4a05 ldr r2, [pc, #20] ; (8000930 <SystemInit+0x20>)
|
|
|
|
800091c: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000
|
|
|
|
8000920: f8c2 3088 str.w r3, [r2, #136] ; 0x88
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* 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 */
|
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000924: bf00 nop
|
|
|
|
8000926: 46bd mov sp, r7
|
|
|
|
8000928: f85d 7b04 ldr.w r7, [sp], #4
|
|
|
|
800092c: 4770 bx lr
|
|
|
|
800092e: bf00 nop
|
|
|
|
8000930: e000ed00 .word 0xe000ed00
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08000934 <Reset_Handler>:
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
.section .text.Reset_Handler
|
|
|
|
.weak Reset_Handler
|
|
|
|
.type Reset_Handler, %function
|
|
|
|
Reset_Handler:
|
|
|
|
ldr sp, =_estack /* set stack pointer */
|
2023-09-17 10:40:31 +00:00
|
|
|
8000934: f8df d034 ldr.w sp, [pc, #52] ; 800096c <LoopFillZerobss+0x12>
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Copy the data segment initializers from flash to SRAM */
|
|
|
|
ldr r0, =_sdata
|
2023-09-17 10:40:31 +00:00
|
|
|
8000938: 480d ldr r0, [pc, #52] ; (8000970 <LoopFillZerobss+0x16>)
|
2023-09-17 08:27:41 +00:00
|
|
|
ldr r1, =_edata
|
2023-09-17 10:40:31 +00:00
|
|
|
800093a: 490e ldr r1, [pc, #56] ; (8000974 <LoopFillZerobss+0x1a>)
|
2023-09-17 08:27:41 +00:00
|
|
|
ldr r2, =_sidata
|
2023-09-17 10:40:31 +00:00
|
|
|
800093c: 4a0e ldr r2, [pc, #56] ; (8000978 <LoopFillZerobss+0x1e>)
|
2023-09-17 08:27:41 +00:00
|
|
|
movs r3, #0
|
2023-09-17 10:40:31 +00:00
|
|
|
800093e: 2300 movs r3, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
b LoopCopyDataInit
|
2023-09-17 10:40:31 +00:00
|
|
|
8000940: e002 b.n 8000948 <LoopCopyDataInit>
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08000942 <CopyDataInit>:
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
CopyDataInit:
|
|
|
|
ldr r4, [r2, r3]
|
2023-09-17 10:40:31 +00:00
|
|
|
8000942: 58d4 ldr r4, [r2, r3]
|
2023-09-17 08:27:41 +00:00
|
|
|
str r4, [r0, r3]
|
2023-09-17 10:40:31 +00:00
|
|
|
8000944: 50c4 str r4, [r0, r3]
|
2023-09-17 08:27:41 +00:00
|
|
|
adds r3, r3, #4
|
2023-09-17 10:40:31 +00:00
|
|
|
8000946: 3304 adds r3, #4
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08000948 <LoopCopyDataInit>:
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
LoopCopyDataInit:
|
|
|
|
adds r4, r0, r3
|
2023-09-17 10:40:31 +00:00
|
|
|
8000948: 18c4 adds r4, r0, r3
|
2023-09-17 08:27:41 +00:00
|
|
|
cmp r4, r1
|
2023-09-17 10:40:31 +00:00
|
|
|
800094a: 428c cmp r4, r1
|
2023-09-17 08:27:41 +00:00
|
|
|
bcc CopyDataInit
|
2023-09-17 10:40:31 +00:00
|
|
|
800094c: d3f9 bcc.n 8000942 <CopyDataInit>
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Zero fill the bss segment. */
|
|
|
|
ldr r2, =_sbss
|
2023-09-17 10:40:31 +00:00
|
|
|
800094e: 4a0b ldr r2, [pc, #44] ; (800097c <LoopFillZerobss+0x22>)
|
2023-09-17 08:27:41 +00:00
|
|
|
ldr r4, =_ebss
|
2023-09-17 10:40:31 +00:00
|
|
|
8000950: 4c0b ldr r4, [pc, #44] ; (8000980 <LoopFillZerobss+0x26>)
|
2023-09-17 08:27:41 +00:00
|
|
|
movs r3, #0
|
2023-09-17 10:40:31 +00:00
|
|
|
8000952: 2300 movs r3, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
b LoopFillZerobss
|
2023-09-17 10:40:31 +00:00
|
|
|
8000954: e001 b.n 800095a <LoopFillZerobss>
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08000956 <FillZerobss>:
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
FillZerobss:
|
|
|
|
str r3, [r2]
|
2023-09-17 10:40:31 +00:00
|
|
|
8000956: 6013 str r3, [r2, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
adds r2, r2, #4
|
2023-09-17 10:40:31 +00:00
|
|
|
8000958: 3204 adds r2, #4
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
0800095a <LoopFillZerobss>:
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
LoopFillZerobss:
|
|
|
|
cmp r2, r4
|
2023-09-17 10:40:31 +00:00
|
|
|
800095a: 42a2 cmp r2, r4
|
2023-09-17 08:27:41 +00:00
|
|
|
bcc FillZerobss
|
2023-09-17 10:40:31 +00:00
|
|
|
800095c: d3fb bcc.n 8000956 <FillZerobss>
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Call the clock system initialization function.*/
|
|
|
|
bl SystemInit
|
2023-09-17 10:40:31 +00:00
|
|
|
800095e: f7ff ffd7 bl 8000910 <SystemInit>
|
2023-09-17 08:27:41 +00:00
|
|
|
/* Call static constructors */
|
|
|
|
bl __libc_init_array
|
2023-09-17 10:40:31 +00:00
|
|
|
8000962: f001 fc23 bl 80021ac <__libc_init_array>
|
2023-09-17 08:27:41 +00:00
|
|
|
/* Call the application's entry point.*/
|
|
|
|
bl main
|
2023-09-17 10:40:31 +00:00
|
|
|
8000966: f7ff fdb5 bl 80004d4 <main>
|
2023-09-17 08:27:41 +00:00
|
|
|
bx lr
|
2023-09-17 10:40:31 +00:00
|
|
|
800096a: 4770 bx lr
|
2023-09-17 08:27:41 +00:00
|
|
|
ldr sp, =_estack /* set stack pointer */
|
2023-09-17 10:40:31 +00:00
|
|
|
800096c: 20020000 .word 0x20020000
|
2023-09-17 08:27:41 +00:00
|
|
|
ldr r0, =_sdata
|
2023-09-17 10:40:31 +00:00
|
|
|
8000970: 20000000 .word 0x20000000
|
2023-09-17 08:27:41 +00:00
|
|
|
ldr r1, =_edata
|
2023-09-17 10:40:31 +00:00
|
|
|
8000974: 2000000c .word 0x2000000c
|
2023-09-17 08:27:41 +00:00
|
|
|
ldr r2, =_sidata
|
2023-09-17 10:40:31 +00:00
|
|
|
8000978: 08002234 .word 0x08002234
|
2023-09-17 08:27:41 +00:00
|
|
|
ldr r2, =_sbss
|
2023-09-17 10:40:31 +00:00
|
|
|
800097c: 2000000c .word 0x2000000c
|
2023-09-17 08:27:41 +00:00
|
|
|
ldr r4, =_ebss
|
2023-09-17 10:40:31 +00:00
|
|
|
8000980: 2000007c .word 0x2000007c
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08000984 <ADC_IRQHandler>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* @retval None
|
|
|
|
*/
|
|
|
|
.section .text.Default_Handler,"ax",%progbits
|
|
|
|
Default_Handler:
|
|
|
|
Infinite_Loop:
|
|
|
|
b Infinite_Loop
|
2023-09-17 10:40:31 +00:00
|
|
|
8000984: e7fe b.n 8000984 <ADC_IRQHandler>
|
2023-09-17 08:27:41 +00:00
|
|
|
...
|
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08000988 <HAL_Init>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* need to ensure that the SysTick time base is always set to 1 millisecond
|
|
|
|
* to have correct HAL operation.
|
|
|
|
* @retval HAL status
|
|
|
|
*/
|
|
|
|
HAL_StatusTypeDef HAL_Init(void)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000988: b580 push {r7, lr}
|
|
|
|
800098a: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
/* Configure Flash prefetch, Instruction cache, Data cache */
|
|
|
|
#if (INSTRUCTION_CACHE_ENABLE != 0U)
|
|
|
|
__HAL_FLASH_INSTRUCTION_CACHE_ENABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
800098c: 4b0e ldr r3, [pc, #56] ; (80009c8 <HAL_Init+0x40>)
|
|
|
|
800098e: 681b ldr r3, [r3, #0]
|
|
|
|
8000990: 4a0d ldr r2, [pc, #52] ; (80009c8 <HAL_Init+0x40>)
|
|
|
|
8000992: f443 7300 orr.w r3, r3, #512 ; 0x200
|
|
|
|
8000996: 6013 str r3, [r2, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
#endif /* INSTRUCTION_CACHE_ENABLE */
|
|
|
|
|
|
|
|
#if (DATA_CACHE_ENABLE != 0U)
|
|
|
|
__HAL_FLASH_DATA_CACHE_ENABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
8000998: 4b0b ldr r3, [pc, #44] ; (80009c8 <HAL_Init+0x40>)
|
|
|
|
800099a: 681b ldr r3, [r3, #0]
|
|
|
|
800099c: 4a0a ldr r2, [pc, #40] ; (80009c8 <HAL_Init+0x40>)
|
|
|
|
800099e: f443 6380 orr.w r3, r3, #1024 ; 0x400
|
|
|
|
80009a2: 6013 str r3, [r2, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
#endif /* DATA_CACHE_ENABLE */
|
|
|
|
|
|
|
|
#if (PREFETCH_ENABLE != 0U)
|
|
|
|
__HAL_FLASH_PREFETCH_BUFFER_ENABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
80009a4: 4b08 ldr r3, [pc, #32] ; (80009c8 <HAL_Init+0x40>)
|
|
|
|
80009a6: 681b ldr r3, [r3, #0]
|
|
|
|
80009a8: 4a07 ldr r2, [pc, #28] ; (80009c8 <HAL_Init+0x40>)
|
|
|
|
80009aa: f443 7380 orr.w r3, r3, #256 ; 0x100
|
|
|
|
80009ae: 6013 str r3, [r2, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
#endif /* PREFETCH_ENABLE */
|
|
|
|
|
|
|
|
/* Set Interrupt Group Priority */
|
|
|
|
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
|
2023-09-17 10:40:31 +00:00
|
|
|
80009b0: 2003 movs r0, #3
|
|
|
|
80009b2: f000 f90d bl 8000bd0 <HAL_NVIC_SetPriorityGrouping>
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */
|
|
|
|
HAL_InitTick(TICK_INT_PRIORITY);
|
2023-09-17 10:40:31 +00:00
|
|
|
80009b6: 2000 movs r0, #0
|
|
|
|
80009b8: f000 f808 bl 80009cc <HAL_InitTick>
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Init the low level hardware */
|
|
|
|
HAL_MspInit();
|
2023-09-17 10:40:31 +00:00
|
|
|
80009bc: f7ff ff0e bl 80007dc <HAL_MspInit>
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Return function status */
|
|
|
|
return HAL_OK;
|
2023-09-17 10:40:31 +00:00
|
|
|
80009c0: 2300 movs r3, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
80009c2: 4618 mov r0, r3
|
|
|
|
80009c4: bd80 pop {r7, pc}
|
|
|
|
80009c6: bf00 nop
|
|
|
|
80009c8: 40023c00 .word 0x40023c00
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
080009cc <HAL_InitTick>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* implementation in user file.
|
|
|
|
* @param TickPriority Tick interrupt priority.
|
|
|
|
* @retval HAL status
|
|
|
|
*/
|
|
|
|
__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
80009cc: b580 push {r7, lr}
|
|
|
|
80009ce: b082 sub sp, #8
|
|
|
|
80009d0: af00 add r7, sp, #0
|
|
|
|
80009d2: 6078 str r0, [r7, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
/* Configure the SysTick to have interrupt in 1ms time basis*/
|
|
|
|
if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U)
|
2023-09-17 10:40:31 +00:00
|
|
|
80009d4: 4b12 ldr r3, [pc, #72] ; (8000a20 <HAL_InitTick+0x54>)
|
|
|
|
80009d6: 681a ldr r2, [r3, #0]
|
|
|
|
80009d8: 4b12 ldr r3, [pc, #72] ; (8000a24 <HAL_InitTick+0x58>)
|
|
|
|
80009da: 781b ldrb r3, [r3, #0]
|
|
|
|
80009dc: 4619 mov r1, r3
|
|
|
|
80009de: f44f 737a mov.w r3, #1000 ; 0x3e8
|
|
|
|
80009e2: fbb3 f3f1 udiv r3, r3, r1
|
|
|
|
80009e6: fbb2 f3f3 udiv r3, r2, r3
|
|
|
|
80009ea: 4618 mov r0, r3
|
|
|
|
80009ec: f000 f917 bl 8000c1e <HAL_SYSTICK_Config>
|
|
|
|
80009f0: 4603 mov r3, r0
|
|
|
|
80009f2: 2b00 cmp r3, #0
|
|
|
|
80009f4: d001 beq.n 80009fa <HAL_InitTick+0x2e>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_ERROR;
|
2023-09-17 10:40:31 +00:00
|
|
|
80009f6: 2301 movs r3, #1
|
|
|
|
80009f8: e00e b.n 8000a18 <HAL_InitTick+0x4c>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Configure the SysTick IRQ priority */
|
|
|
|
if (TickPriority < (1UL << __NVIC_PRIO_BITS))
|
2023-09-17 10:40:31 +00:00
|
|
|
80009fa: 687b ldr r3, [r7, #4]
|
|
|
|
80009fc: 2b0f cmp r3, #15
|
|
|
|
80009fe: d80a bhi.n 8000a16 <HAL_InitTick+0x4a>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a00: 2200 movs r2, #0
|
|
|
|
8000a02: 6879 ldr r1, [r7, #4]
|
|
|
|
8000a04: f04f 30ff mov.w r0, #4294967295
|
|
|
|
8000a08: f000 f8ed bl 8000be6 <HAL_NVIC_SetPriority>
|
2023-09-17 08:27:41 +00:00
|
|
|
uwTickPrio = TickPriority;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a0c: 4a06 ldr r2, [pc, #24] ; (8000a28 <HAL_InitTick+0x5c>)
|
|
|
|
8000a0e: 687b ldr r3, [r7, #4]
|
|
|
|
8000a10: 6013 str r3, [r2, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return function status */
|
|
|
|
return HAL_OK;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a12: 2300 movs r3, #0
|
|
|
|
8000a14: e000 b.n 8000a18 <HAL_InitTick+0x4c>
|
2023-09-17 08:27:41 +00:00
|
|
|
return HAL_ERROR;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a16: 2301 movs r3, #1
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a18: 4618 mov r0, r3
|
|
|
|
8000a1a: 3708 adds r7, #8
|
|
|
|
8000a1c: 46bd mov sp, r7
|
|
|
|
8000a1e: bd80 pop {r7, pc}
|
|
|
|
8000a20: 20000000 .word 0x20000000
|
|
|
|
8000a24: 20000008 .word 0x20000008
|
|
|
|
8000a28: 20000004 .word 0x20000004
|
|
|
|
|
|
|
|
08000a2c <HAL_IncTick>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* @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)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a2c: b480 push {r7}
|
|
|
|
8000a2e: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
uwTick += uwTickFreq;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a30: 4b06 ldr r3, [pc, #24] ; (8000a4c <HAL_IncTick+0x20>)
|
|
|
|
8000a32: 781b ldrb r3, [r3, #0]
|
|
|
|
8000a34: 461a mov r2, r3
|
|
|
|
8000a36: 4b06 ldr r3, [pc, #24] ; (8000a50 <HAL_IncTick+0x24>)
|
|
|
|
8000a38: 681b ldr r3, [r3, #0]
|
|
|
|
8000a3a: 4413 add r3, r2
|
|
|
|
8000a3c: 4a04 ldr r2, [pc, #16] ; (8000a50 <HAL_IncTick+0x24>)
|
|
|
|
8000a3e: 6013 str r3, [r2, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a40: bf00 nop
|
|
|
|
8000a42: 46bd mov sp, r7
|
|
|
|
8000a44: f85d 7b04 ldr.w r7, [sp], #4
|
|
|
|
8000a48: 4770 bx lr
|
|
|
|
8000a4a: bf00 nop
|
|
|
|
8000a4c: 20000008 .word 0x20000008
|
|
|
|
8000a50: 20000078 .word 0x20000078
|
|
|
|
|
|
|
|
08000a54 <HAL_GetTick>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* @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)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a54: b480 push {r7}
|
|
|
|
8000a56: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
return uwTick;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a58: 4b03 ldr r3, [pc, #12] ; (8000a68 <HAL_GetTick+0x14>)
|
|
|
|
8000a5a: 681b ldr r3, [r3, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a5c: 4618 mov r0, r3
|
|
|
|
8000a5e: 46bd mov sp, r7
|
|
|
|
8000a60: f85d 7b04 ldr.w r7, [sp], #4
|
|
|
|
8000a64: 4770 bx lr
|
|
|
|
8000a66: bf00 nop
|
|
|
|
8000a68: 20000078 .word 0x20000078
|
|
|
|
|
|
|
|
08000a6c <__NVIC_SetPriorityGrouping>:
|
2023-09-17 08:27:41 +00:00
|
|
|
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)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a6c: b480 push {r7}
|
|
|
|
8000a6e: b085 sub sp, #20
|
|
|
|
8000a70: af00 add r7, sp, #0
|
|
|
|
8000a72: 6078 str r0, [r7, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
uint32_t reg_value;
|
|
|
|
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a74: 687b ldr r3, [r7, #4]
|
|
|
|
8000a76: f003 0307 and.w r3, r3, #7
|
|
|
|
8000a7a: 60fb str r3, [r7, #12]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
reg_value = SCB->AIRCR; /* read old register configuration */
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a7c: 4b0c ldr r3, [pc, #48] ; (8000ab0 <__NVIC_SetPriorityGrouping+0x44>)
|
|
|
|
8000a7e: 68db ldr r3, [r3, #12]
|
|
|
|
8000a80: 60bb str r3, [r7, #8]
|
2023-09-17 08:27:41 +00:00
|
|
|
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a82: 68ba ldr r2, [r7, #8]
|
|
|
|
8000a84: f64f 03ff movw r3, #63743 ; 0xf8ff
|
|
|
|
8000a88: 4013 ands r3, r2
|
|
|
|
8000a8a: 60bb str r3, [r7, #8]
|
2023-09-17 08:27:41 +00:00
|
|
|
reg_value = (reg_value |
|
|
|
|
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
|
|
|
|
(PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a8c: 68fb ldr r3, [r7, #12]
|
|
|
|
8000a8e: 021a lsls r2, r3, #8
|
2023-09-17 08:27:41 +00:00
|
|
|
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a90: 68bb ldr r3, [r7, #8]
|
|
|
|
8000a92: 4313 orrs r3, r2
|
2023-09-17 08:27:41 +00:00
|
|
|
reg_value = (reg_value |
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a94: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000
|
|
|
|
8000a98: f443 3300 orr.w r3, r3, #131072 ; 0x20000
|
|
|
|
8000a9c: 60bb str r3, [r7, #8]
|
2023-09-17 08:27:41 +00:00
|
|
|
SCB->AIRCR = reg_value;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000a9e: 4a04 ldr r2, [pc, #16] ; (8000ab0 <__NVIC_SetPriorityGrouping+0x44>)
|
|
|
|
8000aa0: 68bb ldr r3, [r7, #8]
|
|
|
|
8000aa2: 60d3 str r3, [r2, #12]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000aa4: bf00 nop
|
|
|
|
8000aa6: 3714 adds r7, #20
|
|
|
|
8000aa8: 46bd mov sp, r7
|
|
|
|
8000aaa: f85d 7b04 ldr.w r7, [sp], #4
|
|
|
|
8000aae: 4770 bx lr
|
|
|
|
8000ab0: e000ed00 .word 0xe000ed00
|
|
|
|
|
|
|
|
08000ab4 <__NVIC_GetPriorityGrouping>:
|
2023-09-17 08:27:41 +00:00
|
|
|
\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)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ab4: b480 push {r7}
|
|
|
|
8000ab6: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ab8: 4b04 ldr r3, [pc, #16] ; (8000acc <__NVIC_GetPriorityGrouping+0x18>)
|
|
|
|
8000aba: 68db ldr r3, [r3, #12]
|
|
|
|
8000abc: 0a1b lsrs r3, r3, #8
|
|
|
|
8000abe: f003 0307 and.w r3, r3, #7
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ac2: 4618 mov r0, r3
|
|
|
|
8000ac4: 46bd mov sp, r7
|
|
|
|
8000ac6: f85d 7b04 ldr.w r7, [sp], #4
|
|
|
|
8000aca: 4770 bx lr
|
|
|
|
8000acc: e000ed00 .word 0xe000ed00
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08000ad0 <__NVIC_SetPriority>:
|
2023-09-17 08:27:41 +00:00
|
|
|
\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)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ad0: b480 push {r7}
|
|
|
|
8000ad2: b083 sub sp, #12
|
|
|
|
8000ad4: af00 add r7, sp, #0
|
|
|
|
8000ad6: 4603 mov r3, r0
|
|
|
|
8000ad8: 6039 str r1, [r7, #0]
|
|
|
|
8000ada: 71fb strb r3, [r7, #7]
|
2023-09-17 08:27:41 +00:00
|
|
|
if ((int32_t)(IRQn) >= 0)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000adc: f997 3007 ldrsb.w r3, [r7, #7]
|
|
|
|
8000ae0: 2b00 cmp r3, #0
|
|
|
|
8000ae2: db0a blt.n 8000afa <__NVIC_SetPriority+0x2a>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ae4: 683b ldr r3, [r7, #0]
|
|
|
|
8000ae6: b2da uxtb r2, r3
|
|
|
|
8000ae8: 490c ldr r1, [pc, #48] ; (8000b1c <__NVIC_SetPriority+0x4c>)
|
|
|
|
8000aea: f997 3007 ldrsb.w r3, [r7, #7]
|
|
|
|
8000aee: 0112 lsls r2, r2, #4
|
|
|
|
8000af0: b2d2 uxtb r2, r2
|
|
|
|
8000af2: 440b add r3, r1
|
|
|
|
8000af4: f883 2300 strb.w r2, [r3, #768] ; 0x300
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
|
|
|
|
}
|
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000af8: e00a b.n 8000b10 <__NVIC_SetPriority+0x40>
|
2023-09-17 08:27:41 +00:00
|
|
|
SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
|
2023-09-17 10:40:31 +00:00
|
|
|
8000afa: 683b ldr r3, [r7, #0]
|
|
|
|
8000afc: b2da uxtb r2, r3
|
|
|
|
8000afe: 4908 ldr r1, [pc, #32] ; (8000b20 <__NVIC_SetPriority+0x50>)
|
|
|
|
8000b00: 79fb ldrb r3, [r7, #7]
|
|
|
|
8000b02: f003 030f and.w r3, r3, #15
|
|
|
|
8000b06: 3b04 subs r3, #4
|
|
|
|
8000b08: 0112 lsls r2, r2, #4
|
|
|
|
8000b0a: b2d2 uxtb r2, r2
|
|
|
|
8000b0c: 440b add r3, r1
|
|
|
|
8000b0e: 761a strb r2, [r3, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000b10: bf00 nop
|
|
|
|
8000b12: 370c adds r7, #12
|
|
|
|
8000b14: 46bd mov sp, r7
|
|
|
|
8000b16: f85d 7b04 ldr.w r7, [sp], #4
|
|
|
|
8000b1a: 4770 bx lr
|
|
|
|
8000b1c: e000e100 .word 0xe000e100
|
|
|
|
8000b20: e000ed00 .word 0xe000ed00
|
|
|
|
|
|
|
|
08000b24 <NVIC_EncodePriority>:
|
2023-09-17 08:27:41 +00:00
|
|
|
\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)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000b24: b480 push {r7}
|
|
|
|
8000b26: b089 sub sp, #36 ; 0x24
|
|
|
|
8000b28: af00 add r7, sp, #0
|
|
|
|
8000b2a: 60f8 str r0, [r7, #12]
|
|
|
|
8000b2c: 60b9 str r1, [r7, #8]
|
|
|
|
8000b2e: 607a str r2, [r7, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
|
2023-09-17 10:40:31 +00:00
|
|
|
8000b30: 68fb ldr r3, [r7, #12]
|
|
|
|
8000b32: f003 0307 and.w r3, r3, #7
|
|
|
|
8000b36: 61fb str r3, [r7, #28]
|
2023-09-17 08:27:41 +00:00
|
|
|
uint32_t PreemptPriorityBits;
|
|
|
|
uint32_t SubPriorityBits;
|
|
|
|
|
|
|
|
PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp);
|
2023-09-17 10:40:31 +00:00
|
|
|
8000b38: 69fb ldr r3, [r7, #28]
|
|
|
|
8000b3a: f1c3 0307 rsb r3, r3, #7
|
|
|
|
8000b3e: 2b04 cmp r3, #4
|
|
|
|
8000b40: bf28 it cs
|
|
|
|
8000b42: 2304 movcs r3, #4
|
|
|
|
8000b44: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
|
2023-09-17 10:40:31 +00:00
|
|
|
8000b46: 69fb ldr r3, [r7, #28]
|
|
|
|
8000b48: 3304 adds r3, #4
|
|
|
|
8000b4a: 2b06 cmp r3, #6
|
|
|
|
8000b4c: d902 bls.n 8000b54 <NVIC_EncodePriority+0x30>
|
|
|
|
8000b4e: 69fb ldr r3, [r7, #28]
|
|
|
|
8000b50: 3b03 subs r3, #3
|
|
|
|
8000b52: e000 b.n 8000b56 <NVIC_EncodePriority+0x32>
|
|
|
|
8000b54: 2300 movs r3, #0
|
|
|
|
8000b56: 617b str r3, [r7, #20]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
|
2023-09-17 10:40:31 +00:00
|
|
|
8000b58: f04f 32ff mov.w r2, #4294967295
|
|
|
|
8000b5c: 69bb ldr r3, [r7, #24]
|
|
|
|
8000b5e: fa02 f303 lsl.w r3, r2, r3
|
|
|
|
8000b62: 43da mvns r2, r3
|
|
|
|
8000b64: 68bb ldr r3, [r7, #8]
|
|
|
|
8000b66: 401a ands r2, r3
|
|
|
|
8000b68: 697b ldr r3, [r7, #20]
|
|
|
|
8000b6a: 409a lsls r2, r3
|
2023-09-17 08:27:41 +00:00
|
|
|
((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
|
2023-09-17 10:40:31 +00:00
|
|
|
8000b6c: f04f 31ff mov.w r1, #4294967295
|
|
|
|
8000b70: 697b ldr r3, [r7, #20]
|
|
|
|
8000b72: fa01 f303 lsl.w r3, r1, r3
|
|
|
|
8000b76: 43d9 mvns r1, r3
|
|
|
|
8000b78: 687b ldr r3, [r7, #4]
|
|
|
|
8000b7a: 400b ands r3, r1
|
2023-09-17 08:27:41 +00:00
|
|
|
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
|
2023-09-17 10:40:31 +00:00
|
|
|
8000b7c: 4313 orrs r3, r2
|
2023-09-17 08:27:41 +00:00
|
|
|
);
|
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000b7e: 4618 mov r0, r3
|
|
|
|
8000b80: 3724 adds r7, #36 ; 0x24
|
|
|
|
8000b82: 46bd mov sp, r7
|
|
|
|
8000b84: f85d 7b04 ldr.w r7, [sp], #4
|
|
|
|
8000b88: 4770 bx lr
|
2023-09-17 08:27:41 +00:00
|
|
|
...
|
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08000b8c <SysTick_Config>:
|
2023-09-17 08:27:41 +00:00
|
|
|
\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)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000b8c: b580 push {r7, lr}
|
|
|
|
8000b8e: b082 sub sp, #8
|
|
|
|
8000b90: af00 add r7, sp, #0
|
|
|
|
8000b92: 6078 str r0, [r7, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000b94: 687b ldr r3, [r7, #4]
|
|
|
|
8000b96: 3b01 subs r3, #1
|
|
|
|
8000b98: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000
|
|
|
|
8000b9c: d301 bcc.n 8000ba2 <SysTick_Config+0x16>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return (1UL); /* Reload value impossible */
|
2023-09-17 10:40:31 +00:00
|
|
|
8000b9e: 2301 movs r3, #1
|
|
|
|
8000ba0: e00f b.n 8000bc2 <SysTick_Config+0x36>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ba2: 4a0a ldr r2, [pc, #40] ; (8000bcc <SysTick_Config+0x40>)
|
|
|
|
8000ba4: 687b ldr r3, [r7, #4]
|
|
|
|
8000ba6: 3b01 subs r3, #1
|
|
|
|
8000ba8: 6053 str r3, [r2, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
|
2023-09-17 10:40:31 +00:00
|
|
|
8000baa: 210f movs r1, #15
|
|
|
|
8000bac: f04f 30ff mov.w r0, #4294967295
|
|
|
|
8000bb0: f7ff ff8e bl 8000ad0 <__NVIC_SetPriority>
|
2023-09-17 08:27:41 +00:00
|
|
|
SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
|
2023-09-17 10:40:31 +00:00
|
|
|
8000bb4: 4b05 ldr r3, [pc, #20] ; (8000bcc <SysTick_Config+0x40>)
|
|
|
|
8000bb6: 2200 movs r2, #0
|
|
|
|
8000bb8: 609a str r2, [r3, #8]
|
2023-09-17 08:27:41 +00:00
|
|
|
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
|
2023-09-17 10:40:31 +00:00
|
|
|
8000bba: 4b04 ldr r3, [pc, #16] ; (8000bcc <SysTick_Config+0x40>)
|
|
|
|
8000bbc: 2207 movs r2, #7
|
|
|
|
8000bbe: 601a str r2, [r3, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
SysTick_CTRL_TICKINT_Msk |
|
|
|
|
SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
|
|
|
|
return (0UL); /* Function successful */
|
2023-09-17 10:40:31 +00:00
|
|
|
8000bc0: 2300 movs r3, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000bc2: 4618 mov r0, r3
|
|
|
|
8000bc4: 3708 adds r7, #8
|
|
|
|
8000bc6: 46bd mov sp, r7
|
|
|
|
8000bc8: bd80 pop {r7, pc}
|
|
|
|
8000bca: bf00 nop
|
|
|
|
8000bcc: e000e010 .word 0xe000e010
|
|
|
|
|
|
|
|
08000bd0 <HAL_NVIC_SetPriorityGrouping>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* @note When the NVIC_PriorityGroup_0 is selected, IRQ preemption is no more possible.
|
|
|
|
* The pending IRQ priority will be managed only by the subpriority.
|
|
|
|
* @retval None
|
|
|
|
*/
|
|
|
|
void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000bd0: b580 push {r7, lr}
|
|
|
|
8000bd2: b082 sub sp, #8
|
|
|
|
8000bd4: af00 add r7, sp, #0
|
|
|
|
8000bd6: 6078 str r0, [r7, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
/* 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);
|
2023-09-17 10:40:31 +00:00
|
|
|
8000bd8: 6878 ldr r0, [r7, #4]
|
|
|
|
8000bda: f7ff ff47 bl 8000a6c <__NVIC_SetPriorityGrouping>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000bde: bf00 nop
|
|
|
|
8000be0: 3708 adds r7, #8
|
|
|
|
8000be2: 46bd mov sp, r7
|
|
|
|
8000be4: bd80 pop {r7, pc}
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08000be6 <HAL_NVIC_SetPriority>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* 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)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000be6: b580 push {r7, lr}
|
|
|
|
8000be8: b086 sub sp, #24
|
|
|
|
8000bea: af00 add r7, sp, #0
|
|
|
|
8000bec: 4603 mov r3, r0
|
|
|
|
8000bee: 60b9 str r1, [r7, #8]
|
|
|
|
8000bf0: 607a str r2, [r7, #4]
|
|
|
|
8000bf2: 73fb strb r3, [r7, #15]
|
2023-09-17 08:27:41 +00:00
|
|
|
uint32_t prioritygroup = 0x00U;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000bf4: 2300 movs r3, #0
|
|
|
|
8000bf6: 617b str r3, [r7, #20]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Check the parameters */
|
|
|
|
assert_param(IS_NVIC_SUB_PRIORITY(SubPriority));
|
|
|
|
assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority));
|
|
|
|
|
|
|
|
prioritygroup = NVIC_GetPriorityGrouping();
|
2023-09-17 10:40:31 +00:00
|
|
|
8000bf8: f7ff ff5c bl 8000ab4 <__NVIC_GetPriorityGrouping>
|
|
|
|
8000bfc: 6178 str r0, [r7, #20]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority));
|
2023-09-17 10:40:31 +00:00
|
|
|
8000bfe: 687a ldr r2, [r7, #4]
|
|
|
|
8000c00: 68b9 ldr r1, [r7, #8]
|
|
|
|
8000c02: 6978 ldr r0, [r7, #20]
|
|
|
|
8000c04: f7ff ff8e bl 8000b24 <NVIC_EncodePriority>
|
|
|
|
8000c08: 4602 mov r2, r0
|
|
|
|
8000c0a: f997 300f ldrsb.w r3, [r7, #15]
|
|
|
|
8000c0e: 4611 mov r1, r2
|
|
|
|
8000c10: 4618 mov r0, r3
|
|
|
|
8000c12: f7ff ff5d bl 8000ad0 <__NVIC_SetPriority>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c16: bf00 nop
|
|
|
|
8000c18: 3718 adds r7, #24
|
|
|
|
8000c1a: 46bd mov sp, r7
|
|
|
|
8000c1c: bd80 pop {r7, pc}
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08000c1e <HAL_SYSTICK_Config>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* @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)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c1e: b580 push {r7, lr}
|
|
|
|
8000c20: b082 sub sp, #8
|
|
|
|
8000c22: af00 add r7, sp, #0
|
|
|
|
8000c24: 6078 str r0, [r7, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
return SysTick_Config(TicksNumb);
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c26: 6878 ldr r0, [r7, #4]
|
|
|
|
8000c28: f7ff ffb0 bl 8000b8c <SysTick_Config>
|
|
|
|
8000c2c: 4603 mov r3, r0
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c2e: 4618 mov r0, r3
|
|
|
|
8000c30: 3708 adds r7, #8
|
|
|
|
8000c32: 46bd mov sp, r7
|
|
|
|
8000c34: bd80 pop {r7, pc}
|
2023-09-17 08:27:41 +00:00
|
|
|
...
|
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08000c38 <HAL_GPIO_Init>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* @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)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c38: b480 push {r7}
|
|
|
|
8000c3a: b089 sub sp, #36 ; 0x24
|
|
|
|
8000c3c: af00 add r7, sp, #0
|
|
|
|
8000c3e: 6078 str r0, [r7, #4]
|
|
|
|
8000c40: 6039 str r1, [r7, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
uint32_t position;
|
|
|
|
uint32_t ioposition = 0x00U;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c42: 2300 movs r3, #0
|
|
|
|
8000c44: 617b str r3, [r7, #20]
|
2023-09-17 08:27:41 +00:00
|
|
|
uint32_t iocurrent = 0x00U;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c46: 2300 movs r3, #0
|
|
|
|
8000c48: 613b str r3, [r7, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
uint32_t temp = 0x00U;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c4a: 2300 movs r3, #0
|
|
|
|
8000c4c: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
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 */
|
|
|
|
for(position = 0U; position < GPIO_NUMBER; position++)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c4e: 2300 movs r3, #0
|
|
|
|
8000c50: 61fb str r3, [r7, #28]
|
|
|
|
8000c52: e159 b.n 8000f08 <HAL_GPIO_Init+0x2d0>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Get the IO position */
|
|
|
|
ioposition = 0x01U << position;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c54: 2201 movs r2, #1
|
|
|
|
8000c56: 69fb ldr r3, [r7, #28]
|
|
|
|
8000c58: fa02 f303 lsl.w r3, r2, r3
|
|
|
|
8000c5c: 617b str r3, [r7, #20]
|
2023-09-17 08:27:41 +00:00
|
|
|
/* Get the current IO position */
|
|
|
|
iocurrent = (uint32_t)(GPIO_Init->Pin) & ioposition;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c5e: 683b ldr r3, [r7, #0]
|
|
|
|
8000c60: 681b ldr r3, [r3, #0]
|
|
|
|
8000c62: 697a ldr r2, [r7, #20]
|
|
|
|
8000c64: 4013 ands r3, r2
|
|
|
|
8000c66: 613b str r3, [r7, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
if(iocurrent == ioposition)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c68: 693a ldr r2, [r7, #16]
|
|
|
|
8000c6a: 697b ldr r3, [r7, #20]
|
|
|
|
8000c6c: 429a cmp r2, r3
|
|
|
|
8000c6e: f040 8148 bne.w 8000f02 <HAL_GPIO_Init+0x2ca>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/*--------------------- GPIO Mode Configuration ------------------------*/
|
|
|
|
/* In case of Output or Alternate function mode selection */
|
|
|
|
if(((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || \
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c72: 683b ldr r3, [r7, #0]
|
|
|
|
8000c74: 685b ldr r3, [r3, #4]
|
|
|
|
8000c76: f003 0303 and.w r3, r3, #3
|
|
|
|
8000c7a: 2b01 cmp r3, #1
|
|
|
|
8000c7c: d005 beq.n 8000c8a <HAL_GPIO_Init+0x52>
|
2023-09-17 08:27:41 +00:00
|
|
|
(GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c7e: 683b ldr r3, [r7, #0]
|
|
|
|
8000c80: 685b ldr r3, [r3, #4]
|
|
|
|
8000c82: f003 0303 and.w r3, r3, #3
|
2023-09-17 08:27:41 +00:00
|
|
|
if(((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || \
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c86: 2b02 cmp r3, #2
|
|
|
|
8000c88: d130 bne.n 8000cec <HAL_GPIO_Init+0xb4>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Check the Speed parameter */
|
|
|
|
assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
|
|
|
|
/* Configure the IO Speed */
|
|
|
|
temp = GPIOx->OSPEEDR;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c8a: 687b ldr r3, [r7, #4]
|
|
|
|
8000c8c: 689b ldr r3, [r3, #8]
|
|
|
|
8000c8e: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
temp &= ~(GPIO_OSPEEDER_OSPEEDR0 << (position * 2U));
|
2023-09-17 10:40:31 +00:00
|
|
|
8000c90: 69fb ldr r3, [r7, #28]
|
|
|
|
8000c92: 005b lsls r3, r3, #1
|
|
|
|
8000c94: 2203 movs r2, #3
|
|
|
|
8000c96: fa02 f303 lsl.w r3, r2, r3
|
|
|
|
8000c9a: 43db mvns r3, r3
|
|
|
|
8000c9c: 69ba ldr r2, [r7, #24]
|
|
|
|
8000c9e: 4013 ands r3, r2
|
|
|
|
8000ca0: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
temp |= (GPIO_Init->Speed << (position * 2U));
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ca2: 683b ldr r3, [r7, #0]
|
|
|
|
8000ca4: 68da ldr r2, [r3, #12]
|
|
|
|
8000ca6: 69fb ldr r3, [r7, #28]
|
|
|
|
8000ca8: 005b lsls r3, r3, #1
|
|
|
|
8000caa: fa02 f303 lsl.w r3, r2, r3
|
|
|
|
8000cae: 69ba ldr r2, [r7, #24]
|
|
|
|
8000cb0: 4313 orrs r3, r2
|
|
|
|
8000cb2: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
GPIOx->OSPEEDR = temp;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000cb4: 687b ldr r3, [r7, #4]
|
|
|
|
8000cb6: 69ba ldr r2, [r7, #24]
|
|
|
|
8000cb8: 609a str r2, [r3, #8]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Configure the IO Output Type */
|
|
|
|
temp = GPIOx->OTYPER;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000cba: 687b ldr r3, [r7, #4]
|
|
|
|
8000cbc: 685b ldr r3, [r3, #4]
|
|
|
|
8000cbe: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
temp &= ~(GPIO_OTYPER_OT_0 << position) ;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000cc0: 2201 movs r2, #1
|
|
|
|
8000cc2: 69fb ldr r3, [r7, #28]
|
|
|
|
8000cc4: fa02 f303 lsl.w r3, r2, r3
|
|
|
|
8000cc8: 43db mvns r3, r3
|
|
|
|
8000cca: 69ba ldr r2, [r7, #24]
|
|
|
|
8000ccc: 4013 ands r3, r2
|
|
|
|
8000cce: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position);
|
2023-09-17 10:40:31 +00:00
|
|
|
8000cd0: 683b ldr r3, [r7, #0]
|
|
|
|
8000cd2: 685b ldr r3, [r3, #4]
|
|
|
|
8000cd4: 091b lsrs r3, r3, #4
|
|
|
|
8000cd6: f003 0201 and.w r2, r3, #1
|
|
|
|
8000cda: 69fb ldr r3, [r7, #28]
|
|
|
|
8000cdc: fa02 f303 lsl.w r3, r2, r3
|
|
|
|
8000ce0: 69ba ldr r2, [r7, #24]
|
|
|
|
8000ce2: 4313 orrs r3, r2
|
|
|
|
8000ce4: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
GPIOx->OTYPER = temp;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ce6: 687b ldr r3, [r7, #4]
|
|
|
|
8000ce8: 69ba ldr r2, [r7, #24]
|
|
|
|
8000cea: 605a str r2, [r3, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000cec: 683b ldr r3, [r7, #0]
|
|
|
|
8000cee: 685b ldr r3, [r3, #4]
|
|
|
|
8000cf0: f003 0303 and.w r3, r3, #3
|
|
|
|
8000cf4: 2b03 cmp r3, #3
|
|
|
|
8000cf6: d017 beq.n 8000d28 <HAL_GPIO_Init+0xf0>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Check the parameters */
|
|
|
|
assert_param(IS_GPIO_PULL(GPIO_Init->Pull));
|
|
|
|
|
|
|
|
/* Activate the Pull-up or Pull down resistor for the current IO */
|
|
|
|
temp = GPIOx->PUPDR;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000cf8: 687b ldr r3, [r7, #4]
|
|
|
|
8000cfa: 68db ldr r3, [r3, #12]
|
|
|
|
8000cfc: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
temp &= ~(GPIO_PUPDR_PUPDR0 << (position * 2U));
|
2023-09-17 10:40:31 +00:00
|
|
|
8000cfe: 69fb ldr r3, [r7, #28]
|
|
|
|
8000d00: 005b lsls r3, r3, #1
|
|
|
|
8000d02: 2203 movs r2, #3
|
|
|
|
8000d04: fa02 f303 lsl.w r3, r2, r3
|
|
|
|
8000d08: 43db mvns r3, r3
|
|
|
|
8000d0a: 69ba ldr r2, [r7, #24]
|
|
|
|
8000d0c: 4013 ands r3, r2
|
|
|
|
8000d0e: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
temp |= ((GPIO_Init->Pull) << (position * 2U));
|
2023-09-17 10:40:31 +00:00
|
|
|
8000d10: 683b ldr r3, [r7, #0]
|
|
|
|
8000d12: 689a ldr r2, [r3, #8]
|
|
|
|
8000d14: 69fb ldr r3, [r7, #28]
|
|
|
|
8000d16: 005b lsls r3, r3, #1
|
|
|
|
8000d18: fa02 f303 lsl.w r3, r2, r3
|
|
|
|
8000d1c: 69ba ldr r2, [r7, #24]
|
|
|
|
8000d1e: 4313 orrs r3, r2
|
|
|
|
8000d20: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
GPIOx->PUPDR = temp;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000d22: 687b ldr r3, [r7, #4]
|
|
|
|
8000d24: 69ba ldr r2, [r7, #24]
|
|
|
|
8000d26: 60da str r2, [r3, #12]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* In case of Alternate function mode selection */
|
|
|
|
if((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000d28: 683b ldr r3, [r7, #0]
|
|
|
|
8000d2a: 685b ldr r3, [r3, #4]
|
|
|
|
8000d2c: f003 0303 and.w r3, r3, #3
|
|
|
|
8000d30: 2b02 cmp r3, #2
|
|
|
|
8000d32: d123 bne.n 8000d7c <HAL_GPIO_Init+0x144>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Check the Alternate function parameter */
|
|
|
|
assert_param(IS_GPIO_AF(GPIO_Init->Alternate));
|
|
|
|
/* Configure Alternate function mapped with the current IO */
|
|
|
|
temp = GPIOx->AFR[position >> 3U];
|
2023-09-17 10:40:31 +00:00
|
|
|
8000d34: 69fb ldr r3, [r7, #28]
|
|
|
|
8000d36: 08da lsrs r2, r3, #3
|
|
|
|
8000d38: 687b ldr r3, [r7, #4]
|
|
|
|
8000d3a: 3208 adds r2, #8
|
|
|
|
8000d3c: f853 3022 ldr.w r3, [r3, r2, lsl #2]
|
|
|
|
8000d40: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
temp &= ~(0xFU << ((uint32_t)(position & 0x07U) * 4U)) ;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000d42: 69fb ldr r3, [r7, #28]
|
|
|
|
8000d44: f003 0307 and.w r3, r3, #7
|
|
|
|
8000d48: 009b lsls r3, r3, #2
|
|
|
|
8000d4a: 220f movs r2, #15
|
|
|
|
8000d4c: fa02 f303 lsl.w r3, r2, r3
|
|
|
|
8000d50: 43db mvns r3, r3
|
|
|
|
8000d52: 69ba ldr r2, [r7, #24]
|
|
|
|
8000d54: 4013 ands r3, r2
|
|
|
|
8000d56: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
temp |= ((uint32_t)(GPIO_Init->Alternate) << (((uint32_t)position & 0x07U) * 4U));
|
2023-09-17 10:40:31 +00:00
|
|
|
8000d58: 683b ldr r3, [r7, #0]
|
|
|
|
8000d5a: 691a ldr r2, [r3, #16]
|
|
|
|
8000d5c: 69fb ldr r3, [r7, #28]
|
|
|
|
8000d5e: f003 0307 and.w r3, r3, #7
|
|
|
|
8000d62: 009b lsls r3, r3, #2
|
|
|
|
8000d64: fa02 f303 lsl.w r3, r2, r3
|
|
|
|
8000d68: 69ba ldr r2, [r7, #24]
|
|
|
|
8000d6a: 4313 orrs r3, r2
|
|
|
|
8000d6c: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
GPIOx->AFR[position >> 3U] = temp;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000d6e: 69fb ldr r3, [r7, #28]
|
|
|
|
8000d70: 08da lsrs r2, r3, #3
|
|
|
|
8000d72: 687b ldr r3, [r7, #4]
|
|
|
|
8000d74: 3208 adds r2, #8
|
|
|
|
8000d76: 69b9 ldr r1, [r7, #24]
|
|
|
|
8000d78: f843 1022 str.w r1, [r3, r2, lsl #2]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Configure IO Direction mode (Input, Output, Alternate or Analog) */
|
|
|
|
temp = GPIOx->MODER;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000d7c: 687b ldr r3, [r7, #4]
|
|
|
|
8000d7e: 681b ldr r3, [r3, #0]
|
|
|
|
8000d80: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
temp &= ~(GPIO_MODER_MODER0 << (position * 2U));
|
2023-09-17 10:40:31 +00:00
|
|
|
8000d82: 69fb ldr r3, [r7, #28]
|
|
|
|
8000d84: 005b lsls r3, r3, #1
|
|
|
|
8000d86: 2203 movs r2, #3
|
|
|
|
8000d88: fa02 f303 lsl.w r3, r2, r3
|
|
|
|
8000d8c: 43db mvns r3, r3
|
|
|
|
8000d8e: 69ba ldr r2, [r7, #24]
|
|
|
|
8000d90: 4013 ands r3, r2
|
|
|
|
8000d92: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2U));
|
2023-09-17 10:40:31 +00:00
|
|
|
8000d94: 683b ldr r3, [r7, #0]
|
|
|
|
8000d96: 685b ldr r3, [r3, #4]
|
|
|
|
8000d98: f003 0203 and.w r2, r3, #3
|
|
|
|
8000d9c: 69fb ldr r3, [r7, #28]
|
|
|
|
8000d9e: 005b lsls r3, r3, #1
|
|
|
|
8000da0: fa02 f303 lsl.w r3, r2, r3
|
|
|
|
8000da4: 69ba ldr r2, [r7, #24]
|
|
|
|
8000da6: 4313 orrs r3, r2
|
|
|
|
8000da8: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
GPIOx->MODER = temp;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000daa: 687b ldr r3, [r7, #4]
|
|
|
|
8000dac: 69ba ldr r2, [r7, #24]
|
|
|
|
8000dae: 601a str r2, [r3, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/*--------------------- EXTI Mode Configuration ------------------------*/
|
|
|
|
/* Configure the External Interrupt or event for the current IO */
|
|
|
|
if((GPIO_Init->Mode & EXTI_MODE) != 0x00U)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000db0: 683b ldr r3, [r7, #0]
|
|
|
|
8000db2: 685b ldr r3, [r3, #4]
|
|
|
|
8000db4: f403 3340 and.w r3, r3, #196608 ; 0x30000
|
|
|
|
8000db8: 2b00 cmp r3, #0
|
|
|
|
8000dba: f000 80a2 beq.w 8000f02 <HAL_GPIO_Init+0x2ca>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Enable SYSCFG Clock */
|
|
|
|
__HAL_RCC_SYSCFG_CLK_ENABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
8000dbe: 2300 movs r3, #0
|
|
|
|
8000dc0: 60fb str r3, [r7, #12]
|
|
|
|
8000dc2: 4b57 ldr r3, [pc, #348] ; (8000f20 <HAL_GPIO_Init+0x2e8>)
|
|
|
|
8000dc4: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
|
|
8000dc6: 4a56 ldr r2, [pc, #344] ; (8000f20 <HAL_GPIO_Init+0x2e8>)
|
|
|
|
8000dc8: f443 4380 orr.w r3, r3, #16384 ; 0x4000
|
|
|
|
8000dcc: 6453 str r3, [r2, #68] ; 0x44
|
|
|
|
8000dce: 4b54 ldr r3, [pc, #336] ; (8000f20 <HAL_GPIO_Init+0x2e8>)
|
|
|
|
8000dd0: 6c5b ldr r3, [r3, #68] ; 0x44
|
|
|
|
8000dd2: f403 4380 and.w r3, r3, #16384 ; 0x4000
|
|
|
|
8000dd6: 60fb str r3, [r7, #12]
|
|
|
|
8000dd8: 68fb ldr r3, [r7, #12]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
temp = SYSCFG->EXTICR[position >> 2U];
|
2023-09-17 10:40:31 +00:00
|
|
|
8000dda: 4a52 ldr r2, [pc, #328] ; (8000f24 <HAL_GPIO_Init+0x2ec>)
|
|
|
|
8000ddc: 69fb ldr r3, [r7, #28]
|
|
|
|
8000dde: 089b lsrs r3, r3, #2
|
|
|
|
8000de0: 3302 adds r3, #2
|
|
|
|
8000de2: f852 3023 ldr.w r3, [r2, r3, lsl #2]
|
|
|
|
8000de6: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
temp &= ~(0x0FU << (4U * (position & 0x03U)));
|
2023-09-17 10:40:31 +00:00
|
|
|
8000de8: 69fb ldr r3, [r7, #28]
|
|
|
|
8000dea: f003 0303 and.w r3, r3, #3
|
|
|
|
8000dee: 009b lsls r3, r3, #2
|
|
|
|
8000df0: 220f movs r2, #15
|
|
|
|
8000df2: fa02 f303 lsl.w r3, r2, r3
|
|
|
|
8000df6: 43db mvns r3, r3
|
|
|
|
8000df8: 69ba ldr r2, [r7, #24]
|
|
|
|
8000dfa: 4013 ands r3, r2
|
|
|
|
8000dfc: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
temp |= ((uint32_t)(GPIO_GET_INDEX(GPIOx)) << (4U * (position & 0x03U)));
|
2023-09-17 09:57:40 +00:00
|
|
|
8000dfe: 687b ldr r3, [r7, #4]
|
2023-09-17 10:40:31 +00:00
|
|
|
8000e00: 4a49 ldr r2, [pc, #292] ; (8000f28 <HAL_GPIO_Init+0x2f0>)
|
2023-09-17 09:57:40 +00:00
|
|
|
8000e02: 4293 cmp r3, r2
|
2023-09-17 10:40:31 +00:00
|
|
|
8000e04: d019 beq.n 8000e3a <HAL_GPIO_Init+0x202>
|
|
|
|
8000e06: 687b ldr r3, [r7, #4]
|
|
|
|
8000e08: 4a48 ldr r2, [pc, #288] ; (8000f2c <HAL_GPIO_Init+0x2f4>)
|
|
|
|
8000e0a: 4293 cmp r3, r2
|
|
|
|
8000e0c: d013 beq.n 8000e36 <HAL_GPIO_Init+0x1fe>
|
|
|
|
8000e0e: 687b ldr r3, [r7, #4]
|
|
|
|
8000e10: 4a47 ldr r2, [pc, #284] ; (8000f30 <HAL_GPIO_Init+0x2f8>)
|
|
|
|
8000e12: 4293 cmp r3, r2
|
|
|
|
8000e14: d00d beq.n 8000e32 <HAL_GPIO_Init+0x1fa>
|
|
|
|
8000e16: 687b ldr r3, [r7, #4]
|
|
|
|
8000e18: 4a46 ldr r2, [pc, #280] ; (8000f34 <HAL_GPIO_Init+0x2fc>)
|
|
|
|
8000e1a: 4293 cmp r3, r2
|
|
|
|
8000e1c: d007 beq.n 8000e2e <HAL_GPIO_Init+0x1f6>
|
|
|
|
8000e1e: 687b ldr r3, [r7, #4]
|
|
|
|
8000e20: 4a45 ldr r2, [pc, #276] ; (8000f38 <HAL_GPIO_Init+0x300>)
|
|
|
|
8000e22: 4293 cmp r3, r2
|
|
|
|
8000e24: d101 bne.n 8000e2a <HAL_GPIO_Init+0x1f2>
|
|
|
|
8000e26: 2304 movs r3, #4
|
|
|
|
8000e28: e008 b.n 8000e3c <HAL_GPIO_Init+0x204>
|
|
|
|
8000e2a: 2307 movs r3, #7
|
|
|
|
8000e2c: e006 b.n 8000e3c <HAL_GPIO_Init+0x204>
|
|
|
|
8000e2e: 2303 movs r3, #3
|
|
|
|
8000e30: e004 b.n 8000e3c <HAL_GPIO_Init+0x204>
|
|
|
|
8000e32: 2302 movs r3, #2
|
|
|
|
8000e34: e002 b.n 8000e3c <HAL_GPIO_Init+0x204>
|
|
|
|
8000e36: 2301 movs r3, #1
|
|
|
|
8000e38: e000 b.n 8000e3c <HAL_GPIO_Init+0x204>
|
|
|
|
8000e3a: 2300 movs r3, #0
|
|
|
|
8000e3c: 69fa ldr r2, [r7, #28]
|
|
|
|
8000e3e: f002 0203 and.w r2, r2, #3
|
|
|
|
8000e42: 0092 lsls r2, r2, #2
|
|
|
|
8000e44: 4093 lsls r3, r2
|
|
|
|
8000e46: 69ba ldr r2, [r7, #24]
|
|
|
|
8000e48: 4313 orrs r3, r2
|
|
|
|
8000e4a: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
SYSCFG->EXTICR[position >> 2U] = temp;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000e4c: 4935 ldr r1, [pc, #212] ; (8000f24 <HAL_GPIO_Init+0x2ec>)
|
|
|
|
8000e4e: 69fb ldr r3, [r7, #28]
|
|
|
|
8000e50: 089b lsrs r3, r3, #2
|
|
|
|
8000e52: 3302 adds r3, #2
|
|
|
|
8000e54: 69ba ldr r2, [r7, #24]
|
|
|
|
8000e56: f841 2023 str.w r2, [r1, r3, lsl #2]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Clear Rising Falling edge configuration */
|
|
|
|
temp = EXTI->RTSR;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000e5a: 4b38 ldr r3, [pc, #224] ; (8000f3c <HAL_GPIO_Init+0x304>)
|
|
|
|
8000e5c: 689b ldr r3, [r3, #8]
|
|
|
|
8000e5e: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
temp &= ~((uint32_t)iocurrent);
|
2023-09-17 10:40:31 +00:00
|
|
|
8000e60: 693b ldr r3, [r7, #16]
|
|
|
|
8000e62: 43db mvns r3, r3
|
|
|
|
8000e64: 69ba ldr r2, [r7, #24]
|
|
|
|
8000e66: 4013 ands r3, r2
|
|
|
|
8000e68: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
if((GPIO_Init->Mode & TRIGGER_RISING) != 0x00U)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000e6a: 683b ldr r3, [r7, #0]
|
|
|
|
8000e6c: 685b ldr r3, [r3, #4]
|
|
|
|
8000e6e: f403 1380 and.w r3, r3, #1048576 ; 0x100000
|
|
|
|
8000e72: 2b00 cmp r3, #0
|
|
|
|
8000e74: d003 beq.n 8000e7e <HAL_GPIO_Init+0x246>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
temp |= iocurrent;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000e76: 69ba ldr r2, [r7, #24]
|
|
|
|
8000e78: 693b ldr r3, [r7, #16]
|
|
|
|
8000e7a: 4313 orrs r3, r2
|
|
|
|
8000e7c: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
EXTI->RTSR = temp;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000e7e: 4a2f ldr r2, [pc, #188] ; (8000f3c <HAL_GPIO_Init+0x304>)
|
|
|
|
8000e80: 69bb ldr r3, [r7, #24]
|
|
|
|
8000e82: 6093 str r3, [r2, #8]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
temp = EXTI->FTSR;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000e84: 4b2d ldr r3, [pc, #180] ; (8000f3c <HAL_GPIO_Init+0x304>)
|
|
|
|
8000e86: 68db ldr r3, [r3, #12]
|
|
|
|
8000e88: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
temp &= ~((uint32_t)iocurrent);
|
2023-09-17 10:40:31 +00:00
|
|
|
8000e8a: 693b ldr r3, [r7, #16]
|
|
|
|
8000e8c: 43db mvns r3, r3
|
|
|
|
8000e8e: 69ba ldr r2, [r7, #24]
|
|
|
|
8000e90: 4013 ands r3, r2
|
|
|
|
8000e92: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
if((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00U)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000e94: 683b ldr r3, [r7, #0]
|
|
|
|
8000e96: 685b ldr r3, [r3, #4]
|
|
|
|
8000e98: f403 1300 and.w r3, r3, #2097152 ; 0x200000
|
|
|
|
8000e9c: 2b00 cmp r3, #0
|
|
|
|
8000e9e: d003 beq.n 8000ea8 <HAL_GPIO_Init+0x270>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
temp |= iocurrent;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ea0: 69ba ldr r2, [r7, #24]
|
|
|
|
8000ea2: 693b ldr r3, [r7, #16]
|
|
|
|
8000ea4: 4313 orrs r3, r2
|
|
|
|
8000ea6: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
EXTI->FTSR = temp;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ea8: 4a24 ldr r2, [pc, #144] ; (8000f3c <HAL_GPIO_Init+0x304>)
|
|
|
|
8000eaa: 69bb ldr r3, [r7, #24]
|
|
|
|
8000eac: 60d3 str r3, [r2, #12]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
temp = EXTI->EMR;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000eae: 4b23 ldr r3, [pc, #140] ; (8000f3c <HAL_GPIO_Init+0x304>)
|
|
|
|
8000eb0: 685b ldr r3, [r3, #4]
|
|
|
|
8000eb2: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
temp &= ~((uint32_t)iocurrent);
|
2023-09-17 10:40:31 +00:00
|
|
|
8000eb4: 693b ldr r3, [r7, #16]
|
|
|
|
8000eb6: 43db mvns r3, r3
|
|
|
|
8000eb8: 69ba ldr r2, [r7, #24]
|
|
|
|
8000eba: 4013 ands r3, r2
|
|
|
|
8000ebc: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
if((GPIO_Init->Mode & EXTI_EVT) != 0x00U)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ebe: 683b ldr r3, [r7, #0]
|
|
|
|
8000ec0: 685b ldr r3, [r3, #4]
|
|
|
|
8000ec2: f403 3300 and.w r3, r3, #131072 ; 0x20000
|
|
|
|
8000ec6: 2b00 cmp r3, #0
|
|
|
|
8000ec8: d003 beq.n 8000ed2 <HAL_GPIO_Init+0x29a>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
temp |= iocurrent;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000eca: 69ba ldr r2, [r7, #24]
|
|
|
|
8000ecc: 693b ldr r3, [r7, #16]
|
|
|
|
8000ece: 4313 orrs r3, r2
|
|
|
|
8000ed0: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
EXTI->EMR = temp;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ed2: 4a1a ldr r2, [pc, #104] ; (8000f3c <HAL_GPIO_Init+0x304>)
|
|
|
|
8000ed4: 69bb ldr r3, [r7, #24]
|
|
|
|
8000ed6: 6053 str r3, [r2, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Clear EXTI line configuration */
|
|
|
|
temp = EXTI->IMR;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ed8: 4b18 ldr r3, [pc, #96] ; (8000f3c <HAL_GPIO_Init+0x304>)
|
|
|
|
8000eda: 681b ldr r3, [r3, #0]
|
|
|
|
8000edc: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
temp &= ~((uint32_t)iocurrent);
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ede: 693b ldr r3, [r7, #16]
|
|
|
|
8000ee0: 43db mvns r3, r3
|
|
|
|
8000ee2: 69ba ldr r2, [r7, #24]
|
|
|
|
8000ee4: 4013 ands r3, r2
|
|
|
|
8000ee6: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
if((GPIO_Init->Mode & EXTI_IT) != 0x00U)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ee8: 683b ldr r3, [r7, #0]
|
|
|
|
8000eea: 685b ldr r3, [r3, #4]
|
|
|
|
8000eec: f403 3380 and.w r3, r3, #65536 ; 0x10000
|
|
|
|
8000ef0: 2b00 cmp r3, #0
|
|
|
|
8000ef2: d003 beq.n 8000efc <HAL_GPIO_Init+0x2c4>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
temp |= iocurrent;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ef4: 69ba ldr r2, [r7, #24]
|
|
|
|
8000ef6: 693b ldr r3, [r7, #16]
|
|
|
|
8000ef8: 4313 orrs r3, r2
|
|
|
|
8000efa: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
EXTI->IMR = temp;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000efc: 4a0f ldr r2, [pc, #60] ; (8000f3c <HAL_GPIO_Init+0x304>)
|
|
|
|
8000efe: 69bb ldr r3, [r7, #24]
|
|
|
|
8000f00: 6013 str r3, [r2, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
for(position = 0U; position < GPIO_NUMBER; position++)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000f02: 69fb ldr r3, [r7, #28]
|
|
|
|
8000f04: 3301 adds r3, #1
|
|
|
|
8000f06: 61fb str r3, [r7, #28]
|
|
|
|
8000f08: 69fb ldr r3, [r7, #28]
|
|
|
|
8000f0a: 2b0f cmp r3, #15
|
|
|
|
8000f0c: f67f aea2 bls.w 8000c54 <HAL_GPIO_Init+0x1c>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000f10: bf00 nop
|
|
|
|
8000f12: bf00 nop
|
|
|
|
8000f14: 3724 adds r7, #36 ; 0x24
|
|
|
|
8000f16: 46bd mov sp, r7
|
|
|
|
8000f18: f85d 7b04 ldr.w r7, [sp], #4
|
|
|
|
8000f1c: 4770 bx lr
|
|
|
|
8000f1e: bf00 nop
|
|
|
|
8000f20: 40023800 .word 0x40023800
|
|
|
|
8000f24: 40013800 .word 0x40013800
|
|
|
|
8000f28: 40020000 .word 0x40020000
|
|
|
|
8000f2c: 40020400 .word 0x40020400
|
|
|
|
8000f30: 40020800 .word 0x40020800
|
|
|
|
8000f34: 40020c00 .word 0x40020c00
|
|
|
|
8000f38: 40021000 .word 0x40021000
|
|
|
|
8000f3c: 40013c00 .word 0x40013c00
|
|
|
|
|
|
|
|
08000f40 <HAL_GPIO_ReadPin>:
|
2023-09-17 09:57:40 +00:00
|
|
|
* @param GPIO_Pin specifies the port bit to read.
|
|
|
|
* This parameter can be GPIO_PIN_x where x can be (0..15).
|
|
|
|
* @retval The input port pin value.
|
|
|
|
*/
|
|
|
|
GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000f40: b480 push {r7}
|
|
|
|
8000f42: b085 sub sp, #20
|
|
|
|
8000f44: af00 add r7, sp, #0
|
|
|
|
8000f46: 6078 str r0, [r7, #4]
|
|
|
|
8000f48: 460b mov r3, r1
|
|
|
|
8000f4a: 807b strh r3, [r7, #2]
|
2023-09-17 09:57:40 +00:00
|
|
|
GPIO_PinState bitstatus;
|
|
|
|
|
|
|
|
/* Check the parameters */
|
|
|
|
assert_param(IS_GPIO_PIN(GPIO_Pin));
|
|
|
|
|
|
|
|
if((GPIOx->IDR & GPIO_Pin) != (uint32_t)GPIO_PIN_RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000f4c: 687b ldr r3, [r7, #4]
|
|
|
|
8000f4e: 691a ldr r2, [r3, #16]
|
|
|
|
8000f50: 887b ldrh r3, [r7, #2]
|
|
|
|
8000f52: 4013 ands r3, r2
|
|
|
|
8000f54: 2b00 cmp r3, #0
|
|
|
|
8000f56: d002 beq.n 8000f5e <HAL_GPIO_ReadPin+0x1e>
|
2023-09-17 09:57:40 +00:00
|
|
|
{
|
|
|
|
bitstatus = GPIO_PIN_SET;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000f58: 2301 movs r3, #1
|
|
|
|
8000f5a: 73fb strb r3, [r7, #15]
|
|
|
|
8000f5c: e001 b.n 8000f62 <HAL_GPIO_ReadPin+0x22>
|
2023-09-17 09:57:40 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
bitstatus = GPIO_PIN_RESET;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000f5e: 2300 movs r3, #0
|
|
|
|
8000f60: 73fb strb r3, [r7, #15]
|
2023-09-17 09:57:40 +00:00
|
|
|
}
|
|
|
|
return bitstatus;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000f62: 7bfb ldrb r3, [r7, #15]
|
2023-09-17 09:57:40 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000f64: 4618 mov r0, r3
|
|
|
|
8000f66: 3714 adds r7, #20
|
|
|
|
8000f68: 46bd mov sp, r7
|
|
|
|
8000f6a: f85d 7b04 ldr.w r7, [sp], #4
|
|
|
|
8000f6e: 4770 bx lr
|
2023-09-17 09:57:40 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08000f70 <HAL_GPIO_WritePin>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* @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)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000f70: b480 push {r7}
|
|
|
|
8000f72: b083 sub sp, #12
|
|
|
|
8000f74: af00 add r7, sp, #0
|
|
|
|
8000f76: 6078 str r0, [r7, #4]
|
|
|
|
8000f78: 460b mov r3, r1
|
|
|
|
8000f7a: 807b strh r3, [r7, #2]
|
|
|
|
8000f7c: 4613 mov r3, r2
|
|
|
|
8000f7e: 707b strb r3, [r7, #1]
|
2023-09-17 08:27:41 +00:00
|
|
|
/* Check the parameters */
|
|
|
|
assert_param(IS_GPIO_PIN(GPIO_Pin));
|
|
|
|
assert_param(IS_GPIO_PIN_ACTION(PinState));
|
|
|
|
|
|
|
|
if(PinState != GPIO_PIN_RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000f80: 787b ldrb r3, [r7, #1]
|
|
|
|
8000f82: 2b00 cmp r3, #0
|
|
|
|
8000f84: d003 beq.n 8000f8e <HAL_GPIO_WritePin+0x1e>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
GPIOx->BSRR = GPIO_Pin;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000f86: 887a ldrh r2, [r7, #2]
|
|
|
|
8000f88: 687b ldr r3, [r7, #4]
|
|
|
|
8000f8a: 619a str r2, [r3, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16U;
|
|
|
|
}
|
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000f8c: e003 b.n 8000f96 <HAL_GPIO_WritePin+0x26>
|
2023-09-17 08:27:41 +00:00
|
|
|
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16U;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000f8e: 887b ldrh r3, [r7, #2]
|
|
|
|
8000f90: 041a lsls r2, r3, #16
|
|
|
|
8000f92: 687b ldr r3, [r7, #4]
|
|
|
|
8000f94: 619a str r2, [r3, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8000f96: bf00 nop
|
|
|
|
8000f98: 370c adds r7, #12
|
|
|
|
8000f9a: 46bd mov sp, r7
|
|
|
|
8000f9c: f85d 7b04 ldr.w r7, [sp], #4
|
|
|
|
8000fa0: 4770 bx lr
|
2023-09-17 08:27:41 +00:00
|
|
|
...
|
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08000fa4 <HAL_RCC_OscConfig>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* supported by this API. User should request a transition to HSE Off
|
|
|
|
* first and then HSE On or HSE Bypass.
|
|
|
|
* @retval HAL status
|
|
|
|
*/
|
|
|
|
__weak HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8000fa4: b580 push {r7, lr}
|
|
|
|
8000fa6: b086 sub sp, #24
|
|
|
|
8000fa8: af00 add r7, sp, #0
|
|
|
|
8000faa: 6078 str r0, [r7, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
uint32_t tickstart, pll_config;
|
|
|
|
|
|
|
|
/* Check Null pointer */
|
|
|
|
if(RCC_OscInitStruct == NULL)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000fac: 687b ldr r3, [r7, #4]
|
|
|
|
8000fae: 2b00 cmp r3, #0
|
|
|
|
8000fb0: d101 bne.n 8000fb6 <HAL_RCC_OscConfig+0x12>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_ERROR;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000fb2: 2301 movs r3, #1
|
|
|
|
8000fb4: e267 b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Check the parameters */
|
|
|
|
assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType));
|
|
|
|
/*------------------------------- HSE Configuration ------------------------*/
|
|
|
|
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE)
|
2023-09-17 10:40:31 +00:00
|
|
|
8000fb6: 687b ldr r3, [r7, #4]
|
|
|
|
8000fb8: 681b ldr r3, [r3, #0]
|
|
|
|
8000fba: f003 0301 and.w r3, r3, #1
|
|
|
|
8000fbe: 2b00 cmp r3, #0
|
|
|
|
8000fc0: d075 beq.n 80010ae <HAL_RCC_OscConfig+0x10a>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* 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 HSE will not disabled */
|
|
|
|
if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) ||\
|
2023-09-17 10:40:31 +00:00
|
|
|
8000fc2: 4b88 ldr r3, [pc, #544] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
8000fc4: 689b ldr r3, [r3, #8]
|
|
|
|
8000fc6: f003 030c and.w r3, r3, #12
|
|
|
|
8000fca: 2b04 cmp r3, #4
|
|
|
|
8000fcc: d00c beq.n 8000fe8 <HAL_RCC_OscConfig+0x44>
|
2023-09-17 08:27:41 +00:00
|
|
|
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
|
2023-09-17 10:40:31 +00:00
|
|
|
8000fce: 4b85 ldr r3, [pc, #532] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
8000fd0: 689b ldr r3, [r3, #8]
|
|
|
|
8000fd2: f003 030c and.w r3, r3, #12
|
2023-09-17 08:27:41 +00:00
|
|
|
if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) ||\
|
2023-09-17 10:40:31 +00:00
|
|
|
8000fd6: 2b08 cmp r3, #8
|
|
|
|
8000fd8: d112 bne.n 8001000 <HAL_RCC_OscConfig+0x5c>
|
2023-09-17 08:27:41 +00:00
|
|
|
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
|
2023-09-17 10:40:31 +00:00
|
|
|
8000fda: 4b82 ldr r3, [pc, #520] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
8000fdc: 685b ldr r3, [r3, #4]
|
|
|
|
8000fde: f403 0380 and.w r3, r3, #4194304 ; 0x400000
|
|
|
|
8000fe2: f5b3 0f80 cmp.w r3, #4194304 ; 0x400000
|
|
|
|
8000fe6: d10b bne.n 8001000 <HAL_RCC_OscConfig+0x5c>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
|
2023-09-17 10:40:31 +00:00
|
|
|
8000fe8: 4b7e ldr r3, [pc, #504] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
8000fea: 681b ldr r3, [r3, #0]
|
|
|
|
8000fec: f403 3300 and.w r3, r3, #131072 ; 0x20000
|
|
|
|
8000ff0: 2b00 cmp r3, #0
|
|
|
|
8000ff2: d05b beq.n 80010ac <HAL_RCC_OscConfig+0x108>
|
|
|
|
8000ff4: 687b ldr r3, [r7, #4]
|
|
|
|
8000ff6: 685b ldr r3, [r3, #4]
|
|
|
|
8000ff8: 2b00 cmp r3, #0
|
|
|
|
8000ffa: d157 bne.n 80010ac <HAL_RCC_OscConfig+0x108>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_ERROR;
|
2023-09-17 10:40:31 +00:00
|
|
|
8000ffc: 2301 movs r3, #1
|
|
|
|
8000ffe: e242 b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Set the new HSE configuration ---------------------------------------*/
|
|
|
|
__HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001000: 687b ldr r3, [r7, #4]
|
|
|
|
8001002: 685b ldr r3, [r3, #4]
|
|
|
|
8001004: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
|
|
|
|
8001008: d106 bne.n 8001018 <HAL_RCC_OscConfig+0x74>
|
|
|
|
800100a: 4b76 ldr r3, [pc, #472] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
800100c: 681b ldr r3, [r3, #0]
|
|
|
|
800100e: 4a75 ldr r2, [pc, #468] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
8001010: f443 3380 orr.w r3, r3, #65536 ; 0x10000
|
|
|
|
8001014: 6013 str r3, [r2, #0]
|
|
|
|
8001016: e01d b.n 8001054 <HAL_RCC_OscConfig+0xb0>
|
|
|
|
8001018: 687b ldr r3, [r7, #4]
|
|
|
|
800101a: 685b ldr r3, [r3, #4]
|
|
|
|
800101c: f5b3 2fa0 cmp.w r3, #327680 ; 0x50000
|
|
|
|
8001020: d10c bne.n 800103c <HAL_RCC_OscConfig+0x98>
|
|
|
|
8001022: 4b70 ldr r3, [pc, #448] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
8001024: 681b ldr r3, [r3, #0]
|
|
|
|
8001026: 4a6f ldr r2, [pc, #444] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
8001028: f443 2380 orr.w r3, r3, #262144 ; 0x40000
|
|
|
|
800102c: 6013 str r3, [r2, #0]
|
|
|
|
800102e: 4b6d ldr r3, [pc, #436] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
8001030: 681b ldr r3, [r3, #0]
|
|
|
|
8001032: 4a6c ldr r2, [pc, #432] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
8001034: f443 3380 orr.w r3, r3, #65536 ; 0x10000
|
|
|
|
8001038: 6013 str r3, [r2, #0]
|
|
|
|
800103a: e00b b.n 8001054 <HAL_RCC_OscConfig+0xb0>
|
|
|
|
800103c: 4b69 ldr r3, [pc, #420] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
800103e: 681b ldr r3, [r3, #0]
|
|
|
|
8001040: 4a68 ldr r2, [pc, #416] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
8001042: f423 3380 bic.w r3, r3, #65536 ; 0x10000
|
|
|
|
8001046: 6013 str r3, [r2, #0]
|
|
|
|
8001048: 4b66 ldr r3, [pc, #408] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
800104a: 681b ldr r3, [r3, #0]
|
|
|
|
800104c: 4a65 ldr r2, [pc, #404] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
800104e: f423 2380 bic.w r3, r3, #262144 ; 0x40000
|
|
|
|
8001052: 6013 str r3, [r2, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Check the HSE State */
|
|
|
|
if((RCC_OscInitStruct->HSEState) != RCC_HSE_OFF)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001054: 687b ldr r3, [r7, #4]
|
|
|
|
8001056: 685b ldr r3, [r3, #4]
|
|
|
|
8001058: 2b00 cmp r3, #0
|
|
|
|
800105a: d013 beq.n 8001084 <HAL_RCC_OscConfig+0xe0>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Get Start Tick */
|
|
|
|
tickstart = HAL_GetTick();
|
2023-09-17 10:40:31 +00:00
|
|
|
800105c: f7ff fcfa bl 8000a54 <HAL_GetTick>
|
|
|
|
8001060: 6138 str r0, [r7, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Wait till HSE is ready */
|
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001062: e008 b.n 8001076 <HAL_RCC_OscConfig+0xd2>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001064: f7ff fcf6 bl 8000a54 <HAL_GetTick>
|
|
|
|
8001068: 4602 mov r2, r0
|
|
|
|
800106a: 693b ldr r3, [r7, #16]
|
|
|
|
800106c: 1ad3 subs r3, r2, r3
|
|
|
|
800106e: 2b64 cmp r3, #100 ; 0x64
|
|
|
|
8001070: d901 bls.n 8001076 <HAL_RCC_OscConfig+0xd2>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001072: 2303 movs r3, #3
|
|
|
|
8001074: e207 b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
2023-09-17 08:27:41 +00:00
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001076: 4b5b ldr r3, [pc, #364] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
8001078: 681b ldr r3, [r3, #0]
|
|
|
|
800107a: f403 3300 and.w r3, r3, #131072 ; 0x20000
|
|
|
|
800107e: 2b00 cmp r3, #0
|
|
|
|
8001080: d0f0 beq.n 8001064 <HAL_RCC_OscConfig+0xc0>
|
|
|
|
8001082: e014 b.n 80010ae <HAL_RCC_OscConfig+0x10a>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Get Start Tick */
|
|
|
|
tickstart = HAL_GetTick();
|
2023-09-17 10:40:31 +00:00
|
|
|
8001084: f7ff fce6 bl 8000a54 <HAL_GetTick>
|
|
|
|
8001088: 6138 str r0, [r7, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Wait till HSE is bypassed or disabled */
|
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
800108a: e008 b.n 800109e <HAL_RCC_OscConfig+0xfa>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
|
2023-09-17 10:40:31 +00:00
|
|
|
800108c: f7ff fce2 bl 8000a54 <HAL_GetTick>
|
|
|
|
8001090: 4602 mov r2, r0
|
|
|
|
8001092: 693b ldr r3, [r7, #16]
|
|
|
|
8001094: 1ad3 subs r3, r2, r3
|
|
|
|
8001096: 2b64 cmp r3, #100 ; 0x64
|
|
|
|
8001098: d901 bls.n 800109e <HAL_RCC_OscConfig+0xfa>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
800109a: 2303 movs r3, #3
|
|
|
|
800109c: e1f3 b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
2023-09-17 08:27:41 +00:00
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
800109e: 4b51 ldr r3, [pc, #324] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
80010a0: 681b ldr r3, [r3, #0]
|
|
|
|
80010a2: f403 3300 and.w r3, r3, #131072 ; 0x20000
|
|
|
|
80010a6: 2b00 cmp r3, #0
|
|
|
|
80010a8: d1f0 bne.n 800108c <HAL_RCC_OscConfig+0xe8>
|
|
|
|
80010aa: e000 b.n 80010ae <HAL_RCC_OscConfig+0x10a>
|
2023-09-17 08:27:41 +00:00
|
|
|
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
|
2023-09-17 10:40:31 +00:00
|
|
|
80010ac: bf00 nop
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*----------------------------- HSI Configuration --------------------------*/
|
|
|
|
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
|
2023-09-17 10:40:31 +00:00
|
|
|
80010ae: 687b ldr r3, [r7, #4]
|
|
|
|
80010b0: 681b ldr r3, [r3, #0]
|
|
|
|
80010b2: f003 0302 and.w r3, r3, #2
|
|
|
|
80010b6: 2b00 cmp r3, #0
|
|
|
|
80010b8: d063 beq.n 8001182 <HAL_RCC_OscConfig+0x1de>
|
2023-09-17 08:27:41 +00:00
|
|
|
/* 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((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) ||\
|
2023-09-17 10:40:31 +00:00
|
|
|
80010ba: 4b4a ldr r3, [pc, #296] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
80010bc: 689b ldr r3, [r3, #8]
|
|
|
|
80010be: f003 030c and.w r3, r3, #12
|
|
|
|
80010c2: 2b00 cmp r3, #0
|
|
|
|
80010c4: d00b beq.n 80010de <HAL_RCC_OscConfig+0x13a>
|
2023-09-17 08:27:41 +00:00
|
|
|
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
|
2023-09-17 10:40:31 +00:00
|
|
|
80010c6: 4b47 ldr r3, [pc, #284] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
80010c8: 689b ldr r3, [r3, #8]
|
|
|
|
80010ca: f003 030c and.w r3, r3, #12
|
2023-09-17 08:27:41 +00:00
|
|
|
if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) ||\
|
2023-09-17 10:40:31 +00:00
|
|
|
80010ce: 2b08 cmp r3, #8
|
|
|
|
80010d0: d11c bne.n 800110c <HAL_RCC_OscConfig+0x168>
|
2023-09-17 08:27:41 +00:00
|
|
|
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
|
2023-09-17 10:40:31 +00:00
|
|
|
80010d2: 4b44 ldr r3, [pc, #272] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
80010d4: 685b ldr r3, [r3, #4]
|
|
|
|
80010d6: f403 0380 and.w r3, r3, #4194304 ; 0x400000
|
|
|
|
80010da: 2b00 cmp r3, #0
|
|
|
|
80010dc: d116 bne.n 800110c <HAL_RCC_OscConfig+0x168>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* When HSI is used as system clock it will not disabled */
|
|
|
|
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
|
2023-09-17 10:40:31 +00:00
|
|
|
80010de: 4b41 ldr r3, [pc, #260] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
80010e0: 681b ldr r3, [r3, #0]
|
|
|
|
80010e2: f003 0302 and.w r3, r3, #2
|
|
|
|
80010e6: 2b00 cmp r3, #0
|
|
|
|
80010e8: d005 beq.n 80010f6 <HAL_RCC_OscConfig+0x152>
|
|
|
|
80010ea: 687b ldr r3, [r7, #4]
|
|
|
|
80010ec: 68db ldr r3, [r3, #12]
|
|
|
|
80010ee: 2b01 cmp r3, #1
|
|
|
|
80010f0: d001 beq.n 80010f6 <HAL_RCC_OscConfig+0x152>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_ERROR;
|
2023-09-17 10:40:31 +00:00
|
|
|
80010f2: 2301 movs r3, #1
|
|
|
|
80010f4: e1c7 b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
/* Otherwise, just the calibration is allowed */
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
|
|
|
|
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
|
2023-09-17 10:40:31 +00:00
|
|
|
80010f6: 4b3b ldr r3, [pc, #236] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
80010f8: 681b ldr r3, [r3, #0]
|
|
|
|
80010fa: f023 02f8 bic.w r2, r3, #248 ; 0xf8
|
|
|
|
80010fe: 687b ldr r3, [r7, #4]
|
|
|
|
8001100: 691b ldr r3, [r3, #16]
|
|
|
|
8001102: 00db lsls r3, r3, #3
|
|
|
|
8001104: 4937 ldr r1, [pc, #220] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
8001106: 4313 orrs r3, r2
|
|
|
|
8001108: 600b str r3, [r1, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
|
2023-09-17 10:40:31 +00:00
|
|
|
800110a: e03a b.n 8001182 <HAL_RCC_OscConfig+0x1de>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Check the HSI State */
|
|
|
|
if((RCC_OscInitStruct->HSIState)!= RCC_HSI_OFF)
|
2023-09-17 10:40:31 +00:00
|
|
|
800110c: 687b ldr r3, [r7, #4]
|
|
|
|
800110e: 68db ldr r3, [r3, #12]
|
|
|
|
8001110: 2b00 cmp r3, #0
|
|
|
|
8001112: d020 beq.n 8001156 <HAL_RCC_OscConfig+0x1b2>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Enable the Internal High Speed oscillator (HSI). */
|
|
|
|
__HAL_RCC_HSI_ENABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
8001114: 4b34 ldr r3, [pc, #208] ; (80011e8 <HAL_RCC_OscConfig+0x244>)
|
|
|
|
8001116: 2201 movs r2, #1
|
|
|
|
8001118: 601a str r2, [r3, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Get Start Tick*/
|
|
|
|
tickstart = HAL_GetTick();
|
2023-09-17 10:40:31 +00:00
|
|
|
800111a: f7ff fc9b bl 8000a54 <HAL_GetTick>
|
|
|
|
800111e: 6138 str r0, [r7, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Wait till HSI is ready */
|
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001120: e008 b.n 8001134 <HAL_RCC_OscConfig+0x190>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001122: f7ff fc97 bl 8000a54 <HAL_GetTick>
|
|
|
|
8001126: 4602 mov r2, r0
|
|
|
|
8001128: 693b ldr r3, [r7, #16]
|
|
|
|
800112a: 1ad3 subs r3, r2, r3
|
|
|
|
800112c: 2b02 cmp r3, #2
|
|
|
|
800112e: d901 bls.n 8001134 <HAL_RCC_OscConfig+0x190>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001130: 2303 movs r3, #3
|
|
|
|
8001132: e1a8 b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
2023-09-17 08:27:41 +00:00
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001134: 4b2b ldr r3, [pc, #172] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
8001136: 681b ldr r3, [r3, #0]
|
|
|
|
8001138: f003 0302 and.w r3, r3, #2
|
|
|
|
800113c: 2b00 cmp r3, #0
|
|
|
|
800113e: d0f0 beq.n 8001122 <HAL_RCC_OscConfig+0x17e>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Adjusts the Internal High Speed oscillator (HSI) calibration value. */
|
|
|
|
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001140: 4b28 ldr r3, [pc, #160] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
8001142: 681b ldr r3, [r3, #0]
|
|
|
|
8001144: f023 02f8 bic.w r2, r3, #248 ; 0xf8
|
|
|
|
8001148: 687b ldr r3, [r7, #4]
|
|
|
|
800114a: 691b ldr r3, [r3, #16]
|
|
|
|
800114c: 00db lsls r3, r3, #3
|
|
|
|
800114e: 4925 ldr r1, [pc, #148] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
8001150: 4313 orrs r3, r2
|
|
|
|
8001152: 600b str r3, [r1, #0]
|
|
|
|
8001154: e015 b.n 8001182 <HAL_RCC_OscConfig+0x1de>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Disable the Internal High Speed oscillator (HSI). */
|
|
|
|
__HAL_RCC_HSI_DISABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
8001156: 4b24 ldr r3, [pc, #144] ; (80011e8 <HAL_RCC_OscConfig+0x244>)
|
|
|
|
8001158: 2200 movs r2, #0
|
|
|
|
800115a: 601a str r2, [r3, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Get Start Tick*/
|
|
|
|
tickstart = HAL_GetTick();
|
2023-09-17 10:40:31 +00:00
|
|
|
800115c: f7ff fc7a bl 8000a54 <HAL_GetTick>
|
|
|
|
8001160: 6138 str r0, [r7, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Wait till HSI is ready */
|
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001162: e008 b.n 8001176 <HAL_RCC_OscConfig+0x1d2>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001164: f7ff fc76 bl 8000a54 <HAL_GetTick>
|
|
|
|
8001168: 4602 mov r2, r0
|
|
|
|
800116a: 693b ldr r3, [r7, #16]
|
|
|
|
800116c: 1ad3 subs r3, r2, r3
|
|
|
|
800116e: 2b02 cmp r3, #2
|
|
|
|
8001170: d901 bls.n 8001176 <HAL_RCC_OscConfig+0x1d2>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001172: 2303 movs r3, #3
|
|
|
|
8001174: e187 b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
2023-09-17 08:27:41 +00:00
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001176: 4b1b ldr r3, [pc, #108] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
8001178: 681b ldr r3, [r3, #0]
|
|
|
|
800117a: f003 0302 and.w r3, r3, #2
|
|
|
|
800117e: 2b00 cmp r3, #0
|
|
|
|
8001180: d1f0 bne.n 8001164 <HAL_RCC_OscConfig+0x1c0>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*------------------------------ LSI Configuration -------------------------*/
|
|
|
|
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001182: 687b ldr r3, [r7, #4]
|
|
|
|
8001184: 681b ldr r3, [r3, #0]
|
|
|
|
8001186: f003 0308 and.w r3, r3, #8
|
|
|
|
800118a: 2b00 cmp r3, #0
|
|
|
|
800118c: d036 beq.n 80011fc <HAL_RCC_OscConfig+0x258>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Check the parameters */
|
|
|
|
assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState));
|
|
|
|
|
|
|
|
/* Check the LSI State */
|
|
|
|
if((RCC_OscInitStruct->LSIState)!= RCC_LSI_OFF)
|
2023-09-17 10:40:31 +00:00
|
|
|
800118e: 687b ldr r3, [r7, #4]
|
|
|
|
8001190: 695b ldr r3, [r3, #20]
|
|
|
|
8001192: 2b00 cmp r3, #0
|
|
|
|
8001194: d016 beq.n 80011c4 <HAL_RCC_OscConfig+0x220>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Enable the Internal Low Speed oscillator (LSI). */
|
|
|
|
__HAL_RCC_LSI_ENABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
8001196: 4b15 ldr r3, [pc, #84] ; (80011ec <HAL_RCC_OscConfig+0x248>)
|
|
|
|
8001198: 2201 movs r2, #1
|
|
|
|
800119a: 601a str r2, [r3, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Get Start Tick*/
|
|
|
|
tickstart = HAL_GetTick();
|
2023-09-17 10:40:31 +00:00
|
|
|
800119c: f7ff fc5a bl 8000a54 <HAL_GetTick>
|
|
|
|
80011a0: 6138 str r0, [r7, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Wait till LSI is ready */
|
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
80011a2: e008 b.n 80011b6 <HAL_RCC_OscConfig+0x212>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
|
2023-09-17 10:40:31 +00:00
|
|
|
80011a4: f7ff fc56 bl 8000a54 <HAL_GetTick>
|
|
|
|
80011a8: 4602 mov r2, r0
|
|
|
|
80011aa: 693b ldr r3, [r7, #16]
|
|
|
|
80011ac: 1ad3 subs r3, r2, r3
|
|
|
|
80011ae: 2b02 cmp r3, #2
|
|
|
|
80011b0: d901 bls.n 80011b6 <HAL_RCC_OscConfig+0x212>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
80011b2: 2303 movs r3, #3
|
|
|
|
80011b4: e167 b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
2023-09-17 08:27:41 +00:00
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
80011b6: 4b0b ldr r3, [pc, #44] ; (80011e4 <HAL_RCC_OscConfig+0x240>)
|
|
|
|
80011b8: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
|
|
80011ba: f003 0302 and.w r3, r3, #2
|
|
|
|
80011be: 2b00 cmp r3, #0
|
|
|
|
80011c0: d0f0 beq.n 80011a4 <HAL_RCC_OscConfig+0x200>
|
|
|
|
80011c2: e01b b.n 80011fc <HAL_RCC_OscConfig+0x258>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Disable the Internal Low Speed oscillator (LSI). */
|
|
|
|
__HAL_RCC_LSI_DISABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
80011c4: 4b09 ldr r3, [pc, #36] ; (80011ec <HAL_RCC_OscConfig+0x248>)
|
|
|
|
80011c6: 2200 movs r2, #0
|
|
|
|
80011c8: 601a str r2, [r3, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Get Start Tick */
|
|
|
|
tickstart = HAL_GetTick();
|
2023-09-17 10:40:31 +00:00
|
|
|
80011ca: f7ff fc43 bl 8000a54 <HAL_GetTick>
|
|
|
|
80011ce: 6138 str r0, [r7, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Wait till LSI is ready */
|
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
80011d0: e00e b.n 80011f0 <HAL_RCC_OscConfig+0x24c>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
|
2023-09-17 10:40:31 +00:00
|
|
|
80011d2: f7ff fc3f bl 8000a54 <HAL_GetTick>
|
|
|
|
80011d6: 4602 mov r2, r0
|
|
|
|
80011d8: 693b ldr r3, [r7, #16]
|
|
|
|
80011da: 1ad3 subs r3, r2, r3
|
|
|
|
80011dc: 2b02 cmp r3, #2
|
|
|
|
80011de: d907 bls.n 80011f0 <HAL_RCC_OscConfig+0x24c>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
80011e0: 2303 movs r3, #3
|
|
|
|
80011e2: e150 b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
|
|
|
80011e4: 40023800 .word 0x40023800
|
|
|
|
80011e8: 42470000 .word 0x42470000
|
|
|
|
80011ec: 42470e80 .word 0x42470e80
|
2023-09-17 08:27:41 +00:00
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
80011f0: 4b88 ldr r3, [pc, #544] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
80011f2: 6f5b ldr r3, [r3, #116] ; 0x74
|
|
|
|
80011f4: f003 0302 and.w r3, r3, #2
|
|
|
|
80011f8: 2b00 cmp r3, #0
|
|
|
|
80011fa: d1ea bne.n 80011d2 <HAL_RCC_OscConfig+0x22e>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*------------------------------ LSE Configuration -------------------------*/
|
|
|
|
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
|
2023-09-17 10:40:31 +00:00
|
|
|
80011fc: 687b ldr r3, [r7, #4]
|
|
|
|
80011fe: 681b ldr r3, [r3, #0]
|
|
|
|
8001200: f003 0304 and.w r3, r3, #4
|
|
|
|
8001204: 2b00 cmp r3, #0
|
|
|
|
8001206: f000 8097 beq.w 8001338 <HAL_RCC_OscConfig+0x394>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
FlagStatus pwrclkchanged = RESET;
|
2023-09-17 10:40:31 +00:00
|
|
|
800120a: 2300 movs r3, #0
|
|
|
|
800120c: 75fb strb r3, [r7, #23]
|
2023-09-17 08:27:41 +00:00
|
|
|
/* 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())
|
2023-09-17 10:40:31 +00:00
|
|
|
800120e: 4b81 ldr r3, [pc, #516] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
8001210: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
|
|
8001212: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
|
|
|
|
8001216: 2b00 cmp r3, #0
|
|
|
|
8001218: d10f bne.n 800123a <HAL_RCC_OscConfig+0x296>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
__HAL_RCC_PWR_CLK_ENABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
800121a: 2300 movs r3, #0
|
|
|
|
800121c: 60bb str r3, [r7, #8]
|
|
|
|
800121e: 4b7d ldr r3, [pc, #500] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
8001220: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
|
|
8001222: 4a7c ldr r2, [pc, #496] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
8001224: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
|
|
|
|
8001228: 6413 str r3, [r2, #64] ; 0x40
|
|
|
|
800122a: 4b7a ldr r3, [pc, #488] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
800122c: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
|
|
800122e: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
|
|
|
|
8001232: 60bb str r3, [r7, #8]
|
|
|
|
8001234: 68bb ldr r3, [r7, #8]
|
2023-09-17 08:27:41 +00:00
|
|
|
pwrclkchanged = SET;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001236: 2301 movs r3, #1
|
|
|
|
8001238: 75fb strb r3, [r7, #23]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
|
2023-09-17 10:40:31 +00:00
|
|
|
800123a: 4b77 ldr r3, [pc, #476] ; (8001418 <HAL_RCC_OscConfig+0x474>)
|
|
|
|
800123c: 681b ldr r3, [r3, #0]
|
|
|
|
800123e: f403 7380 and.w r3, r3, #256 ; 0x100
|
|
|
|
8001242: 2b00 cmp r3, #0
|
|
|
|
8001244: d118 bne.n 8001278 <HAL_RCC_OscConfig+0x2d4>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Enable write access to Backup domain */
|
|
|
|
SET_BIT(PWR->CR, PWR_CR_DBP);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001246: 4b74 ldr r3, [pc, #464] ; (8001418 <HAL_RCC_OscConfig+0x474>)
|
|
|
|
8001248: 681b ldr r3, [r3, #0]
|
|
|
|
800124a: 4a73 ldr r2, [pc, #460] ; (8001418 <HAL_RCC_OscConfig+0x474>)
|
|
|
|
800124c: f443 7380 orr.w r3, r3, #256 ; 0x100
|
|
|
|
8001250: 6013 str r3, [r2, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Wait for Backup domain Write protection disable */
|
|
|
|
tickstart = HAL_GetTick();
|
2023-09-17 10:40:31 +00:00
|
|
|
8001252: f7ff fbff bl 8000a54 <HAL_GetTick>
|
|
|
|
8001256: 6138 str r0, [r7, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
|
2023-09-17 10:40:31 +00:00
|
|
|
8001258: e008 b.n 800126c <HAL_RCC_OscConfig+0x2c8>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
|
2023-09-17 10:40:31 +00:00
|
|
|
800125a: f7ff fbfb bl 8000a54 <HAL_GetTick>
|
|
|
|
800125e: 4602 mov r2, r0
|
|
|
|
8001260: 693b ldr r3, [r7, #16]
|
|
|
|
8001262: 1ad3 subs r3, r2, r3
|
|
|
|
8001264: 2b02 cmp r3, #2
|
|
|
|
8001266: d901 bls.n 800126c <HAL_RCC_OscConfig+0x2c8>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001268: 2303 movs r3, #3
|
|
|
|
800126a: e10c b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
2023-09-17 08:27:41 +00:00
|
|
|
while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
|
2023-09-17 10:40:31 +00:00
|
|
|
800126c: 4b6a ldr r3, [pc, #424] ; (8001418 <HAL_RCC_OscConfig+0x474>)
|
|
|
|
800126e: 681b ldr r3, [r3, #0]
|
|
|
|
8001270: f403 7380 and.w r3, r3, #256 ; 0x100
|
|
|
|
8001274: 2b00 cmp r3, #0
|
|
|
|
8001276: d0f0 beq.n 800125a <HAL_RCC_OscConfig+0x2b6>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Set the new LSE configuration -----------------------------------------*/
|
|
|
|
__HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001278: 687b ldr r3, [r7, #4]
|
|
|
|
800127a: 689b ldr r3, [r3, #8]
|
|
|
|
800127c: 2b01 cmp r3, #1
|
|
|
|
800127e: d106 bne.n 800128e <HAL_RCC_OscConfig+0x2ea>
|
|
|
|
8001280: 4b64 ldr r3, [pc, #400] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
8001282: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
|
|
8001284: 4a63 ldr r2, [pc, #396] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
8001286: f043 0301 orr.w r3, r3, #1
|
|
|
|
800128a: 6713 str r3, [r2, #112] ; 0x70
|
|
|
|
800128c: e01c b.n 80012c8 <HAL_RCC_OscConfig+0x324>
|
|
|
|
800128e: 687b ldr r3, [r7, #4]
|
|
|
|
8001290: 689b ldr r3, [r3, #8]
|
|
|
|
8001292: 2b05 cmp r3, #5
|
|
|
|
8001294: d10c bne.n 80012b0 <HAL_RCC_OscConfig+0x30c>
|
|
|
|
8001296: 4b5f ldr r3, [pc, #380] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
8001298: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
|
|
800129a: 4a5e ldr r2, [pc, #376] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
800129c: f043 0304 orr.w r3, r3, #4
|
|
|
|
80012a0: 6713 str r3, [r2, #112] ; 0x70
|
|
|
|
80012a2: 4b5c ldr r3, [pc, #368] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
80012a4: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
|
|
80012a6: 4a5b ldr r2, [pc, #364] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
80012a8: f043 0301 orr.w r3, r3, #1
|
|
|
|
80012ac: 6713 str r3, [r2, #112] ; 0x70
|
|
|
|
80012ae: e00b b.n 80012c8 <HAL_RCC_OscConfig+0x324>
|
|
|
|
80012b0: 4b58 ldr r3, [pc, #352] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
80012b2: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
|
|
80012b4: 4a57 ldr r2, [pc, #348] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
80012b6: f023 0301 bic.w r3, r3, #1
|
|
|
|
80012ba: 6713 str r3, [r2, #112] ; 0x70
|
|
|
|
80012bc: 4b55 ldr r3, [pc, #340] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
80012be: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
|
|
80012c0: 4a54 ldr r2, [pc, #336] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
80012c2: f023 0304 bic.w r3, r3, #4
|
|
|
|
80012c6: 6713 str r3, [r2, #112] ; 0x70
|
2023-09-17 08:27:41 +00:00
|
|
|
/* Check the LSE State */
|
|
|
|
if((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF)
|
2023-09-17 10:40:31 +00:00
|
|
|
80012c8: 687b ldr r3, [r7, #4]
|
|
|
|
80012ca: 689b ldr r3, [r3, #8]
|
|
|
|
80012cc: 2b00 cmp r3, #0
|
|
|
|
80012ce: d015 beq.n 80012fc <HAL_RCC_OscConfig+0x358>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Get Start Tick*/
|
|
|
|
tickstart = HAL_GetTick();
|
2023-09-17 10:40:31 +00:00
|
|
|
80012d0: f7ff fbc0 bl 8000a54 <HAL_GetTick>
|
|
|
|
80012d4: 6138 str r0, [r7, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Wait till LSE is ready */
|
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
80012d6: e00a b.n 80012ee <HAL_RCC_OscConfig+0x34a>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
|
2023-09-17 10:40:31 +00:00
|
|
|
80012d8: f7ff fbbc bl 8000a54 <HAL_GetTick>
|
|
|
|
80012dc: 4602 mov r2, r0
|
|
|
|
80012de: 693b ldr r3, [r7, #16]
|
|
|
|
80012e0: 1ad3 subs r3, r2, r3
|
|
|
|
80012e2: f241 3288 movw r2, #5000 ; 0x1388
|
|
|
|
80012e6: 4293 cmp r3, r2
|
|
|
|
80012e8: d901 bls.n 80012ee <HAL_RCC_OscConfig+0x34a>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
80012ea: 2303 movs r3, #3
|
|
|
|
80012ec: e0cb b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
2023-09-17 08:27:41 +00:00
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
80012ee: 4b49 ldr r3, [pc, #292] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
80012f0: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
|
|
80012f2: f003 0302 and.w r3, r3, #2
|
|
|
|
80012f6: 2b00 cmp r3, #0
|
|
|
|
80012f8: d0ee beq.n 80012d8 <HAL_RCC_OscConfig+0x334>
|
|
|
|
80012fa: e014 b.n 8001326 <HAL_RCC_OscConfig+0x382>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Get Start Tick */
|
|
|
|
tickstart = HAL_GetTick();
|
2023-09-17 10:40:31 +00:00
|
|
|
80012fc: f7ff fbaa bl 8000a54 <HAL_GetTick>
|
|
|
|
8001300: 6138 str r0, [r7, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Wait till LSE is ready */
|
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001302: e00a b.n 800131a <HAL_RCC_OscConfig+0x376>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001304: f7ff fba6 bl 8000a54 <HAL_GetTick>
|
|
|
|
8001308: 4602 mov r2, r0
|
|
|
|
800130a: 693b ldr r3, [r7, #16]
|
|
|
|
800130c: 1ad3 subs r3, r2, r3
|
|
|
|
800130e: f241 3288 movw r2, #5000 ; 0x1388
|
|
|
|
8001312: 4293 cmp r3, r2
|
|
|
|
8001314: d901 bls.n 800131a <HAL_RCC_OscConfig+0x376>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001316: 2303 movs r3, #3
|
|
|
|
8001318: e0b5 b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
2023-09-17 08:27:41 +00:00
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
800131a: 4b3e ldr r3, [pc, #248] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
800131c: 6f1b ldr r3, [r3, #112] ; 0x70
|
|
|
|
800131e: f003 0302 and.w r3, r3, #2
|
|
|
|
8001322: 2b00 cmp r3, #0
|
|
|
|
8001324: d1ee bne.n 8001304 <HAL_RCC_OscConfig+0x360>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Restore clock configuration if changed */
|
|
|
|
if(pwrclkchanged == SET)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001326: 7dfb ldrb r3, [r7, #23]
|
|
|
|
8001328: 2b01 cmp r3, #1
|
|
|
|
800132a: d105 bne.n 8001338 <HAL_RCC_OscConfig+0x394>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
__HAL_RCC_PWR_CLK_DISABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
800132c: 4b39 ldr r3, [pc, #228] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
800132e: 6c1b ldr r3, [r3, #64] ; 0x40
|
|
|
|
8001330: 4a38 ldr r2, [pc, #224] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
8001332: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000
|
|
|
|
8001336: 6413 str r3, [r2, #64] ; 0x40
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
/*-------------------------------- PLL Configuration -----------------------*/
|
|
|
|
/* Check the parameters */
|
|
|
|
assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState));
|
|
|
|
if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001338: 687b ldr r3, [r7, #4]
|
|
|
|
800133a: 699b ldr r3, [r3, #24]
|
|
|
|
800133c: 2b00 cmp r3, #0
|
|
|
|
800133e: f000 80a1 beq.w 8001484 <HAL_RCC_OscConfig+0x4e0>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Check if the PLL is used as system clock or not */
|
|
|
|
if(__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_CFGR_SWS_PLL)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001342: 4b34 ldr r3, [pc, #208] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
8001344: 689b ldr r3, [r3, #8]
|
|
|
|
8001346: f003 030c and.w r3, r3, #12
|
|
|
|
800134a: 2b08 cmp r3, #8
|
|
|
|
800134c: d05c beq.n 8001408 <HAL_RCC_OscConfig+0x464>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON)
|
2023-09-17 10:40:31 +00:00
|
|
|
800134e: 687b ldr r3, [r7, #4]
|
|
|
|
8001350: 699b ldr r3, [r3, #24]
|
|
|
|
8001352: 2b02 cmp r3, #2
|
|
|
|
8001354: d141 bne.n 80013da <HAL_RCC_OscConfig+0x436>
|
2023-09-17 08:27:41 +00:00
|
|
|
assert_param(IS_RCC_PLLN_VALUE(RCC_OscInitStruct->PLL.PLLN));
|
|
|
|
assert_param(IS_RCC_PLLP_VALUE(RCC_OscInitStruct->PLL.PLLP));
|
|
|
|
assert_param(IS_RCC_PLLQ_VALUE(RCC_OscInitStruct->PLL.PLLQ));
|
|
|
|
|
|
|
|
/* Disable the main PLL. */
|
|
|
|
__HAL_RCC_PLL_DISABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
8001356: 4b31 ldr r3, [pc, #196] ; (800141c <HAL_RCC_OscConfig+0x478>)
|
|
|
|
8001358: 2200 movs r2, #0
|
|
|
|
800135a: 601a str r2, [r3, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Get Start Tick */
|
|
|
|
tickstart = HAL_GetTick();
|
2023-09-17 10:40:31 +00:00
|
|
|
800135c: f7ff fb7a bl 8000a54 <HAL_GetTick>
|
|
|
|
8001360: 6138 str r0, [r7, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Wait till PLL is ready */
|
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001362: e008 b.n 8001376 <HAL_RCC_OscConfig+0x3d2>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001364: f7ff fb76 bl 8000a54 <HAL_GetTick>
|
|
|
|
8001368: 4602 mov r2, r0
|
|
|
|
800136a: 693b ldr r3, [r7, #16]
|
|
|
|
800136c: 1ad3 subs r3, r2, r3
|
|
|
|
800136e: 2b02 cmp r3, #2
|
|
|
|
8001370: d901 bls.n 8001376 <HAL_RCC_OscConfig+0x3d2>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001372: 2303 movs r3, #3
|
|
|
|
8001374: e087 b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
2023-09-17 08:27:41 +00:00
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001376: 4b27 ldr r3, [pc, #156] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
8001378: 681b ldr r3, [r3, #0]
|
|
|
|
800137a: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
|
|
|
|
800137e: 2b00 cmp r3, #0
|
|
|
|
8001380: d1f0 bne.n 8001364 <HAL_RCC_OscConfig+0x3c0>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Configure the main PLL clock source, multiplication and division factors. */
|
|
|
|
WRITE_REG(RCC->PLLCFGR, (RCC_OscInitStruct->PLL.PLLSource | \
|
2023-09-17 10:40:31 +00:00
|
|
|
8001382: 687b ldr r3, [r7, #4]
|
|
|
|
8001384: 69da ldr r2, [r3, #28]
|
|
|
|
8001386: 687b ldr r3, [r7, #4]
|
|
|
|
8001388: 6a1b ldr r3, [r3, #32]
|
|
|
|
800138a: 431a orrs r2, r3
|
|
|
|
800138c: 687b ldr r3, [r7, #4]
|
|
|
|
800138e: 6a5b ldr r3, [r3, #36] ; 0x24
|
|
|
|
8001390: 019b lsls r3, r3, #6
|
|
|
|
8001392: 431a orrs r2, r3
|
|
|
|
8001394: 687b ldr r3, [r7, #4]
|
|
|
|
8001396: 6a9b ldr r3, [r3, #40] ; 0x28
|
|
|
|
8001398: 085b lsrs r3, r3, #1
|
|
|
|
800139a: 3b01 subs r3, #1
|
|
|
|
800139c: 041b lsls r3, r3, #16
|
|
|
|
800139e: 431a orrs r2, r3
|
|
|
|
80013a0: 687b ldr r3, [r7, #4]
|
|
|
|
80013a2: 6adb ldr r3, [r3, #44] ; 0x2c
|
|
|
|
80013a4: 061b lsls r3, r3, #24
|
|
|
|
80013a6: 491b ldr r1, [pc, #108] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
80013a8: 4313 orrs r3, r2
|
|
|
|
80013aa: 604b str r3, [r1, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
RCC_OscInitStruct->PLL.PLLM | \
|
|
|
|
(RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos) | \
|
|
|
|
(((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U) << RCC_PLLCFGR_PLLP_Pos) | \
|
|
|
|
(RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)));
|
|
|
|
/* Enable the main PLL. */
|
|
|
|
__HAL_RCC_PLL_ENABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
80013ac: 4b1b ldr r3, [pc, #108] ; (800141c <HAL_RCC_OscConfig+0x478>)
|
|
|
|
80013ae: 2201 movs r2, #1
|
|
|
|
80013b0: 601a str r2, [r3, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Get Start Tick */
|
|
|
|
tickstart = HAL_GetTick();
|
2023-09-17 10:40:31 +00:00
|
|
|
80013b2: f7ff fb4f bl 8000a54 <HAL_GetTick>
|
|
|
|
80013b6: 6138 str r0, [r7, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Wait till PLL is ready */
|
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
80013b8: e008 b.n 80013cc <HAL_RCC_OscConfig+0x428>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
|
2023-09-17 10:40:31 +00:00
|
|
|
80013ba: f7ff fb4b bl 8000a54 <HAL_GetTick>
|
|
|
|
80013be: 4602 mov r2, r0
|
|
|
|
80013c0: 693b ldr r3, [r7, #16]
|
|
|
|
80013c2: 1ad3 subs r3, r2, r3
|
|
|
|
80013c4: 2b02 cmp r3, #2
|
|
|
|
80013c6: d901 bls.n 80013cc <HAL_RCC_OscConfig+0x428>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
80013c8: 2303 movs r3, #3
|
|
|
|
80013ca: e05c b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
2023-09-17 08:27:41 +00:00
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
80013cc: 4b11 ldr r3, [pc, #68] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
80013ce: 681b ldr r3, [r3, #0]
|
|
|
|
80013d0: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
|
|
|
|
80013d4: 2b00 cmp r3, #0
|
|
|
|
80013d6: d0f0 beq.n 80013ba <HAL_RCC_OscConfig+0x416>
|
|
|
|
80013d8: e054 b.n 8001484 <HAL_RCC_OscConfig+0x4e0>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Disable the main PLL. */
|
|
|
|
__HAL_RCC_PLL_DISABLE();
|
2023-09-17 10:40:31 +00:00
|
|
|
80013da: 4b10 ldr r3, [pc, #64] ; (800141c <HAL_RCC_OscConfig+0x478>)
|
|
|
|
80013dc: 2200 movs r2, #0
|
|
|
|
80013de: 601a str r2, [r3, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Get Start Tick */
|
|
|
|
tickstart = HAL_GetTick();
|
2023-09-17 10:40:31 +00:00
|
|
|
80013e0: f7ff fb38 bl 8000a54 <HAL_GetTick>
|
|
|
|
80013e4: 6138 str r0, [r7, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Wait till PLL is ready */
|
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
80013e6: e008 b.n 80013fa <HAL_RCC_OscConfig+0x456>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
|
2023-09-17 10:40:31 +00:00
|
|
|
80013e8: f7ff fb34 bl 8000a54 <HAL_GetTick>
|
|
|
|
80013ec: 4602 mov r2, r0
|
|
|
|
80013ee: 693b ldr r3, [r7, #16]
|
|
|
|
80013f0: 1ad3 subs r3, r2, r3
|
|
|
|
80013f2: 2b02 cmp r3, #2
|
|
|
|
80013f4: d901 bls.n 80013fa <HAL_RCC_OscConfig+0x456>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
80013f6: 2303 movs r3, #3
|
|
|
|
80013f8: e045 b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
2023-09-17 08:27:41 +00:00
|
|
|
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
80013fa: 4b06 ldr r3, [pc, #24] ; (8001414 <HAL_RCC_OscConfig+0x470>)
|
|
|
|
80013fc: 681b ldr r3, [r3, #0]
|
|
|
|
80013fe: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
|
|
|
|
8001402: 2b00 cmp r3, #0
|
|
|
|
8001404: d1f0 bne.n 80013e8 <HAL_RCC_OscConfig+0x444>
|
|
|
|
8001406: e03d b.n 8001484 <HAL_RCC_OscConfig+0x4e0>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Check if there is a request to disable the PLL used as System clock source */
|
|
|
|
if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001408: 687b ldr r3, [r7, #4]
|
|
|
|
800140a: 699b ldr r3, [r3, #24]
|
|
|
|
800140c: 2b01 cmp r3, #1
|
|
|
|
800140e: d107 bne.n 8001420 <HAL_RCC_OscConfig+0x47c>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_ERROR;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001410: 2301 movs r3, #1
|
|
|
|
8001412: e038 b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
|
|
|
8001414: 40023800 .word 0x40023800
|
|
|
|
8001418: 40007000 .word 0x40007000
|
|
|
|
800141c: 42470060 .word 0x42470060
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Do not return HAL_ERROR if request repeats the current configuration */
|
|
|
|
pll_config = RCC->PLLCFGR;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001420: 4b1b ldr r3, [pc, #108] ; (8001490 <HAL_RCC_OscConfig+0x4ec>)
|
|
|
|
8001422: 685b ldr r3, [r3, #4]
|
|
|
|
8001424: 60fb str r3, [r7, #12]
|
2023-09-17 08:27:41 +00:00
|
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
|
|
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
|
|
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)) ||
|
|
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLR) != (RCC_OscInitStruct->PLL.PLLR << RCC_PLLCFGR_PLLR_Pos)))
|
|
|
|
#else
|
|
|
|
if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
|
2023-09-17 10:40:31 +00:00
|
|
|
8001426: 687b ldr r3, [r7, #4]
|
|
|
|
8001428: 699b ldr r3, [r3, #24]
|
|
|
|
800142a: 2b01 cmp r3, #1
|
|
|
|
800142c: d028 beq.n 8001480 <HAL_RCC_OscConfig+0x4dc>
|
2023-09-17 08:27:41 +00:00
|
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
|
2023-09-17 10:40:31 +00:00
|
|
|
800142e: 68fb ldr r3, [r7, #12]
|
|
|
|
8001430: f403 0280 and.w r2, r3, #4194304 ; 0x400000
|
|
|
|
8001434: 687b ldr r3, [r7, #4]
|
|
|
|
8001436: 69db ldr r3, [r3, #28]
|
2023-09-17 08:27:41 +00:00
|
|
|
if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
|
2023-09-17 10:40:31 +00:00
|
|
|
8001438: 429a cmp r2, r3
|
|
|
|
800143a: d121 bne.n 8001480 <HAL_RCC_OscConfig+0x4dc>
|
2023-09-17 08:27:41 +00:00
|
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != (RCC_OscInitStruct->PLL.PLLM) << RCC_PLLCFGR_PLLM_Pos) ||
|
2023-09-17 10:40:31 +00:00
|
|
|
800143c: 68fb ldr r3, [r7, #12]
|
|
|
|
800143e: f003 023f and.w r2, r3, #63 ; 0x3f
|
|
|
|
8001442: 687b ldr r3, [r7, #4]
|
|
|
|
8001444: 6a1b ldr r3, [r3, #32]
|
2023-09-17 08:27:41 +00:00
|
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
|
2023-09-17 10:40:31 +00:00
|
|
|
8001446: 429a cmp r2, r3
|
|
|
|
8001448: d11a bne.n 8001480 <HAL_RCC_OscConfig+0x4dc>
|
2023-09-17 08:27:41 +00:00
|
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
|
2023-09-17 10:40:31 +00:00
|
|
|
800144a: 68fa ldr r2, [r7, #12]
|
|
|
|
800144c: f647 73c0 movw r3, #32704 ; 0x7fc0
|
|
|
|
8001450: 4013 ands r3, r2
|
|
|
|
8001452: 687a ldr r2, [r7, #4]
|
|
|
|
8001454: 6a52 ldr r2, [r2, #36] ; 0x24
|
|
|
|
8001456: 0192 lsls r2, r2, #6
|
2023-09-17 08:27:41 +00:00
|
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != (RCC_OscInitStruct->PLL.PLLM) << RCC_PLLCFGR_PLLM_Pos) ||
|
2023-09-17 10:40:31 +00:00
|
|
|
8001458: 4293 cmp r3, r2
|
|
|
|
800145a: d111 bne.n 8001480 <HAL_RCC_OscConfig+0x4dc>
|
2023-09-17 08:27:41 +00:00
|
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
|
2023-09-17 10:40:31 +00:00
|
|
|
800145c: 68fb ldr r3, [r7, #12]
|
|
|
|
800145e: f403 3240 and.w r2, r3, #196608 ; 0x30000
|
|
|
|
8001462: 687b ldr r3, [r7, #4]
|
|
|
|
8001464: 6a9b ldr r3, [r3, #40] ; 0x28
|
|
|
|
8001466: 085b lsrs r3, r3, #1
|
|
|
|
8001468: 3b01 subs r3, #1
|
|
|
|
800146a: 041b lsls r3, r3, #16
|
2023-09-17 08:27:41 +00:00
|
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
|
2023-09-17 10:40:31 +00:00
|
|
|
800146c: 429a cmp r2, r3
|
|
|
|
800146e: d107 bne.n 8001480 <HAL_RCC_OscConfig+0x4dc>
|
2023-09-17 08:27:41 +00:00
|
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)))
|
2023-09-17 10:40:31 +00:00
|
|
|
8001470: 68fb ldr r3, [r7, #12]
|
|
|
|
8001472: f003 6270 and.w r2, r3, #251658240 ; 0xf000000
|
|
|
|
8001476: 687b ldr r3, [r7, #4]
|
|
|
|
8001478: 6adb ldr r3, [r3, #44] ; 0x2c
|
|
|
|
800147a: 061b lsls r3, r3, #24
|
2023-09-17 08:27:41 +00:00
|
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
|
2023-09-17 10:40:31 +00:00
|
|
|
800147c: 429a cmp r2, r3
|
|
|
|
800147e: d001 beq.n 8001484 <HAL_RCC_OscConfig+0x4e0>
|
2023-09-17 08:27:41 +00:00
|
|
|
#endif
|
|
|
|
{
|
|
|
|
return HAL_ERROR;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001480: 2301 movs r3, #1
|
|
|
|
8001482: e000 b.n 8001486 <HAL_RCC_OscConfig+0x4e2>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return HAL_OK;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001484: 2300 movs r3, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8001486: 4618 mov r0, r3
|
|
|
|
8001488: 3718 adds r7, #24
|
|
|
|
800148a: 46bd mov sp, r7
|
|
|
|
800148c: bd80 pop {r7, pc}
|
|
|
|
800148e: bf00 nop
|
|
|
|
8001490: 40023800 .word 0x40023800
|
|
|
|
|
|
|
|
08001494 <HAL_RCC_ClockConfig>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* HPRE[3:0] bits to ensure that HCLK not exceed the maximum allowed frequency
|
|
|
|
* (for more details refer to section above "Initialization/de-initialization functions")
|
|
|
|
* @retval None
|
|
|
|
*/
|
|
|
|
HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8001494: b580 push {r7, lr}
|
|
|
|
8001496: b084 sub sp, #16
|
|
|
|
8001498: af00 add r7, sp, #0
|
|
|
|
800149a: 6078 str r0, [r7, #4]
|
|
|
|
800149c: 6039 str r1, [r7, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
uint32_t tickstart;
|
|
|
|
|
|
|
|
/* Check Null pointer */
|
|
|
|
if(RCC_ClkInitStruct == NULL)
|
2023-09-17 10:40:31 +00:00
|
|
|
800149e: 687b ldr r3, [r7, #4]
|
|
|
|
80014a0: 2b00 cmp r3, #0
|
|
|
|
80014a2: d101 bne.n 80014a8 <HAL_RCC_ClockConfig+0x14>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_ERROR;
|
2023-09-17 10:40:31 +00:00
|
|
|
80014a4: 2301 movs r3, #1
|
|
|
|
80014a6: e0cc b.n 8001642 <HAL_RCC_ClockConfig+0x1ae>
|
2023-09-17 08:27:41 +00:00
|
|
|
/* 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())
|
2023-09-17 10:40:31 +00:00
|
|
|
80014a8: 4b68 ldr r3, [pc, #416] ; (800164c <HAL_RCC_ClockConfig+0x1b8>)
|
|
|
|
80014aa: 681b ldr r3, [r3, #0]
|
|
|
|
80014ac: f003 0307 and.w r3, r3, #7
|
|
|
|
80014b0: 683a ldr r2, [r7, #0]
|
|
|
|
80014b2: 429a cmp r2, r3
|
|
|
|
80014b4: d90c bls.n 80014d0 <HAL_RCC_ClockConfig+0x3c>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
|
|
|
|
__HAL_FLASH_SET_LATENCY(FLatency);
|
2023-09-17 10:40:31 +00:00
|
|
|
80014b6: 4b65 ldr r3, [pc, #404] ; (800164c <HAL_RCC_ClockConfig+0x1b8>)
|
|
|
|
80014b8: 683a ldr r2, [r7, #0]
|
|
|
|
80014ba: b2d2 uxtb r2, r2
|
|
|
|
80014bc: 701a strb r2, [r3, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* 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)
|
2023-09-17 10:40:31 +00:00
|
|
|
80014be: 4b63 ldr r3, [pc, #396] ; (800164c <HAL_RCC_ClockConfig+0x1b8>)
|
|
|
|
80014c0: 681b ldr r3, [r3, #0]
|
|
|
|
80014c2: f003 0307 and.w r3, r3, #7
|
|
|
|
80014c6: 683a ldr r2, [r7, #0]
|
|
|
|
80014c8: 429a cmp r2, r3
|
|
|
|
80014ca: d001 beq.n 80014d0 <HAL_RCC_ClockConfig+0x3c>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_ERROR;
|
2023-09-17 10:40:31 +00:00
|
|
|
80014cc: 2301 movs r3, #1
|
|
|
|
80014ce: e0b8 b.n 8001642 <HAL_RCC_ClockConfig+0x1ae>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*-------------------------- HCLK Configuration --------------------------*/
|
|
|
|
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
|
2023-09-17 10:40:31 +00:00
|
|
|
80014d0: 687b ldr r3, [r7, #4]
|
|
|
|
80014d2: 681b ldr r3, [r3, #0]
|
|
|
|
80014d4: f003 0302 and.w r3, r3, #2
|
|
|
|
80014d8: 2b00 cmp r3, #0
|
|
|
|
80014da: d020 beq.n 800151e <HAL_RCC_ClockConfig+0x8a>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Set the highest APBx dividers in order to ensure that we do not go through
|
|
|
|
a non-spec phase whatever we decrease or increase HCLK. */
|
|
|
|
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
|
2023-09-17 10:40:31 +00:00
|
|
|
80014dc: 687b ldr r3, [r7, #4]
|
|
|
|
80014de: 681b ldr r3, [r3, #0]
|
|
|
|
80014e0: f003 0304 and.w r3, r3, #4
|
|
|
|
80014e4: 2b00 cmp r3, #0
|
|
|
|
80014e6: d005 beq.n 80014f4 <HAL_RCC_ClockConfig+0x60>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_HCLK_DIV16);
|
2023-09-17 10:40:31 +00:00
|
|
|
80014e8: 4b59 ldr r3, [pc, #356] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
80014ea: 689b ldr r3, [r3, #8]
|
|
|
|
80014ec: 4a58 ldr r2, [pc, #352] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
80014ee: f443 53e0 orr.w r3, r3, #7168 ; 0x1c00
|
|
|
|
80014f2: 6093 str r3, [r2, #8]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
|
2023-09-17 10:40:31 +00:00
|
|
|
80014f4: 687b ldr r3, [r7, #4]
|
|
|
|
80014f6: 681b ldr r3, [r3, #0]
|
|
|
|
80014f8: f003 0308 and.w r3, r3, #8
|
|
|
|
80014fc: 2b00 cmp r3, #0
|
|
|
|
80014fe: d005 beq.n 800150c <HAL_RCC_ClockConfig+0x78>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, (RCC_HCLK_DIV16 << 3));
|
2023-09-17 10:40:31 +00:00
|
|
|
8001500: 4b53 ldr r3, [pc, #332] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
8001502: 689b ldr r3, [r3, #8]
|
|
|
|
8001504: 4a52 ldr r2, [pc, #328] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
8001506: f443 4360 orr.w r3, r3, #57344 ; 0xe000
|
|
|
|
800150a: 6093 str r3, [r2, #8]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider));
|
|
|
|
MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
|
2023-09-17 10:40:31 +00:00
|
|
|
800150c: 4b50 ldr r3, [pc, #320] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
800150e: 689b ldr r3, [r3, #8]
|
|
|
|
8001510: f023 02f0 bic.w r2, r3, #240 ; 0xf0
|
|
|
|
8001514: 687b ldr r3, [r7, #4]
|
|
|
|
8001516: 689b ldr r3, [r3, #8]
|
|
|
|
8001518: 494d ldr r1, [pc, #308] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
800151a: 4313 orrs r3, r2
|
|
|
|
800151c: 608b str r3, [r1, #8]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*------------------------- SYSCLK Configuration ---------------------------*/
|
|
|
|
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
|
2023-09-17 10:40:31 +00:00
|
|
|
800151e: 687b ldr r3, [r7, #4]
|
|
|
|
8001520: 681b ldr r3, [r3, #0]
|
|
|
|
8001522: f003 0301 and.w r3, r3, #1
|
|
|
|
8001526: 2b00 cmp r3, #0
|
|
|
|
8001528: d044 beq.n 80015b4 <HAL_RCC_ClockConfig+0x120>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource));
|
|
|
|
|
|
|
|
/* HSE is selected as System Clock Source */
|
|
|
|
if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE)
|
2023-09-17 10:40:31 +00:00
|
|
|
800152a: 687b ldr r3, [r7, #4]
|
|
|
|
800152c: 685b ldr r3, [r3, #4]
|
|
|
|
800152e: 2b01 cmp r3, #1
|
|
|
|
8001530: d107 bne.n 8001542 <HAL_RCC_ClockConfig+0xae>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Check the HSE ready flag */
|
|
|
|
if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001532: 4b47 ldr r3, [pc, #284] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
8001534: 681b ldr r3, [r3, #0]
|
|
|
|
8001536: f403 3300 and.w r3, r3, #131072 ; 0x20000
|
|
|
|
800153a: 2b00 cmp r3, #0
|
|
|
|
800153c: d119 bne.n 8001572 <HAL_RCC_ClockConfig+0xde>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_ERROR;
|
2023-09-17 10:40:31 +00:00
|
|
|
800153e: 2301 movs r3, #1
|
|
|
|
8001540: e07f b.n 8001642 <HAL_RCC_ClockConfig+0x1ae>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
/* PLL is selected as System Clock Source */
|
|
|
|
else if((RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) ||
|
2023-09-17 10:40:31 +00:00
|
|
|
8001542: 687b ldr r3, [r7, #4]
|
|
|
|
8001544: 685b ldr r3, [r3, #4]
|
|
|
|
8001546: 2b02 cmp r3, #2
|
|
|
|
8001548: d003 beq.n 8001552 <HAL_RCC_ClockConfig+0xbe>
|
2023-09-17 08:27:41 +00:00
|
|
|
(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLRCLK))
|
2023-09-17 10:40:31 +00:00
|
|
|
800154a: 687b ldr r3, [r7, #4]
|
|
|
|
800154c: 685b ldr r3, [r3, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
else if((RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) ||
|
2023-09-17 10:40:31 +00:00
|
|
|
800154e: 2b03 cmp r3, #3
|
|
|
|
8001550: d107 bne.n 8001562 <HAL_RCC_ClockConfig+0xce>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Check the PLL ready flag */
|
|
|
|
if(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001552: 4b3f ldr r3, [pc, #252] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
8001554: 681b ldr r3, [r3, #0]
|
|
|
|
8001556: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
|
|
|
|
800155a: 2b00 cmp r3, #0
|
|
|
|
800155c: d109 bne.n 8001572 <HAL_RCC_ClockConfig+0xde>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_ERROR;
|
2023-09-17 10:40:31 +00:00
|
|
|
800155e: 2301 movs r3, #1
|
|
|
|
8001560: e06f b.n 8001642 <HAL_RCC_ClockConfig+0x1ae>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
/* HSI is selected as System Clock Source */
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Check the HSI ready flag */
|
|
|
|
if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001562: 4b3b ldr r3, [pc, #236] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
8001564: 681b ldr r3, [r3, #0]
|
|
|
|
8001566: f003 0302 and.w r3, r3, #2
|
|
|
|
800156a: 2b00 cmp r3, #0
|
|
|
|
800156c: d101 bne.n 8001572 <HAL_RCC_ClockConfig+0xde>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_ERROR;
|
2023-09-17 10:40:31 +00:00
|
|
|
800156e: 2301 movs r3, #1
|
|
|
|
8001570: e067 b.n 8001642 <HAL_RCC_ClockConfig+0x1ae>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
__HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001572: 4b37 ldr r3, [pc, #220] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
8001574: 689b ldr r3, [r3, #8]
|
|
|
|
8001576: f023 0203 bic.w r2, r3, #3
|
|
|
|
800157a: 687b ldr r3, [r7, #4]
|
|
|
|
800157c: 685b ldr r3, [r3, #4]
|
|
|
|
800157e: 4934 ldr r1, [pc, #208] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
8001580: 4313 orrs r3, r2
|
|
|
|
8001582: 608b str r3, [r1, #8]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Get Start Tick */
|
|
|
|
tickstart = HAL_GetTick();
|
2023-09-17 10:40:31 +00:00
|
|
|
8001584: f7ff fa66 bl 8000a54 <HAL_GetTick>
|
|
|
|
8001588: 60f8 str r0, [r7, #12]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
|
2023-09-17 10:40:31 +00:00
|
|
|
800158a: e00a b.n 80015a2 <HAL_RCC_ClockConfig+0x10e>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
|
2023-09-17 10:40:31 +00:00
|
|
|
800158c: f7ff fa62 bl 8000a54 <HAL_GetTick>
|
|
|
|
8001590: 4602 mov r2, r0
|
|
|
|
8001592: 68fb ldr r3, [r7, #12]
|
|
|
|
8001594: 1ad3 subs r3, r2, r3
|
|
|
|
8001596: f241 3288 movw r2, #5000 ; 0x1388
|
|
|
|
800159a: 4293 cmp r3, r2
|
|
|
|
800159c: d901 bls.n 80015a2 <HAL_RCC_ClockConfig+0x10e>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
800159e: 2303 movs r3, #3
|
|
|
|
80015a0: e04f b.n 8001642 <HAL_RCC_ClockConfig+0x1ae>
|
2023-09-17 08:27:41 +00:00
|
|
|
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
|
2023-09-17 10:40:31 +00:00
|
|
|
80015a2: 4b2b ldr r3, [pc, #172] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
80015a4: 689b ldr r3, [r3, #8]
|
|
|
|
80015a6: f003 020c and.w r2, r3, #12
|
|
|
|
80015aa: 687b ldr r3, [r7, #4]
|
|
|
|
80015ac: 685b ldr r3, [r3, #4]
|
|
|
|
80015ae: 009b lsls r3, r3, #2
|
|
|
|
80015b0: 429a cmp r2, r3
|
|
|
|
80015b2: d1eb bne.n 800158c <HAL_RCC_ClockConfig+0xf8>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Decreasing the number of wait states because of lower CPU frequency */
|
|
|
|
if(FLatency < __HAL_FLASH_GET_LATENCY())
|
2023-09-17 10:40:31 +00:00
|
|
|
80015b4: 4b25 ldr r3, [pc, #148] ; (800164c <HAL_RCC_ClockConfig+0x1b8>)
|
|
|
|
80015b6: 681b ldr r3, [r3, #0]
|
|
|
|
80015b8: f003 0307 and.w r3, r3, #7
|
|
|
|
80015bc: 683a ldr r2, [r7, #0]
|
|
|
|
80015be: 429a cmp r2, r3
|
|
|
|
80015c0: d20c bcs.n 80015dc <HAL_RCC_ClockConfig+0x148>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
|
|
|
|
__HAL_FLASH_SET_LATENCY(FLatency);
|
2023-09-17 10:40:31 +00:00
|
|
|
80015c2: 4b22 ldr r3, [pc, #136] ; (800164c <HAL_RCC_ClockConfig+0x1b8>)
|
|
|
|
80015c4: 683a ldr r2, [r7, #0]
|
|
|
|
80015c6: b2d2 uxtb r2, r2
|
|
|
|
80015c8: 701a strb r2, [r3, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* 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)
|
2023-09-17 10:40:31 +00:00
|
|
|
80015ca: 4b20 ldr r3, [pc, #128] ; (800164c <HAL_RCC_ClockConfig+0x1b8>)
|
|
|
|
80015cc: 681b ldr r3, [r3, #0]
|
|
|
|
80015ce: f003 0307 and.w r3, r3, #7
|
|
|
|
80015d2: 683a ldr r2, [r7, #0]
|
|
|
|
80015d4: 429a cmp r2, r3
|
|
|
|
80015d6: d001 beq.n 80015dc <HAL_RCC_ClockConfig+0x148>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_ERROR;
|
2023-09-17 10:40:31 +00:00
|
|
|
80015d8: 2301 movs r3, #1
|
|
|
|
80015da: e032 b.n 8001642 <HAL_RCC_ClockConfig+0x1ae>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*-------------------------- PCLK1 Configuration ---------------------------*/
|
|
|
|
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
|
2023-09-17 10:40:31 +00:00
|
|
|
80015dc: 687b ldr r3, [r7, #4]
|
|
|
|
80015de: 681b ldr r3, [r3, #0]
|
|
|
|
80015e0: f003 0304 and.w r3, r3, #4
|
|
|
|
80015e4: 2b00 cmp r3, #0
|
|
|
|
80015e6: d008 beq.n 80015fa <HAL_RCC_ClockConfig+0x166>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider));
|
|
|
|
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider);
|
2023-09-17 10:40:31 +00:00
|
|
|
80015e8: 4b19 ldr r3, [pc, #100] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
80015ea: 689b ldr r3, [r3, #8]
|
|
|
|
80015ec: f423 52e0 bic.w r2, r3, #7168 ; 0x1c00
|
|
|
|
80015f0: 687b ldr r3, [r7, #4]
|
|
|
|
80015f2: 68db ldr r3, [r3, #12]
|
|
|
|
80015f4: 4916 ldr r1, [pc, #88] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
80015f6: 4313 orrs r3, r2
|
|
|
|
80015f8: 608b str r3, [r1, #8]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*-------------------------- PCLK2 Configuration ---------------------------*/
|
|
|
|
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
|
2023-09-17 10:40:31 +00:00
|
|
|
80015fa: 687b ldr r3, [r7, #4]
|
|
|
|
80015fc: 681b ldr r3, [r3, #0]
|
|
|
|
80015fe: f003 0308 and.w r3, r3, #8
|
|
|
|
8001602: 2b00 cmp r3, #0
|
|
|
|
8001604: d009 beq.n 800161a <HAL_RCC_ClockConfig+0x186>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider));
|
|
|
|
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3U));
|
2023-09-17 10:40:31 +00:00
|
|
|
8001606: 4b12 ldr r3, [pc, #72] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
8001608: 689b ldr r3, [r3, #8]
|
|
|
|
800160a: f423 4260 bic.w r2, r3, #57344 ; 0xe000
|
|
|
|
800160e: 687b ldr r3, [r7, #4]
|
|
|
|
8001610: 691b ldr r3, [r3, #16]
|
|
|
|
8001612: 00db lsls r3, r3, #3
|
|
|
|
8001614: 490e ldr r1, [pc, #56] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
8001616: 4313 orrs r3, r2
|
|
|
|
8001618: 608b str r3, [r1, #8]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Update the SystemCoreClock global variable */
|
|
|
|
SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE)>> RCC_CFGR_HPRE_Pos];
|
2023-09-17 10:40:31 +00:00
|
|
|
800161a: f000 f821 bl 8001660 <HAL_RCC_GetSysClockFreq>
|
|
|
|
800161e: 4602 mov r2, r0
|
|
|
|
8001620: 4b0b ldr r3, [pc, #44] ; (8001650 <HAL_RCC_ClockConfig+0x1bc>)
|
|
|
|
8001622: 689b ldr r3, [r3, #8]
|
|
|
|
8001624: 091b lsrs r3, r3, #4
|
|
|
|
8001626: f003 030f and.w r3, r3, #15
|
|
|
|
800162a: 490a ldr r1, [pc, #40] ; (8001654 <HAL_RCC_ClockConfig+0x1c0>)
|
|
|
|
800162c: 5ccb ldrb r3, [r1, r3]
|
|
|
|
800162e: fa22 f303 lsr.w r3, r2, r3
|
|
|
|
8001632: 4a09 ldr r2, [pc, #36] ; (8001658 <HAL_RCC_ClockConfig+0x1c4>)
|
|
|
|
8001634: 6013 str r3, [r2, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Configure the source of time base considering new system clocks settings */
|
|
|
|
HAL_InitTick (uwTickPrio);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001636: 4b09 ldr r3, [pc, #36] ; (800165c <HAL_RCC_ClockConfig+0x1c8>)
|
|
|
|
8001638: 681b ldr r3, [r3, #0]
|
|
|
|
800163a: 4618 mov r0, r3
|
|
|
|
800163c: f7ff f9c6 bl 80009cc <HAL_InitTick>
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
return HAL_OK;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001640: 2300 movs r3, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8001642: 4618 mov r0, r3
|
|
|
|
8001644: 3710 adds r7, #16
|
|
|
|
8001646: 46bd mov sp, r7
|
|
|
|
8001648: bd80 pop {r7, pc}
|
|
|
|
800164a: bf00 nop
|
|
|
|
800164c: 40023c00 .word 0x40023c00
|
|
|
|
8001650: 40023800 .word 0x40023800
|
|
|
|
8001654: 0800220c .word 0x0800220c
|
|
|
|
8001658: 20000000 .word 0x20000000
|
|
|
|
800165c: 20000004 .word 0x20000004
|
|
|
|
|
|
|
|
08001660 <HAL_RCC_GetSysClockFreq>:
|
2023-09-17 08:27:41 +00:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* @retval SYSCLK frequency
|
|
|
|
*/
|
|
|
|
__weak uint32_t HAL_RCC_GetSysClockFreq(void)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8001660: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr}
|
|
|
|
8001664: b094 sub sp, #80 ; 0x50
|
|
|
|
8001666: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
uint32_t pllm = 0U, pllvco = 0U, pllp = 0U;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001668: 2300 movs r3, #0
|
|
|
|
800166a: 647b str r3, [r7, #68] ; 0x44
|
|
|
|
800166c: 2300 movs r3, #0
|
|
|
|
800166e: 64fb str r3, [r7, #76] ; 0x4c
|
|
|
|
8001670: 2300 movs r3, #0
|
|
|
|
8001672: 643b str r3, [r7, #64] ; 0x40
|
2023-09-17 08:27:41 +00:00
|
|
|
uint32_t sysclockfreq = 0U;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001674: 2300 movs r3, #0
|
|
|
|
8001676: 64bb str r3, [r7, #72] ; 0x48
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Get SYSCLK source -------------------------------------------------------*/
|
|
|
|
switch (RCC->CFGR & RCC_CFGR_SWS)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001678: 4b79 ldr r3, [pc, #484] ; (8001860 <HAL_RCC_GetSysClockFreq+0x200>)
|
|
|
|
800167a: 689b ldr r3, [r3, #8]
|
|
|
|
800167c: f003 030c and.w r3, r3, #12
|
|
|
|
8001680: 2b08 cmp r3, #8
|
|
|
|
8001682: d00d beq.n 80016a0 <HAL_RCC_GetSysClockFreq+0x40>
|
|
|
|
8001684: 2b08 cmp r3, #8
|
|
|
|
8001686: f200 80e1 bhi.w 800184c <HAL_RCC_GetSysClockFreq+0x1ec>
|
|
|
|
800168a: 2b00 cmp r3, #0
|
|
|
|
800168c: d002 beq.n 8001694 <HAL_RCC_GetSysClockFreq+0x34>
|
|
|
|
800168e: 2b04 cmp r3, #4
|
|
|
|
8001690: d003 beq.n 800169a <HAL_RCC_GetSysClockFreq+0x3a>
|
|
|
|
8001692: e0db b.n 800184c <HAL_RCC_GetSysClockFreq+0x1ec>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
case RCC_CFGR_SWS_HSI: /* HSI used as system clock source */
|
|
|
|
{
|
|
|
|
sysclockfreq = HSI_VALUE;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001694: 4b73 ldr r3, [pc, #460] ; (8001864 <HAL_RCC_GetSysClockFreq+0x204>)
|
|
|
|
8001696: 64bb str r3, [r7, #72] ; 0x48
|
2023-09-17 08:27:41 +00:00
|
|
|
break;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001698: e0db b.n 8001852 <HAL_RCC_GetSysClockFreq+0x1f2>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
case RCC_CFGR_SWS_HSE: /* HSE used as system clock source */
|
|
|
|
{
|
|
|
|
sysclockfreq = HSE_VALUE;
|
2023-09-17 10:40:31 +00:00
|
|
|
800169a: 4b73 ldr r3, [pc, #460] ; (8001868 <HAL_RCC_GetSysClockFreq+0x208>)
|
|
|
|
800169c: 64bb str r3, [r7, #72] ; 0x48
|
2023-09-17 08:27:41 +00:00
|
|
|
break;
|
2023-09-17 10:40:31 +00:00
|
|
|
800169e: e0d8 b.n 8001852 <HAL_RCC_GetSysClockFreq+0x1f2>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
case RCC_CFGR_SWS_PLL: /* PLL used as system clock source */
|
|
|
|
{
|
|
|
|
/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN
|
|
|
|
SYSCLK = PLL_VCO / PLLP */
|
|
|
|
pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM;
|
2023-09-17 10:40:31 +00:00
|
|
|
80016a0: 4b6f ldr r3, [pc, #444] ; (8001860 <HAL_RCC_GetSysClockFreq+0x200>)
|
|
|
|
80016a2: 685b ldr r3, [r3, #4]
|
|
|
|
80016a4: f003 033f and.w r3, r3, #63 ; 0x3f
|
|
|
|
80016a8: 647b str r3, [r7, #68] ; 0x44
|
2023-09-17 08:27:41 +00:00
|
|
|
if(__HAL_RCC_GET_PLL_OSCSOURCE() != RCC_PLLSOURCE_HSI)
|
2023-09-17 10:40:31 +00:00
|
|
|
80016aa: 4b6d ldr r3, [pc, #436] ; (8001860 <HAL_RCC_GetSysClockFreq+0x200>)
|
|
|
|
80016ac: 685b ldr r3, [r3, #4]
|
|
|
|
80016ae: f403 0380 and.w r3, r3, #4194304 ; 0x400000
|
|
|
|
80016b2: 2b00 cmp r3, #0
|
|
|
|
80016b4: d063 beq.n 800177e <HAL_RCC_GetSysClockFreq+0x11e>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* HSE used as PLL clock source */
|
|
|
|
pllvco = (uint32_t) ((((uint64_t) HSE_VALUE * ((uint64_t) ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)))) / (uint64_t)pllm);
|
2023-09-17 10:40:31 +00:00
|
|
|
80016b6: 4b6a ldr r3, [pc, #424] ; (8001860 <HAL_RCC_GetSysClockFreq+0x200>)
|
|
|
|
80016b8: 685b ldr r3, [r3, #4]
|
|
|
|
80016ba: 099b lsrs r3, r3, #6
|
|
|
|
80016bc: 2200 movs r2, #0
|
|
|
|
80016be: 63bb str r3, [r7, #56] ; 0x38
|
|
|
|
80016c0: 63fa str r2, [r7, #60] ; 0x3c
|
|
|
|
80016c2: 6bbb ldr r3, [r7, #56] ; 0x38
|
|
|
|
80016c4: f3c3 0308 ubfx r3, r3, #0, #9
|
|
|
|
80016c8: 633b str r3, [r7, #48] ; 0x30
|
|
|
|
80016ca: 2300 movs r3, #0
|
|
|
|
80016cc: 637b str r3, [r7, #52] ; 0x34
|
|
|
|
80016ce: e9d7 450c ldrd r4, r5, [r7, #48] ; 0x30
|
|
|
|
80016d2: 4622 mov r2, r4
|
|
|
|
80016d4: 462b mov r3, r5
|
|
|
|
80016d6: f04f 0000 mov.w r0, #0
|
|
|
|
80016da: f04f 0100 mov.w r1, #0
|
|
|
|
80016de: 0159 lsls r1, r3, #5
|
|
|
|
80016e0: ea41 61d2 orr.w r1, r1, r2, lsr #27
|
|
|
|
80016e4: 0150 lsls r0, r2, #5
|
|
|
|
80016e6: 4602 mov r2, r0
|
|
|
|
80016e8: 460b mov r3, r1
|
|
|
|
80016ea: 4621 mov r1, r4
|
|
|
|
80016ec: 1a51 subs r1, r2, r1
|
|
|
|
80016ee: 6139 str r1, [r7, #16]
|
|
|
|
80016f0: 4629 mov r1, r5
|
|
|
|
80016f2: eb63 0301 sbc.w r3, r3, r1
|
|
|
|
80016f6: 617b str r3, [r7, #20]
|
|
|
|
80016f8: f04f 0200 mov.w r2, #0
|
|
|
|
80016fc: f04f 0300 mov.w r3, #0
|
|
|
|
8001700: e9d7 ab04 ldrd sl, fp, [r7, #16]
|
|
|
|
8001704: 4659 mov r1, fp
|
|
|
|
8001706: 018b lsls r3, r1, #6
|
|
|
|
8001708: 4651 mov r1, sl
|
|
|
|
800170a: ea43 6391 orr.w r3, r3, r1, lsr #26
|
|
|
|
800170e: 4651 mov r1, sl
|
|
|
|
8001710: 018a lsls r2, r1, #6
|
|
|
|
8001712: 4651 mov r1, sl
|
|
|
|
8001714: ebb2 0801 subs.w r8, r2, r1
|
|
|
|
8001718: 4659 mov r1, fp
|
|
|
|
800171a: eb63 0901 sbc.w r9, r3, r1
|
|
|
|
800171e: f04f 0200 mov.w r2, #0
|
|
|
|
8001722: f04f 0300 mov.w r3, #0
|
|
|
|
8001726: ea4f 03c9 mov.w r3, r9, lsl #3
|
|
|
|
800172a: ea43 7358 orr.w r3, r3, r8, lsr #29
|
|
|
|
800172e: ea4f 02c8 mov.w r2, r8, lsl #3
|
|
|
|
8001732: 4690 mov r8, r2
|
|
|
|
8001734: 4699 mov r9, r3
|
|
|
|
8001736: 4623 mov r3, r4
|
|
|
|
8001738: eb18 0303 adds.w r3, r8, r3
|
|
|
|
800173c: 60bb str r3, [r7, #8]
|
|
|
|
800173e: 462b mov r3, r5
|
|
|
|
8001740: eb49 0303 adc.w r3, r9, r3
|
|
|
|
8001744: 60fb str r3, [r7, #12]
|
|
|
|
8001746: f04f 0200 mov.w r2, #0
|
|
|
|
800174a: f04f 0300 mov.w r3, #0
|
|
|
|
800174e: e9d7 4502 ldrd r4, r5, [r7, #8]
|
|
|
|
8001752: 4629 mov r1, r5
|
|
|
|
8001754: 024b lsls r3, r1, #9
|
|
|
|
8001756: 4621 mov r1, r4
|
|
|
|
8001758: ea43 53d1 orr.w r3, r3, r1, lsr #23
|
|
|
|
800175c: 4621 mov r1, r4
|
|
|
|
800175e: 024a lsls r2, r1, #9
|
|
|
|
8001760: 4610 mov r0, r2
|
|
|
|
8001762: 4619 mov r1, r3
|
|
|
|
8001764: 6c7b ldr r3, [r7, #68] ; 0x44
|
|
|
|
8001766: 2200 movs r2, #0
|
|
|
|
8001768: 62bb str r3, [r7, #40] ; 0x28
|
|
|
|
800176a: 62fa str r2, [r7, #44] ; 0x2c
|
|
|
|
800176c: e9d7 230a ldrd r2, r3, [r7, #40] ; 0x28
|
|
|
|
8001770: f7fe fd32 bl 80001d8 <__aeabi_uldivmod>
|
|
|
|
8001774: 4602 mov r2, r0
|
|
|
|
8001776: 460b mov r3, r1
|
|
|
|
8001778: 4613 mov r3, r2
|
|
|
|
800177a: 64fb str r3, [r7, #76] ; 0x4c
|
|
|
|
800177c: e058 b.n 8001830 <HAL_RCC_GetSysClockFreq+0x1d0>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* HSI used as PLL clock source */
|
|
|
|
pllvco = (uint32_t) ((((uint64_t) HSI_VALUE * ((uint64_t) ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)))) / (uint64_t)pllm);
|
2023-09-17 10:40:31 +00:00
|
|
|
800177e: 4b38 ldr r3, [pc, #224] ; (8001860 <HAL_RCC_GetSysClockFreq+0x200>)
|
|
|
|
8001780: 685b ldr r3, [r3, #4]
|
|
|
|
8001782: 099b lsrs r3, r3, #6
|
|
|
|
8001784: 2200 movs r2, #0
|
|
|
|
8001786: 4618 mov r0, r3
|
|
|
|
8001788: 4611 mov r1, r2
|
|
|
|
800178a: f3c0 0308 ubfx r3, r0, #0, #9
|
|
|
|
800178e: 623b str r3, [r7, #32]
|
|
|
|
8001790: 2300 movs r3, #0
|
|
|
|
8001792: 627b str r3, [r7, #36] ; 0x24
|
|
|
|
8001794: e9d7 8908 ldrd r8, r9, [r7, #32]
|
|
|
|
8001798: 4642 mov r2, r8
|
|
|
|
800179a: 464b mov r3, r9
|
|
|
|
800179c: f04f 0000 mov.w r0, #0
|
|
|
|
80017a0: f04f 0100 mov.w r1, #0
|
|
|
|
80017a4: 0159 lsls r1, r3, #5
|
|
|
|
80017a6: ea41 61d2 orr.w r1, r1, r2, lsr #27
|
|
|
|
80017aa: 0150 lsls r0, r2, #5
|
|
|
|
80017ac: 4602 mov r2, r0
|
|
|
|
80017ae: 460b mov r3, r1
|
|
|
|
80017b0: 4641 mov r1, r8
|
|
|
|
80017b2: ebb2 0a01 subs.w sl, r2, r1
|
|
|
|
80017b6: 4649 mov r1, r9
|
|
|
|
80017b8: eb63 0b01 sbc.w fp, r3, r1
|
|
|
|
80017bc: f04f 0200 mov.w r2, #0
|
|
|
|
80017c0: f04f 0300 mov.w r3, #0
|
|
|
|
80017c4: ea4f 138b mov.w r3, fp, lsl #6
|
|
|
|
80017c8: ea43 639a orr.w r3, r3, sl, lsr #26
|
|
|
|
80017cc: ea4f 128a mov.w r2, sl, lsl #6
|
|
|
|
80017d0: ebb2 040a subs.w r4, r2, sl
|
|
|
|
80017d4: eb63 050b sbc.w r5, r3, fp
|
|
|
|
80017d8: f04f 0200 mov.w r2, #0
|
|
|
|
80017dc: f04f 0300 mov.w r3, #0
|
|
|
|
80017e0: 00eb lsls r3, r5, #3
|
|
|
|
80017e2: ea43 7354 orr.w r3, r3, r4, lsr #29
|
|
|
|
80017e6: 00e2 lsls r2, r4, #3
|
|
|
|
80017e8: 4614 mov r4, r2
|
|
|
|
80017ea: 461d mov r5, r3
|
|
|
|
80017ec: 4643 mov r3, r8
|
|
|
|
80017ee: 18e3 adds r3, r4, r3
|
|
|
|
80017f0: 603b str r3, [r7, #0]
|
|
|
|
80017f2: 464b mov r3, r9
|
|
|
|
80017f4: eb45 0303 adc.w r3, r5, r3
|
|
|
|
80017f8: 607b str r3, [r7, #4]
|
|
|
|
80017fa: f04f 0200 mov.w r2, #0
|
|
|
|
80017fe: f04f 0300 mov.w r3, #0
|
|
|
|
8001802: e9d7 4500 ldrd r4, r5, [r7]
|
|
|
|
8001806: 4629 mov r1, r5
|
|
|
|
8001808: 028b lsls r3, r1, #10
|
|
|
|
800180a: 4621 mov r1, r4
|
|
|
|
800180c: ea43 5391 orr.w r3, r3, r1, lsr #22
|
|
|
|
8001810: 4621 mov r1, r4
|
|
|
|
8001812: 028a lsls r2, r1, #10
|
|
|
|
8001814: 4610 mov r0, r2
|
|
|
|
8001816: 4619 mov r1, r3
|
|
|
|
8001818: 6c7b ldr r3, [r7, #68] ; 0x44
|
|
|
|
800181a: 2200 movs r2, #0
|
|
|
|
800181c: 61bb str r3, [r7, #24]
|
|
|
|
800181e: 61fa str r2, [r7, #28]
|
|
|
|
8001820: e9d7 2306 ldrd r2, r3, [r7, #24]
|
|
|
|
8001824: f7fe fcd8 bl 80001d8 <__aeabi_uldivmod>
|
|
|
|
8001828: 4602 mov r2, r0
|
|
|
|
800182a: 460b mov r3, r1
|
|
|
|
800182c: 4613 mov r3, r2
|
|
|
|
800182e: 64fb str r3, [r7, #76] ; 0x4c
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
pllp = ((((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >> RCC_PLLCFGR_PLLP_Pos) + 1U) *2U);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001830: 4b0b ldr r3, [pc, #44] ; (8001860 <HAL_RCC_GetSysClockFreq+0x200>)
|
|
|
|
8001832: 685b ldr r3, [r3, #4]
|
|
|
|
8001834: 0c1b lsrs r3, r3, #16
|
|
|
|
8001836: f003 0303 and.w r3, r3, #3
|
|
|
|
800183a: 3301 adds r3, #1
|
|
|
|
800183c: 005b lsls r3, r3, #1
|
|
|
|
800183e: 643b str r3, [r7, #64] ; 0x40
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
sysclockfreq = pllvco/pllp;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001840: 6cfa ldr r2, [r7, #76] ; 0x4c
|
|
|
|
8001842: 6c3b ldr r3, [r7, #64] ; 0x40
|
|
|
|
8001844: fbb2 f3f3 udiv r3, r2, r3
|
|
|
|
8001848: 64bb str r3, [r7, #72] ; 0x48
|
2023-09-17 08:27:41 +00:00
|
|
|
break;
|
2023-09-17 10:40:31 +00:00
|
|
|
800184a: e002 b.n 8001852 <HAL_RCC_GetSysClockFreq+0x1f2>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
sysclockfreq = HSI_VALUE;
|
2023-09-17 10:40:31 +00:00
|
|
|
800184c: 4b05 ldr r3, [pc, #20] ; (8001864 <HAL_RCC_GetSysClockFreq+0x204>)
|
|
|
|
800184e: 64bb str r3, [r7, #72] ; 0x48
|
2023-09-17 08:27:41 +00:00
|
|
|
break;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001850: bf00 nop
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return sysclockfreq;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001852: 6cbb ldr r3, [r7, #72] ; 0x48
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8001854: 4618 mov r0, r3
|
|
|
|
8001856: 3750 adds r7, #80 ; 0x50
|
|
|
|
8001858: 46bd mov sp, r7
|
|
|
|
800185a: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc}
|
|
|
|
800185e: bf00 nop
|
|
|
|
8001860: 40023800 .word 0x40023800
|
|
|
|
8001864: 00f42400 .word 0x00f42400
|
|
|
|
8001868: 007a1200 .word 0x007a1200
|
|
|
|
|
|
|
|
0800186c <HAL_RCC_GetHCLKFreq>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* @note The SystemCoreClock CMSIS variable is used to store System Clock Frequency
|
|
|
|
* and updated within this function
|
|
|
|
* @retval HCLK frequency
|
|
|
|
*/
|
|
|
|
uint32_t HAL_RCC_GetHCLKFreq(void)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
800186c: b480 push {r7}
|
|
|
|
800186e: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
return SystemCoreClock;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001870: 4b03 ldr r3, [pc, #12] ; (8001880 <HAL_RCC_GetHCLKFreq+0x14>)
|
|
|
|
8001872: 681b ldr r3, [r3, #0]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8001874: 4618 mov r0, r3
|
|
|
|
8001876: 46bd mov sp, r7
|
|
|
|
8001878: f85d 7b04 ldr.w r7, [sp], #4
|
|
|
|
800187c: 4770 bx lr
|
|
|
|
800187e: bf00 nop
|
|
|
|
8001880: 20000000 .word 0x20000000
|
|
|
|
|
|
|
|
08001884 <HAL_RCC_GetPCLK1Freq>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* @note Each time PCLK1 changes, this function must be called to update the
|
|
|
|
* right PCLK1 value. Otherwise, any configuration based on this function will be incorrect.
|
|
|
|
* @retval PCLK1 frequency
|
|
|
|
*/
|
|
|
|
uint32_t HAL_RCC_GetPCLK1Freq(void)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8001884: b580 push {r7, lr}
|
|
|
|
8001886: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
/* Get HCLK source and Compute PCLK1 frequency ---------------------------*/
|
|
|
|
return (HAL_RCC_GetHCLKFreq() >> APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE1)>> RCC_CFGR_PPRE1_Pos]);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001888: f7ff fff0 bl 800186c <HAL_RCC_GetHCLKFreq>
|
|
|
|
800188c: 4602 mov r2, r0
|
|
|
|
800188e: 4b05 ldr r3, [pc, #20] ; (80018a4 <HAL_RCC_GetPCLK1Freq+0x20>)
|
|
|
|
8001890: 689b ldr r3, [r3, #8]
|
|
|
|
8001892: 0a9b lsrs r3, r3, #10
|
|
|
|
8001894: f003 0307 and.w r3, r3, #7
|
|
|
|
8001898: 4903 ldr r1, [pc, #12] ; (80018a8 <HAL_RCC_GetPCLK1Freq+0x24>)
|
|
|
|
800189a: 5ccb ldrb r3, [r1, r3]
|
|
|
|
800189c: fa22 f303 lsr.w r3, r2, r3
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
80018a0: 4618 mov r0, r3
|
|
|
|
80018a2: bd80 pop {r7, pc}
|
|
|
|
80018a4: 40023800 .word 0x40023800
|
|
|
|
80018a8: 0800221c .word 0x0800221c
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
080018ac <HAL_RCC_GetPCLK2Freq>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* @note Each time PCLK2 changes, this function must be called to update the
|
|
|
|
* right PCLK2 value. Otherwise, any configuration based on this function will be incorrect.
|
|
|
|
* @retval PCLK2 frequency
|
|
|
|
*/
|
|
|
|
uint32_t HAL_RCC_GetPCLK2Freq(void)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
80018ac: b580 push {r7, lr}
|
|
|
|
80018ae: af00 add r7, sp, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
/* Get HCLK source and Compute PCLK2 frequency ---------------------------*/
|
|
|
|
return (HAL_RCC_GetHCLKFreq()>> APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE2)>> RCC_CFGR_PPRE2_Pos]);
|
2023-09-17 10:40:31 +00:00
|
|
|
80018b0: f7ff ffdc bl 800186c <HAL_RCC_GetHCLKFreq>
|
|
|
|
80018b4: 4602 mov r2, r0
|
|
|
|
80018b6: 4b05 ldr r3, [pc, #20] ; (80018cc <HAL_RCC_GetPCLK2Freq+0x20>)
|
|
|
|
80018b8: 689b ldr r3, [r3, #8]
|
|
|
|
80018ba: 0b5b lsrs r3, r3, #13
|
|
|
|
80018bc: f003 0307 and.w r3, r3, #7
|
|
|
|
80018c0: 4903 ldr r1, [pc, #12] ; (80018d0 <HAL_RCC_GetPCLK2Freq+0x24>)
|
|
|
|
80018c2: 5ccb ldrb r3, [r1, r3]
|
|
|
|
80018c4: fa22 f303 lsr.w r3, r2, r3
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
80018c8: 4618 mov r0, r3
|
|
|
|
80018ca: bd80 pop {r7, pc}
|
|
|
|
80018cc: 40023800 .word 0x40023800
|
|
|
|
80018d0: 0800221c .word 0x0800221c
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
080018d4 <HAL_UART_Init>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* @param huart Pointer to a UART_HandleTypeDef structure that contains
|
|
|
|
* the configuration information for the specified UART module.
|
|
|
|
* @retval HAL status
|
|
|
|
*/
|
|
|
|
HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
80018d4: b580 push {r7, lr}
|
|
|
|
80018d6: b082 sub sp, #8
|
|
|
|
80018d8: af00 add r7, sp, #0
|
|
|
|
80018da: 6078 str r0, [r7, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
/* Check the UART handle allocation */
|
|
|
|
if (huart == NULL)
|
2023-09-17 10:40:31 +00:00
|
|
|
80018dc: 687b ldr r3, [r7, #4]
|
|
|
|
80018de: 2b00 cmp r3, #0
|
|
|
|
80018e0: d101 bne.n 80018e6 <HAL_UART_Init+0x12>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_ERROR;
|
2023-09-17 10:40:31 +00:00
|
|
|
80018e2: 2301 movs r3, #1
|
|
|
|
80018e4: e03f b.n 8001966 <HAL_UART_Init+0x92>
|
2023-09-17 08:27:41 +00:00
|
|
|
assert_param(IS_UART_INSTANCE(huart->Instance));
|
|
|
|
}
|
|
|
|
assert_param(IS_UART_WORD_LENGTH(huart->Init.WordLength));
|
|
|
|
assert_param(IS_UART_OVERSAMPLING(huart->Init.OverSampling));
|
|
|
|
|
|
|
|
if (huart->gState == HAL_UART_STATE_RESET)
|
2023-09-17 10:40:31 +00:00
|
|
|
80018e6: 687b ldr r3, [r7, #4]
|
|
|
|
80018e8: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
|
|
|
|
80018ec: b2db uxtb r3, r3
|
|
|
|
80018ee: 2b00 cmp r3, #0
|
|
|
|
80018f0: d106 bne.n 8001900 <HAL_UART_Init+0x2c>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Allocate lock resource and initialize it */
|
|
|
|
huart->Lock = HAL_UNLOCKED;
|
2023-09-17 10:40:31 +00:00
|
|
|
80018f2: 687b ldr r3, [r7, #4]
|
|
|
|
80018f4: 2200 movs r2, #0
|
|
|
|
80018f6: f883 203c strb.w r2, [r3, #60] ; 0x3c
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Init the low level hardware */
|
|
|
|
huart->MspInitCallback(huart);
|
|
|
|
#else
|
|
|
|
/* Init the low level hardware : GPIO, CLOCK */
|
|
|
|
HAL_UART_MspInit(huart);
|
2023-09-17 10:40:31 +00:00
|
|
|
80018fa: 6878 ldr r0, [r7, #4]
|
|
|
|
80018fc: f7fe ff96 bl 800082c <HAL_UART_MspInit>
|
2023-09-17 08:27:41 +00:00
|
|
|
#endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */
|
|
|
|
}
|
|
|
|
|
|
|
|
huart->gState = HAL_UART_STATE_BUSY;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001900: 687b ldr r3, [r7, #4]
|
|
|
|
8001902: 2224 movs r2, #36 ; 0x24
|
|
|
|
8001904: f883 203d strb.w r2, [r3, #61] ; 0x3d
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Disable the peripheral */
|
|
|
|
__HAL_UART_DISABLE(huart);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001908: 687b ldr r3, [r7, #4]
|
|
|
|
800190a: 681b ldr r3, [r3, #0]
|
|
|
|
800190c: 68da ldr r2, [r3, #12]
|
|
|
|
800190e: 687b ldr r3, [r7, #4]
|
|
|
|
8001910: 681b ldr r3, [r3, #0]
|
|
|
|
8001912: f422 5200 bic.w r2, r2, #8192 ; 0x2000
|
|
|
|
8001916: 60da str r2, [r3, #12]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Set the UART Communication parameters */
|
|
|
|
UART_SetConfig(huart);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001918: 6878 ldr r0, [r7, #4]
|
|
|
|
800191a: f000 f9cb bl 8001cb4 <UART_SetConfig>
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* In asynchronous mode, the following bits must be kept cleared:
|
|
|
|
- LINEN and CLKEN bits in the USART_CR2 register,
|
|
|
|
- SCEN, HDSEL and IREN bits in the USART_CR3 register.*/
|
|
|
|
CLEAR_BIT(huart->Instance->CR2, (USART_CR2_LINEN | USART_CR2_CLKEN));
|
2023-09-17 09:57:40 +00:00
|
|
|
800191e: 687b ldr r3, [r7, #4]
|
|
|
|
8001920: 681b ldr r3, [r3, #0]
|
2023-09-17 10:40:31 +00:00
|
|
|
8001922: 691a ldr r2, [r3, #16]
|
2023-09-17 09:57:40 +00:00
|
|
|
8001924: 687b ldr r3, [r7, #4]
|
|
|
|
8001926: 681b ldr r3, [r3, #0]
|
2023-09-17 10:40:31 +00:00
|
|
|
8001928: f422 4290 bic.w r2, r2, #18432 ; 0x4800
|
|
|
|
800192c: 611a str r2, [r3, #16]
|
|
|
|
CLEAR_BIT(huart->Instance->CR3, (USART_CR3_SCEN | USART_CR3_HDSEL | USART_CR3_IREN));
|
|
|
|
800192e: 687b ldr r3, [r7, #4]
|
|
|
|
8001930: 681b ldr r3, [r3, #0]
|
|
|
|
8001932: 695a ldr r2, [r3, #20]
|
|
|
|
8001934: 687b ldr r3, [r7, #4]
|
|
|
|
8001936: 681b ldr r3, [r3, #0]
|
|
|
|
8001938: f022 022a bic.w r2, r2, #42 ; 0x2a
|
|
|
|
800193c: 615a str r2, [r3, #20]
|
|
|
|
|
|
|
|
/* Enable the peripheral */
|
|
|
|
__HAL_UART_ENABLE(huart);
|
|
|
|
800193e: 687b ldr r3, [r7, #4]
|
|
|
|
8001940: 681b ldr r3, [r3, #0]
|
|
|
|
8001942: 68da ldr r2, [r3, #12]
|
|
|
|
8001944: 687b ldr r3, [r7, #4]
|
|
|
|
8001946: 681b ldr r3, [r3, #0]
|
|
|
|
8001948: f442 5200 orr.w r2, r2, #8192 ; 0x2000
|
|
|
|
800194c: 60da str r2, [r3, #12]
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Initialize the UART state */
|
|
|
|
huart->ErrorCode = HAL_UART_ERROR_NONE;
|
2023-09-17 10:40:31 +00:00
|
|
|
800194e: 687b ldr r3, [r7, #4]
|
|
|
|
8001950: 2200 movs r2, #0
|
|
|
|
8001952: 641a str r2, [r3, #64] ; 0x40
|
2023-09-17 08:27:41 +00:00
|
|
|
huart->gState = HAL_UART_STATE_READY;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001954: 687b ldr r3, [r7, #4]
|
|
|
|
8001956: 2220 movs r2, #32
|
|
|
|
8001958: f883 203d strb.w r2, [r3, #61] ; 0x3d
|
2023-09-17 08:27:41 +00:00
|
|
|
huart->RxState = HAL_UART_STATE_READY;
|
2023-09-17 10:40:31 +00:00
|
|
|
800195c: 687b ldr r3, [r7, #4]
|
|
|
|
800195e: 2220 movs r2, #32
|
|
|
|
8001960: f883 203e strb.w r2, [r3, #62] ; 0x3e
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
return HAL_OK;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001964: 2300 movs r3, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8001966: 4618 mov r0, r3
|
|
|
|
8001968: 3708 adds r7, #8
|
|
|
|
800196a: 46bd mov sp, r7
|
|
|
|
800196c: bd80 pop {r7, pc}
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
0800196e <HAL_UART_Transmit>:
|
2023-09-17 09:18:33 +00:00
|
|
|
* @param Size Amount of data elements (u8 or u16) to be sent
|
2023-09-17 08:27:41 +00:00
|
|
|
* @param Timeout Timeout duration
|
|
|
|
* @retval HAL status
|
|
|
|
*/
|
2023-09-17 09:18:33 +00:00
|
|
|
HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size, uint32_t Timeout)
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
800196e: b580 push {r7, lr}
|
|
|
|
8001970: b08a sub sp, #40 ; 0x28
|
|
|
|
8001972: af02 add r7, sp, #8
|
|
|
|
8001974: 60f8 str r0, [r7, #12]
|
|
|
|
8001976: 60b9 str r1, [r7, #8]
|
|
|
|
8001978: 603b str r3, [r7, #0]
|
|
|
|
800197a: 4613 mov r3, r2
|
|
|
|
800197c: 80fb strh r3, [r7, #6]
|
2023-09-17 09:18:33 +00:00
|
|
|
const uint8_t *pdata8bits;
|
|
|
|
const uint16_t *pdata16bits;
|
2023-09-17 08:27:41 +00:00
|
|
|
uint32_t tickstart = 0U;
|
2023-09-17 10:40:31 +00:00
|
|
|
800197e: 2300 movs r3, #0
|
|
|
|
8001980: 617b str r3, [r7, #20]
|
2023-09-17 09:18:33 +00:00
|
|
|
|
|
|
|
/* Check that a Tx process is not already ongoing */
|
|
|
|
if (huart->gState == HAL_UART_STATE_READY)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001982: 68fb ldr r3, [r7, #12]
|
|
|
|
8001984: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
|
|
|
|
8001988: b2db uxtb r3, r3
|
|
|
|
800198a: 2b20 cmp r3, #32
|
|
|
|
800198c: d17c bne.n 8001a88 <HAL_UART_Transmit+0x11a>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if ((pData == NULL) || (Size == 0U))
|
2023-09-17 10:40:31 +00:00
|
|
|
800198e: 68bb ldr r3, [r7, #8]
|
|
|
|
8001990: 2b00 cmp r3, #0
|
|
|
|
8001992: d002 beq.n 800199a <HAL_UART_Transmit+0x2c>
|
|
|
|
8001994: 88fb ldrh r3, [r7, #6]
|
|
|
|
8001996: 2b00 cmp r3, #0
|
|
|
|
8001998: d101 bne.n 800199e <HAL_UART_Transmit+0x30>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_ERROR;
|
2023-09-17 10:40:31 +00:00
|
|
|
800199a: 2301 movs r3, #1
|
|
|
|
800199c: e075 b.n 8001a8a <HAL_UART_Transmit+0x11c>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Process Locked */
|
|
|
|
__HAL_LOCK(huart);
|
2023-09-17 10:40:31 +00:00
|
|
|
800199e: 68fb ldr r3, [r7, #12]
|
|
|
|
80019a0: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
|
|
|
|
80019a4: 2b01 cmp r3, #1
|
|
|
|
80019a6: d101 bne.n 80019ac <HAL_UART_Transmit+0x3e>
|
|
|
|
80019a8: 2302 movs r3, #2
|
|
|
|
80019aa: e06e b.n 8001a8a <HAL_UART_Transmit+0x11c>
|
|
|
|
80019ac: 68fb ldr r3, [r7, #12]
|
|
|
|
80019ae: 2201 movs r2, #1
|
|
|
|
80019b0: f883 203c strb.w r2, [r3, #60] ; 0x3c
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
huart->ErrorCode = HAL_UART_ERROR_NONE;
|
2023-09-17 10:40:31 +00:00
|
|
|
80019b4: 68fb ldr r3, [r7, #12]
|
|
|
|
80019b6: 2200 movs r2, #0
|
|
|
|
80019b8: 641a str r2, [r3, #64] ; 0x40
|
2023-09-17 09:18:33 +00:00
|
|
|
huart->gState = HAL_UART_STATE_BUSY_TX;
|
2023-09-17 10:40:31 +00:00
|
|
|
80019ba: 68fb ldr r3, [r7, #12]
|
|
|
|
80019bc: 2221 movs r2, #33 ; 0x21
|
|
|
|
80019be: f883 203d strb.w r2, [r3, #61] ; 0x3d
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Init tickstart for timeout management */
|
|
|
|
tickstart = HAL_GetTick();
|
2023-09-17 10:40:31 +00:00
|
|
|
80019c2: f7ff f847 bl 8000a54 <HAL_GetTick>
|
|
|
|
80019c6: 6178 str r0, [r7, #20]
|
2023-09-17 09:18:33 +00:00
|
|
|
|
|
|
|
huart->TxXferSize = Size;
|
2023-09-17 10:40:31 +00:00
|
|
|
80019c8: 68fb ldr r3, [r7, #12]
|
|
|
|
80019ca: 88fa ldrh r2, [r7, #6]
|
|
|
|
80019cc: 849a strh r2, [r3, #36] ; 0x24
|
2023-09-17 09:18:33 +00:00
|
|
|
huart->TxXferCount = Size;
|
2023-09-17 10:40:31 +00:00
|
|
|
80019ce: 68fb ldr r3, [r7, #12]
|
|
|
|
80019d0: 88fa ldrh r2, [r7, #6]
|
|
|
|
80019d2: 84da strh r2, [r3, #38] ; 0x26
|
2023-09-17 09:18:33 +00:00
|
|
|
|
|
|
|
/* In case of 9bits/No Parity transfer, pData needs to be handled as a uint16_t pointer */
|
2023-09-17 08:27:41 +00:00
|
|
|
if ((huart->Init.WordLength == UART_WORDLENGTH_9B) && (huart->Init.Parity == UART_PARITY_NONE))
|
2023-09-17 10:40:31 +00:00
|
|
|
80019d4: 68fb ldr r3, [r7, #12]
|
|
|
|
80019d6: 689b ldr r3, [r3, #8]
|
|
|
|
80019d8: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
|
|
|
|
80019dc: d108 bne.n 80019f0 <HAL_UART_Transmit+0x82>
|
|
|
|
80019de: 68fb ldr r3, [r7, #12]
|
|
|
|
80019e0: 691b ldr r3, [r3, #16]
|
|
|
|
80019e2: 2b00 cmp r3, #0
|
|
|
|
80019e4: d104 bne.n 80019f0 <HAL_UART_Transmit+0x82>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
pdata8bits = NULL;
|
2023-09-17 10:40:31 +00:00
|
|
|
80019e6: 2300 movs r3, #0
|
|
|
|
80019e8: 61fb str r3, [r7, #28]
|
2023-09-17 09:18:33 +00:00
|
|
|
pdata16bits = (const uint16_t *) pData;
|
2023-09-17 10:40:31 +00:00
|
|
|
80019ea: 68bb ldr r3, [r7, #8]
|
|
|
|
80019ec: 61bb str r3, [r7, #24]
|
|
|
|
80019ee: e003 b.n 80019f8 <HAL_UART_Transmit+0x8a>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pdata8bits = pData;
|
2023-09-17 10:40:31 +00:00
|
|
|
80019f0: 68bb ldr r3, [r7, #8]
|
|
|
|
80019f2: 61fb str r3, [r7, #28]
|
2023-09-17 08:27:41 +00:00
|
|
|
pdata16bits = NULL;
|
2023-09-17 10:40:31 +00:00
|
|
|
80019f4: 2300 movs r3, #0
|
|
|
|
80019f6: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Process Unlocked */
|
|
|
|
__HAL_UNLOCK(huart);
|
2023-09-17 10:40:31 +00:00
|
|
|
80019f8: 68fb ldr r3, [r7, #12]
|
|
|
|
80019fa: 2200 movs r2, #0
|
|
|
|
80019fc: f883 203c strb.w r2, [r3, #60] ; 0x3c
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 09:18:33 +00:00
|
|
|
while (huart->TxXferCount > 0U)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a00: e02a b.n 8001a58 <HAL_UART_Transmit+0xea>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
2023-09-17 09:18:33 +00:00
|
|
|
if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_TXE, RESET, tickstart, Timeout) != HAL_OK)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a02: 683b ldr r3, [r7, #0]
|
|
|
|
8001a04: 9300 str r3, [sp, #0]
|
|
|
|
8001a06: 697b ldr r3, [r7, #20]
|
|
|
|
8001a08: 2200 movs r2, #0
|
|
|
|
8001a0a: 2180 movs r1, #128 ; 0x80
|
|
|
|
8001a0c: 68f8 ldr r0, [r7, #12]
|
|
|
|
8001a0e: f000 f8e2 bl 8001bd6 <UART_WaitOnFlagUntilTimeout>
|
|
|
|
8001a12: 4603 mov r3, r0
|
|
|
|
8001a14: 2b00 cmp r3, #0
|
|
|
|
8001a16: d001 beq.n 8001a1c <HAL_UART_Transmit+0xae>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a18: 2303 movs r3, #3
|
|
|
|
8001a1a: e036 b.n 8001a8a <HAL_UART_Transmit+0x11c>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
if (pdata8bits == NULL)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a1c: 69fb ldr r3, [r7, #28]
|
|
|
|
8001a1e: 2b00 cmp r3, #0
|
|
|
|
8001a20: d10b bne.n 8001a3a <HAL_UART_Transmit+0xcc>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
2023-09-17 09:18:33 +00:00
|
|
|
huart->Instance->DR = (uint16_t)(*pdata16bits & 0x01FFU);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a22: 69bb ldr r3, [r7, #24]
|
|
|
|
8001a24: 881b ldrh r3, [r3, #0]
|
|
|
|
8001a26: 461a mov r2, r3
|
|
|
|
8001a28: 68fb ldr r3, [r7, #12]
|
|
|
|
8001a2a: 681b ldr r3, [r3, #0]
|
|
|
|
8001a2c: f3c2 0208 ubfx r2, r2, #0, #9
|
|
|
|
8001a30: 605a str r2, [r3, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
pdata16bits++;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a32: 69bb ldr r3, [r7, #24]
|
|
|
|
8001a34: 3302 adds r3, #2
|
|
|
|
8001a36: 61bb str r3, [r7, #24]
|
|
|
|
8001a38: e007 b.n 8001a4a <HAL_UART_Transmit+0xdc>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2023-09-17 09:18:33 +00:00
|
|
|
huart->Instance->DR = (uint8_t)(*pdata8bits & 0xFFU);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a3a: 69fb ldr r3, [r7, #28]
|
|
|
|
8001a3c: 781a ldrb r2, [r3, #0]
|
|
|
|
8001a3e: 68fb ldr r3, [r7, #12]
|
|
|
|
8001a40: 681b ldr r3, [r3, #0]
|
|
|
|
8001a42: 605a str r2, [r3, #4]
|
2023-09-17 08:27:41 +00:00
|
|
|
pdata8bits++;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a44: 69fb ldr r3, [r7, #28]
|
|
|
|
8001a46: 3301 adds r3, #1
|
|
|
|
8001a48: 61fb str r3, [r7, #28]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 09:18:33 +00:00
|
|
|
huart->TxXferCount--;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a4a: 68fb ldr r3, [r7, #12]
|
|
|
|
8001a4c: 8cdb ldrh r3, [r3, #38] ; 0x26
|
|
|
|
8001a4e: b29b uxth r3, r3
|
|
|
|
8001a50: 3b01 subs r3, #1
|
|
|
|
8001a52: b29a uxth r2, r3
|
|
|
|
8001a54: 68fb ldr r3, [r7, #12]
|
|
|
|
8001a56: 84da strh r2, [r3, #38] ; 0x26
|
2023-09-17 09:18:33 +00:00
|
|
|
while (huart->TxXferCount > 0U)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a58: 68fb ldr r3, [r7, #12]
|
|
|
|
8001a5a: 8cdb ldrh r3, [r3, #38] ; 0x26
|
|
|
|
8001a5c: b29b uxth r3, r3
|
|
|
|
8001a5e: 2b00 cmp r3, #0
|
|
|
|
8001a60: d1cf bne.n 8001a02 <HAL_UART_Transmit+0x94>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
|
2023-09-17 09:18:33 +00:00
|
|
|
if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_TC, RESET, tickstart, Timeout) != HAL_OK)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a62: 683b ldr r3, [r7, #0]
|
|
|
|
8001a64: 9300 str r3, [sp, #0]
|
|
|
|
8001a66: 697b ldr r3, [r7, #20]
|
|
|
|
8001a68: 2200 movs r2, #0
|
|
|
|
8001a6a: 2140 movs r1, #64 ; 0x40
|
|
|
|
8001a6c: 68f8 ldr r0, [r7, #12]
|
|
|
|
8001a6e: f000 f8b2 bl 8001bd6 <UART_WaitOnFlagUntilTimeout>
|
|
|
|
8001a72: 4603 mov r3, r0
|
|
|
|
8001a74: 2b00 cmp r3, #0
|
|
|
|
8001a76: d001 beq.n 8001a7c <HAL_UART_Transmit+0x10e>
|
2023-09-17 09:18:33 +00:00
|
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a78: 2303 movs r3, #3
|
|
|
|
8001a7a: e006 b.n 8001a8a <HAL_UART_Transmit+0x11c>
|
2023-09-17 09:18:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* At end of Tx process, restore huart->gState to Ready */
|
|
|
|
huart->gState = HAL_UART_STATE_READY;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a7c: 68fb ldr r3, [r7, #12]
|
|
|
|
8001a7e: 2220 movs r2, #32
|
|
|
|
8001a80: f883 203d strb.w r2, [r3, #61] ; 0x3d
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
return HAL_OK;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a84: 2300 movs r3, #0
|
|
|
|
8001a86: e000 b.n 8001a8a <HAL_UART_Transmit+0x11c>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return HAL_BUSY;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a88: 2302 movs r3, #2
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a8a: 4618 mov r0, r3
|
|
|
|
8001a8c: 3720 adds r7, #32
|
|
|
|
8001a8e: 46bd mov sp, r7
|
|
|
|
8001a90: bd80 pop {r7, pc}
|
2023-09-17 08:27:41 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08001a92 <HAL_UART_Receive>:
|
2023-09-17 09:57:40 +00:00
|
|
|
* @param Size Amount of data elements (u8 or u16) to be received.
|
|
|
|
* @param Timeout Timeout duration
|
|
|
|
* @retval HAL status
|
|
|
|
*/
|
|
|
|
HAL_StatusTypeDef HAL_UART_Receive(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8001a92: b580 push {r7, lr}
|
|
|
|
8001a94: b08a sub sp, #40 ; 0x28
|
|
|
|
8001a96: af02 add r7, sp, #8
|
|
|
|
8001a98: 60f8 str r0, [r7, #12]
|
|
|
|
8001a9a: 60b9 str r1, [r7, #8]
|
|
|
|
8001a9c: 603b str r3, [r7, #0]
|
|
|
|
8001a9e: 4613 mov r3, r2
|
|
|
|
8001aa0: 80fb strh r3, [r7, #6]
|
2023-09-17 09:57:40 +00:00
|
|
|
uint8_t *pdata8bits;
|
|
|
|
uint16_t *pdata16bits;
|
|
|
|
uint32_t tickstart = 0U;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001aa2: 2300 movs r3, #0
|
|
|
|
8001aa4: 617b str r3, [r7, #20]
|
2023-09-17 09:57:40 +00:00
|
|
|
|
|
|
|
/* Check that a Rx process is not already ongoing */
|
|
|
|
if (huart->RxState == HAL_UART_STATE_READY)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001aa6: 68fb ldr r3, [r7, #12]
|
|
|
|
8001aa8: f893 303e ldrb.w r3, [r3, #62] ; 0x3e
|
|
|
|
8001aac: b2db uxtb r3, r3
|
|
|
|
8001aae: 2b20 cmp r3, #32
|
|
|
|
8001ab0: f040 808c bne.w 8001bcc <HAL_UART_Receive+0x13a>
|
2023-09-17 09:57:40 +00:00
|
|
|
{
|
|
|
|
if ((pData == NULL) || (Size == 0U))
|
2023-09-17 10:40:31 +00:00
|
|
|
8001ab4: 68bb ldr r3, [r7, #8]
|
|
|
|
8001ab6: 2b00 cmp r3, #0
|
|
|
|
8001ab8: d002 beq.n 8001ac0 <HAL_UART_Receive+0x2e>
|
|
|
|
8001aba: 88fb ldrh r3, [r7, #6]
|
|
|
|
8001abc: 2b00 cmp r3, #0
|
|
|
|
8001abe: d101 bne.n 8001ac4 <HAL_UART_Receive+0x32>
|
2023-09-17 09:57:40 +00:00
|
|
|
{
|
|
|
|
return HAL_ERROR;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001ac0: 2301 movs r3, #1
|
|
|
|
8001ac2: e084 b.n 8001bce <HAL_UART_Receive+0x13c>
|
2023-09-17 09:57:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Process Locked */
|
|
|
|
__HAL_LOCK(huart);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001ac4: 68fb ldr r3, [r7, #12]
|
|
|
|
8001ac6: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
|
|
|
|
8001aca: 2b01 cmp r3, #1
|
|
|
|
8001acc: d101 bne.n 8001ad2 <HAL_UART_Receive+0x40>
|
|
|
|
8001ace: 2302 movs r3, #2
|
|
|
|
8001ad0: e07d b.n 8001bce <HAL_UART_Receive+0x13c>
|
|
|
|
8001ad2: 68fb ldr r3, [r7, #12]
|
|
|
|
8001ad4: 2201 movs r2, #1
|
|
|
|
8001ad6: f883 203c strb.w r2, [r3, #60] ; 0x3c
|
2023-09-17 09:57:40 +00:00
|
|
|
|
|
|
|
huart->ErrorCode = HAL_UART_ERROR_NONE;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001ada: 68fb ldr r3, [r7, #12]
|
|
|
|
8001adc: 2200 movs r2, #0
|
|
|
|
8001ade: 641a str r2, [r3, #64] ; 0x40
|
2023-09-17 09:57:40 +00:00
|
|
|
huart->RxState = HAL_UART_STATE_BUSY_RX;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001ae0: 68fb ldr r3, [r7, #12]
|
|
|
|
8001ae2: 2222 movs r2, #34 ; 0x22
|
|
|
|
8001ae4: f883 203e strb.w r2, [r3, #62] ; 0x3e
|
2023-09-17 09:57:40 +00:00
|
|
|
huart->ReceptionType = HAL_UART_RECEPTION_STANDARD;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001ae8: 68fb ldr r3, [r7, #12]
|
|
|
|
8001aea: 2200 movs r2, #0
|
|
|
|
8001aec: 631a str r2, [r3, #48] ; 0x30
|
2023-09-17 09:57:40 +00:00
|
|
|
|
|
|
|
/* Init tickstart for timeout management */
|
|
|
|
tickstart = HAL_GetTick();
|
2023-09-17 10:40:31 +00:00
|
|
|
8001aee: f7fe ffb1 bl 8000a54 <HAL_GetTick>
|
|
|
|
8001af2: 6178 str r0, [r7, #20]
|
2023-09-17 09:57:40 +00:00
|
|
|
|
|
|
|
huart->RxXferSize = Size;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001af4: 68fb ldr r3, [r7, #12]
|
|
|
|
8001af6: 88fa ldrh r2, [r7, #6]
|
|
|
|
8001af8: 859a strh r2, [r3, #44] ; 0x2c
|
2023-09-17 09:57:40 +00:00
|
|
|
huart->RxXferCount = Size;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001afa: 68fb ldr r3, [r7, #12]
|
|
|
|
8001afc: 88fa ldrh r2, [r7, #6]
|
|
|
|
8001afe: 85da strh r2, [r3, #46] ; 0x2e
|
2023-09-17 09:57:40 +00:00
|
|
|
|
|
|
|
/* In case of 9bits/No Parity transfer, pRxData needs to be handled as a uint16_t pointer */
|
|
|
|
if ((huart->Init.WordLength == UART_WORDLENGTH_9B) && (huart->Init.Parity == UART_PARITY_NONE))
|
2023-09-17 10:40:31 +00:00
|
|
|
8001b00: 68fb ldr r3, [r7, #12]
|
|
|
|
8001b02: 689b ldr r3, [r3, #8]
|
|
|
|
8001b04: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
|
|
|
|
8001b08: d108 bne.n 8001b1c <HAL_UART_Receive+0x8a>
|
|
|
|
8001b0a: 68fb ldr r3, [r7, #12]
|
|
|
|
8001b0c: 691b ldr r3, [r3, #16]
|
|
|
|
8001b0e: 2b00 cmp r3, #0
|
|
|
|
8001b10: d104 bne.n 8001b1c <HAL_UART_Receive+0x8a>
|
2023-09-17 09:57:40 +00:00
|
|
|
{
|
|
|
|
pdata8bits = NULL;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001b12: 2300 movs r3, #0
|
|
|
|
8001b14: 61fb str r3, [r7, #28]
|
2023-09-17 09:57:40 +00:00
|
|
|
pdata16bits = (uint16_t *) pData;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001b16: 68bb ldr r3, [r7, #8]
|
|
|
|
8001b18: 61bb str r3, [r7, #24]
|
|
|
|
8001b1a: e003 b.n 8001b24 <HAL_UART_Receive+0x92>
|
2023-09-17 09:57:40 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pdata8bits = pData;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001b1c: 68bb ldr r3, [r7, #8]
|
|
|
|
8001b1e: 61fb str r3, [r7, #28]
|
2023-09-17 09:57:40 +00:00
|
|
|
pdata16bits = NULL;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001b20: 2300 movs r3, #0
|
|
|
|
8001b22: 61bb str r3, [r7, #24]
|
2023-09-17 09:57:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Process Unlocked */
|
|
|
|
__HAL_UNLOCK(huart);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001b24: 68fb ldr r3, [r7, #12]
|
|
|
|
8001b26: 2200 movs r2, #0
|
|
|
|
8001b28: f883 203c strb.w r2, [r3, #60] ; 0x3c
|
2023-09-17 09:57:40 +00:00
|
|
|
|
|
|
|
/* Check the remain data to be received */
|
|
|
|
while (huart->RxXferCount > 0U)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001b2c: e043 b.n 8001bb6 <HAL_UART_Receive+0x124>
|
2023-09-17 09:57:40 +00:00
|
|
|
{
|
|
|
|
if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_RXNE, RESET, tickstart, Timeout) != HAL_OK)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001b2e: 683b ldr r3, [r7, #0]
|
|
|
|
8001b30: 9300 str r3, [sp, #0]
|
|
|
|
8001b32: 697b ldr r3, [r7, #20]
|
|
|
|
8001b34: 2200 movs r2, #0
|
|
|
|
8001b36: 2120 movs r1, #32
|
|
|
|
8001b38: 68f8 ldr r0, [r7, #12]
|
|
|
|
8001b3a: f000 f84c bl 8001bd6 <UART_WaitOnFlagUntilTimeout>
|
|
|
|
8001b3e: 4603 mov r3, r0
|
|
|
|
8001b40: 2b00 cmp r3, #0
|
|
|
|
8001b42: d001 beq.n 8001b48 <HAL_UART_Receive+0xb6>
|
2023-09-17 09:57:40 +00:00
|
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001b44: 2303 movs r3, #3
|
|
|
|
8001b46: e042 b.n 8001bce <HAL_UART_Receive+0x13c>
|
2023-09-17 09:57:40 +00:00
|
|
|
}
|
|
|
|
if (pdata8bits == NULL)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001b48: 69fb ldr r3, [r7, #28]
|
|
|
|
8001b4a: 2b00 cmp r3, #0
|
|
|
|
8001b4c: d10c bne.n 8001b68 <HAL_UART_Receive+0xd6>
|
2023-09-17 09:57:40 +00:00
|
|
|
{
|
|
|
|
*pdata16bits = (uint16_t)(huart->Instance->DR & 0x01FF);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001b4e: 68fb ldr r3, [r7, #12]
|
|
|
|
8001b50: 681b ldr r3, [r3, #0]
|
|
|
|
8001b52: 685b ldr r3, [r3, #4]
|
|
|
|
8001b54: b29b uxth r3, r3
|
|
|
|
8001b56: f3c3 0308 ubfx r3, r3, #0, #9
|
|
|
|
8001b5a: b29a uxth r2, r3
|
|
|
|
8001b5c: 69bb ldr r3, [r7, #24]
|
|
|
|
8001b5e: 801a strh r2, [r3, #0]
|
2023-09-17 09:57:40 +00:00
|
|
|
pdata16bits++;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001b60: 69bb ldr r3, [r7, #24]
|
|
|
|
8001b62: 3302 adds r3, #2
|
|
|
|
8001b64: 61bb str r3, [r7, #24]
|
|
|
|
8001b66: e01f b.n 8001ba8 <HAL_UART_Receive+0x116>
|
2023-09-17 09:57:40 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ((huart->Init.WordLength == UART_WORDLENGTH_9B) || ((huart->Init.WordLength == UART_WORDLENGTH_8B) && (huart->Init.Parity == UART_PARITY_NONE)))
|
2023-09-17 10:40:31 +00:00
|
|
|
8001b68: 68fb ldr r3, [r7, #12]
|
|
|
|
8001b6a: 689b ldr r3, [r3, #8]
|
|
|
|
8001b6c: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
|
|
|
|
8001b70: d007 beq.n 8001b82 <HAL_UART_Receive+0xf0>
|
|
|
|
8001b72: 68fb ldr r3, [r7, #12]
|
|
|
|
8001b74: 689b ldr r3, [r3, #8]
|
|
|
|
8001b76: 2b00 cmp r3, #0
|
|
|
|
8001b78: d10a bne.n 8001b90 <HAL_UART_Receive+0xfe>
|
|
|
|
8001b7a: 68fb ldr r3, [r7, #12]
|
|
|
|
8001b7c: 691b ldr r3, [r3, #16]
|
|
|
|
8001b7e: 2b00 cmp r3, #0
|
|
|
|
8001b80: d106 bne.n 8001b90 <HAL_UART_Receive+0xfe>
|
2023-09-17 09:57:40 +00:00
|
|
|
{
|
|
|
|
*pdata8bits = (uint8_t)(huart->Instance->DR & (uint8_t)0x00FF);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001b82: 68fb ldr r3, [r7, #12]
|
|
|
|
8001b84: 681b ldr r3, [r3, #0]
|
|
|
|
8001b86: 685b ldr r3, [r3, #4]
|
|
|
|
8001b88: b2da uxtb r2, r3
|
|
|
|
8001b8a: 69fb ldr r3, [r7, #28]
|
|
|
|
8001b8c: 701a strb r2, [r3, #0]
|
|
|
|
8001b8e: e008 b.n 8001ba2 <HAL_UART_Receive+0x110>
|
2023-09-17 09:57:40 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
*pdata8bits = (uint8_t)(huart->Instance->DR & (uint8_t)0x007F);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001b90: 68fb ldr r3, [r7, #12]
|
|
|
|
8001b92: 681b ldr r3, [r3, #0]
|
|
|
|
8001b94: 685b ldr r3, [r3, #4]
|
|
|
|
8001b96: b2db uxtb r3, r3
|
|
|
|
8001b98: f003 037f and.w r3, r3, #127 ; 0x7f
|
|
|
|
8001b9c: b2da uxtb r2, r3
|
|
|
|
8001b9e: 69fb ldr r3, [r7, #28]
|
|
|
|
8001ba0: 701a strb r2, [r3, #0]
|
2023-09-17 09:57:40 +00:00
|
|
|
}
|
|
|
|
pdata8bits++;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001ba2: 69fb ldr r3, [r7, #28]
|
|
|
|
8001ba4: 3301 adds r3, #1
|
|
|
|
8001ba6: 61fb str r3, [r7, #28]
|
2023-09-17 09:57:40 +00:00
|
|
|
}
|
|
|
|
huart->RxXferCount--;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001ba8: 68fb ldr r3, [r7, #12]
|
|
|
|
8001baa: 8ddb ldrh r3, [r3, #46] ; 0x2e
|
|
|
|
8001bac: b29b uxth r3, r3
|
|
|
|
8001bae: 3b01 subs r3, #1
|
|
|
|
8001bb0: b29a uxth r2, r3
|
|
|
|
8001bb2: 68fb ldr r3, [r7, #12]
|
|
|
|
8001bb4: 85da strh r2, [r3, #46] ; 0x2e
|
2023-09-17 09:57:40 +00:00
|
|
|
while (huart->RxXferCount > 0U)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001bb6: 68fb ldr r3, [r7, #12]
|
|
|
|
8001bb8: 8ddb ldrh r3, [r3, #46] ; 0x2e
|
|
|
|
8001bba: b29b uxth r3, r3
|
|
|
|
8001bbc: 2b00 cmp r3, #0
|
|
|
|
8001bbe: d1b6 bne.n 8001b2e <HAL_UART_Receive+0x9c>
|
2023-09-17 09:57:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* At end of Rx process, restore huart->RxState to Ready */
|
|
|
|
huart->RxState = HAL_UART_STATE_READY;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001bc0: 68fb ldr r3, [r7, #12]
|
|
|
|
8001bc2: 2220 movs r2, #32
|
|
|
|
8001bc4: f883 203e strb.w r2, [r3, #62] ; 0x3e
|
2023-09-17 09:57:40 +00:00
|
|
|
|
|
|
|
return HAL_OK;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001bc8: 2300 movs r3, #0
|
|
|
|
8001bca: e000 b.n 8001bce <HAL_UART_Receive+0x13c>
|
2023-09-17 09:57:40 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return HAL_BUSY;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001bcc: 2302 movs r3, #2
|
2023-09-17 09:57:40 +00:00
|
|
|
}
|
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8001bce: 4618 mov r0, r3
|
|
|
|
8001bd0: 3720 adds r7, #32
|
|
|
|
8001bd2: 46bd mov sp, r7
|
|
|
|
8001bd4: bd80 pop {r7, pc}
|
2023-09-17 09:57:40 +00:00
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08001bd6 <UART_WaitOnFlagUntilTimeout>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* @param Timeout Timeout duration
|
|
|
|
* @retval HAL status
|
|
|
|
*/
|
|
|
|
static HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout(UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status,
|
|
|
|
uint32_t Tickstart, uint32_t Timeout)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8001bd6: b580 push {r7, lr}
|
|
|
|
8001bd8: b090 sub sp, #64 ; 0x40
|
|
|
|
8001bda: af00 add r7, sp, #0
|
|
|
|
8001bdc: 60f8 str r0, [r7, #12]
|
|
|
|
8001bde: 60b9 str r1, [r7, #8]
|
|
|
|
8001be0: 603b str r3, [r7, #0]
|
|
|
|
8001be2: 4613 mov r3, r2
|
|
|
|
8001be4: 71fb strb r3, [r7, #7]
|
2023-09-17 08:27:41 +00:00
|
|
|
/* Wait until flag is set */
|
|
|
|
while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001be6: e050 b.n 8001c8a <UART_WaitOnFlagUntilTimeout+0xb4>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Check for the Timeout */
|
|
|
|
if (Timeout != HAL_MAX_DELAY)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001be8: 6cbb ldr r3, [r7, #72] ; 0x48
|
|
|
|
8001bea: f1b3 3fff cmp.w r3, #4294967295
|
|
|
|
8001bee: d04c beq.n 8001c8a <UART_WaitOnFlagUntilTimeout+0xb4>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
if ((Timeout == 0U) || ((HAL_GetTick() - Tickstart) > Timeout))
|
2023-09-17 10:40:31 +00:00
|
|
|
8001bf0: 6cbb ldr r3, [r7, #72] ; 0x48
|
|
|
|
8001bf2: 2b00 cmp r3, #0
|
|
|
|
8001bf4: d007 beq.n 8001c06 <UART_WaitOnFlagUntilTimeout+0x30>
|
|
|
|
8001bf6: f7fe ff2d bl 8000a54 <HAL_GetTick>
|
|
|
|
8001bfa: 4602 mov r2, r0
|
|
|
|
8001bfc: 683b ldr r3, [r7, #0]
|
|
|
|
8001bfe: 1ad3 subs r3, r2, r3
|
|
|
|
8001c00: 6cba ldr r2, [r7, #72] ; 0x48
|
|
|
|
8001c02: 429a cmp r2, r3
|
|
|
|
8001c04: d241 bcs.n 8001c8a <UART_WaitOnFlagUntilTimeout+0xb4>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
/* Disable TXE, RXNE, PE and ERR (Frame error, noise error, overrun error) interrupts for the interrupt process */
|
|
|
|
ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE | USART_CR1_TXEIE));
|
2023-09-17 10:40:31 +00:00
|
|
|
8001c06: 68fb ldr r3, [r7, #12]
|
|
|
|
8001c08: 681b ldr r3, [r3, #0]
|
|
|
|
8001c0a: 330c adds r3, #12
|
|
|
|
8001c0c: 62bb str r3, [r7, #40] ; 0x28
|
2023-09-17 08:27:41 +00:00
|
|
|
*/
|
|
|
|
__STATIC_FORCEINLINE uint32_t __LDREXW(volatile uint32_t *addr)
|
|
|
|
{
|
|
|
|
uint32_t result;
|
|
|
|
|
|
|
|
__ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) );
|
2023-09-17 10:40:31 +00:00
|
|
|
8001c0e: 6abb ldr r3, [r7, #40] ; 0x28
|
|
|
|
8001c10: e853 3f00 ldrex r3, [r3]
|
|
|
|
8001c14: 627b str r3, [r7, #36] ; 0x24
|
2023-09-17 08:27:41 +00:00
|
|
|
return(result);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001c16: 6a7b ldr r3, [r7, #36] ; 0x24
|
|
|
|
8001c18: f423 73d0 bic.w r3, r3, #416 ; 0x1a0
|
|
|
|
8001c1c: 63fb str r3, [r7, #60] ; 0x3c
|
|
|
|
8001c1e: 68fb ldr r3, [r7, #12]
|
|
|
|
8001c20: 681b ldr r3, [r3, #0]
|
|
|
|
8001c22: 330c adds r3, #12
|
|
|
|
8001c24: 6bfa ldr r2, [r7, #60] ; 0x3c
|
|
|
|
8001c26: 637a str r2, [r7, #52] ; 0x34
|
|
|
|
8001c28: 633b str r3, [r7, #48] ; 0x30
|
2023-09-17 08:27:41 +00:00
|
|
|
*/
|
|
|
|
__STATIC_FORCEINLINE uint32_t __STREXW(uint32_t value, volatile uint32_t *addr)
|
|
|
|
{
|
|
|
|
uint32_t result;
|
|
|
|
|
|
|
|
__ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) );
|
2023-09-17 10:40:31 +00:00
|
|
|
8001c2a: 6b39 ldr r1, [r7, #48] ; 0x30
|
|
|
|
8001c2c: 6b7a ldr r2, [r7, #52] ; 0x34
|
|
|
|
8001c2e: e841 2300 strex r3, r2, [r1]
|
|
|
|
8001c32: 62fb str r3, [r7, #44] ; 0x2c
|
2023-09-17 08:27:41 +00:00
|
|
|
return(result);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001c34: 6afb ldr r3, [r7, #44] ; 0x2c
|
|
|
|
8001c36: 2b00 cmp r3, #0
|
|
|
|
8001c38: d1e5 bne.n 8001c06 <UART_WaitOnFlagUntilTimeout+0x30>
|
2023-09-17 08:27:41 +00:00
|
|
|
ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001c3a: 68fb ldr r3, [r7, #12]
|
|
|
|
8001c3c: 681b ldr r3, [r3, #0]
|
|
|
|
8001c3e: 3314 adds r3, #20
|
|
|
|
8001c40: 617b str r3, [r7, #20]
|
2023-09-17 08:27:41 +00:00
|
|
|
__ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) );
|
2023-09-17 10:40:31 +00:00
|
|
|
8001c42: 697b ldr r3, [r7, #20]
|
|
|
|
8001c44: e853 3f00 ldrex r3, [r3]
|
|
|
|
8001c48: 613b str r3, [r7, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
return(result);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001c4a: 693b ldr r3, [r7, #16]
|
|
|
|
8001c4c: f023 0301 bic.w r3, r3, #1
|
|
|
|
8001c50: 63bb str r3, [r7, #56] ; 0x38
|
|
|
|
8001c52: 68fb ldr r3, [r7, #12]
|
|
|
|
8001c54: 681b ldr r3, [r3, #0]
|
|
|
|
8001c56: 3314 adds r3, #20
|
|
|
|
8001c58: 6bba ldr r2, [r7, #56] ; 0x38
|
|
|
|
8001c5a: 623a str r2, [r7, #32]
|
|
|
|
8001c5c: 61fb str r3, [r7, #28]
|
2023-09-17 08:27:41 +00:00
|
|
|
__ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) );
|
2023-09-17 10:40:31 +00:00
|
|
|
8001c5e: 69f9 ldr r1, [r7, #28]
|
|
|
|
8001c60: 6a3a ldr r2, [r7, #32]
|
|
|
|
8001c62: e841 2300 strex r3, r2, [r1]
|
|
|
|
8001c66: 61bb str r3, [r7, #24]
|
2023-09-17 08:27:41 +00:00
|
|
|
return(result);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001c68: 69bb ldr r3, [r7, #24]
|
|
|
|
8001c6a: 2b00 cmp r3, #0
|
|
|
|
8001c6c: d1e5 bne.n 8001c3a <UART_WaitOnFlagUntilTimeout+0x64>
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
huart->gState = HAL_UART_STATE_READY;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001c6e: 68fb ldr r3, [r7, #12]
|
|
|
|
8001c70: 2220 movs r2, #32
|
|
|
|
8001c72: f883 203d strb.w r2, [r3, #61] ; 0x3d
|
2023-09-17 08:27:41 +00:00
|
|
|
huart->RxState = HAL_UART_STATE_READY;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001c76: 68fb ldr r3, [r7, #12]
|
|
|
|
8001c78: 2220 movs r2, #32
|
|
|
|
8001c7a: f883 203e strb.w r2, [r3, #62] ; 0x3e
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
/* Process Unlocked */
|
|
|
|
__HAL_UNLOCK(huart);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001c7e: 68fb ldr r3, [r7, #12]
|
|
|
|
8001c80: 2200 movs r2, #0
|
|
|
|
8001c82: f883 203c strb.w r2, [r3, #60] ; 0x3c
|
2023-09-17 08:27:41 +00:00
|
|
|
|
|
|
|
return HAL_TIMEOUT;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001c86: 2303 movs r3, #3
|
|
|
|
8001c88: e00f b.n 8001caa <UART_WaitOnFlagUntilTimeout+0xd4>
|
2023-09-17 08:27:41 +00:00
|
|
|
while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001c8a: 68fb ldr r3, [r7, #12]
|
|
|
|
8001c8c: 681b ldr r3, [r3, #0]
|
|
|
|
8001c8e: 681a ldr r2, [r3, #0]
|
|
|
|
8001c90: 68bb ldr r3, [r7, #8]
|
|
|
|
8001c92: 4013 ands r3, r2
|
|
|
|
8001c94: 68ba ldr r2, [r7, #8]
|
|
|
|
8001c96: 429a cmp r2, r3
|
|
|
|
8001c98: bf0c ite eq
|
|
|
|
8001c9a: 2301 moveq r3, #1
|
|
|
|
8001c9c: 2300 movne r3, #0
|
|
|
|
8001c9e: b2db uxtb r3, r3
|
|
|
|
8001ca0: 461a mov r2, r3
|
|
|
|
8001ca2: 79fb ldrb r3, [r7, #7]
|
|
|
|
8001ca4: 429a cmp r2, r3
|
|
|
|
8001ca6: d09f beq.n 8001be8 <UART_WaitOnFlagUntilTimeout+0x12>
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return HAL_OK;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001ca8: 2300 movs r3, #0
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8001caa: 4618 mov r0, r3
|
|
|
|
8001cac: 3740 adds r7, #64 ; 0x40
|
|
|
|
8001cae: 46bd mov sp, r7
|
|
|
|
8001cb0: bd80 pop {r7, pc}
|
2023-09-17 08:27:41 +00:00
|
|
|
...
|
|
|
|
|
2023-09-17 10:40:31 +00:00
|
|
|
08001cb4 <UART_SetConfig>:
|
2023-09-17 08:27:41 +00:00
|
|
|
* @param huart Pointer to a UART_HandleTypeDef structure that contains
|
|
|
|
* the configuration information for the specified UART module.
|
|
|
|
* @retval None
|
|
|
|
*/
|
|
|
|
static void UART_SetConfig(UART_HandleTypeDef *huart)
|
|
|
|
{
|
2023-09-17 10:40:31 +00:00
|
|
|
8001cb4: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr}
|
|
|
|
8001cb8: b0c0 sub sp, #256 ; 0x100
|
|
|
|
8001cba: af00 add r7, sp, #0
|
|
|
|
8001cbc: f8c7 00f4 str.w r0, [r7, #244] ; 0xf4
|
2023-09-17 08:27:41 +00:00
|
|
|
assert_param(IS_UART_MODE(huart->Init.Mode));
|
|
|
|
|
|
|
|
/*-------------------------- USART CR2 Configuration -----------------------*/
|
|
|
|
/* Configure the UART Stop Bits: Set STOP[13:12] bits
|
|
|
|
according to huart->Init.StopBits value */
|
|
|
|
MODIFY_REG(huart->Instance->CR2, USART_CR2_STOP, huart->Init.StopBits);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001cc0: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001cc4: 681b ldr r3, [r3, #0]
|
|
|
|
8001cc6: 691b ldr r3, [r3, #16]
|
|
|
|
8001cc8: f423 5040 bic.w r0, r3, #12288 ; 0x3000
|
|
|
|
8001ccc: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001cd0: 68d9 ldr r1, [r3, #12]
|
|
|
|
8001cd2: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001cd6: 681a ldr r2, [r3, #0]
|
|
|
|
8001cd8: ea40 0301 orr.w r3, r0, r1
|
|
|
|
8001cdc: 6113 str r3, [r2, #16]
|
2023-09-17 08:27:41 +00:00
|
|
|
Set the M bits according to huart->Init.WordLength value
|
|
|
|
Set PCE and PS bits according to huart->Init.Parity value
|
|
|
|
Set TE and RE bits according to huart->Init.Mode value
|
|
|
|
Set OVER8 bit according to huart->Init.OverSampling value */
|
|
|
|
|
|
|
|
tmpreg = (uint32_t)huart->Init.WordLength | huart->Init.Parity | huart->Init.Mode | huart->Init.OverSampling;
|
2023-09-17 10:40:31 +00:00
|
|
|
8001cde: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001ce2: 689a ldr r2, [r3, #8]
|
|
|
|
8001ce4: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001ce8: 691b ldr r3, [r3, #16]
|
|
|
|
8001cea: 431a orrs r2, r3
|
|
|
|
8001cec: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001cf0: 695b ldr r3, [r3, #20]
|
|
|
|
8001cf2: 431a orrs r2, r3
|
|
|
|
8001cf4: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001cf8: 69db ldr r3, [r3, #28]
|
|
|
|
8001cfa: 4313 orrs r3, r2
|
|
|
|
8001cfc: f8c7 30f8 str.w r3, [r7, #248] ; 0xf8
|
2023-09-17 08:27:41 +00:00
|
|
|
MODIFY_REG(huart->Instance->CR1,
|
2023-09-17 10:40:31 +00:00
|
|
|
8001d00: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001d04: 681b ldr r3, [r3, #0]
|
|
|
|
8001d06: 68db ldr r3, [r3, #12]
|
|
|
|
8001d08: f423 4116 bic.w r1, r3, #38400 ; 0x9600
|
|
|
|
8001d0c: f021 010c bic.w r1, r1, #12
|
|
|
|
8001d10: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001d14: 681a ldr r2, [r3, #0]
|
|
|
|
8001d16: f8d7 30f8 ldr.w r3, [r7, #248] ; 0xf8
|
|
|
|
8001d1a: 430b orrs r3, r1
|
|
|
|
8001d1c: 60d3 str r3, [r2, #12]
|
2023-09-17 08:27:41 +00:00
|
|
|
(uint32_t)(USART_CR1_M | USART_CR1_PCE | USART_CR1_PS | USART_CR1_TE | USART_CR1_RE | USART_CR1_OVER8),
|
|
|
|
tmpreg);
|
|
|
|
|
|
|
|
/*-------------------------- USART CR3 Configuration -----------------------*/
|
|
|
|
/* Configure the UART HFC: Set CTSE and RTSE bits according to huart->Init.HwFlowCtl value */
|
|
|
|
MODIFY_REG(huart->Instance->CR3, (USART_CR3_RTSE | USART_CR3_CTSE), huart->Init.HwFlowCtl);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001d1e: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001d22: 681b ldr r3, [r3, #0]
|
|
|
|
8001d24: 695b ldr r3, [r3, #20]
|
|
|
|
8001d26: f423 7040 bic.w r0, r3, #768 ; 0x300
|
|
|
|
8001d2a: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001d2e: 6999 ldr r1, [r3, #24]
|
|
|
|
8001d30: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001d34: 681a ldr r2, [r3, #0]
|
|
|
|
8001d36: ea40 0301 orr.w r3, r0, r1
|
|
|
|
8001d3a: 6153 str r3, [r2, #20]
|
2023-09-17 08:27:41 +00:00
|
|
|
if ((huart->Instance == USART1) || (huart->Instance == USART6) || (huart->Instance == UART9) || (huart->Instance == UART10))
|
|
|
|
{
|
|
|
|
pclk = HAL_RCC_GetPCLK2Freq();
|
|
|
|
}
|
|
|
|
#elif defined(USART6)
|
|
|
|
if ((huart->Instance == USART1) || (huart->Instance == USART6))
|
2023-09-17 10:40:31 +00:00
|
|
|
8001d3c: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001d40: 681a ldr r2, [r3, #0]
|
|
|
|
8001d42: 4b8f ldr r3, [pc, #572] ; (8001f80 <UART_SetConfig+0x2cc>)
|
|
|
|
8001d44: 429a cmp r2, r3
|
|
|
|
8001d46: d005 beq.n 8001d54 <UART_SetConfig+0xa0>
|
|
|
|
8001d48: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001d4c: 681a ldr r2, [r3, #0]
|
|
|
|
8001d4e: 4b8d ldr r3, [pc, #564] ; (8001f84 <UART_SetConfig+0x2d0>)
|
|
|
|
8001d50: 429a cmp r2, r3
|
|
|
|
8001d52: d104 bne.n 8001d5e <UART_SetConfig+0xaa>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
pclk = HAL_RCC_GetPCLK2Freq();
|
2023-09-17 10:40:31 +00:00
|
|
|
8001d54: f7ff fdaa bl 80018ac <HAL_RCC_GetPCLK2Freq>
|
|
|
|
8001d58: f8c7 00fc str.w r0, [r7, #252] ; 0xfc
|
|
|
|
8001d5c: e003 b.n 8001d66 <UART_SetConfig+0xb2>
|
2023-09-17 08:27:41 +00:00
|
|
|
pclk = HAL_RCC_GetPCLK2Freq();
|
|
|
|
}
|
|
|
|
#endif /* USART6 */
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pclk = HAL_RCC_GetPCLK1Freq();
|
2023-09-17 10:40:31 +00:00
|
|
|
8001d5e: f7ff fd91 bl 8001884 <HAL_RCC_GetPCLK1Freq>
|
|
|
|
8001d62: f8c7 00fc str.w r0, [r7, #252] ; 0xfc
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
/*-------------------------- USART BRR Configuration ---------------------*/
|
|
|
|
if (huart->Init.OverSampling == UART_OVERSAMPLING_8)
|
2023-09-17 10:40:31 +00:00
|
|
|
8001d66: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001d6a: 69db ldr r3, [r3, #28]
|
|
|
|
8001d6c: f5b3 4f00 cmp.w r3, #32768 ; 0x8000
|
|
|
|
8001d70: f040 810c bne.w 8001f8c <UART_SetConfig+0x2d8>
|
2023-09-17 08:27:41 +00:00
|
|
|
{
|
|
|
|
huart->Instance->BRR = UART_BRR_SAMPLING8(pclk, huart->Init.BaudRate);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001d74: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc
|
|
|
|
8001d78: 2200 movs r2, #0
|
|
|
|
8001d7a: f8c7 30e8 str.w r3, [r7, #232] ; 0xe8
|
|
|
|
8001d7e: f8c7 20ec str.w r2, [r7, #236] ; 0xec
|
|
|
|
8001d82: e9d7 453a ldrd r4, r5, [r7, #232] ; 0xe8
|
|
|
|
8001d86: 4622 mov r2, r4
|
|
|
|
8001d88: 462b mov r3, r5
|
|
|
|
8001d8a: 1891 adds r1, r2, r2
|
|
|
|
8001d8c: 65b9 str r1, [r7, #88] ; 0x58
|
|
|
|
8001d8e: 415b adcs r3, r3
|
|
|
|
8001d90: 65fb str r3, [r7, #92] ; 0x5c
|
|
|
|
8001d92: e9d7 2316 ldrd r2, r3, [r7, #88] ; 0x58
|
|
|
|
8001d96: 4621 mov r1, r4
|
|
|
|
8001d98: eb12 0801 adds.w r8, r2, r1
|
|
|
|
8001d9c: 4629 mov r1, r5
|
|
|
|
8001d9e: eb43 0901 adc.w r9, r3, r1
|
|
|
|
8001da2: f04f 0200 mov.w r2, #0
|
|
|
|
8001da6: f04f 0300 mov.w r3, #0
|
|
|
|
8001daa: ea4f 03c9 mov.w r3, r9, lsl #3
|
|
|
|
8001dae: ea43 7358 orr.w r3, r3, r8, lsr #29
|
|
|
|
8001db2: ea4f 02c8 mov.w r2, r8, lsl #3
|
|
|
|
8001db6: 4690 mov r8, r2
|
|
|
|
8001db8: 4699 mov r9, r3
|
|
|
|
8001dba: 4623 mov r3, r4
|
|
|
|
8001dbc: eb18 0303 adds.w r3, r8, r3
|
|
|
|
8001dc0: f8c7 30e0 str.w r3, [r7, #224] ; 0xe0
|
|
|
|
8001dc4: 462b mov r3, r5
|
|
|
|
8001dc6: eb49 0303 adc.w r3, r9, r3
|
|
|
|
8001dca: f8c7 30e4 str.w r3, [r7, #228] ; 0xe4
|
|
|
|
8001dce: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001dd2: 685b ldr r3, [r3, #4]
|
|
|
|
8001dd4: 2200 movs r2, #0
|
|
|
|
8001dd6: f8c7 30d8 str.w r3, [r7, #216] ; 0xd8
|
|
|
|
8001dda: f8c7 20dc str.w r2, [r7, #220] ; 0xdc
|
|
|
|
8001dde: e9d7 1236 ldrd r1, r2, [r7, #216] ; 0xd8
|
|
|
|
8001de2: 460b mov r3, r1
|
|
|
|
8001de4: 18db adds r3, r3, r3
|
|
|
|
8001de6: 653b str r3, [r7, #80] ; 0x50
|
|
|
|
8001de8: 4613 mov r3, r2
|
|
|
|
8001dea: eb42 0303 adc.w r3, r2, r3
|
|
|
|
8001dee: 657b str r3, [r7, #84] ; 0x54
|
|
|
|
8001df0: e9d7 2314 ldrd r2, r3, [r7, #80] ; 0x50
|
|
|
|
8001df4: e9d7 0138 ldrd r0, r1, [r7, #224] ; 0xe0
|
|
|
|
8001df8: f7fe f9ee bl 80001d8 <__aeabi_uldivmod>
|
|
|
|
8001dfc: 4602 mov r2, r0
|
|
|
|
8001dfe: 460b mov r3, r1
|
|
|
|
8001e00: 4b61 ldr r3, [pc, #388] ; (8001f88 <UART_SetConfig+0x2d4>)
|
|
|
|
8001e02: fba3 2302 umull r2, r3, r3, r2
|
|
|
|
8001e06: 095b lsrs r3, r3, #5
|
|
|
|
8001e08: 011c lsls r4, r3, #4
|
|
|
|
8001e0a: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc
|
|
|
|
8001e0e: 2200 movs r2, #0
|
|
|
|
8001e10: f8c7 30d0 str.w r3, [r7, #208] ; 0xd0
|
|
|
|
8001e14: f8c7 20d4 str.w r2, [r7, #212] ; 0xd4
|
|
|
|
8001e18: e9d7 8934 ldrd r8, r9, [r7, #208] ; 0xd0
|
|
|
|
8001e1c: 4642 mov r2, r8
|
|
|
|
8001e1e: 464b mov r3, r9
|
|
|
|
8001e20: 1891 adds r1, r2, r2
|
|
|
|
8001e22: 64b9 str r1, [r7, #72] ; 0x48
|
|
|
|
8001e24: 415b adcs r3, r3
|
|
|
|
8001e26: 64fb str r3, [r7, #76] ; 0x4c
|
|
|
|
8001e28: e9d7 2312 ldrd r2, r3, [r7, #72] ; 0x48
|
|
|
|
8001e2c: 4641 mov r1, r8
|
|
|
|
8001e2e: eb12 0a01 adds.w sl, r2, r1
|
|
|
|
8001e32: 4649 mov r1, r9
|
|
|
|
8001e34: eb43 0b01 adc.w fp, r3, r1
|
|
|
|
8001e38: f04f 0200 mov.w r2, #0
|
|
|
|
8001e3c: f04f 0300 mov.w r3, #0
|
|
|
|
8001e40: ea4f 03cb mov.w r3, fp, lsl #3
|
|
|
|
8001e44: ea43 735a orr.w r3, r3, sl, lsr #29
|
|
|
|
8001e48: ea4f 02ca mov.w r2, sl, lsl #3
|
|
|
|
8001e4c: 4692 mov sl, r2
|
|
|
|
8001e4e: 469b mov fp, r3
|
|
|
|
8001e50: 4643 mov r3, r8
|
|
|
|
8001e52: eb1a 0303 adds.w r3, sl, r3
|
|
|
|
8001e56: f8c7 30c8 str.w r3, [r7, #200] ; 0xc8
|
|
|
|
8001e5a: 464b mov r3, r9
|
|
|
|
8001e5c: eb4b 0303 adc.w r3, fp, r3
|
|
|
|
8001e60: f8c7 30cc str.w r3, [r7, #204] ; 0xcc
|
|
|
|
8001e64: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001e68: 685b ldr r3, [r3, #4]
|
|
|
|
8001e6a: 2200 movs r2, #0
|
|
|
|
8001e6c: f8c7 30c0 str.w r3, [r7, #192] ; 0xc0
|
|
|
|
8001e70: f8c7 20c4 str.w r2, [r7, #196] ; 0xc4
|
|
|
|
8001e74: e9d7 1230 ldrd r1, r2, [r7, #192] ; 0xc0
|
|
|
|
8001e78: 460b mov r3, r1
|
|
|
|
8001e7a: 18db adds r3, r3, r3
|
|
|
|
8001e7c: 643b str r3, [r7, #64] ; 0x40
|
|
|
|
8001e7e: 4613 mov r3, r2
|
|
|
|
8001e80: eb42 0303 adc.w r3, r2, r3
|
|
|
|
8001e84: 647b str r3, [r7, #68] ; 0x44
|
|
|
|
8001e86: e9d7 2310 ldrd r2, r3, [r7, #64] ; 0x40
|
|
|
|
8001e8a: e9d7 0132 ldrd r0, r1, [r7, #200] ; 0xc8
|
|
|
|
8001e8e: f7fe f9a3 bl 80001d8 <__aeabi_uldivmod>
|
|
|
|
8001e92: 4602 mov r2, r0
|
|
|
|
8001e94: 460b mov r3, r1
|
|
|
|
8001e96: 4611 mov r1, r2
|
|
|
|
8001e98: 4b3b ldr r3, [pc, #236] ; (8001f88 <UART_SetConfig+0x2d4>)
|
|
|
|
8001e9a: fba3 2301 umull r2, r3, r3, r1
|
|
|
|
8001e9e: 095b lsrs r3, r3, #5
|
|
|
|
8001ea0: 2264 movs r2, #100 ; 0x64
|
|
|
|
8001ea2: fb02 f303 mul.w r3, r2, r3
|
|
|
|
8001ea6: 1acb subs r3, r1, r3
|
|
|
|
8001ea8: 00db lsls r3, r3, #3
|
|
|
|
8001eaa: f103 0232 add.w r2, r3, #50 ; 0x32
|
|
|
|
8001eae: 4b36 ldr r3, [pc, #216] ; (8001f88 <UART_SetConfig+0x2d4>)
|
|
|
|
8001eb0: fba3 2302 umull r2, r3, r3, r2
|
|
|
|
8001eb4: 095b lsrs r3, r3, #5
|
|
|
|
8001eb6: 005b lsls r3, r3, #1
|
|
|
|
8001eb8: f403 73f8 and.w r3, r3, #496 ; 0x1f0
|
|
|
|
8001ebc: 441c add r4, r3
|
|
|
|
8001ebe: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc
|
|
|
|
8001ec2: 2200 movs r2, #0
|
|
|
|
8001ec4: f8c7 30b8 str.w r3, [r7, #184] ; 0xb8
|
|
|
|
8001ec8: f8c7 20bc str.w r2, [r7, #188] ; 0xbc
|
|
|
|
8001ecc: e9d7 892e ldrd r8, r9, [r7, #184] ; 0xb8
|
|
|
|
8001ed0: 4642 mov r2, r8
|
|
|
|
8001ed2: 464b mov r3, r9
|
|
|
|
8001ed4: 1891 adds r1, r2, r2
|
|
|
|
8001ed6: 63b9 str r1, [r7, #56] ; 0x38
|
|
|
|
8001ed8: 415b adcs r3, r3
|
|
|
|
8001eda: 63fb str r3, [r7, #60] ; 0x3c
|
|
|
|
8001edc: e9d7 230e ldrd r2, r3, [r7, #56] ; 0x38
|
|
|
|
8001ee0: 4641 mov r1, r8
|
|
|
|
8001ee2: 1851 adds r1, r2, r1
|
|
|
|
8001ee4: 6339 str r1, [r7, #48] ; 0x30
|
|
|
|
8001ee6: 4649 mov r1, r9
|
|
|
|
8001ee8: 414b adcs r3, r1
|
|
|
|
8001eea: 637b str r3, [r7, #52] ; 0x34
|
|
|
|
8001eec: f04f 0200 mov.w r2, #0
|
|
|
|
8001ef0: f04f 0300 mov.w r3, #0
|
|
|
|
8001ef4: e9d7 ab0c ldrd sl, fp, [r7, #48] ; 0x30
|
|
|
|
8001ef8: 4659 mov r1, fp
|
|
|
|
8001efa: 00cb lsls r3, r1, #3
|
|
|
|
8001efc: 4651 mov r1, sl
|
|
|
|
8001efe: ea43 7351 orr.w r3, r3, r1, lsr #29
|
|
|
|
8001f02: 4651 mov r1, sl
|
|
|
|
8001f04: 00ca lsls r2, r1, #3
|
|
|
|
8001f06: 4610 mov r0, r2
|
|
|
|
8001f08: 4619 mov r1, r3
|
|
|
|
8001f0a: 4603 mov r3, r0
|
|
|
|
8001f0c: 4642 mov r2, r8
|
|
|
|
8001f0e: 189b adds r3, r3, r2
|
|
|
|
8001f10: f8c7 30b0 str.w r3, [r7, #176] ; 0xb0
|
|
|
|
8001f14: 464b mov r3, r9
|
|
|
|
8001f16: 460a mov r2, r1
|
|
|
|
8001f18: eb42 0303 adc.w r3, r2, r3
|
|
|
|
8001f1c: f8c7 30b4 str.w r3, [r7, #180] ; 0xb4
|
|
|
|
8001f20: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001f24: 685b ldr r3, [r3, #4]
|
|
|
|
8001f26: 2200 movs r2, #0
|
|
|
|
8001f28: f8c7 30a8 str.w r3, [r7, #168] ; 0xa8
|
|
|
|
8001f2c: f8c7 20ac str.w r2, [r7, #172] ; 0xac
|
|
|
|
8001f30: e9d7 122a ldrd r1, r2, [r7, #168] ; 0xa8
|
|
|
|
8001f34: 460b mov r3, r1
|
|
|
|
8001f36: 18db adds r3, r3, r3
|
|
|
|
8001f38: 62bb str r3, [r7, #40] ; 0x28
|
|
|
|
8001f3a: 4613 mov r3, r2
|
|
|
|
8001f3c: eb42 0303 adc.w r3, r2, r3
|
|
|
|
8001f40: 62fb str r3, [r7, #44] ; 0x2c
|
|
|
|
8001f42: e9d7 230a ldrd r2, r3, [r7, #40] ; 0x28
|
|
|
|
8001f46: e9d7 012c ldrd r0, r1, [r7, #176] ; 0xb0
|
|
|
|
8001f4a: f7fe f945 bl 80001d8 <__aeabi_uldivmod>
|
|
|
|
8001f4e: 4602 mov r2, r0
|
|
|
|
8001f50: 460b mov r3, r1
|
|
|
|
8001f52: 4b0d ldr r3, [pc, #52] ; (8001f88 <UART_SetConfig+0x2d4>)
|
|
|
|
8001f54: fba3 1302 umull r1, r3, r3, r2
|
|
|
|
8001f58: 095b lsrs r3, r3, #5
|
|
|
|
8001f5a: 2164 movs r1, #100 ; 0x64
|
|
|
|
8001f5c: fb01 f303 mul.w r3, r1, r3
|
|
|
|
8001f60: 1ad3 subs r3, r2, r3
|
|
|
|
8001f62: 00db lsls r3, r3, #3
|
|
|
|
8001f64: 3332 adds r3, #50 ; 0x32
|
|
|
|
8001f66: 4a08 ldr r2, [pc, #32] ; (8001f88 <UART_SetConfig+0x2d4>)
|
|
|
|
8001f68: fba2 2303 umull r2, r3, r2, r3
|
|
|
|
8001f6c: 095b lsrs r3, r3, #5
|
|
|
|
8001f6e: f003 0207 and.w r2, r3, #7
|
|
|
|
8001f72: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001f76: 681b ldr r3, [r3, #0]
|
|
|
|
8001f78: 4422 add r2, r4
|
|
|
|
8001f7a: 609a str r2, [r3, #8]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
huart->Instance->BRR = UART_BRR_SAMPLING16(pclk, huart->Init.BaudRate);
|
|
|
|
}
|
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
8001f7c: e106 b.n 800218c <UART_SetConfig+0x4d8>
|
|
|
|
8001f7e: bf00 nop
|
|
|
|
8001f80: 40011000 .word 0x40011000
|
|
|
|
8001f84: 40011400 .word 0x40011400
|
|
|
|
8001f88: 51eb851f .word 0x51eb851f
|
2023-09-17 08:27:41 +00:00
|
|
|
huart->Instance->BRR = UART_BRR_SAMPLING16(pclk, huart->Init.BaudRate);
|
2023-09-17 10:40:31 +00:00
|
|
|
8001f8c: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc
|
|
|
|
8001f90: 2200 movs r2, #0
|
|
|
|
8001f92: f8c7 30a0 str.w r3, [r7, #160] ; 0xa0
|
|
|
|
8001f96: f8c7 20a4 str.w r2, [r7, #164] ; 0xa4
|
|
|
|
8001f9a: e9d7 8928 ldrd r8, r9, [r7, #160] ; 0xa0
|
|
|
|
8001f9e: 4642 mov r2, r8
|
|
|
|
8001fa0: 464b mov r3, r9
|
|
|
|
8001fa2: 1891 adds r1, r2, r2
|
|
|
|
8001fa4: 6239 str r1, [r7, #32]
|
|
|
|
8001fa6: 415b adcs r3, r3
|
|
|
|
8001fa8: 627b str r3, [r7, #36] ; 0x24
|
|
|
|
8001faa: e9d7 2308 ldrd r2, r3, [r7, #32]
|
|
|
|
8001fae: 4641 mov r1, r8
|
|
|
|
8001fb0: 1854 adds r4, r2, r1
|
|
|
|
8001fb2: 4649 mov r1, r9
|
|
|
|
8001fb4: eb43 0501 adc.w r5, r3, r1
|
|
|
|
8001fb8: f04f 0200 mov.w r2, #0
|
|
|
|
8001fbc: f04f 0300 mov.w r3, #0
|
|
|
|
8001fc0: 00eb lsls r3, r5, #3
|
|
|
|
8001fc2: ea43 7354 orr.w r3, r3, r4, lsr #29
|
|
|
|
8001fc6: 00e2 lsls r2, r4, #3
|
|
|
|
8001fc8: 4614 mov r4, r2
|
|
|
|
8001fca: 461d mov r5, r3
|
|
|
|
8001fcc: 4643 mov r3, r8
|
|
|
|
8001fce: 18e3 adds r3, r4, r3
|
|
|
|
8001fd0: f8c7 3098 str.w r3, [r7, #152] ; 0x98
|
|
|
|
8001fd4: 464b mov r3, r9
|
|
|
|
8001fd6: eb45 0303 adc.w r3, r5, r3
|
|
|
|
8001fda: f8c7 309c str.w r3, [r7, #156] ; 0x9c
|
|
|
|
8001fde: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8001fe2: 685b ldr r3, [r3, #4]
|
|
|
|
8001fe4: 2200 movs r2, #0
|
|
|
|
8001fe6: f8c7 3090 str.w r3, [r7, #144] ; 0x90
|
|
|
|
8001fea: f8c7 2094 str.w r2, [r7, #148] ; 0x94
|
|
|
|
8001fee: f04f 0200 mov.w r2, #0
|
|
|
|
8001ff2: f04f 0300 mov.w r3, #0
|
|
|
|
8001ff6: e9d7 4524 ldrd r4, r5, [r7, #144] ; 0x90
|
|
|
|
8001ffa: 4629 mov r1, r5
|
|
|
|
8001ffc: 008b lsls r3, r1, #2
|
|
|
|
8001ffe: 4621 mov r1, r4
|
|
|
|
8002000: ea43 7391 orr.w r3, r3, r1, lsr #30
|
|
|
|
8002004: 4621 mov r1, r4
|
|
|
|
8002006: 008a lsls r2, r1, #2
|
|
|
|
8002008: e9d7 0126 ldrd r0, r1, [r7, #152] ; 0x98
|
|
|
|
800200c: f7fe f8e4 bl 80001d8 <__aeabi_uldivmod>
|
|
|
|
8002010: 4602 mov r2, r0
|
|
|
|
8002012: 460b mov r3, r1
|
|
|
|
8002014: 4b60 ldr r3, [pc, #384] ; (8002198 <UART_SetConfig+0x4e4>)
|
|
|
|
8002016: fba3 2302 umull r2, r3, r3, r2
|
|
|
|
800201a: 095b lsrs r3, r3, #5
|
|
|
|
800201c: 011c lsls r4, r3, #4
|
|
|
|
800201e: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc
|
|
|
|
8002022: 2200 movs r2, #0
|
|
|
|
8002024: f8c7 3088 str.w r3, [r7, #136] ; 0x88
|
|
|
|
8002028: f8c7 208c str.w r2, [r7, #140] ; 0x8c
|
|
|
|
800202c: e9d7 8922 ldrd r8, r9, [r7, #136] ; 0x88
|
|
|
|
8002030: 4642 mov r2, r8
|
|
|
|
8002032: 464b mov r3, r9
|
|
|
|
8002034: 1891 adds r1, r2, r2
|
|
|
|
8002036: 61b9 str r1, [r7, #24]
|
|
|
|
8002038: 415b adcs r3, r3
|
|
|
|
800203a: 61fb str r3, [r7, #28]
|
|
|
|
800203c: e9d7 2306 ldrd r2, r3, [r7, #24]
|
|
|
|
8002040: 4641 mov r1, r8
|
|
|
|
8002042: 1851 adds r1, r2, r1
|
|
|
|
8002044: 6139 str r1, [r7, #16]
|
|
|
|
8002046: 4649 mov r1, r9
|
|
|
|
8002048: 414b adcs r3, r1
|
|
|
|
800204a: 617b str r3, [r7, #20]
|
|
|
|
800204c: f04f 0200 mov.w r2, #0
|
|
|
|
8002050: f04f 0300 mov.w r3, #0
|
|
|
|
8002054: e9d7 ab04 ldrd sl, fp, [r7, #16]
|
|
|
|
8002058: 4659 mov r1, fp
|
|
|
|
800205a: 00cb lsls r3, r1, #3
|
|
|
|
800205c: 4651 mov r1, sl
|
|
|
|
800205e: ea43 7351 orr.w r3, r3, r1, lsr #29
|
|
|
|
8002062: 4651 mov r1, sl
|
|
|
|
8002064: 00ca lsls r2, r1, #3
|
|
|
|
8002066: 4610 mov r0, r2
|
|
|
|
8002068: 4619 mov r1, r3
|
|
|
|
800206a: 4603 mov r3, r0
|
|
|
|
800206c: 4642 mov r2, r8
|
|
|
|
800206e: 189b adds r3, r3, r2
|
|
|
|
8002070: f8c7 3080 str.w r3, [r7, #128] ; 0x80
|
|
|
|
8002074: 464b mov r3, r9
|
|
|
|
8002076: 460a mov r2, r1
|
|
|
|
8002078: eb42 0303 adc.w r3, r2, r3
|
|
|
|
800207c: f8c7 3084 str.w r3, [r7, #132] ; 0x84
|
|
|
|
8002080: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8002084: 685b ldr r3, [r3, #4]
|
|
|
|
8002086: 2200 movs r2, #0
|
|
|
|
8002088: 67bb str r3, [r7, #120] ; 0x78
|
|
|
|
800208a: 67fa str r2, [r7, #124] ; 0x7c
|
|
|
|
800208c: f04f 0200 mov.w r2, #0
|
|
|
|
8002090: f04f 0300 mov.w r3, #0
|
|
|
|
8002094: e9d7 891e ldrd r8, r9, [r7, #120] ; 0x78
|
|
|
|
8002098: 4649 mov r1, r9
|
|
|
|
800209a: 008b lsls r3, r1, #2
|
|
|
|
800209c: 4641 mov r1, r8
|
|
|
|
800209e: ea43 7391 orr.w r3, r3, r1, lsr #30
|
|
|
|
80020a2: 4641 mov r1, r8
|
|
|
|
80020a4: 008a lsls r2, r1, #2
|
|
|
|
80020a6: e9d7 0120 ldrd r0, r1, [r7, #128] ; 0x80
|
|
|
|
80020aa: f7fe f895 bl 80001d8 <__aeabi_uldivmod>
|
|
|
|
80020ae: 4602 mov r2, r0
|
|
|
|
80020b0: 460b mov r3, r1
|
|
|
|
80020b2: 4611 mov r1, r2
|
|
|
|
80020b4: 4b38 ldr r3, [pc, #224] ; (8002198 <UART_SetConfig+0x4e4>)
|
|
|
|
80020b6: fba3 2301 umull r2, r3, r3, r1
|
|
|
|
80020ba: 095b lsrs r3, r3, #5
|
|
|
|
80020bc: 2264 movs r2, #100 ; 0x64
|
|
|
|
80020be: fb02 f303 mul.w r3, r2, r3
|
|
|
|
80020c2: 1acb subs r3, r1, r3
|
|
|
|
80020c4: 011b lsls r3, r3, #4
|
|
|
|
80020c6: 3332 adds r3, #50 ; 0x32
|
|
|
|
80020c8: 4a33 ldr r2, [pc, #204] ; (8002198 <UART_SetConfig+0x4e4>)
|
|
|
|
80020ca: fba2 2303 umull r2, r3, r2, r3
|
|
|
|
80020ce: 095b lsrs r3, r3, #5
|
|
|
|
80020d0: f003 03f0 and.w r3, r3, #240 ; 0xf0
|
|
|
|
80020d4: 441c add r4, r3
|
|
|
|
80020d6: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc
|
|
|
|
80020da: 2200 movs r2, #0
|
|
|
|
80020dc: 673b str r3, [r7, #112] ; 0x70
|
|
|
|
80020de: 677a str r2, [r7, #116] ; 0x74
|
|
|
|
80020e0: e9d7 891c ldrd r8, r9, [r7, #112] ; 0x70
|
|
|
|
80020e4: 4642 mov r2, r8
|
|
|
|
80020e6: 464b mov r3, r9
|
|
|
|
80020e8: 1891 adds r1, r2, r2
|
|
|
|
80020ea: 60b9 str r1, [r7, #8]
|
|
|
|
80020ec: 415b adcs r3, r3
|
|
|
|
80020ee: 60fb str r3, [r7, #12]
|
|
|
|
80020f0: e9d7 2302 ldrd r2, r3, [r7, #8]
|
|
|
|
80020f4: 4641 mov r1, r8
|
|
|
|
80020f6: 1851 adds r1, r2, r1
|
|
|
|
80020f8: 6039 str r1, [r7, #0]
|
|
|
|
80020fa: 4649 mov r1, r9
|
|
|
|
80020fc: 414b adcs r3, r1
|
|
|
|
80020fe: 607b str r3, [r7, #4]
|
|
|
|
8002100: f04f 0200 mov.w r2, #0
|
|
|
|
8002104: f04f 0300 mov.w r3, #0
|
|
|
|
8002108: e9d7 ab00 ldrd sl, fp, [r7]
|
|
|
|
800210c: 4659 mov r1, fp
|
|
|
|
800210e: 00cb lsls r3, r1, #3
|
|
|
|
8002110: 4651 mov r1, sl
|
|
|
|
8002112: ea43 7351 orr.w r3, r3, r1, lsr #29
|
|
|
|
8002116: 4651 mov r1, sl
|
|
|
|
8002118: 00ca lsls r2, r1, #3
|
|
|
|
800211a: 4610 mov r0, r2
|
|
|
|
800211c: 4619 mov r1, r3
|
|
|
|
800211e: 4603 mov r3, r0
|
|
|
|
8002120: 4642 mov r2, r8
|
|
|
|
8002122: 189b adds r3, r3, r2
|
|
|
|
8002124: 66bb str r3, [r7, #104] ; 0x68
|
|
|
|
8002126: 464b mov r3, r9
|
|
|
|
8002128: 460a mov r2, r1
|
|
|
|
800212a: eb42 0303 adc.w r3, r2, r3
|
|
|
|
800212e: 66fb str r3, [r7, #108] ; 0x6c
|
|
|
|
8002130: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8002134: 685b ldr r3, [r3, #4]
|
|
|
|
8002136: 2200 movs r2, #0
|
|
|
|
8002138: 663b str r3, [r7, #96] ; 0x60
|
|
|
|
800213a: 667a str r2, [r7, #100] ; 0x64
|
|
|
|
800213c: f04f 0200 mov.w r2, #0
|
|
|
|
8002140: f04f 0300 mov.w r3, #0
|
|
|
|
8002144: e9d7 8918 ldrd r8, r9, [r7, #96] ; 0x60
|
|
|
|
8002148: 4649 mov r1, r9
|
|
|
|
800214a: 008b lsls r3, r1, #2
|
|
|
|
800214c: 4641 mov r1, r8
|
|
|
|
800214e: ea43 7391 orr.w r3, r3, r1, lsr #30
|
|
|
|
8002152: 4641 mov r1, r8
|
|
|
|
8002154: 008a lsls r2, r1, #2
|
|
|
|
8002156: e9d7 011a ldrd r0, r1, [r7, #104] ; 0x68
|
|
|
|
800215a: f7fe f83d bl 80001d8 <__aeabi_uldivmod>
|
|
|
|
800215e: 4602 mov r2, r0
|
|
|
|
8002160: 460b mov r3, r1
|
|
|
|
8002162: 4b0d ldr r3, [pc, #52] ; (8002198 <UART_SetConfig+0x4e4>)
|
|
|
|
8002164: fba3 1302 umull r1, r3, r3, r2
|
|
|
|
8002168: 095b lsrs r3, r3, #5
|
|
|
|
800216a: 2164 movs r1, #100 ; 0x64
|
|
|
|
800216c: fb01 f303 mul.w r3, r1, r3
|
|
|
|
8002170: 1ad3 subs r3, r2, r3
|
|
|
|
8002172: 011b lsls r3, r3, #4
|
|
|
|
8002174: 3332 adds r3, #50 ; 0x32
|
|
|
|
8002176: 4a08 ldr r2, [pc, #32] ; (8002198 <UART_SetConfig+0x4e4>)
|
|
|
|
8002178: fba2 2303 umull r2, r3, r2, r3
|
|
|
|
800217c: 095b lsrs r3, r3, #5
|
|
|
|
800217e: f003 020f and.w r2, r3, #15
|
|
|
|
8002182: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
|
|
|
|
8002186: 681b ldr r3, [r3, #0]
|
|
|
|
8002188: 4422 add r2, r4
|
|
|
|
800218a: 609a str r2, [r3, #8]
|
2023-09-17 08:27:41 +00:00
|
|
|
}
|
2023-09-17 10:40:31 +00:00
|
|
|
800218c: bf00 nop
|
|
|
|
800218e: f507 7780 add.w r7, r7, #256 ; 0x100
|
|
|
|
8002192: 46bd mov sp, r7
|
|
|
|
8002194: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc}
|
|
|
|
8002198: 51eb851f .word 0x51eb851f
|
|
|
|
|
|
|
|
0800219c <memset>:
|
|
|
|
800219c: 4402 add r2, r0
|
|
|
|
800219e: 4603 mov r3, r0
|
|
|
|
80021a0: 4293 cmp r3, r2
|
|
|
|
80021a2: d100 bne.n 80021a6 <memset+0xa>
|
|
|
|
80021a4: 4770 bx lr
|
|
|
|
80021a6: f803 1b01 strb.w r1, [r3], #1
|
|
|
|
80021aa: e7f9 b.n 80021a0 <memset+0x4>
|
|
|
|
|
|
|
|
080021ac <__libc_init_array>:
|
|
|
|
80021ac: b570 push {r4, r5, r6, lr}
|
|
|
|
80021ae: 4d0d ldr r5, [pc, #52] ; (80021e4 <__libc_init_array+0x38>)
|
|
|
|
80021b0: 4c0d ldr r4, [pc, #52] ; (80021e8 <__libc_init_array+0x3c>)
|
|
|
|
80021b2: 1b64 subs r4, r4, r5
|
|
|
|
80021b4: 10a4 asrs r4, r4, #2
|
|
|
|
80021b6: 2600 movs r6, #0
|
|
|
|
80021b8: 42a6 cmp r6, r4
|
|
|
|
80021ba: d109 bne.n 80021d0 <__libc_init_array+0x24>
|
|
|
|
80021bc: 4d0b ldr r5, [pc, #44] ; (80021ec <__libc_init_array+0x40>)
|
|
|
|
80021be: 4c0c ldr r4, [pc, #48] ; (80021f0 <__libc_init_array+0x44>)
|
|
|
|
80021c0: f000 f818 bl 80021f4 <_init>
|
|
|
|
80021c4: 1b64 subs r4, r4, r5
|
|
|
|
80021c6: 10a4 asrs r4, r4, #2
|
|
|
|
80021c8: 2600 movs r6, #0
|
|
|
|
80021ca: 42a6 cmp r6, r4
|
|
|
|
80021cc: d105 bne.n 80021da <__libc_init_array+0x2e>
|
|
|
|
80021ce: bd70 pop {r4, r5, r6, pc}
|
|
|
|
80021d0: f855 3b04 ldr.w r3, [r5], #4
|
|
|
|
80021d4: 4798 blx r3
|
|
|
|
80021d6: 3601 adds r6, #1
|
|
|
|
80021d8: e7ee b.n 80021b8 <__libc_init_array+0xc>
|
|
|
|
80021da: f855 3b04 ldr.w r3, [r5], #4
|
|
|
|
80021de: 4798 blx r3
|
|
|
|
80021e0: 3601 adds r6, #1
|
|
|
|
80021e2: e7f2 b.n 80021ca <__libc_init_array+0x1e>
|
|
|
|
80021e4: 0800222c .word 0x0800222c
|
|
|
|
80021e8: 0800222c .word 0x0800222c
|
|
|
|
80021ec: 0800222c .word 0x0800222c
|
|
|
|
80021f0: 08002230 .word 0x08002230
|
|
|
|
|
|
|
|
080021f4 <_init>:
|
|
|
|
80021f4: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
|
|
80021f6: bf00 nop
|
|
|
|
80021f8: bcf8 pop {r3, r4, r5, r6, r7}
|
|
|
|
80021fa: bc08 pop {r3}
|
|
|
|
80021fc: 469e mov lr, r3
|
|
|
|
80021fe: 4770 bx lr
|
|
|
|
|
|
|
|
08002200 <_fini>:
|
|
|
|
8002200: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
|
|
8002202: bf00 nop
|
|
|
|
8002204: bcf8 pop {r3, r4, r5, r6, r7}
|
|
|
|
8002206: bc08 pop {r3}
|
|
|
|
8002208: 469e mov lr, r3
|
|
|
|
800220a: 4770 bx lr
|