24109 lines
904 KiB
Plaintext
Executable File
24109 lines
904 KiB
Plaintext
Executable File
|
|
P8_SETR1.elf: file format elf32-littlearm
|
|
|
|
Sections:
|
|
Idx Name Size VMA LMA File off Algn
|
|
0 .isr_vector 00000188 08000000 08000000 00001000 2**0
|
|
CONTENTS, ALLOC, LOAD, READONLY, DATA
|
|
1 .text 000086d4 08000190 08000190 00001190 2**4
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
2 .rodata 0000017c 08008864 08008864 00009864 2**2
|
|
CONTENTS, ALLOC, LOAD, READONLY, DATA
|
|
3 .ARM.extab 00000000 080089e0 080089e0 0000a010 2**0
|
|
CONTENTS, READONLY
|
|
4 .ARM 00000008 080089e0 080089e0 000099e0 2**2
|
|
CONTENTS, ALLOC, LOAD, READONLY, DATA
|
|
5 .preinit_array 00000000 080089e8 080089e8 0000a010 2**0
|
|
CONTENTS, ALLOC, LOAD, DATA
|
|
6 .init_array 00000004 080089e8 080089e8 000099e8 2**2
|
|
CONTENTS, ALLOC, LOAD, READONLY, DATA
|
|
7 .fini_array 00000004 080089ec 080089ec 000099ec 2**2
|
|
CONTENTS, ALLOC, LOAD, READONLY, DATA
|
|
8 .data 00000010 20000000 080089f0 0000a000 2**2
|
|
CONTENTS, ALLOC, LOAD, DATA
|
|
9 .bss 00002488 20000010 08008a00 0000a010 2**2
|
|
ALLOC
|
|
10 ._user_heap_stack 00000600 20002498 08008a00 0000a498 2**0
|
|
ALLOC
|
|
11 .ARM.attributes 00000030 00000000 00000000 0000a010 2**0
|
|
CONTENTS, READONLY
|
|
12 .debug_info 000215fc 00000000 00000000 0000a040 2**0
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
13 .debug_abbrev 000044ff 00000000 00000000 0002b63c 2**0
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
14 .debug_aranges 00001df0 00000000 00000000 0002fb40 2**3
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
15 .debug_rnglists 00001733 00000000 00000000 00031930 2**0
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
16 .debug_macro 00004708 00000000 00000000 00033063 2**0
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
17 .debug_line 000218ef 00000000 00000000 0003776b 2**0
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
18 .debug_str 000fd9a6 00000000 00000000 0005905a 2**0
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
19 .comment 00000043 00000000 00000000 00156a00 2**0
|
|
CONTENTS, READONLY
|
|
20 .debug_frame 00008008 00000000 00000000 00156a44 2**2
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
21 .debug_line_str 00000064 00000000 00000000 0015ea4c 2**0
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
|
|
Disassembly of section .text:
|
|
|
|
08000190 <__do_global_dtors_aux>:
|
|
8000190: b510 push {r4, lr}
|
|
8000192: 4c05 ldr r4, [pc, #20] @ (80001a8 <__do_global_dtors_aux+0x18>)
|
|
8000194: 7823 ldrb r3, [r4, #0]
|
|
8000196: b933 cbnz r3, 80001a6 <__do_global_dtors_aux+0x16>
|
|
8000198: 4b04 ldr r3, [pc, #16] @ (80001ac <__do_global_dtors_aux+0x1c>)
|
|
800019a: b113 cbz r3, 80001a2 <__do_global_dtors_aux+0x12>
|
|
800019c: 4804 ldr r0, [pc, #16] @ (80001b0 <__do_global_dtors_aux+0x20>)
|
|
800019e: f3af 8000 nop.w
|
|
80001a2: 2301 movs r3, #1
|
|
80001a4: 7023 strb r3, [r4, #0]
|
|
80001a6: bd10 pop {r4, pc}
|
|
80001a8: 20000010 .word 0x20000010
|
|
80001ac: 00000000 .word 0x00000000
|
|
80001b0: 0800884c .word 0x0800884c
|
|
|
|
080001b4 <frame_dummy>:
|
|
80001b4: b508 push {r3, lr}
|
|
80001b6: 4b03 ldr r3, [pc, #12] @ (80001c4 <frame_dummy+0x10>)
|
|
80001b8: b11b cbz r3, 80001c2 <frame_dummy+0xe>
|
|
80001ba: 4903 ldr r1, [pc, #12] @ (80001c8 <frame_dummy+0x14>)
|
|
80001bc: 4803 ldr r0, [pc, #12] @ (80001cc <frame_dummy+0x18>)
|
|
80001be: f3af 8000 nop.w
|
|
80001c2: bd08 pop {r3, pc}
|
|
80001c4: 00000000 .word 0x00000000
|
|
80001c8: 20000014 .word 0x20000014
|
|
80001cc: 0800884c .word 0x0800884c
|
|
|
|
080001d0 <__aeabi_uldivmod>:
|
|
80001d0: b953 cbnz r3, 80001e8 <__aeabi_uldivmod+0x18>
|
|
80001d2: b94a cbnz r2, 80001e8 <__aeabi_uldivmod+0x18>
|
|
80001d4: 2900 cmp r1, #0
|
|
80001d6: bf08 it eq
|
|
80001d8: 2800 cmpeq r0, #0
|
|
80001da: bf1c itt ne
|
|
80001dc: f04f 31ff movne.w r1, #4294967295
|
|
80001e0: f04f 30ff movne.w r0, #4294967295
|
|
80001e4: f000 b988 b.w 80004f8 <__aeabi_idiv0>
|
|
80001e8: f1ad 0c08 sub.w ip, sp, #8
|
|
80001ec: e96d ce04 strd ip, lr, [sp, #-16]!
|
|
80001f0: f000 f806 bl 8000200 <__udivmoddi4>
|
|
80001f4: f8dd e004 ldr.w lr, [sp, #4]
|
|
80001f8: e9dd 2302 ldrd r2, r3, [sp, #8]
|
|
80001fc: b004 add sp, #16
|
|
80001fe: 4770 bx lr
|
|
|
|
08000200 <__udivmoddi4>:
|
|
8000200: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
|
|
8000204: 9d08 ldr r5, [sp, #32]
|
|
8000206: 468e mov lr, r1
|
|
8000208: 4604 mov r4, r0
|
|
800020a: 4688 mov r8, r1
|
|
800020c: 2b00 cmp r3, #0
|
|
800020e: d14a bne.n 80002a6 <__udivmoddi4+0xa6>
|
|
8000210: 428a cmp r2, r1
|
|
8000212: 4617 mov r7, r2
|
|
8000214: d962 bls.n 80002dc <__udivmoddi4+0xdc>
|
|
8000216: fab2 f682 clz r6, r2
|
|
800021a: b14e cbz r6, 8000230 <__udivmoddi4+0x30>
|
|
800021c: f1c6 0320 rsb r3, r6, #32
|
|
8000220: fa01 f806 lsl.w r8, r1, r6
|
|
8000224: fa20 f303 lsr.w r3, r0, r3
|
|
8000228: 40b7 lsls r7, r6
|
|
800022a: ea43 0808 orr.w r8, r3, r8
|
|
800022e: 40b4 lsls r4, r6
|
|
8000230: ea4f 4e17 mov.w lr, r7, lsr #16
|
|
8000234: fa1f fc87 uxth.w ip, r7
|
|
8000238: fbb8 f1fe udiv r1, r8, lr
|
|
800023c: 0c23 lsrs r3, r4, #16
|
|
800023e: fb0e 8811 mls r8, lr, r1, r8
|
|
8000242: ea43 4308 orr.w r3, r3, r8, lsl #16
|
|
8000246: fb01 f20c mul.w r2, r1, ip
|
|
800024a: 429a cmp r2, r3
|
|
800024c: d909 bls.n 8000262 <__udivmoddi4+0x62>
|
|
800024e: 18fb adds r3, r7, r3
|
|
8000250: f101 30ff add.w r0, r1, #4294967295
|
|
8000254: f080 80ea bcs.w 800042c <__udivmoddi4+0x22c>
|
|
8000258: 429a cmp r2, r3
|
|
800025a: f240 80e7 bls.w 800042c <__udivmoddi4+0x22c>
|
|
800025e: 3902 subs r1, #2
|
|
8000260: 443b add r3, r7
|
|
8000262: 1a9a subs r2, r3, r2
|
|
8000264: b2a3 uxth r3, r4
|
|
8000266: fbb2 f0fe udiv r0, r2, lr
|
|
800026a: fb0e 2210 mls r2, lr, r0, r2
|
|
800026e: ea43 4302 orr.w r3, r3, r2, lsl #16
|
|
8000272: fb00 fc0c mul.w ip, r0, ip
|
|
8000276: 459c cmp ip, r3
|
|
8000278: d909 bls.n 800028e <__udivmoddi4+0x8e>
|
|
800027a: 18fb adds r3, r7, r3
|
|
800027c: f100 32ff add.w r2, r0, #4294967295
|
|
8000280: f080 80d6 bcs.w 8000430 <__udivmoddi4+0x230>
|
|
8000284: 459c cmp ip, r3
|
|
8000286: f240 80d3 bls.w 8000430 <__udivmoddi4+0x230>
|
|
800028a: 443b add r3, r7
|
|
800028c: 3802 subs r0, #2
|
|
800028e: ea40 4001 orr.w r0, r0, r1, lsl #16
|
|
8000292: eba3 030c sub.w r3, r3, ip
|
|
8000296: 2100 movs r1, #0
|
|
8000298: b11d cbz r5, 80002a2 <__udivmoddi4+0xa2>
|
|
800029a: 40f3 lsrs r3, r6
|
|
800029c: 2200 movs r2, #0
|
|
800029e: e9c5 3200 strd r3, r2, [r5]
|
|
80002a2: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
|
|
80002a6: 428b cmp r3, r1
|
|
80002a8: d905 bls.n 80002b6 <__udivmoddi4+0xb6>
|
|
80002aa: b10d cbz r5, 80002b0 <__udivmoddi4+0xb0>
|
|
80002ac: e9c5 0100 strd r0, r1, [r5]
|
|
80002b0: 2100 movs r1, #0
|
|
80002b2: 4608 mov r0, r1
|
|
80002b4: e7f5 b.n 80002a2 <__udivmoddi4+0xa2>
|
|
80002b6: fab3 f183 clz r1, r3
|
|
80002ba: 2900 cmp r1, #0
|
|
80002bc: d146 bne.n 800034c <__udivmoddi4+0x14c>
|
|
80002be: 4573 cmp r3, lr
|
|
80002c0: d302 bcc.n 80002c8 <__udivmoddi4+0xc8>
|
|
80002c2: 4282 cmp r2, r0
|
|
80002c4: f200 8105 bhi.w 80004d2 <__udivmoddi4+0x2d2>
|
|
80002c8: 1a84 subs r4, r0, r2
|
|
80002ca: eb6e 0203 sbc.w r2, lr, r3
|
|
80002ce: 2001 movs r0, #1
|
|
80002d0: 4690 mov r8, r2
|
|
80002d2: 2d00 cmp r5, #0
|
|
80002d4: d0e5 beq.n 80002a2 <__udivmoddi4+0xa2>
|
|
80002d6: e9c5 4800 strd r4, r8, [r5]
|
|
80002da: e7e2 b.n 80002a2 <__udivmoddi4+0xa2>
|
|
80002dc: 2a00 cmp r2, #0
|
|
80002de: f000 8090 beq.w 8000402 <__udivmoddi4+0x202>
|
|
80002e2: fab2 f682 clz r6, r2
|
|
80002e6: 2e00 cmp r6, #0
|
|
80002e8: f040 80a4 bne.w 8000434 <__udivmoddi4+0x234>
|
|
80002ec: 1a8a subs r2, r1, r2
|
|
80002ee: 0c03 lsrs r3, r0, #16
|
|
80002f0: ea4f 4e17 mov.w lr, r7, lsr #16
|
|
80002f4: b280 uxth r0, r0
|
|
80002f6: b2bc uxth r4, r7
|
|
80002f8: 2101 movs r1, #1
|
|
80002fa: fbb2 fcfe udiv ip, r2, lr
|
|
80002fe: fb0e 221c mls r2, lr, ip, r2
|
|
8000302: ea43 4302 orr.w r3, r3, r2, lsl #16
|
|
8000306: fb04 f20c mul.w r2, r4, ip
|
|
800030a: 429a cmp r2, r3
|
|
800030c: d907 bls.n 800031e <__udivmoddi4+0x11e>
|
|
800030e: 18fb adds r3, r7, r3
|
|
8000310: f10c 38ff add.w r8, ip, #4294967295
|
|
8000314: d202 bcs.n 800031c <__udivmoddi4+0x11c>
|
|
8000316: 429a cmp r2, r3
|
|
8000318: f200 80e0 bhi.w 80004dc <__udivmoddi4+0x2dc>
|
|
800031c: 46c4 mov ip, r8
|
|
800031e: 1a9b subs r3, r3, r2
|
|
8000320: fbb3 f2fe udiv r2, r3, lr
|
|
8000324: fb0e 3312 mls r3, lr, r2, r3
|
|
8000328: ea40 4303 orr.w r3, r0, r3, lsl #16
|
|
800032c: fb02 f404 mul.w r4, r2, r4
|
|
8000330: 429c cmp r4, r3
|
|
8000332: d907 bls.n 8000344 <__udivmoddi4+0x144>
|
|
8000334: 18fb adds r3, r7, r3
|
|
8000336: f102 30ff add.w r0, r2, #4294967295
|
|
800033a: d202 bcs.n 8000342 <__udivmoddi4+0x142>
|
|
800033c: 429c cmp r4, r3
|
|
800033e: f200 80ca bhi.w 80004d6 <__udivmoddi4+0x2d6>
|
|
8000342: 4602 mov r2, r0
|
|
8000344: 1b1b subs r3, r3, r4
|
|
8000346: ea42 400c orr.w r0, r2, ip, lsl #16
|
|
800034a: e7a5 b.n 8000298 <__udivmoddi4+0x98>
|
|
800034c: f1c1 0620 rsb r6, r1, #32
|
|
8000350: 408b lsls r3, r1
|
|
8000352: fa22 f706 lsr.w r7, r2, r6
|
|
8000356: 431f orrs r7, r3
|
|
8000358: fa0e f401 lsl.w r4, lr, r1
|
|
800035c: fa20 f306 lsr.w r3, r0, r6
|
|
8000360: fa2e fe06 lsr.w lr, lr, r6
|
|
8000364: ea4f 4917 mov.w r9, r7, lsr #16
|
|
8000368: 4323 orrs r3, r4
|
|
800036a: fa00 f801 lsl.w r8, r0, r1
|
|
800036e: fa1f fc87 uxth.w ip, r7
|
|
8000372: fbbe f0f9 udiv r0, lr, r9
|
|
8000376: 0c1c lsrs r4, r3, #16
|
|
8000378: fb09 ee10 mls lr, r9, r0, lr
|
|
800037c: ea44 440e orr.w r4, r4, lr, lsl #16
|
|
8000380: fb00 fe0c mul.w lr, r0, ip
|
|
8000384: 45a6 cmp lr, r4
|
|
8000386: fa02 f201 lsl.w r2, r2, r1
|
|
800038a: d909 bls.n 80003a0 <__udivmoddi4+0x1a0>
|
|
800038c: 193c adds r4, r7, r4
|
|
800038e: f100 3aff add.w sl, r0, #4294967295
|
|
8000392: f080 809c bcs.w 80004ce <__udivmoddi4+0x2ce>
|
|
8000396: 45a6 cmp lr, r4
|
|
8000398: f240 8099 bls.w 80004ce <__udivmoddi4+0x2ce>
|
|
800039c: 3802 subs r0, #2
|
|
800039e: 443c add r4, r7
|
|
80003a0: eba4 040e sub.w r4, r4, lr
|
|
80003a4: fa1f fe83 uxth.w lr, r3
|
|
80003a8: fbb4 f3f9 udiv r3, r4, r9
|
|
80003ac: fb09 4413 mls r4, r9, r3, r4
|
|
80003b0: ea4e 4404 orr.w r4, lr, r4, lsl #16
|
|
80003b4: fb03 fc0c mul.w ip, r3, ip
|
|
80003b8: 45a4 cmp ip, r4
|
|
80003ba: d908 bls.n 80003ce <__udivmoddi4+0x1ce>
|
|
80003bc: 193c adds r4, r7, r4
|
|
80003be: f103 3eff add.w lr, r3, #4294967295
|
|
80003c2: f080 8082 bcs.w 80004ca <__udivmoddi4+0x2ca>
|
|
80003c6: 45a4 cmp ip, r4
|
|
80003c8: d97f bls.n 80004ca <__udivmoddi4+0x2ca>
|
|
80003ca: 3b02 subs r3, #2
|
|
80003cc: 443c add r4, r7
|
|
80003ce: ea43 4000 orr.w r0, r3, r0, lsl #16
|
|
80003d2: eba4 040c sub.w r4, r4, ip
|
|
80003d6: fba0 ec02 umull lr, ip, r0, r2
|
|
80003da: 4564 cmp r4, ip
|
|
80003dc: 4673 mov r3, lr
|
|
80003de: 46e1 mov r9, ip
|
|
80003e0: d362 bcc.n 80004a8 <__udivmoddi4+0x2a8>
|
|
80003e2: d05f beq.n 80004a4 <__udivmoddi4+0x2a4>
|
|
80003e4: b15d cbz r5, 80003fe <__udivmoddi4+0x1fe>
|
|
80003e6: ebb8 0203 subs.w r2, r8, r3
|
|
80003ea: eb64 0409 sbc.w r4, r4, r9
|
|
80003ee: fa04 f606 lsl.w r6, r4, r6
|
|
80003f2: fa22 f301 lsr.w r3, r2, r1
|
|
80003f6: 431e orrs r6, r3
|
|
80003f8: 40cc lsrs r4, r1
|
|
80003fa: e9c5 6400 strd r6, r4, [r5]
|
|
80003fe: 2100 movs r1, #0
|
|
8000400: e74f b.n 80002a2 <__udivmoddi4+0xa2>
|
|
8000402: fbb1 fcf2 udiv ip, r1, r2
|
|
8000406: 0c01 lsrs r1, r0, #16
|
|
8000408: ea41 410e orr.w r1, r1, lr, lsl #16
|
|
800040c: b280 uxth r0, r0
|
|
800040e: ea40 4201 orr.w r2, r0, r1, lsl #16
|
|
8000412: 463b mov r3, r7
|
|
8000414: 4638 mov r0, r7
|
|
8000416: 463c mov r4, r7
|
|
8000418: 46b8 mov r8, r7
|
|
800041a: 46be mov lr, r7
|
|
800041c: 2620 movs r6, #32
|
|
800041e: fbb1 f1f7 udiv r1, r1, r7
|
|
8000422: eba2 0208 sub.w r2, r2, r8
|
|
8000426: ea41 410c orr.w r1, r1, ip, lsl #16
|
|
800042a: e766 b.n 80002fa <__udivmoddi4+0xfa>
|
|
800042c: 4601 mov r1, r0
|
|
800042e: e718 b.n 8000262 <__udivmoddi4+0x62>
|
|
8000430: 4610 mov r0, r2
|
|
8000432: e72c b.n 800028e <__udivmoddi4+0x8e>
|
|
8000434: f1c6 0220 rsb r2, r6, #32
|
|
8000438: fa2e f302 lsr.w r3, lr, r2
|
|
800043c: 40b7 lsls r7, r6
|
|
800043e: 40b1 lsls r1, r6
|
|
8000440: fa20 f202 lsr.w r2, r0, r2
|
|
8000444: ea4f 4e17 mov.w lr, r7, lsr #16
|
|
8000448: 430a orrs r2, r1
|
|
800044a: fbb3 f8fe udiv r8, r3, lr
|
|
800044e: b2bc uxth r4, r7
|
|
8000450: fb0e 3318 mls r3, lr, r8, r3
|
|
8000454: 0c11 lsrs r1, r2, #16
|
|
8000456: ea41 4103 orr.w r1, r1, r3, lsl #16
|
|
800045a: fb08 f904 mul.w r9, r8, r4
|
|
800045e: 40b0 lsls r0, r6
|
|
8000460: 4589 cmp r9, r1
|
|
8000462: ea4f 4310 mov.w r3, r0, lsr #16
|
|
8000466: b280 uxth r0, r0
|
|
8000468: d93e bls.n 80004e8 <__udivmoddi4+0x2e8>
|
|
800046a: 1879 adds r1, r7, r1
|
|
800046c: f108 3cff add.w ip, r8, #4294967295
|
|
8000470: d201 bcs.n 8000476 <__udivmoddi4+0x276>
|
|
8000472: 4589 cmp r9, r1
|
|
8000474: d81f bhi.n 80004b6 <__udivmoddi4+0x2b6>
|
|
8000476: eba1 0109 sub.w r1, r1, r9
|
|
800047a: fbb1 f9fe udiv r9, r1, lr
|
|
800047e: fb09 f804 mul.w r8, r9, r4
|
|
8000482: fb0e 1119 mls r1, lr, r9, r1
|
|
8000486: b292 uxth r2, r2
|
|
8000488: ea42 4201 orr.w r2, r2, r1, lsl #16
|
|
800048c: 4542 cmp r2, r8
|
|
800048e: d229 bcs.n 80004e4 <__udivmoddi4+0x2e4>
|
|
8000490: 18ba adds r2, r7, r2
|
|
8000492: f109 31ff add.w r1, r9, #4294967295
|
|
8000496: d2c4 bcs.n 8000422 <__udivmoddi4+0x222>
|
|
8000498: 4542 cmp r2, r8
|
|
800049a: d2c2 bcs.n 8000422 <__udivmoddi4+0x222>
|
|
800049c: f1a9 0102 sub.w r1, r9, #2
|
|
80004a0: 443a add r2, r7
|
|
80004a2: e7be b.n 8000422 <__udivmoddi4+0x222>
|
|
80004a4: 45f0 cmp r8, lr
|
|
80004a6: d29d bcs.n 80003e4 <__udivmoddi4+0x1e4>
|
|
80004a8: ebbe 0302 subs.w r3, lr, r2
|
|
80004ac: eb6c 0c07 sbc.w ip, ip, r7
|
|
80004b0: 3801 subs r0, #1
|
|
80004b2: 46e1 mov r9, ip
|
|
80004b4: e796 b.n 80003e4 <__udivmoddi4+0x1e4>
|
|
80004b6: eba7 0909 sub.w r9, r7, r9
|
|
80004ba: 4449 add r1, r9
|
|
80004bc: f1a8 0c02 sub.w ip, r8, #2
|
|
80004c0: fbb1 f9fe udiv r9, r1, lr
|
|
80004c4: fb09 f804 mul.w r8, r9, r4
|
|
80004c8: e7db b.n 8000482 <__udivmoddi4+0x282>
|
|
80004ca: 4673 mov r3, lr
|
|
80004cc: e77f b.n 80003ce <__udivmoddi4+0x1ce>
|
|
80004ce: 4650 mov r0, sl
|
|
80004d0: e766 b.n 80003a0 <__udivmoddi4+0x1a0>
|
|
80004d2: 4608 mov r0, r1
|
|
80004d4: e6fd b.n 80002d2 <__udivmoddi4+0xd2>
|
|
80004d6: 443b add r3, r7
|
|
80004d8: 3a02 subs r2, #2
|
|
80004da: e733 b.n 8000344 <__udivmoddi4+0x144>
|
|
80004dc: f1ac 0c02 sub.w ip, ip, #2
|
|
80004e0: 443b add r3, r7
|
|
80004e2: e71c b.n 800031e <__udivmoddi4+0x11e>
|
|
80004e4: 4649 mov r1, r9
|
|
80004e6: e79c b.n 8000422 <__udivmoddi4+0x222>
|
|
80004e8: eba1 0109 sub.w r1, r1, r9
|
|
80004ec: 46c4 mov ip, r8
|
|
80004ee: fbb1 f9fe udiv r9, r1, lr
|
|
80004f2: fb09 f804 mul.w r8, r9, r4
|
|
80004f6: e7c4 b.n 8000482 <__udivmoddi4+0x282>
|
|
|
|
080004f8 <__aeabi_idiv0>:
|
|
80004f8: 4770 bx lr
|
|
80004fa: bf00 nop
|
|
|
|
080004fc <lcd_clock>:
|
|
uint8_t _lcd_line = 0;
|
|
|
|
|
|
|
|
void lcd_clock(void)
|
|
{
|
|
80004fc: b580 push {r7, lr}
|
|
80004fe: af00 add r7, sp, #0
|
|
// Pulse clock
|
|
HAL_GPIO_WritePin(CLOCK_PORT, LCD_CLOCK, 1);
|
|
8000500: 2201 movs r2, #1
|
|
8000502: f44f 4100 mov.w r1, #32768 @ 0x8000
|
|
8000506: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
800050a: f001 fec7 bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
osDelay(1);
|
|
800050e: 2001 movs r0, #1
|
|
8000510: f004 fef9 bl 8005306 <osDelay>
|
|
HAL_GPIO_WritePin(CLOCK_PORT, LCD_CLOCK, 0);
|
|
8000514: 2200 movs r2, #0
|
|
8000516: f44f 4100 mov.w r1, #32768 @ 0x8000
|
|
800051a: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
800051e: f001 febd bl 800229c <HAL_GPIO_WritePin>
|
|
osDelay(1);
|
|
8000522: 2001 movs r0, #1
|
|
8000524: f004 feef bl 8005306 <osDelay>
|
|
}
|
|
8000528: bf00 nop
|
|
800052a: bd80 pop {r7, pc}
|
|
|
|
0800052c <lcd_reset>:
|
|
|
|
void lcd_reset(void)
|
|
{
|
|
800052c: b580 push {r7, lr}
|
|
800052e: af00 add r7, sp, #0
|
|
// Resets display from any state to 4-bit mode, first nibble.
|
|
|
|
// Set everything low first
|
|
HAL_GPIO_WritePin(RS_PORT, LCD_RS, 0);
|
|
8000530: 2200 movs r2, #0
|
|
8000532: 2104 movs r1, #4
|
|
8000534: 4820 ldr r0, [pc, #128] @ (80005b8 <lcd_reset+0x8c>)
|
|
8000536: f001 feb1 bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
HAL_GPIO_WritePin(LCD_PORT7, LCD_7, 0);
|
|
800053a: 2200 movs r2, #0
|
|
800053c: 2110 movs r1, #16
|
|
800053e: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
8000542: f001 feab bl 800229c <HAL_GPIO_WritePin>
|
|
HAL_GPIO_WritePin(LCD_PORT4, LCD_4, 0);
|
|
8000546: 2200 movs r2, #0
|
|
8000548: 2108 movs r1, #8
|
|
800054a: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
800054e: f001 fea5 bl 800229c <HAL_GPIO_WritePin>
|
|
HAL_GPIO_WritePin(LCD_PORT56, LCD_5, 0);
|
|
8000552: 2200 movs r2, #0
|
|
8000554: 2110 movs r1, #16
|
|
8000556: 4818 ldr r0, [pc, #96] @ (80005b8 <lcd_reset+0x8c>)
|
|
8000558: f001 fea0 bl 800229c <HAL_GPIO_WritePin>
|
|
HAL_GPIO_WritePin(LCD_PORT56, LCD_6, 0);
|
|
800055c: 2200 movs r2, #0
|
|
800055e: 2102 movs r1, #2
|
|
8000560: 4815 ldr r0, [pc, #84] @ (80005b8 <lcd_reset+0x8c>)
|
|
8000562: f001 fe9b bl 800229c <HAL_GPIO_WritePin>
|
|
HAL_GPIO_WritePin(CLOCK_PORT, LCD_CLOCK, 0);
|
|
8000566: 2200 movs r2, #0
|
|
8000568: f44f 4100 mov.w r1, #32768 @ 0x8000
|
|
800056c: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
8000570: f001 fe94 bl 800229c <HAL_GPIO_WritePin>
|
|
// from any setting
|
|
|
|
// Write 0b0011 three times
|
|
// (Everyday Practical Electronics says 3 times, Wikipedia says 2 times,
|
|
// 3 seems to work better).
|
|
HAL_GPIO_WritePin(LCD_PORT4, LCD_4, 1);
|
|
8000574: 2201 movs r2, #1
|
|
8000576: 2108 movs r1, #8
|
|
8000578: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
800057c: f001 fe8e bl 800229c <HAL_GPIO_WritePin>
|
|
HAL_GPIO_WritePin(LCD_PORT56, LCD_5, 1);
|
|
8000580: 2201 movs r2, #1
|
|
8000582: 2110 movs r1, #16
|
|
8000584: 480c ldr r0, [pc, #48] @ (80005b8 <lcd_reset+0x8c>)
|
|
8000586: f001 fe89 bl 800229c <HAL_GPIO_WritePin>
|
|
lcd_clock();
|
|
800058a: f7ff ffb7 bl 80004fc <lcd_clock>
|
|
lcd_clock();
|
|
800058e: f7ff ffb5 bl 80004fc <lcd_clock>
|
|
lcd_clock();
|
|
8000592: f7ff ffb3 bl 80004fc <lcd_clock>
|
|
// LCD now guaranteed to be in 8-bit state
|
|
// Now write 0b0010 (set to 4-bit mode, ready for first nibble)
|
|
HAL_GPIO_WritePin(LCD_PORT4, LCD_4, 0);
|
|
8000596: 2200 movs r2, #0
|
|
8000598: 2108 movs r1, #8
|
|
800059a: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
800059e: f001 fe7d bl 800229c <HAL_GPIO_WritePin>
|
|
lcd_clock();
|
|
80005a2: f7ff ffab bl 80004fc <lcd_clock>
|
|
|
|
HAL_GPIO_WritePin(Led_LCD_GPIO_Port, Led_LCD_Pin, 1);
|
|
80005a6: 2201 movs r2, #1
|
|
80005a8: 2104 movs r1, #4
|
|
80005aa: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
80005ae: f001 fe75 bl 800229c <HAL_GPIO_WritePin>
|
|
}
|
|
80005b2: bf00 nop
|
|
80005b4: bd80 pop {r7, pc}
|
|
80005b6: bf00 nop
|
|
80005b8: 48000400 .word 0x48000400
|
|
|
|
080005bc <lcd_write>:
|
|
* for proper masks to be calculated.
|
|
* Aside from this, setting the RS bit seems to go wrong.
|
|
*/
|
|
|
|
void lcd_write(uint8_t byte, uint8_t rs)
|
|
{
|
|
80005bc: b580 push {r7, lr}
|
|
80005be: b082 sub sp, #8
|
|
80005c0: af00 add r7, sp, #0
|
|
80005c2: 4603 mov r3, r0
|
|
80005c4: 460a mov r2, r1
|
|
80005c6: 71fb strb r3, [r7, #7]
|
|
80005c8: 4613 mov r3, r2
|
|
80005ca: 71bb strb r3, [r7, #6]
|
|
// Writes a byte to the display (rs must be either 0 or 1)
|
|
//rs=0 comando;; rs=1 dato
|
|
// Write second nibble and set RS
|
|
|
|
if((byte >> 4 ) & 1)
|
|
80005cc: 79fb ldrb r3, [r7, #7]
|
|
80005ce: 091b lsrs r3, r3, #4
|
|
80005d0: b2db uxtb r3, r3
|
|
80005d2: f003 0301 and.w r3, r3, #1
|
|
80005d6: 2b00 cmp r3, #0
|
|
80005d8: d006 beq.n 80005e8 <lcd_write+0x2c>
|
|
HAL_GPIO_WritePin(LCD_PORT4, LCD_4, 1);
|
|
80005da: 2201 movs r2, #1
|
|
80005dc: 2108 movs r1, #8
|
|
80005de: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
80005e2: f001 fe5b bl 800229c <HAL_GPIO_WritePin>
|
|
80005e6: e005 b.n 80005f4 <lcd_write+0x38>
|
|
else
|
|
HAL_GPIO_WritePin(LCD_PORT4, LCD_4, 0);
|
|
80005e8: 2200 movs r2, #0
|
|
80005ea: 2108 movs r1, #8
|
|
80005ec: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
80005f0: f001 fe54 bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
if((byte >> 5 ) & 1)
|
|
80005f4: 79fb ldrb r3, [r7, #7]
|
|
80005f6: 095b lsrs r3, r3, #5
|
|
80005f8: b2db uxtb r3, r3
|
|
80005fa: f003 0301 and.w r3, r3, #1
|
|
80005fe: 2b00 cmp r3, #0
|
|
8000600: d005 beq.n 800060e <lcd_write+0x52>
|
|
HAL_GPIO_WritePin(LCD_PORT56, LCD_5, 1);
|
|
8000602: 2201 movs r2, #1
|
|
8000604: 2110 movs r1, #16
|
|
8000606: 4847 ldr r0, [pc, #284] @ (8000724 <lcd_write+0x168>)
|
|
8000608: f001 fe48 bl 800229c <HAL_GPIO_WritePin>
|
|
800060c: e004 b.n 8000618 <lcd_write+0x5c>
|
|
else
|
|
HAL_GPIO_WritePin(LCD_PORT56, LCD_5, 0);
|
|
800060e: 2200 movs r2, #0
|
|
8000610: 2110 movs r1, #16
|
|
8000612: 4844 ldr r0, [pc, #272] @ (8000724 <lcd_write+0x168>)
|
|
8000614: f001 fe42 bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
if((byte >> 6 ) & 1)
|
|
8000618: 79fb ldrb r3, [r7, #7]
|
|
800061a: 099b lsrs r3, r3, #6
|
|
800061c: b2db uxtb r3, r3
|
|
800061e: f003 0301 and.w r3, r3, #1
|
|
8000622: 2b00 cmp r3, #0
|
|
8000624: d005 beq.n 8000632 <lcd_write+0x76>
|
|
HAL_GPIO_WritePin(LCD_PORT56, LCD_6, 1);
|
|
8000626: 2201 movs r2, #1
|
|
8000628: 2102 movs r1, #2
|
|
800062a: 483e ldr r0, [pc, #248] @ (8000724 <lcd_write+0x168>)
|
|
800062c: f001 fe36 bl 800229c <HAL_GPIO_WritePin>
|
|
8000630: e004 b.n 800063c <lcd_write+0x80>
|
|
else
|
|
HAL_GPIO_WritePin(LCD_PORT56, LCD_6, 0);
|
|
8000632: 2200 movs r2, #0
|
|
8000634: 2102 movs r1, #2
|
|
8000636: 483b ldr r0, [pc, #236] @ (8000724 <lcd_write+0x168>)
|
|
8000638: f001 fe30 bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
if((byte >> 7 ) & 1)
|
|
800063c: 79fb ldrb r3, [r7, #7]
|
|
800063e: 09db lsrs r3, r3, #7
|
|
8000640: b2db uxtb r3, r3
|
|
8000642: f003 0301 and.w r3, r3, #1
|
|
8000646: 2b00 cmp r3, #0
|
|
8000648: d006 beq.n 8000658 <lcd_write+0x9c>
|
|
HAL_GPIO_WritePin(LCD_PORT7, LCD_7, 1);
|
|
800064a: 2201 movs r2, #1
|
|
800064c: 2110 movs r1, #16
|
|
800064e: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
8000652: f001 fe23 bl 800229c <HAL_GPIO_WritePin>
|
|
8000656: e005 b.n 8000664 <lcd_write+0xa8>
|
|
else
|
|
HAL_GPIO_WritePin(LCD_PORT7, LCD_7, 0);
|
|
8000658: 2200 movs r2, #0
|
|
800065a: 2110 movs r1, #16
|
|
800065c: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
8000660: f001 fe1c bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
if(rs)
|
|
8000664: 79bb ldrb r3, [r7, #6]
|
|
8000666: 2b00 cmp r3, #0
|
|
8000668: d005 beq.n 8000676 <lcd_write+0xba>
|
|
HAL_GPIO_WritePin(RS_PORT, LCD_RS, 1);
|
|
800066a: 2201 movs r2, #1
|
|
800066c: 2104 movs r1, #4
|
|
800066e: 482d ldr r0, [pc, #180] @ (8000724 <lcd_write+0x168>)
|
|
8000670: f001 fe14 bl 800229c <HAL_GPIO_WritePin>
|
|
8000674: e004 b.n 8000680 <lcd_write+0xc4>
|
|
else
|
|
HAL_GPIO_WritePin(RS_PORT, LCD_RS, 0);
|
|
8000676: 2200 movs r2, #0
|
|
8000678: 2104 movs r1, #4
|
|
800067a: 482a ldr r0, [pc, #168] @ (8000724 <lcd_write+0x168>)
|
|
800067c: f001 fe0e bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
lcd_clock();
|
|
8000680: f7ff ff3c bl 80004fc <lcd_clock>
|
|
|
|
// Write first nibble
|
|
|
|
if(byte & 1)
|
|
8000684: 79fb ldrb r3, [r7, #7]
|
|
8000686: f003 0301 and.w r3, r3, #1
|
|
800068a: 2b00 cmp r3, #0
|
|
800068c: d006 beq.n 800069c <lcd_write+0xe0>
|
|
HAL_GPIO_WritePin(LCD_PORT4, LCD_4, 1);
|
|
800068e: 2201 movs r2, #1
|
|
8000690: 2108 movs r1, #8
|
|
8000692: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
8000696: f001 fe01 bl 800229c <HAL_GPIO_WritePin>
|
|
800069a: e005 b.n 80006a8 <lcd_write+0xec>
|
|
else
|
|
HAL_GPIO_WritePin(LCD_PORT4, LCD_4, 0);
|
|
800069c: 2200 movs r2, #0
|
|
800069e: 2108 movs r1, #8
|
|
80006a0: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
80006a4: f001 fdfa bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
if((byte >> 1 ) & 1)
|
|
80006a8: 79fb ldrb r3, [r7, #7]
|
|
80006aa: 085b lsrs r3, r3, #1
|
|
80006ac: b2db uxtb r3, r3
|
|
80006ae: f003 0301 and.w r3, r3, #1
|
|
80006b2: 2b00 cmp r3, #0
|
|
80006b4: d005 beq.n 80006c2 <lcd_write+0x106>
|
|
HAL_GPIO_WritePin(LCD_PORT56, LCD_5, 1);
|
|
80006b6: 2201 movs r2, #1
|
|
80006b8: 2110 movs r1, #16
|
|
80006ba: 481a ldr r0, [pc, #104] @ (8000724 <lcd_write+0x168>)
|
|
80006bc: f001 fdee bl 800229c <HAL_GPIO_WritePin>
|
|
80006c0: e004 b.n 80006cc <lcd_write+0x110>
|
|
else
|
|
HAL_GPIO_WritePin(LCD_PORT56, LCD_5, 0);
|
|
80006c2: 2200 movs r2, #0
|
|
80006c4: 2110 movs r1, #16
|
|
80006c6: 4817 ldr r0, [pc, #92] @ (8000724 <lcd_write+0x168>)
|
|
80006c8: f001 fde8 bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
if((byte >> 2 ) & 1)
|
|
80006cc: 79fb ldrb r3, [r7, #7]
|
|
80006ce: 089b lsrs r3, r3, #2
|
|
80006d0: b2db uxtb r3, r3
|
|
80006d2: f003 0301 and.w r3, r3, #1
|
|
80006d6: 2b00 cmp r3, #0
|
|
80006d8: d005 beq.n 80006e6 <lcd_write+0x12a>
|
|
HAL_GPIO_WritePin(LCD_PORT56, LCD_6, 1);
|
|
80006da: 2201 movs r2, #1
|
|
80006dc: 2102 movs r1, #2
|
|
80006de: 4811 ldr r0, [pc, #68] @ (8000724 <lcd_write+0x168>)
|
|
80006e0: f001 fddc bl 800229c <HAL_GPIO_WritePin>
|
|
80006e4: e004 b.n 80006f0 <lcd_write+0x134>
|
|
else
|
|
HAL_GPIO_WritePin(LCD_PORT56, LCD_6, 0);
|
|
80006e6: 2200 movs r2, #0
|
|
80006e8: 2102 movs r1, #2
|
|
80006ea: 480e ldr r0, [pc, #56] @ (8000724 <lcd_write+0x168>)
|
|
80006ec: f001 fdd6 bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
if((byte >> 3 ) & 1)
|
|
80006f0: 79fb ldrb r3, [r7, #7]
|
|
80006f2: 08db lsrs r3, r3, #3
|
|
80006f4: b2db uxtb r3, r3
|
|
80006f6: f003 0301 and.w r3, r3, #1
|
|
80006fa: 2b00 cmp r3, #0
|
|
80006fc: d006 beq.n 800070c <lcd_write+0x150>
|
|
HAL_GPIO_WritePin(LCD_PORT7, LCD_7, 1);
|
|
80006fe: 2201 movs r2, #1
|
|
8000700: 2110 movs r1, #16
|
|
8000702: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
8000706: f001 fdc9 bl 800229c <HAL_GPIO_WritePin>
|
|
800070a: e005 b.n 8000718 <lcd_write+0x15c>
|
|
else
|
|
HAL_GPIO_WritePin(LCD_PORT7, LCD_7, 0);
|
|
800070c: 2200 movs r2, #0
|
|
800070e: 2110 movs r1, #16
|
|
8000710: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
8000714: f001 fdc2 bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
lcd_clock();
|
|
8000718: f7ff fef0 bl 80004fc <lcd_clock>
|
|
}
|
|
800071c: bf00 nop
|
|
800071e: 3708 adds r7, #8
|
|
8000720: 46bd mov sp, r7
|
|
8000722: bd80 pop {r7, pc}
|
|
8000724: 48000400 .word 0x48000400
|
|
|
|
08000728 <lcd_clear>:
|
|
|
|
void lcd_clear(void)
|
|
{
|
|
8000728: b580 push {r7, lr}
|
|
800072a: af00 add r7, sp, #0
|
|
// Clears display, resets cursor
|
|
lcd_write(0b00000001, 0);
|
|
800072c: 2100 movs r1, #0
|
|
800072e: 2001 movs r0, #1
|
|
8000730: f7ff ff44 bl 80005bc <lcd_write>
|
|
_lcd_char = 0;
|
|
8000734: 4b03 ldr r3, [pc, #12] @ (8000744 <lcd_clear+0x1c>)
|
|
8000736: 2200 movs r2, #0
|
|
8000738: 701a strb r2, [r3, #0]
|
|
_lcd_line = 0;
|
|
800073a: 4b03 ldr r3, [pc, #12] @ (8000748 <lcd_clear+0x20>)
|
|
800073c: 2200 movs r2, #0
|
|
800073e: 701a strb r2, [r3, #0]
|
|
}
|
|
8000740: bf00 nop
|
|
8000742: bd80 pop {r7, pc}
|
|
8000744: 20000034 .word 0x20000034
|
|
8000748: 20000035 .word 0x20000035
|
|
|
|
0800074c <lcd_display_settings>:
|
|
|
|
void lcd_display_settings(uint8_t on, uint8_t underline, uint8_t blink)
|
|
{
|
|
800074c: b580 push {r7, lr}
|
|
800074e: b082 sub sp, #8
|
|
8000750: af00 add r7, sp, #0
|
|
8000752: 4603 mov r3, r0
|
|
8000754: 71fb strb r3, [r7, #7]
|
|
8000756: 460b mov r3, r1
|
|
8000758: 71bb strb r3, [r7, #6]
|
|
800075a: 4613 mov r3, r2
|
|
800075c: 717b strb r3, [r7, #5]
|
|
// "Display On/Off & Cursor" command. All parameters must be either 0 or 1
|
|
|
|
lcd_write(0b00001000 | (on << 2) | (underline << 1) | blink, 0);
|
|
800075e: f997 3007 ldrsb.w r3, [r7, #7]
|
|
8000762: 009b lsls r3, r3, #2
|
|
8000764: b25b sxtb r3, r3
|
|
8000766: f043 0308 orr.w r3, r3, #8
|
|
800076a: b25a sxtb r2, r3
|
|
800076c: f997 3006 ldrsb.w r3, [r7, #6]
|
|
8000770: 005b lsls r3, r3, #1
|
|
8000772: b25b sxtb r3, r3
|
|
8000774: 4313 orrs r3, r2
|
|
8000776: b25a sxtb r2, r3
|
|
8000778: f997 3005 ldrsb.w r3, [r7, #5]
|
|
800077c: 4313 orrs r3, r2
|
|
800077e: b25b sxtb r3, r3
|
|
8000780: b2db uxtb r3, r3
|
|
8000782: 2100 movs r1, #0
|
|
8000784: 4618 mov r0, r3
|
|
8000786: f7ff ff19 bl 80005bc <lcd_write>
|
|
}
|
|
800078a: bf00 nop
|
|
800078c: 3708 adds r7, #8
|
|
800078e: 46bd mov sp, r7
|
|
8000790: bd80 pop {r7, pc}
|
|
|
|
08000792 <lcd_display_address>:
|
|
|
|
void lcd_display_address(uint8_t address)
|
|
{
|
|
8000792: b580 push {r7, lr}
|
|
8000794: b082 sub sp, #8
|
|
8000796: af00 add r7, sp, #0
|
|
8000798: 4603 mov r3, r0
|
|
800079a: 71fb strb r3, [r7, #7]
|
|
lcd_write(0b10000000 | address, 0);
|
|
800079c: 79fb ldrb r3, [r7, #7]
|
|
800079e: f063 037f orn r3, r3, #127 @ 0x7f
|
|
80007a2: b2db uxtb r3, r3
|
|
80007a4: 2100 movs r1, #0
|
|
80007a6: 4618 mov r0, r3
|
|
80007a8: f7ff ff08 bl 80005bc <lcd_write>
|
|
}
|
|
80007ac: bf00 nop
|
|
80007ae: 3708 adds r7, #8
|
|
80007b0: 46bd mov sp, r7
|
|
80007b2: bd80 pop {r7, pc}
|
|
|
|
080007b4 <lcd_print>:
|
|
{
|
|
lcd_write(0b01000000 | address, 0);
|
|
}
|
|
|
|
void lcd_print(char string[])
|
|
{
|
|
80007b4: b580 push {r7, lr}
|
|
80007b6: b084 sub sp, #16
|
|
80007b8: af00 add r7, sp, #0
|
|
80007ba: 6078 str r0, [r7, #4]
|
|
uint8_t i;
|
|
for(i = 0; string[i] != 0; i++) {
|
|
80007bc: 2300 movs r3, #0
|
|
80007be: 73fb strb r3, [r7, #15]
|
|
80007c0: e055 b.n 800086e <lcd_print+0xba>
|
|
// If we know the display properties and a newline character is
|
|
// present, print the rest of the string on the new line.
|
|
if(lcd_lines && string[i] == '\n') {
|
|
80007c2: 4b30 ldr r3, [pc, #192] @ (8000884 <lcd_print+0xd0>)
|
|
80007c4: 781b ldrb r3, [r3, #0]
|
|
80007c6: 2b00 cmp r3, #0
|
|
80007c8: d01c beq.n 8000804 <lcd_print+0x50>
|
|
80007ca: 7bfb ldrb r3, [r7, #15]
|
|
80007cc: 687a ldr r2, [r7, #4]
|
|
80007ce: 4413 add r3, r2
|
|
80007d0: 781b ldrb r3, [r3, #0]
|
|
80007d2: 2b0a cmp r3, #10
|
|
80007d4: d116 bne.n 8000804 <lcd_print+0x50>
|
|
if(_lcd_line < lcd_lines) {
|
|
80007d6: 4b2c ldr r3, [pc, #176] @ (8000888 <lcd_print+0xd4>)
|
|
80007d8: 781a ldrb r2, [r3, #0]
|
|
80007da: 4b2a ldr r3, [pc, #168] @ (8000884 <lcd_print+0xd0>)
|
|
80007dc: 781b ldrb r3, [r3, #0]
|
|
80007de: 429a cmp r2, r3
|
|
80007e0: d242 bcs.n 8000868 <lcd_print+0xb4>
|
|
lcd_display_address(lcd_line_addresses[_lcd_line++]);
|
|
80007e2: 4b2a ldr r3, [pc, #168] @ (800088c <lcd_print+0xd8>)
|
|
80007e4: 681a ldr r2, [r3, #0]
|
|
80007e6: 4b28 ldr r3, [pc, #160] @ (8000888 <lcd_print+0xd4>)
|
|
80007e8: 781b ldrb r3, [r3, #0]
|
|
80007ea: 1c59 adds r1, r3, #1
|
|
80007ec: b2c8 uxtb r0, r1
|
|
80007ee: 4926 ldr r1, [pc, #152] @ (8000888 <lcd_print+0xd4>)
|
|
80007f0: 7008 strb r0, [r1, #0]
|
|
80007f2: 4413 add r3, r2
|
|
80007f4: 781b ldrb r3, [r3, #0]
|
|
80007f6: 4618 mov r0, r3
|
|
80007f8: f7ff ffcb bl 8000792 <lcd_display_address>
|
|
_lcd_char = 0;
|
|
80007fc: 4b24 ldr r3, [pc, #144] @ (8000890 <lcd_print+0xdc>)
|
|
80007fe: 2200 movs r2, #0
|
|
8000800: 701a strb r2, [r3, #0]
|
|
if(_lcd_line < lcd_lines) {
|
|
8000802: e031 b.n 8000868 <lcd_print+0xb4>
|
|
}
|
|
}
|
|
else {
|
|
// If we know the display properties and have reached the end of
|
|
// line, print the rest on the next line
|
|
if(lcd_chars)
|
|
8000804: 4b23 ldr r3, [pc, #140] @ (8000894 <lcd_print+0xe0>)
|
|
8000806: 781b ldrb r3, [r3, #0]
|
|
8000808: 2b00 cmp r3, #0
|
|
800080a: d01b beq.n 8000844 <lcd_print+0x90>
|
|
if((_lcd_char == lcd_chars) && (_lcd_line < lcd_lines)) {
|
|
800080c: 4b20 ldr r3, [pc, #128] @ (8000890 <lcd_print+0xdc>)
|
|
800080e: 781a ldrb r2, [r3, #0]
|
|
8000810: 4b20 ldr r3, [pc, #128] @ (8000894 <lcd_print+0xe0>)
|
|
8000812: 781b ldrb r3, [r3, #0]
|
|
8000814: 429a cmp r2, r3
|
|
8000816: d115 bne.n 8000844 <lcd_print+0x90>
|
|
8000818: 4b1b ldr r3, [pc, #108] @ (8000888 <lcd_print+0xd4>)
|
|
800081a: 781a ldrb r2, [r3, #0]
|
|
800081c: 4b19 ldr r3, [pc, #100] @ (8000884 <lcd_print+0xd0>)
|
|
800081e: 781b ldrb r3, [r3, #0]
|
|
8000820: 429a cmp r2, r3
|
|
8000822: d20f bcs.n 8000844 <lcd_print+0x90>
|
|
lcd_display_address(lcd_line_addresses[_lcd_line++]);
|
|
8000824: 4b19 ldr r3, [pc, #100] @ (800088c <lcd_print+0xd8>)
|
|
8000826: 681a ldr r2, [r3, #0]
|
|
8000828: 4b17 ldr r3, [pc, #92] @ (8000888 <lcd_print+0xd4>)
|
|
800082a: 781b ldrb r3, [r3, #0]
|
|
800082c: 1c59 adds r1, r3, #1
|
|
800082e: b2c8 uxtb r0, r1
|
|
8000830: 4915 ldr r1, [pc, #84] @ (8000888 <lcd_print+0xd4>)
|
|
8000832: 7008 strb r0, [r1, #0]
|
|
8000834: 4413 add r3, r2
|
|
8000836: 781b ldrb r3, [r3, #0]
|
|
8000838: 4618 mov r0, r3
|
|
800083a: f7ff ffaa bl 8000792 <lcd_display_address>
|
|
_lcd_char = 0;
|
|
800083e: 4b14 ldr r3, [pc, #80] @ (8000890 <lcd_print+0xdc>)
|
|
8000840: 2200 movs r2, #0
|
|
8000842: 701a strb r2, [r3, #0]
|
|
}
|
|
lcd_write(string[i], 1);
|
|
8000844: 7bfb ldrb r3, [r7, #15]
|
|
8000846: 687a ldr r2, [r7, #4]
|
|
8000848: 4413 add r3, r2
|
|
800084a: 781b ldrb r3, [r3, #0]
|
|
800084c: 2101 movs r1, #1
|
|
800084e: 4618 mov r0, r3
|
|
8000850: f7ff feb4 bl 80005bc <lcd_write>
|
|
if(lcd_chars) _lcd_char++;
|
|
8000854: 4b0f ldr r3, [pc, #60] @ (8000894 <lcd_print+0xe0>)
|
|
8000856: 781b ldrb r3, [r3, #0]
|
|
8000858: 2b00 cmp r3, #0
|
|
800085a: d005 beq.n 8000868 <lcd_print+0xb4>
|
|
800085c: 4b0c ldr r3, [pc, #48] @ (8000890 <lcd_print+0xdc>)
|
|
800085e: 781b ldrb r3, [r3, #0]
|
|
8000860: 3301 adds r3, #1
|
|
8000862: b2da uxtb r2, r3
|
|
8000864: 4b0a ldr r3, [pc, #40] @ (8000890 <lcd_print+0xdc>)
|
|
8000866: 701a strb r2, [r3, #0]
|
|
for(i = 0; string[i] != 0; i++) {
|
|
8000868: 7bfb ldrb r3, [r7, #15]
|
|
800086a: 3301 adds r3, #1
|
|
800086c: 73fb strb r3, [r7, #15]
|
|
800086e: 7bfb ldrb r3, [r7, #15]
|
|
8000870: 687a ldr r2, [r7, #4]
|
|
8000872: 4413 add r3, r2
|
|
8000874: 781b ldrb r3, [r3, #0]
|
|
8000876: 2b00 cmp r3, #0
|
|
8000878: d1a3 bne.n 80007c2 <lcd_print+0xe>
|
|
}
|
|
}
|
|
}
|
|
800087a: bf00 nop
|
|
800087c: bf00 nop
|
|
800087e: 3710 adds r7, #16
|
|
8000880: 46bd mov sp, r7
|
|
8000882: bd80 pop {r7, pc}
|
|
8000884: 2000002d .word 0x2000002d
|
|
8000888: 20000035 .word 0x20000035
|
|
800088c: 20000030 .word 0x20000030
|
|
8000890: 20000034 .word 0x20000034
|
|
8000894: 2000002c .word 0x2000002c
|
|
|
|
08000898 <writeIntegerToLCD>:
|
|
|
|
void writeIntegerToLCD(int integer)
|
|
{
|
|
8000898: b580 push {r7, lr}
|
|
800089a: b084 sub sp, #16
|
|
800089c: af00 add r7, sp, #0
|
|
800089e: 6078 str r0, [r7, #4]
|
|
// Break down the original number into the thousands, hundreds, tens,
|
|
// and ones places and then immediately write that value to the LCD
|
|
unsigned char thousands = integer / 1000;
|
|
80008a0: 687b ldr r3, [r7, #4]
|
|
80008a2: 4a32 ldr r2, [pc, #200] @ (800096c <writeIntegerToLCD+0xd4>)
|
|
80008a4: fb82 1203 smull r1, r2, r2, r3
|
|
80008a8: 1192 asrs r2, r2, #6
|
|
80008aa: 17db asrs r3, r3, #31
|
|
80008ac: 1ad3 subs r3, r2, r3
|
|
80008ae: 73fb strb r3, [r7, #15]
|
|
lcd_write( thousands + 0x30,1);
|
|
80008b0: 7bfb ldrb r3, [r7, #15]
|
|
80008b2: 3330 adds r3, #48 @ 0x30
|
|
80008b4: b2db uxtb r3, r3
|
|
80008b6: 2101 movs r1, #1
|
|
80008b8: 4618 mov r0, r3
|
|
80008ba: f7ff fe7f bl 80005bc <lcd_write>
|
|
|
|
unsigned char hundreds = (integer - thousands*1000) / 100;
|
|
80008be: 7bfb ldrb r3, [r7, #15]
|
|
80008c0: 4a2b ldr r2, [pc, #172] @ (8000970 <writeIntegerToLCD+0xd8>)
|
|
80008c2: fb03 f202 mul.w r2, r3, r2
|
|
80008c6: 687b ldr r3, [r7, #4]
|
|
80008c8: 4413 add r3, r2
|
|
80008ca: 4a2a ldr r2, [pc, #168] @ (8000974 <writeIntegerToLCD+0xdc>)
|
|
80008cc: fb82 1203 smull r1, r2, r2, r3
|
|
80008d0: 1152 asrs r2, r2, #5
|
|
80008d2: 17db asrs r3, r3, #31
|
|
80008d4: 1ad3 subs r3, r2, r3
|
|
80008d6: 73bb strb r3, [r7, #14]
|
|
lcd_write( hundreds + 0x30,1);
|
|
80008d8: 7bbb ldrb r3, [r7, #14]
|
|
80008da: 3330 adds r3, #48 @ 0x30
|
|
80008dc: b2db uxtb r3, r3
|
|
80008de: 2101 movs r1, #1
|
|
80008e0: 4618 mov r0, r3
|
|
80008e2: f7ff fe6b bl 80005bc <lcd_write>
|
|
|
|
unsigned char tens = (integer - thousands*1000 - hundreds*100 ) / 10;
|
|
80008e6: 7bfb ldrb r3, [r7, #15]
|
|
80008e8: 4a21 ldr r2, [pc, #132] @ (8000970 <writeIntegerToLCD+0xd8>)
|
|
80008ea: fb03 f202 mul.w r2, r3, r2
|
|
80008ee: 687b ldr r3, [r7, #4]
|
|
80008f0: 441a add r2, r3
|
|
80008f2: 7bbb ldrb r3, [r7, #14]
|
|
80008f4: f06f 0163 mvn.w r1, #99 @ 0x63
|
|
80008f8: fb01 f303 mul.w r3, r1, r3
|
|
80008fc: 4413 add r3, r2
|
|
80008fe: 4a1e ldr r2, [pc, #120] @ (8000978 <writeIntegerToLCD+0xe0>)
|
|
8000900: fb82 1203 smull r1, r2, r2, r3
|
|
8000904: 1092 asrs r2, r2, #2
|
|
8000906: 17db asrs r3, r3, #31
|
|
8000908: 1ad3 subs r3, r2, r3
|
|
800090a: 737b strb r3, [r7, #13]
|
|
lcd_write( tens + 0x30,1);
|
|
800090c: 7b7b ldrb r3, [r7, #13]
|
|
800090e: 3330 adds r3, #48 @ 0x30
|
|
8000910: b2db uxtb r3, r3
|
|
8000912: 2101 movs r1, #1
|
|
8000914: 4618 mov r0, r3
|
|
8000916: f7ff fe51 bl 80005bc <lcd_write>
|
|
|
|
unsigned char ones = (integer - thousands*1000 - hundreds*100 - tens*10);
|
|
800091a: 7bfb ldrb r3, [r7, #15]
|
|
800091c: 461a mov r2, r3
|
|
800091e: 0052 lsls r2, r2, #1
|
|
8000920: 4413 add r3, r2
|
|
8000922: 00db lsls r3, r3, #3
|
|
8000924: b2da uxtb r2, r3
|
|
8000926: 7bbb ldrb r3, [r7, #14]
|
|
8000928: 4619 mov r1, r3
|
|
800092a: 0089 lsls r1, r1, #2
|
|
800092c: 4419 add r1, r3
|
|
800092e: 00c9 lsls r1, r1, #3
|
|
8000930: 1acb subs r3, r1, r3
|
|
8000932: 009b lsls r3, r3, #2
|
|
8000934: b2db uxtb r3, r3
|
|
8000936: 4413 add r3, r2
|
|
8000938: b2da uxtb r2, r3
|
|
800093a: 687b ldr r3, [r7, #4]
|
|
800093c: b2db uxtb r3, r3
|
|
800093e: 4413 add r3, r2
|
|
8000940: b2da uxtb r2, r3
|
|
8000942: 7b7b ldrb r3, [r7, #13]
|
|
8000944: 4619 mov r1, r3
|
|
8000946: 0149 lsls r1, r1, #5
|
|
8000948: 1ac9 subs r1, r1, r3
|
|
800094a: 0089 lsls r1, r1, #2
|
|
800094c: 1acb subs r3, r1, r3
|
|
800094e: 005b lsls r3, r3, #1
|
|
8000950: b2db uxtb r3, r3
|
|
8000952: 4413 add r3, r2
|
|
8000954: 733b strb r3, [r7, #12]
|
|
lcd_write( ones + 0x30,1);
|
|
8000956: 7b3b ldrb r3, [r7, #12]
|
|
8000958: 3330 adds r3, #48 @ 0x30
|
|
800095a: b2db uxtb r3, r3
|
|
800095c: 2101 movs r1, #1
|
|
800095e: 4618 mov r0, r3
|
|
8000960: f7ff fe2c bl 80005bc <lcd_write>
|
|
}
|
|
8000964: bf00 nop
|
|
8000966: 3710 adds r7, #16
|
|
8000968: 46bd mov sp, r7
|
|
800096a: bd80 pop {r7, pc}
|
|
800096c: 10624dd3 .word 0x10624dd3
|
|
8000970: fffffc18 .word 0xfffffc18
|
|
8000974: 51eb851f .word 0x51eb851f
|
|
8000978: 66666667 .word 0x66666667
|
|
|
|
0800097c <moveToXY>:
|
|
|
|
void moveToXY(unsigned char row, unsigned char column)
|
|
{
|
|
800097c: b580 push {r7, lr}
|
|
800097e: b084 sub sp, #16
|
|
8000980: af00 add r7, sp, #0
|
|
8000982: 4603 mov r3, r0
|
|
8000984: 460a mov r2, r1
|
|
8000986: 71fb strb r3, [r7, #7]
|
|
8000988: 4613 mov r3, r2
|
|
800098a: 71bb strb r3, [r7, #6]
|
|
// Determine the new position
|
|
int position = (row * 16) + column;
|
|
800098c: 79fb ldrb r3, [r7, #7]
|
|
800098e: 011a lsls r2, r3, #4
|
|
8000990: 79bb ldrb r3, [r7, #6]
|
|
8000992: 4413 add r3, r2
|
|
8000994: 60fb str r3, [r7, #12]
|
|
|
|
// Send the correct commands to the command register of the LCD
|
|
if(position < 16)
|
|
8000996: 68fb ldr r3, [r7, #12]
|
|
8000998: 2b0f cmp r3, #15
|
|
800099a: dc0a bgt.n 80009b2 <moveToXY+0x36>
|
|
lcd_write( 0x80 | position,0);
|
|
800099c: 68fb ldr r3, [r7, #12]
|
|
800099e: b25b sxtb r3, r3
|
|
80009a0: f063 037f orn r3, r3, #127 @ 0x7f
|
|
80009a4: b25b sxtb r3, r3
|
|
80009a6: b2db uxtb r3, r3
|
|
80009a8: 2100 movs r1, #0
|
|
80009aa: 4618 mov r0, r3
|
|
80009ac: f7ff fe06 bl 80005bc <lcd_write>
|
|
lcd_write( 0x80 | (position % 16 + 0x40),0);
|
|
else if(position >= 41 && position < 60)
|
|
lcd_write( 0x80 | (position % 40 + 0x14),0);
|
|
else if(position >= 20 && position < 40)
|
|
lcd_write( 0x80 | (position % 60 + 0x54),0);
|
|
}
|
|
80009b0: e059 b.n 8000a66 <moveToXY+0xea>
|
|
else if(position >= 16 && position < 32)
|
|
80009b2: 68fb ldr r3, [r7, #12]
|
|
80009b4: 2b0f cmp r3, #15
|
|
80009b6: dd17 ble.n 80009e8 <moveToXY+0x6c>
|
|
80009b8: 68fb ldr r3, [r7, #12]
|
|
80009ba: 2b1f cmp r3, #31
|
|
80009bc: dc14 bgt.n 80009e8 <moveToXY+0x6c>
|
|
lcd_write( 0x80 | (position % 16 + 0x40),0);
|
|
80009be: 68fb ldr r3, [r7, #12]
|
|
80009c0: 425a negs r2, r3
|
|
80009c2: f003 030f and.w r3, r3, #15
|
|
80009c6: f002 020f and.w r2, r2, #15
|
|
80009ca: bf58 it pl
|
|
80009cc: 4253 negpl r3, r2
|
|
80009ce: b2db uxtb r3, r3
|
|
80009d0: 3340 adds r3, #64 @ 0x40
|
|
80009d2: b2db uxtb r3, r3
|
|
80009d4: b25b sxtb r3, r3
|
|
80009d6: f063 037f orn r3, r3, #127 @ 0x7f
|
|
80009da: b25b sxtb r3, r3
|
|
80009dc: b2db uxtb r3, r3
|
|
80009de: 2100 movs r1, #0
|
|
80009e0: 4618 mov r0, r3
|
|
80009e2: f7ff fdeb bl 80005bc <lcd_write>
|
|
80009e6: e03e b.n 8000a66 <moveToXY+0xea>
|
|
else if(position >= 41 && position < 60)
|
|
80009e8: 68fb ldr r3, [r7, #12]
|
|
80009ea: 2b28 cmp r3, #40 @ 0x28
|
|
80009ec: dd1b ble.n 8000a26 <moveToXY+0xaa>
|
|
80009ee: 68fb ldr r3, [r7, #12]
|
|
80009f0: 2b3b cmp r3, #59 @ 0x3b
|
|
80009f2: dc18 bgt.n 8000a26 <moveToXY+0xaa>
|
|
lcd_write( 0x80 | (position % 40 + 0x14),0);
|
|
80009f4: 68fa ldr r2, [r7, #12]
|
|
80009f6: 4b1e ldr r3, [pc, #120] @ (8000a70 <moveToXY+0xf4>)
|
|
80009f8: fb83 1302 smull r1, r3, r3, r2
|
|
80009fc: 1119 asrs r1, r3, #4
|
|
80009fe: 17d3 asrs r3, r2, #31
|
|
8000a00: 1ac9 subs r1, r1, r3
|
|
8000a02: 460b mov r3, r1
|
|
8000a04: 009b lsls r3, r3, #2
|
|
8000a06: 440b add r3, r1
|
|
8000a08: 00db lsls r3, r3, #3
|
|
8000a0a: 1ad1 subs r1, r2, r3
|
|
8000a0c: b2cb uxtb r3, r1
|
|
8000a0e: 3314 adds r3, #20
|
|
8000a10: b2db uxtb r3, r3
|
|
8000a12: b25b sxtb r3, r3
|
|
8000a14: f063 037f orn r3, r3, #127 @ 0x7f
|
|
8000a18: b25b sxtb r3, r3
|
|
8000a1a: b2db uxtb r3, r3
|
|
8000a1c: 2100 movs r1, #0
|
|
8000a1e: 4618 mov r0, r3
|
|
8000a20: f7ff fdcc bl 80005bc <lcd_write>
|
|
8000a24: e01f b.n 8000a66 <moveToXY+0xea>
|
|
else if(position >= 20 && position < 40)
|
|
8000a26: 68fb ldr r3, [r7, #12]
|
|
8000a28: 2b13 cmp r3, #19
|
|
8000a2a: dd1c ble.n 8000a66 <moveToXY+0xea>
|
|
8000a2c: 68fb ldr r3, [r7, #12]
|
|
8000a2e: 2b27 cmp r3, #39 @ 0x27
|
|
8000a30: dc19 bgt.n 8000a66 <moveToXY+0xea>
|
|
lcd_write( 0x80 | (position % 60 + 0x54),0);
|
|
8000a32: 68fa ldr r2, [r7, #12]
|
|
8000a34: 4b0f ldr r3, [pc, #60] @ (8000a74 <moveToXY+0xf8>)
|
|
8000a36: fb83 1302 smull r1, r3, r3, r2
|
|
8000a3a: 4413 add r3, r2
|
|
8000a3c: 1159 asrs r1, r3, #5
|
|
8000a3e: 17d3 asrs r3, r2, #31
|
|
8000a40: 1ac9 subs r1, r1, r3
|
|
8000a42: 460b mov r3, r1
|
|
8000a44: 011b lsls r3, r3, #4
|
|
8000a46: 1a5b subs r3, r3, r1
|
|
8000a48: 009b lsls r3, r3, #2
|
|
8000a4a: 1ad1 subs r1, r2, r3
|
|
8000a4c: b2cb uxtb r3, r1
|
|
8000a4e: 3354 adds r3, #84 @ 0x54
|
|
8000a50: b2db uxtb r3, r3
|
|
8000a52: b25b sxtb r3, r3
|
|
8000a54: f063 037f orn r3, r3, #127 @ 0x7f
|
|
8000a58: b25b sxtb r3, r3
|
|
8000a5a: b2db uxtb r3, r3
|
|
8000a5c: 2100 movs r1, #0
|
|
8000a5e: 4618 mov r0, r3
|
|
8000a60: f7ff fdac bl 80005bc <lcd_write>
|
|
}
|
|
8000a64: e7ff b.n 8000a66 <moveToXY+0xea>
|
|
8000a66: bf00 nop
|
|
8000a68: 3710 adds r7, #16
|
|
8000a6a: 46bd mov sp, r7
|
|
8000a6c: bd80 pop {r7, pc}
|
|
8000a6e: bf00 nop
|
|
8000a70: 66666667 .word 0x66666667
|
|
8000a74: 88888889 .word 0x88888889
|
|
|
|
08000a78 <main>:
|
|
/**
|
|
* @brief The application entry point.
|
|
* @retval int
|
|
*/
|
|
int main(void)
|
|
{
|
|
8000a78: b580 push {r7, lr}
|
|
8000a7a: af00 add r7, sp, #0
|
|
/* USER CODE END 1 */
|
|
|
|
/* MCU Configuration--------------------------------------------------------*/
|
|
|
|
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
|
|
HAL_Init();
|
|
8000a7c: f000 ffad bl 80019da <HAL_Init>
|
|
/* USER CODE BEGIN Init */
|
|
|
|
/* USER CODE END Init */
|
|
|
|
/* Configure the system clock */
|
|
SystemClock_Config();
|
|
8000a80: f000 f868 bl 8000b54 <SystemClock_Config>
|
|
/* USER CODE BEGIN SysInit */
|
|
|
|
/* USER CODE END SysInit */
|
|
|
|
/* Initialize all configured peripherals */
|
|
MX_GPIO_Init();
|
|
8000a84: f000 fa30 bl 8000ee8 <MX_GPIO_Init>
|
|
MX_DFSDM1_Init();
|
|
8000a88: f000 f8c6 bl 8000c18 <MX_DFSDM1_Init>
|
|
MX_I2C2_Init();
|
|
8000a8c: f000 f8fc bl 8000c88 <MX_I2C2_Init>
|
|
MX_QUADSPI_Init();
|
|
8000a90: f000 f938 bl 8000d04 <MX_QUADSPI_Init>
|
|
MX_SPI3_Init();
|
|
8000a94: f000 f95c bl 8000d50 <MX_SPI3_Init>
|
|
MX_USART1_UART_Init();
|
|
8000a98: f000 f998 bl 8000dcc <MX_USART1_UART_Init>
|
|
MX_USART3_UART_Init();
|
|
8000a9c: f000 f9c6 bl 8000e2c <MX_USART3_UART_Init>
|
|
MX_USB_OTG_FS_PCD_Init();
|
|
8000aa0: f000 f9f4 bl 8000e8c <MX_USB_OTG_FS_PCD_Init>
|
|
/* USER CODE BEGIN 2 */
|
|
|
|
/* USER CODE END 2 */
|
|
|
|
/* Init scheduler */
|
|
osKernelInitialize();
|
|
8000aa4: f004 fb4c bl 8005140 <osKernelInitialize>
|
|
/* add mutexes, ... */
|
|
/* USER CODE END RTOS_MUTEX */
|
|
|
|
/* Create the semaphores(s) */
|
|
/* creation of myLCD */
|
|
myLCDHandle = osSemaphoreNew(1, 1, &myLCD_attributes);
|
|
8000aa8: 4a19 ldr r2, [pc, #100] @ (8000b10 <main+0x98>)
|
|
8000aaa: 2101 movs r1, #1
|
|
8000aac: 2001 movs r0, #1
|
|
8000aae: f004 fc45 bl 800533c <osSemaphoreNew>
|
|
8000ab2: 4603 mov r3, r0
|
|
8000ab4: 4a17 ldr r2, [pc, #92] @ (8000b14 <main+0x9c>)
|
|
8000ab6: 6013 str r3, [r2, #0]
|
|
/* add queues, ... */
|
|
/* USER CODE END RTOS_QUEUES */
|
|
|
|
/* Create the thread(s) */
|
|
/* creation of defaultTask */
|
|
defaultTaskHandle = osThreadNew(StartDefaultTask, NULL, &defaultTask_attributes);
|
|
8000ab8: 4a17 ldr r2, [pc, #92] @ (8000b18 <main+0xa0>)
|
|
8000aba: 2100 movs r1, #0
|
|
8000abc: 4817 ldr r0, [pc, #92] @ (8000b1c <main+0xa4>)
|
|
8000abe: f004 fb89 bl 80051d4 <osThreadNew>
|
|
8000ac2: 4603 mov r3, r0
|
|
8000ac4: 4a16 ldr r2, [pc, #88] @ (8000b20 <main+0xa8>)
|
|
8000ac6: 6013 str r3, [r2, #0]
|
|
|
|
/* creation of led_verde */
|
|
led_verdeHandle = osThreadNew(Start_led_verde, NULL, &led_verde_attributes);
|
|
8000ac8: 4a16 ldr r2, [pc, #88] @ (8000b24 <main+0xac>)
|
|
8000aca: 2100 movs r1, #0
|
|
8000acc: 4816 ldr r0, [pc, #88] @ (8000b28 <main+0xb0>)
|
|
8000ace: f004 fb81 bl 80051d4 <osThreadNew>
|
|
8000ad2: 4603 mov r3, r0
|
|
8000ad4: 4a15 ldr r2, [pc, #84] @ (8000b2c <main+0xb4>)
|
|
8000ad6: 6013 str r3, [r2, #0]
|
|
|
|
/* creation of led_amarillo */
|
|
led_amarilloHandle = osThreadNew(Start_led_amarillo, NULL, &led_amarillo_attributes);
|
|
8000ad8: 4a15 ldr r2, [pc, #84] @ (8000b30 <main+0xb8>)
|
|
8000ada: 2100 movs r1, #0
|
|
8000adc: 4815 ldr r0, [pc, #84] @ (8000b34 <main+0xbc>)
|
|
8000ade: f004 fb79 bl 80051d4 <osThreadNew>
|
|
8000ae2: 4603 mov r3, r0
|
|
8000ae4: 4a14 ldr r2, [pc, #80] @ (8000b38 <main+0xc0>)
|
|
8000ae6: 6013 str r3, [r2, #0]
|
|
|
|
/* creation of lcd_A */
|
|
lcd_AHandle = osThreadNew(Start_lcd_A, NULL, &lcd_A_attributes);
|
|
8000ae8: 4a14 ldr r2, [pc, #80] @ (8000b3c <main+0xc4>)
|
|
8000aea: 2100 movs r1, #0
|
|
8000aec: 4814 ldr r0, [pc, #80] @ (8000b40 <main+0xc8>)
|
|
8000aee: f004 fb71 bl 80051d4 <osThreadNew>
|
|
8000af2: 4603 mov r3, r0
|
|
8000af4: 4a13 ldr r2, [pc, #76] @ (8000b44 <main+0xcc>)
|
|
8000af6: 6013 str r3, [r2, #0]
|
|
|
|
/* creation of lcd_B */
|
|
lcd_BHandle = osThreadNew(Start_lcd_B, NULL, &lcd_B_attributes);
|
|
8000af8: 4a13 ldr r2, [pc, #76] @ (8000b48 <main+0xd0>)
|
|
8000afa: 2100 movs r1, #0
|
|
8000afc: 4813 ldr r0, [pc, #76] @ (8000b4c <main+0xd4>)
|
|
8000afe: f004 fb69 bl 80051d4 <osThreadNew>
|
|
8000b02: 4603 mov r3, r0
|
|
8000b04: 4a12 ldr r2, [pc, #72] @ (8000b50 <main+0xd8>)
|
|
8000b06: 6013 str r3, [r2, #0]
|
|
/* USER CODE BEGIN RTOS_EVENTS */
|
|
/* add events, ... */
|
|
/* USER CODE END RTOS_EVENTS */
|
|
|
|
/* Start scheduler */
|
|
osKernelStart();
|
|
8000b08: f004 fb3e bl 8005188 <osKernelStart>
|
|
|
|
/* We should never get here as control is now taken by the scheduler */
|
|
|
|
/* Infinite loop */
|
|
/* USER CODE BEGIN WHILE */
|
|
while (1)
|
|
8000b0c: bf00 nop
|
|
8000b0e: e7fd b.n 8000b0c <main+0x94>
|
|
8000b10: 08008988 .word 0x08008988
|
|
8000b14: 20000774 .word 0x20000774
|
|
8000b18: 080088d4 .word 0x080088d4
|
|
8000b1c: 080011f1 .word 0x080011f1
|
|
8000b20: 20000760 .word 0x20000760
|
|
8000b24: 080088f8 .word 0x080088f8
|
|
8000b28: 080011fd .word 0x080011fd
|
|
8000b2c: 20000764 .word 0x20000764
|
|
8000b30: 0800891c .word 0x0800891c
|
|
8000b34: 08001235 .word 0x08001235
|
|
8000b38: 20000768 .word 0x20000768
|
|
8000b3c: 08008940 .word 0x08008940
|
|
8000b40: 08001269 .word 0x08001269
|
|
8000b44: 2000076c .word 0x2000076c
|
|
8000b48: 08008964 .word 0x08008964
|
|
8000b4c: 080012dd .word 0x080012dd
|
|
8000b50: 20000770 .word 0x20000770
|
|
|
|
08000b54 <SystemClock_Config>:
|
|
/**
|
|
* @brief System Clock Configuration
|
|
* @retval None
|
|
*/
|
|
void SystemClock_Config(void)
|
|
{
|
|
8000b54: b580 push {r7, lr}
|
|
8000b56: b096 sub sp, #88 @ 0x58
|
|
8000b58: af00 add r7, sp, #0
|
|
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
|
|
8000b5a: f107 0314 add.w r3, r7, #20
|
|
8000b5e: 2244 movs r2, #68 @ 0x44
|
|
8000b60: 2100 movs r1, #0
|
|
8000b62: 4618 mov r0, r3
|
|
8000b64: f007 fe38 bl 80087d8 <memset>
|
|
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
|
|
8000b68: 463b mov r3, r7
|
|
8000b6a: 2200 movs r2, #0
|
|
8000b6c: 601a str r2, [r3, #0]
|
|
8000b6e: 605a str r2, [r3, #4]
|
|
8000b70: 609a str r2, [r3, #8]
|
|
8000b72: 60da str r2, [r3, #12]
|
|
8000b74: 611a str r2, [r3, #16]
|
|
|
|
/** Configure the main internal regulator output voltage
|
|
*/
|
|
if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1) != HAL_OK)
|
|
8000b76: f44f 7000 mov.w r0, #512 @ 0x200
|
|
8000b7a: f001 fe4d bl 8002818 <HAL_PWREx_ControlVoltageScaling>
|
|
8000b7e: 4603 mov r3, r0
|
|
8000b80: 2b00 cmp r3, #0
|
|
8000b82: d001 beq.n 8000b88 <SystemClock_Config+0x34>
|
|
{
|
|
Error_Handler();
|
|
8000b84: f000 fbe4 bl 8001350 <Error_Handler>
|
|
}
|
|
|
|
/** Configure LSE Drive Capability
|
|
*/
|
|
HAL_PWR_EnableBkUpAccess();
|
|
8000b88: f001 fe28 bl 80027dc <HAL_PWR_EnableBkUpAccess>
|
|
__HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_LOW);
|
|
8000b8c: 4b21 ldr r3, [pc, #132] @ (8000c14 <SystemClock_Config+0xc0>)
|
|
8000b8e: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90
|
|
8000b92: 4a20 ldr r2, [pc, #128] @ (8000c14 <SystemClock_Config+0xc0>)
|
|
8000b94: f023 0318 bic.w r3, r3, #24
|
|
8000b98: f8c2 3090 str.w r3, [r2, #144] @ 0x90
|
|
|
|
/** Initializes the RCC Oscillators according to the specified parameters
|
|
* in the RCC_OscInitTypeDef structure.
|
|
*/
|
|
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE|RCC_OSCILLATORTYPE_MSI;
|
|
8000b9c: 2314 movs r3, #20
|
|
8000b9e: 617b str r3, [r7, #20]
|
|
RCC_OscInitStruct.LSEState = RCC_LSE_ON;
|
|
8000ba0: 2301 movs r3, #1
|
|
8000ba2: 61fb str r3, [r7, #28]
|
|
RCC_OscInitStruct.MSIState = RCC_MSI_ON;
|
|
8000ba4: 2301 movs r3, #1
|
|
8000ba6: 62fb str r3, [r7, #44] @ 0x2c
|
|
RCC_OscInitStruct.MSICalibrationValue = 0;
|
|
8000ba8: 2300 movs r3, #0
|
|
8000baa: 633b str r3, [r7, #48] @ 0x30
|
|
RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_6;
|
|
8000bac: 2360 movs r3, #96 @ 0x60
|
|
8000bae: 637b str r3, [r7, #52] @ 0x34
|
|
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
|
|
8000bb0: 2302 movs r3, #2
|
|
8000bb2: 63fb str r3, [r7, #60] @ 0x3c
|
|
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_MSI;
|
|
8000bb4: 2301 movs r3, #1
|
|
8000bb6: 643b str r3, [r7, #64] @ 0x40
|
|
RCC_OscInitStruct.PLL.PLLM = 1;
|
|
8000bb8: 2301 movs r3, #1
|
|
8000bba: 647b str r3, [r7, #68] @ 0x44
|
|
RCC_OscInitStruct.PLL.PLLN = 40;
|
|
8000bbc: 2328 movs r3, #40 @ 0x28
|
|
8000bbe: 64bb str r3, [r7, #72] @ 0x48
|
|
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV7;
|
|
8000bc0: 2307 movs r3, #7
|
|
8000bc2: 64fb str r3, [r7, #76] @ 0x4c
|
|
RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;
|
|
8000bc4: 2302 movs r3, #2
|
|
8000bc6: 653b str r3, [r7, #80] @ 0x50
|
|
RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;
|
|
8000bc8: 2302 movs r3, #2
|
|
8000bca: 657b str r3, [r7, #84] @ 0x54
|
|
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
|
|
8000bcc: f107 0314 add.w r3, r7, #20
|
|
8000bd0: 4618 mov r0, r3
|
|
8000bd2: f001 ff43 bl 8002a5c <HAL_RCC_OscConfig>
|
|
8000bd6: 4603 mov r3, r0
|
|
8000bd8: 2b00 cmp r3, #0
|
|
8000bda: d001 beq.n 8000be0 <SystemClock_Config+0x8c>
|
|
{
|
|
Error_Handler();
|
|
8000bdc: f000 fbb8 bl 8001350 <Error_Handler>
|
|
}
|
|
|
|
/** Initializes the CPU, AHB and APB buses clocks
|
|
*/
|
|
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|
|
8000be0: 230f movs r3, #15
|
|
8000be2: 603b str r3, [r7, #0]
|
|
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
|
|
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
|
8000be4: 2303 movs r3, #3
|
|
8000be6: 607b str r3, [r7, #4]
|
|
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
|
|
8000be8: 2300 movs r3, #0
|
|
8000bea: 60bb str r3, [r7, #8]
|
|
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
|
|
8000bec: 2300 movs r3, #0
|
|
8000bee: 60fb str r3, [r7, #12]
|
|
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
|
|
8000bf0: 2300 movs r3, #0
|
|
8000bf2: 613b str r3, [r7, #16]
|
|
|
|
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK)
|
|
8000bf4: 463b mov r3, r7
|
|
8000bf6: 2104 movs r1, #4
|
|
8000bf8: 4618 mov r0, r3
|
|
8000bfa: f002 fb0b bl 8003214 <HAL_RCC_ClockConfig>
|
|
8000bfe: 4603 mov r3, r0
|
|
8000c00: 2b00 cmp r3, #0
|
|
8000c02: d001 beq.n 8000c08 <SystemClock_Config+0xb4>
|
|
{
|
|
Error_Handler();
|
|
8000c04: f000 fba4 bl 8001350 <Error_Handler>
|
|
}
|
|
|
|
/** Enable MSI Auto calibration
|
|
*/
|
|
HAL_RCCEx_EnableMSIPLLMode();
|
|
8000c08: f003 f812 bl 8003c30 <HAL_RCCEx_EnableMSIPLLMode>
|
|
}
|
|
8000c0c: bf00 nop
|
|
8000c0e: 3758 adds r7, #88 @ 0x58
|
|
8000c10: 46bd mov sp, r7
|
|
8000c12: bd80 pop {r7, pc}
|
|
8000c14: 40021000 .word 0x40021000
|
|
|
|
08000c18 <MX_DFSDM1_Init>:
|
|
* @brief DFSDM1 Initialization Function
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
static void MX_DFSDM1_Init(void)
|
|
{
|
|
8000c18: b580 push {r7, lr}
|
|
8000c1a: af00 add r7, sp, #0
|
|
/* USER CODE END DFSDM1_Init 0 */
|
|
|
|
/* USER CODE BEGIN DFSDM1_Init 1 */
|
|
|
|
/* USER CODE END DFSDM1_Init 1 */
|
|
hdfsdm1_channel1.Instance = DFSDM1_Channel1;
|
|
8000c1c: 4b18 ldr r3, [pc, #96] @ (8000c80 <MX_DFSDM1_Init+0x68>)
|
|
8000c1e: 4a19 ldr r2, [pc, #100] @ (8000c84 <MX_DFSDM1_Init+0x6c>)
|
|
8000c20: 601a str r2, [r3, #0]
|
|
hdfsdm1_channel1.Init.OutputClock.Activation = ENABLE;
|
|
8000c22: 4b17 ldr r3, [pc, #92] @ (8000c80 <MX_DFSDM1_Init+0x68>)
|
|
8000c24: 2201 movs r2, #1
|
|
8000c26: 711a strb r2, [r3, #4]
|
|
hdfsdm1_channel1.Init.OutputClock.Selection = DFSDM_CHANNEL_OUTPUT_CLOCK_SYSTEM;
|
|
8000c28: 4b15 ldr r3, [pc, #84] @ (8000c80 <MX_DFSDM1_Init+0x68>)
|
|
8000c2a: 2200 movs r2, #0
|
|
8000c2c: 609a str r2, [r3, #8]
|
|
hdfsdm1_channel1.Init.OutputClock.Divider = 2;
|
|
8000c2e: 4b14 ldr r3, [pc, #80] @ (8000c80 <MX_DFSDM1_Init+0x68>)
|
|
8000c30: 2202 movs r2, #2
|
|
8000c32: 60da str r2, [r3, #12]
|
|
hdfsdm1_channel1.Init.Input.Multiplexer = DFSDM_CHANNEL_EXTERNAL_INPUTS;
|
|
8000c34: 4b12 ldr r3, [pc, #72] @ (8000c80 <MX_DFSDM1_Init+0x68>)
|
|
8000c36: 2200 movs r2, #0
|
|
8000c38: 611a str r2, [r3, #16]
|
|
hdfsdm1_channel1.Init.Input.DataPacking = DFSDM_CHANNEL_STANDARD_MODE;
|
|
8000c3a: 4b11 ldr r3, [pc, #68] @ (8000c80 <MX_DFSDM1_Init+0x68>)
|
|
8000c3c: 2200 movs r2, #0
|
|
8000c3e: 615a str r2, [r3, #20]
|
|
hdfsdm1_channel1.Init.Input.Pins = DFSDM_CHANNEL_FOLLOWING_CHANNEL_PINS;
|
|
8000c40: 4b0f ldr r3, [pc, #60] @ (8000c80 <MX_DFSDM1_Init+0x68>)
|
|
8000c42: f44f 7280 mov.w r2, #256 @ 0x100
|
|
8000c46: 619a str r2, [r3, #24]
|
|
hdfsdm1_channel1.Init.SerialInterface.Type = DFSDM_CHANNEL_SPI_RISING;
|
|
8000c48: 4b0d ldr r3, [pc, #52] @ (8000c80 <MX_DFSDM1_Init+0x68>)
|
|
8000c4a: 2200 movs r2, #0
|
|
8000c4c: 61da str r2, [r3, #28]
|
|
hdfsdm1_channel1.Init.SerialInterface.SpiClock = DFSDM_CHANNEL_SPI_CLOCK_INTERNAL;
|
|
8000c4e: 4b0c ldr r3, [pc, #48] @ (8000c80 <MX_DFSDM1_Init+0x68>)
|
|
8000c50: 2204 movs r2, #4
|
|
8000c52: 621a str r2, [r3, #32]
|
|
hdfsdm1_channel1.Init.Awd.FilterOrder = DFSDM_CHANNEL_FASTSINC_ORDER;
|
|
8000c54: 4b0a ldr r3, [pc, #40] @ (8000c80 <MX_DFSDM1_Init+0x68>)
|
|
8000c56: 2200 movs r2, #0
|
|
8000c58: 625a str r2, [r3, #36] @ 0x24
|
|
hdfsdm1_channel1.Init.Awd.Oversampling = 1;
|
|
8000c5a: 4b09 ldr r3, [pc, #36] @ (8000c80 <MX_DFSDM1_Init+0x68>)
|
|
8000c5c: 2201 movs r2, #1
|
|
8000c5e: 629a str r2, [r3, #40] @ 0x28
|
|
hdfsdm1_channel1.Init.Offset = 0;
|
|
8000c60: 4b07 ldr r3, [pc, #28] @ (8000c80 <MX_DFSDM1_Init+0x68>)
|
|
8000c62: 2200 movs r2, #0
|
|
8000c64: 62da str r2, [r3, #44] @ 0x2c
|
|
hdfsdm1_channel1.Init.RightBitShift = 0x00;
|
|
8000c66: 4b06 ldr r3, [pc, #24] @ (8000c80 <MX_DFSDM1_Init+0x68>)
|
|
8000c68: 2200 movs r2, #0
|
|
8000c6a: 631a str r2, [r3, #48] @ 0x30
|
|
if (HAL_DFSDM_ChannelInit(&hdfsdm1_channel1) != HAL_OK)
|
|
8000c6c: 4804 ldr r0, [pc, #16] @ (8000c80 <MX_DFSDM1_Init+0x68>)
|
|
8000c6e: f001 f85f bl 8001d30 <HAL_DFSDM_ChannelInit>
|
|
8000c72: 4603 mov r3, r0
|
|
8000c74: 2b00 cmp r3, #0
|
|
8000c76: d001 beq.n 8000c7c <MX_DFSDM1_Init+0x64>
|
|
{
|
|
Error_Handler();
|
|
8000c78: f000 fb6a bl 8001350 <Error_Handler>
|
|
}
|
|
/* USER CODE BEGIN DFSDM1_Init 2 */
|
|
|
|
/* USER CODE END DFSDM1_Init 2 */
|
|
|
|
}
|
|
8000c7c: bf00 nop
|
|
8000c7e: bd80 pop {r7, pc}
|
|
8000c80: 20000038 .word 0x20000038
|
|
8000c84: 40016020 .word 0x40016020
|
|
|
|
08000c88 <MX_I2C2_Init>:
|
|
* @brief I2C2 Initialization Function
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
static void MX_I2C2_Init(void)
|
|
{
|
|
8000c88: b580 push {r7, lr}
|
|
8000c8a: af00 add r7, sp, #0
|
|
/* USER CODE END I2C2_Init 0 */
|
|
|
|
/* USER CODE BEGIN I2C2_Init 1 */
|
|
|
|
/* USER CODE END I2C2_Init 1 */
|
|
hi2c2.Instance = I2C2;
|
|
8000c8c: 4b1b ldr r3, [pc, #108] @ (8000cfc <MX_I2C2_Init+0x74>)
|
|
8000c8e: 4a1c ldr r2, [pc, #112] @ (8000d00 <MX_I2C2_Init+0x78>)
|
|
8000c90: 601a str r2, [r3, #0]
|
|
hi2c2.Init.Timing = 0x00000E14;
|
|
8000c92: 4b1a ldr r3, [pc, #104] @ (8000cfc <MX_I2C2_Init+0x74>)
|
|
8000c94: f640 6214 movw r2, #3604 @ 0xe14
|
|
8000c98: 605a str r2, [r3, #4]
|
|
hi2c2.Init.OwnAddress1 = 0;
|
|
8000c9a: 4b18 ldr r3, [pc, #96] @ (8000cfc <MX_I2C2_Init+0x74>)
|
|
8000c9c: 2200 movs r2, #0
|
|
8000c9e: 609a str r2, [r3, #8]
|
|
hi2c2.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
|
|
8000ca0: 4b16 ldr r3, [pc, #88] @ (8000cfc <MX_I2C2_Init+0x74>)
|
|
8000ca2: 2201 movs r2, #1
|
|
8000ca4: 60da str r2, [r3, #12]
|
|
hi2c2.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
|
|
8000ca6: 4b15 ldr r3, [pc, #84] @ (8000cfc <MX_I2C2_Init+0x74>)
|
|
8000ca8: 2200 movs r2, #0
|
|
8000caa: 611a str r2, [r3, #16]
|
|
hi2c2.Init.OwnAddress2 = 0;
|
|
8000cac: 4b13 ldr r3, [pc, #76] @ (8000cfc <MX_I2C2_Init+0x74>)
|
|
8000cae: 2200 movs r2, #0
|
|
8000cb0: 615a str r2, [r3, #20]
|
|
hi2c2.Init.OwnAddress2Masks = I2C_OA2_NOMASK;
|
|
8000cb2: 4b12 ldr r3, [pc, #72] @ (8000cfc <MX_I2C2_Init+0x74>)
|
|
8000cb4: 2200 movs r2, #0
|
|
8000cb6: 619a str r2, [r3, #24]
|
|
hi2c2.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
|
|
8000cb8: 4b10 ldr r3, [pc, #64] @ (8000cfc <MX_I2C2_Init+0x74>)
|
|
8000cba: 2200 movs r2, #0
|
|
8000cbc: 61da str r2, [r3, #28]
|
|
hi2c2.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
|
|
8000cbe: 4b0f ldr r3, [pc, #60] @ (8000cfc <MX_I2C2_Init+0x74>)
|
|
8000cc0: 2200 movs r2, #0
|
|
8000cc2: 621a str r2, [r3, #32]
|
|
if (HAL_I2C_Init(&hi2c2) != HAL_OK)
|
|
8000cc4: 480d ldr r0, [pc, #52] @ (8000cfc <MX_I2C2_Init+0x74>)
|
|
8000cc6: f001 fb24 bl 8002312 <HAL_I2C_Init>
|
|
8000cca: 4603 mov r3, r0
|
|
8000ccc: 2b00 cmp r3, #0
|
|
8000cce: d001 beq.n 8000cd4 <MX_I2C2_Init+0x4c>
|
|
{
|
|
Error_Handler();
|
|
8000cd0: f000 fb3e bl 8001350 <Error_Handler>
|
|
}
|
|
|
|
/** Configure Analogue filter
|
|
*/
|
|
if (HAL_I2CEx_ConfigAnalogFilter(&hi2c2, I2C_ANALOGFILTER_ENABLE) != HAL_OK)
|
|
8000cd4: 2100 movs r1, #0
|
|
8000cd6: 4809 ldr r0, [pc, #36] @ (8000cfc <MX_I2C2_Init+0x74>)
|
|
8000cd8: f001 fbb6 bl 8002448 <HAL_I2CEx_ConfigAnalogFilter>
|
|
8000cdc: 4603 mov r3, r0
|
|
8000cde: 2b00 cmp r3, #0
|
|
8000ce0: d001 beq.n 8000ce6 <MX_I2C2_Init+0x5e>
|
|
{
|
|
Error_Handler();
|
|
8000ce2: f000 fb35 bl 8001350 <Error_Handler>
|
|
}
|
|
|
|
/** Configure Digital filter
|
|
*/
|
|
if (HAL_I2CEx_ConfigDigitalFilter(&hi2c2, 0) != HAL_OK)
|
|
8000ce6: 2100 movs r1, #0
|
|
8000ce8: 4804 ldr r0, [pc, #16] @ (8000cfc <MX_I2C2_Init+0x74>)
|
|
8000cea: f001 fbf8 bl 80024de <HAL_I2CEx_ConfigDigitalFilter>
|
|
8000cee: 4603 mov r3, r0
|
|
8000cf0: 2b00 cmp r3, #0
|
|
8000cf2: d001 beq.n 8000cf8 <MX_I2C2_Init+0x70>
|
|
{
|
|
Error_Handler();
|
|
8000cf4: f000 fb2c bl 8001350 <Error_Handler>
|
|
}
|
|
/* USER CODE BEGIN I2C2_Init 2 */
|
|
|
|
/* USER CODE END I2C2_Init 2 */
|
|
|
|
}
|
|
8000cf8: bf00 nop
|
|
8000cfa: bd80 pop {r7, pc}
|
|
8000cfc: 20000070 .word 0x20000070
|
|
8000d00: 40005800 .word 0x40005800
|
|
|
|
08000d04 <MX_QUADSPI_Init>:
|
|
* @brief QUADSPI Initialization Function
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
static void MX_QUADSPI_Init(void)
|
|
{
|
|
8000d04: b580 push {r7, lr}
|
|
8000d06: af00 add r7, sp, #0
|
|
|
|
/* USER CODE BEGIN QUADSPI_Init 1 */
|
|
|
|
/* USER CODE END QUADSPI_Init 1 */
|
|
/* QUADSPI parameter configuration*/
|
|
hqspi.Instance = QUADSPI;
|
|
8000d08: 4b0f ldr r3, [pc, #60] @ (8000d48 <MX_QUADSPI_Init+0x44>)
|
|
8000d0a: 4a10 ldr r2, [pc, #64] @ (8000d4c <MX_QUADSPI_Init+0x48>)
|
|
8000d0c: 601a str r2, [r3, #0]
|
|
hqspi.Init.ClockPrescaler = 2;
|
|
8000d0e: 4b0e ldr r3, [pc, #56] @ (8000d48 <MX_QUADSPI_Init+0x44>)
|
|
8000d10: 2202 movs r2, #2
|
|
8000d12: 605a str r2, [r3, #4]
|
|
hqspi.Init.FifoThreshold = 4;
|
|
8000d14: 4b0c ldr r3, [pc, #48] @ (8000d48 <MX_QUADSPI_Init+0x44>)
|
|
8000d16: 2204 movs r2, #4
|
|
8000d18: 609a str r2, [r3, #8]
|
|
hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_HALFCYCLE;
|
|
8000d1a: 4b0b ldr r3, [pc, #44] @ (8000d48 <MX_QUADSPI_Init+0x44>)
|
|
8000d1c: 2210 movs r2, #16
|
|
8000d1e: 60da str r2, [r3, #12]
|
|
hqspi.Init.FlashSize = 23;
|
|
8000d20: 4b09 ldr r3, [pc, #36] @ (8000d48 <MX_QUADSPI_Init+0x44>)
|
|
8000d22: 2217 movs r2, #23
|
|
8000d24: 611a str r2, [r3, #16]
|
|
hqspi.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_1_CYCLE;
|
|
8000d26: 4b08 ldr r3, [pc, #32] @ (8000d48 <MX_QUADSPI_Init+0x44>)
|
|
8000d28: 2200 movs r2, #0
|
|
8000d2a: 615a str r2, [r3, #20]
|
|
hqspi.Init.ClockMode = QSPI_CLOCK_MODE_0;
|
|
8000d2c: 4b06 ldr r3, [pc, #24] @ (8000d48 <MX_QUADSPI_Init+0x44>)
|
|
8000d2e: 2200 movs r2, #0
|
|
8000d30: 619a str r2, [r3, #24]
|
|
if (HAL_QSPI_Init(&hqspi) != HAL_OK)
|
|
8000d32: 4805 ldr r0, [pc, #20] @ (8000d48 <MX_QUADSPI_Init+0x44>)
|
|
8000d34: f001 fdd6 bl 80028e4 <HAL_QSPI_Init>
|
|
8000d38: 4603 mov r3, r0
|
|
8000d3a: 2b00 cmp r3, #0
|
|
8000d3c: d001 beq.n 8000d42 <MX_QUADSPI_Init+0x3e>
|
|
{
|
|
Error_Handler();
|
|
8000d3e: f000 fb07 bl 8001350 <Error_Handler>
|
|
}
|
|
/* USER CODE BEGIN QUADSPI_Init 2 */
|
|
|
|
/* USER CODE END QUADSPI_Init 2 */
|
|
|
|
}
|
|
8000d42: bf00 nop
|
|
8000d44: bd80 pop {r7, pc}
|
|
8000d46: bf00 nop
|
|
8000d48: 200000c4 .word 0x200000c4
|
|
8000d4c: a0001000 .word 0xa0001000
|
|
|
|
08000d50 <MX_SPI3_Init>:
|
|
* @brief SPI3 Initialization Function
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
static void MX_SPI3_Init(void)
|
|
{
|
|
8000d50: b580 push {r7, lr}
|
|
8000d52: af00 add r7, sp, #0
|
|
|
|
/* USER CODE BEGIN SPI3_Init 1 */
|
|
|
|
/* USER CODE END SPI3_Init 1 */
|
|
/* SPI3 parameter configuration*/
|
|
hspi3.Instance = SPI3;
|
|
8000d54: 4b1b ldr r3, [pc, #108] @ (8000dc4 <MX_SPI3_Init+0x74>)
|
|
8000d56: 4a1c ldr r2, [pc, #112] @ (8000dc8 <MX_SPI3_Init+0x78>)
|
|
8000d58: 601a str r2, [r3, #0]
|
|
hspi3.Init.Mode = SPI_MODE_MASTER;
|
|
8000d5a: 4b1a ldr r3, [pc, #104] @ (8000dc4 <MX_SPI3_Init+0x74>)
|
|
8000d5c: f44f 7282 mov.w r2, #260 @ 0x104
|
|
8000d60: 605a str r2, [r3, #4]
|
|
hspi3.Init.Direction = SPI_DIRECTION_2LINES;
|
|
8000d62: 4b18 ldr r3, [pc, #96] @ (8000dc4 <MX_SPI3_Init+0x74>)
|
|
8000d64: 2200 movs r2, #0
|
|
8000d66: 609a str r2, [r3, #8]
|
|
hspi3.Init.DataSize = SPI_DATASIZE_4BIT;
|
|
8000d68: 4b16 ldr r3, [pc, #88] @ (8000dc4 <MX_SPI3_Init+0x74>)
|
|
8000d6a: f44f 7240 mov.w r2, #768 @ 0x300
|
|
8000d6e: 60da str r2, [r3, #12]
|
|
hspi3.Init.CLKPolarity = SPI_POLARITY_LOW;
|
|
8000d70: 4b14 ldr r3, [pc, #80] @ (8000dc4 <MX_SPI3_Init+0x74>)
|
|
8000d72: 2200 movs r2, #0
|
|
8000d74: 611a str r2, [r3, #16]
|
|
hspi3.Init.CLKPhase = SPI_PHASE_1EDGE;
|
|
8000d76: 4b13 ldr r3, [pc, #76] @ (8000dc4 <MX_SPI3_Init+0x74>)
|
|
8000d78: 2200 movs r2, #0
|
|
8000d7a: 615a str r2, [r3, #20]
|
|
hspi3.Init.NSS = SPI_NSS_SOFT;
|
|
8000d7c: 4b11 ldr r3, [pc, #68] @ (8000dc4 <MX_SPI3_Init+0x74>)
|
|
8000d7e: f44f 7200 mov.w r2, #512 @ 0x200
|
|
8000d82: 619a str r2, [r3, #24]
|
|
hspi3.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
|
|
8000d84: 4b0f ldr r3, [pc, #60] @ (8000dc4 <MX_SPI3_Init+0x74>)
|
|
8000d86: 2200 movs r2, #0
|
|
8000d88: 61da str r2, [r3, #28]
|
|
hspi3.Init.FirstBit = SPI_FIRSTBIT_MSB;
|
|
8000d8a: 4b0e ldr r3, [pc, #56] @ (8000dc4 <MX_SPI3_Init+0x74>)
|
|
8000d8c: 2200 movs r2, #0
|
|
8000d8e: 621a str r2, [r3, #32]
|
|
hspi3.Init.TIMode = SPI_TIMODE_DISABLE;
|
|
8000d90: 4b0c ldr r3, [pc, #48] @ (8000dc4 <MX_SPI3_Init+0x74>)
|
|
8000d92: 2200 movs r2, #0
|
|
8000d94: 625a str r2, [r3, #36] @ 0x24
|
|
hspi3.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
|
|
8000d96: 4b0b ldr r3, [pc, #44] @ (8000dc4 <MX_SPI3_Init+0x74>)
|
|
8000d98: 2200 movs r2, #0
|
|
8000d9a: 629a str r2, [r3, #40] @ 0x28
|
|
hspi3.Init.CRCPolynomial = 7;
|
|
8000d9c: 4b09 ldr r3, [pc, #36] @ (8000dc4 <MX_SPI3_Init+0x74>)
|
|
8000d9e: 2207 movs r2, #7
|
|
8000da0: 62da str r2, [r3, #44] @ 0x2c
|
|
hspi3.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE;
|
|
8000da2: 4b08 ldr r3, [pc, #32] @ (8000dc4 <MX_SPI3_Init+0x74>)
|
|
8000da4: 2200 movs r2, #0
|
|
8000da6: 631a str r2, [r3, #48] @ 0x30
|
|
hspi3.Init.NSSPMode = SPI_NSS_PULSE_ENABLE;
|
|
8000da8: 4b06 ldr r3, [pc, #24] @ (8000dc4 <MX_SPI3_Init+0x74>)
|
|
8000daa: 2208 movs r2, #8
|
|
8000dac: 635a str r2, [r3, #52] @ 0x34
|
|
if (HAL_SPI_Init(&hspi3) != HAL_OK)
|
|
8000dae: 4805 ldr r0, [pc, #20] @ (8000dc4 <MX_SPI3_Init+0x74>)
|
|
8000db0: f003 f920 bl 8003ff4 <HAL_SPI_Init>
|
|
8000db4: 4603 mov r3, r0
|
|
8000db6: 2b00 cmp r3, #0
|
|
8000db8: d001 beq.n 8000dbe <MX_SPI3_Init+0x6e>
|
|
{
|
|
Error_Handler();
|
|
8000dba: f000 fac9 bl 8001350 <Error_Handler>
|
|
}
|
|
/* USER CODE BEGIN SPI3_Init 2 */
|
|
|
|
/* USER CODE END SPI3_Init 2 */
|
|
|
|
}
|
|
8000dbe: bf00 nop
|
|
8000dc0: bd80 pop {r7, pc}
|
|
8000dc2: bf00 nop
|
|
8000dc4: 20000108 .word 0x20000108
|
|
8000dc8: 40003c00 .word 0x40003c00
|
|
|
|
08000dcc <MX_USART1_UART_Init>:
|
|
* @brief USART1 Initialization Function
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
static void MX_USART1_UART_Init(void)
|
|
{
|
|
8000dcc: b580 push {r7, lr}
|
|
8000dce: af00 add r7, sp, #0
|
|
/* USER CODE END USART1_Init 0 */
|
|
|
|
/* USER CODE BEGIN USART1_Init 1 */
|
|
|
|
/* USER CODE END USART1_Init 1 */
|
|
huart1.Instance = USART1;
|
|
8000dd0: 4b14 ldr r3, [pc, #80] @ (8000e24 <MX_USART1_UART_Init+0x58>)
|
|
8000dd2: 4a15 ldr r2, [pc, #84] @ (8000e28 <MX_USART1_UART_Init+0x5c>)
|
|
8000dd4: 601a str r2, [r3, #0]
|
|
huart1.Init.BaudRate = 115200;
|
|
8000dd6: 4b13 ldr r3, [pc, #76] @ (8000e24 <MX_USART1_UART_Init+0x58>)
|
|
8000dd8: f44f 32e1 mov.w r2, #115200 @ 0x1c200
|
|
8000ddc: 605a str r2, [r3, #4]
|
|
huart1.Init.WordLength = UART_WORDLENGTH_8B;
|
|
8000dde: 4b11 ldr r3, [pc, #68] @ (8000e24 <MX_USART1_UART_Init+0x58>)
|
|
8000de0: 2200 movs r2, #0
|
|
8000de2: 609a str r2, [r3, #8]
|
|
huart1.Init.StopBits = UART_STOPBITS_1;
|
|
8000de4: 4b0f ldr r3, [pc, #60] @ (8000e24 <MX_USART1_UART_Init+0x58>)
|
|
8000de6: 2200 movs r2, #0
|
|
8000de8: 60da str r2, [r3, #12]
|
|
huart1.Init.Parity = UART_PARITY_NONE;
|
|
8000dea: 4b0e ldr r3, [pc, #56] @ (8000e24 <MX_USART1_UART_Init+0x58>)
|
|
8000dec: 2200 movs r2, #0
|
|
8000dee: 611a str r2, [r3, #16]
|
|
huart1.Init.Mode = UART_MODE_TX_RX;
|
|
8000df0: 4b0c ldr r3, [pc, #48] @ (8000e24 <MX_USART1_UART_Init+0x58>)
|
|
8000df2: 220c movs r2, #12
|
|
8000df4: 615a str r2, [r3, #20]
|
|
huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
|
|
8000df6: 4b0b ldr r3, [pc, #44] @ (8000e24 <MX_USART1_UART_Init+0x58>)
|
|
8000df8: 2200 movs r2, #0
|
|
8000dfa: 619a str r2, [r3, #24]
|
|
huart1.Init.OverSampling = UART_OVERSAMPLING_16;
|
|
8000dfc: 4b09 ldr r3, [pc, #36] @ (8000e24 <MX_USART1_UART_Init+0x58>)
|
|
8000dfe: 2200 movs r2, #0
|
|
8000e00: 61da str r2, [r3, #28]
|
|
huart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
|
|
8000e02: 4b08 ldr r3, [pc, #32] @ (8000e24 <MX_USART1_UART_Init+0x58>)
|
|
8000e04: 2200 movs r2, #0
|
|
8000e06: 621a str r2, [r3, #32]
|
|
huart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
|
|
8000e08: 4b06 ldr r3, [pc, #24] @ (8000e24 <MX_USART1_UART_Init+0x58>)
|
|
8000e0a: 2200 movs r2, #0
|
|
8000e0c: 625a str r2, [r3, #36] @ 0x24
|
|
if (HAL_UART_Init(&huart1) != HAL_OK)
|
|
8000e0e: 4805 ldr r0, [pc, #20] @ (8000e24 <MX_USART1_UART_Init+0x58>)
|
|
8000e10: f003 f993 bl 800413a <HAL_UART_Init>
|
|
8000e14: 4603 mov r3, r0
|
|
8000e16: 2b00 cmp r3, #0
|
|
8000e18: d001 beq.n 8000e1e <MX_USART1_UART_Init+0x52>
|
|
{
|
|
Error_Handler();
|
|
8000e1a: f000 fa99 bl 8001350 <Error_Handler>
|
|
}
|
|
/* USER CODE BEGIN USART1_Init 2 */
|
|
|
|
/* USER CODE END USART1_Init 2 */
|
|
|
|
}
|
|
8000e1e: bf00 nop
|
|
8000e20: bd80 pop {r7, pc}
|
|
8000e22: bf00 nop
|
|
8000e24: 2000016c .word 0x2000016c
|
|
8000e28: 40013800 .word 0x40013800
|
|
|
|
08000e2c <MX_USART3_UART_Init>:
|
|
* @brief USART3 Initialization Function
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
static void MX_USART3_UART_Init(void)
|
|
{
|
|
8000e2c: b580 push {r7, lr}
|
|
8000e2e: af00 add r7, sp, #0
|
|
/* USER CODE END USART3_Init 0 */
|
|
|
|
/* USER CODE BEGIN USART3_Init 1 */
|
|
|
|
/* USER CODE END USART3_Init 1 */
|
|
huart3.Instance = USART3;
|
|
8000e30: 4b14 ldr r3, [pc, #80] @ (8000e84 <MX_USART3_UART_Init+0x58>)
|
|
8000e32: 4a15 ldr r2, [pc, #84] @ (8000e88 <MX_USART3_UART_Init+0x5c>)
|
|
8000e34: 601a str r2, [r3, #0]
|
|
huart3.Init.BaudRate = 115200;
|
|
8000e36: 4b13 ldr r3, [pc, #76] @ (8000e84 <MX_USART3_UART_Init+0x58>)
|
|
8000e38: f44f 32e1 mov.w r2, #115200 @ 0x1c200
|
|
8000e3c: 605a str r2, [r3, #4]
|
|
huart3.Init.WordLength = UART_WORDLENGTH_8B;
|
|
8000e3e: 4b11 ldr r3, [pc, #68] @ (8000e84 <MX_USART3_UART_Init+0x58>)
|
|
8000e40: 2200 movs r2, #0
|
|
8000e42: 609a str r2, [r3, #8]
|
|
huart3.Init.StopBits = UART_STOPBITS_1;
|
|
8000e44: 4b0f ldr r3, [pc, #60] @ (8000e84 <MX_USART3_UART_Init+0x58>)
|
|
8000e46: 2200 movs r2, #0
|
|
8000e48: 60da str r2, [r3, #12]
|
|
huart3.Init.Parity = UART_PARITY_NONE;
|
|
8000e4a: 4b0e ldr r3, [pc, #56] @ (8000e84 <MX_USART3_UART_Init+0x58>)
|
|
8000e4c: 2200 movs r2, #0
|
|
8000e4e: 611a str r2, [r3, #16]
|
|
huart3.Init.Mode = UART_MODE_TX_RX;
|
|
8000e50: 4b0c ldr r3, [pc, #48] @ (8000e84 <MX_USART3_UART_Init+0x58>)
|
|
8000e52: 220c movs r2, #12
|
|
8000e54: 615a str r2, [r3, #20]
|
|
huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE;
|
|
8000e56: 4b0b ldr r3, [pc, #44] @ (8000e84 <MX_USART3_UART_Init+0x58>)
|
|
8000e58: 2200 movs r2, #0
|
|
8000e5a: 619a str r2, [r3, #24]
|
|
huart3.Init.OverSampling = UART_OVERSAMPLING_16;
|
|
8000e5c: 4b09 ldr r3, [pc, #36] @ (8000e84 <MX_USART3_UART_Init+0x58>)
|
|
8000e5e: 2200 movs r2, #0
|
|
8000e60: 61da str r2, [r3, #28]
|
|
huart3.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
|
|
8000e62: 4b08 ldr r3, [pc, #32] @ (8000e84 <MX_USART3_UART_Init+0x58>)
|
|
8000e64: 2200 movs r2, #0
|
|
8000e66: 621a str r2, [r3, #32]
|
|
huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
|
|
8000e68: 4b06 ldr r3, [pc, #24] @ (8000e84 <MX_USART3_UART_Init+0x58>)
|
|
8000e6a: 2200 movs r2, #0
|
|
8000e6c: 625a str r2, [r3, #36] @ 0x24
|
|
if (HAL_UART_Init(&huart3) != HAL_OK)
|
|
8000e6e: 4805 ldr r0, [pc, #20] @ (8000e84 <MX_USART3_UART_Init+0x58>)
|
|
8000e70: f003 f963 bl 800413a <HAL_UART_Init>
|
|
8000e74: 4603 mov r3, r0
|
|
8000e76: 2b00 cmp r3, #0
|
|
8000e78: d001 beq.n 8000e7e <MX_USART3_UART_Init+0x52>
|
|
{
|
|
Error_Handler();
|
|
8000e7a: f000 fa69 bl 8001350 <Error_Handler>
|
|
}
|
|
/* USER CODE BEGIN USART3_Init 2 */
|
|
|
|
/* USER CODE END USART3_Init 2 */
|
|
|
|
}
|
|
8000e7e: bf00 nop
|
|
8000e80: bd80 pop {r7, pc}
|
|
8000e82: bf00 nop
|
|
8000e84: 200001f4 .word 0x200001f4
|
|
8000e88: 40004800 .word 0x40004800
|
|
|
|
08000e8c <MX_USB_OTG_FS_PCD_Init>:
|
|
* @brief USB_OTG_FS Initialization Function
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
static void MX_USB_OTG_FS_PCD_Init(void)
|
|
{
|
|
8000e8c: b580 push {r7, lr}
|
|
8000e8e: af00 add r7, sp, #0
|
|
/* USER CODE END USB_OTG_FS_Init 0 */
|
|
|
|
/* USER CODE BEGIN USB_OTG_FS_Init 1 */
|
|
|
|
/* USER CODE END USB_OTG_FS_Init 1 */
|
|
hpcd_USB_OTG_FS.Instance = USB_OTG_FS;
|
|
8000e90: 4b14 ldr r3, [pc, #80] @ (8000ee4 <MX_USB_OTG_FS_PCD_Init+0x58>)
|
|
8000e92: f04f 42a0 mov.w r2, #1342177280 @ 0x50000000
|
|
8000e96: 601a str r2, [r3, #0]
|
|
hpcd_USB_OTG_FS.Init.dev_endpoints = 6;
|
|
8000e98: 4b12 ldr r3, [pc, #72] @ (8000ee4 <MX_USB_OTG_FS_PCD_Init+0x58>)
|
|
8000e9a: 2206 movs r2, #6
|
|
8000e9c: 711a strb r2, [r3, #4]
|
|
hpcd_USB_OTG_FS.Init.speed = PCD_SPEED_FULL;
|
|
8000e9e: 4b11 ldr r3, [pc, #68] @ (8000ee4 <MX_USB_OTG_FS_PCD_Init+0x58>)
|
|
8000ea0: 2202 movs r2, #2
|
|
8000ea2: 71da strb r2, [r3, #7]
|
|
hpcd_USB_OTG_FS.Init.phy_itface = PCD_PHY_EMBEDDED;
|
|
8000ea4: 4b0f ldr r3, [pc, #60] @ (8000ee4 <MX_USB_OTG_FS_PCD_Init+0x58>)
|
|
8000ea6: 2202 movs r2, #2
|
|
8000ea8: 725a strb r2, [r3, #9]
|
|
hpcd_USB_OTG_FS.Init.Sof_enable = DISABLE;
|
|
8000eaa: 4b0e ldr r3, [pc, #56] @ (8000ee4 <MX_USB_OTG_FS_PCD_Init+0x58>)
|
|
8000eac: 2200 movs r2, #0
|
|
8000eae: 729a strb r2, [r3, #10]
|
|
hpcd_USB_OTG_FS.Init.low_power_enable = DISABLE;
|
|
8000eb0: 4b0c ldr r3, [pc, #48] @ (8000ee4 <MX_USB_OTG_FS_PCD_Init+0x58>)
|
|
8000eb2: 2200 movs r2, #0
|
|
8000eb4: 72da strb r2, [r3, #11]
|
|
hpcd_USB_OTG_FS.Init.lpm_enable = DISABLE;
|
|
8000eb6: 4b0b ldr r3, [pc, #44] @ (8000ee4 <MX_USB_OTG_FS_PCD_Init+0x58>)
|
|
8000eb8: 2200 movs r2, #0
|
|
8000eba: 731a strb r2, [r3, #12]
|
|
hpcd_USB_OTG_FS.Init.battery_charging_enable = DISABLE;
|
|
8000ebc: 4b09 ldr r3, [pc, #36] @ (8000ee4 <MX_USB_OTG_FS_PCD_Init+0x58>)
|
|
8000ebe: 2200 movs r2, #0
|
|
8000ec0: 735a strb r2, [r3, #13]
|
|
hpcd_USB_OTG_FS.Init.use_dedicated_ep1 = DISABLE;
|
|
8000ec2: 4b08 ldr r3, [pc, #32] @ (8000ee4 <MX_USB_OTG_FS_PCD_Init+0x58>)
|
|
8000ec4: 2200 movs r2, #0
|
|
8000ec6: 73da strb r2, [r3, #15]
|
|
hpcd_USB_OTG_FS.Init.vbus_sensing_enable = DISABLE;
|
|
8000ec8: 4b06 ldr r3, [pc, #24] @ (8000ee4 <MX_USB_OTG_FS_PCD_Init+0x58>)
|
|
8000eca: 2200 movs r2, #0
|
|
8000ecc: 739a strb r2, [r3, #14]
|
|
if (HAL_PCD_Init(&hpcd_USB_OTG_FS) != HAL_OK)
|
|
8000ece: 4805 ldr r0, [pc, #20] @ (8000ee4 <MX_USB_OTG_FS_PCD_Init+0x58>)
|
|
8000ed0: f001 fb51 bl 8002576 <HAL_PCD_Init>
|
|
8000ed4: 4603 mov r3, r0
|
|
8000ed6: 2b00 cmp r3, #0
|
|
8000ed8: d001 beq.n 8000ede <MX_USB_OTG_FS_PCD_Init+0x52>
|
|
{
|
|
Error_Handler();
|
|
8000eda: f000 fa39 bl 8001350 <Error_Handler>
|
|
}
|
|
/* USER CODE BEGIN USB_OTG_FS_Init 2 */
|
|
|
|
/* USER CODE END USB_OTG_FS_Init 2 */
|
|
|
|
}
|
|
8000ede: bf00 nop
|
|
8000ee0: bd80 pop {r7, pc}
|
|
8000ee2: bf00 nop
|
|
8000ee4: 2000027c .word 0x2000027c
|
|
|
|
08000ee8 <MX_GPIO_Init>:
|
|
* @brief GPIO Initialization Function
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
static void MX_GPIO_Init(void)
|
|
{
|
|
8000ee8: b580 push {r7, lr}
|
|
8000eea: b08a sub sp, #40 @ 0x28
|
|
8000eec: af00 add r7, sp, #0
|
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
|
8000eee: f107 0314 add.w r3, r7, #20
|
|
8000ef2: 2200 movs r2, #0
|
|
8000ef4: 601a str r2, [r3, #0]
|
|
8000ef6: 605a str r2, [r3, #4]
|
|
8000ef8: 609a str r2, [r3, #8]
|
|
8000efa: 60da str r2, [r3, #12]
|
|
8000efc: 611a str r2, [r3, #16]
|
|
/* USER CODE BEGIN MX_GPIO_Init_1 */
|
|
|
|
/* USER CODE END MX_GPIO_Init_1 */
|
|
|
|
/* GPIO Ports Clock Enable */
|
|
__HAL_RCC_GPIOE_CLK_ENABLE();
|
|
8000efe: 4bb7 ldr r3, [pc, #732] @ (80011dc <MX_GPIO_Init+0x2f4>)
|
|
8000f00: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8000f02: 4ab6 ldr r2, [pc, #728] @ (80011dc <MX_GPIO_Init+0x2f4>)
|
|
8000f04: f043 0310 orr.w r3, r3, #16
|
|
8000f08: 64d3 str r3, [r2, #76] @ 0x4c
|
|
8000f0a: 4bb4 ldr r3, [pc, #720] @ (80011dc <MX_GPIO_Init+0x2f4>)
|
|
8000f0c: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8000f0e: f003 0310 and.w r3, r3, #16
|
|
8000f12: 613b str r3, [r7, #16]
|
|
8000f14: 693b ldr r3, [r7, #16]
|
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
|
8000f16: 4bb1 ldr r3, [pc, #708] @ (80011dc <MX_GPIO_Init+0x2f4>)
|
|
8000f18: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8000f1a: 4ab0 ldr r2, [pc, #704] @ (80011dc <MX_GPIO_Init+0x2f4>)
|
|
8000f1c: f043 0304 orr.w r3, r3, #4
|
|
8000f20: 64d3 str r3, [r2, #76] @ 0x4c
|
|
8000f22: 4bae ldr r3, [pc, #696] @ (80011dc <MX_GPIO_Init+0x2f4>)
|
|
8000f24: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8000f26: f003 0304 and.w r3, r3, #4
|
|
8000f2a: 60fb str r3, [r7, #12]
|
|
8000f2c: 68fb ldr r3, [r7, #12]
|
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
|
8000f2e: 4bab ldr r3, [pc, #684] @ (80011dc <MX_GPIO_Init+0x2f4>)
|
|
8000f30: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8000f32: 4aaa ldr r2, [pc, #680] @ (80011dc <MX_GPIO_Init+0x2f4>)
|
|
8000f34: f043 0301 orr.w r3, r3, #1
|
|
8000f38: 64d3 str r3, [r2, #76] @ 0x4c
|
|
8000f3a: 4ba8 ldr r3, [pc, #672] @ (80011dc <MX_GPIO_Init+0x2f4>)
|
|
8000f3c: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8000f3e: f003 0301 and.w r3, r3, #1
|
|
8000f42: 60bb str r3, [r7, #8]
|
|
8000f44: 68bb ldr r3, [r7, #8]
|
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
|
8000f46: 4ba5 ldr r3, [pc, #660] @ (80011dc <MX_GPIO_Init+0x2f4>)
|
|
8000f48: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8000f4a: 4aa4 ldr r2, [pc, #656] @ (80011dc <MX_GPIO_Init+0x2f4>)
|
|
8000f4c: f043 0302 orr.w r3, r3, #2
|
|
8000f50: 64d3 str r3, [r2, #76] @ 0x4c
|
|
8000f52: 4ba2 ldr r3, [pc, #648] @ (80011dc <MX_GPIO_Init+0x2f4>)
|
|
8000f54: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8000f56: f003 0302 and.w r3, r3, #2
|
|
8000f5a: 607b str r3, [r7, #4]
|
|
8000f5c: 687b ldr r3, [r7, #4]
|
|
__HAL_RCC_GPIOD_CLK_ENABLE();
|
|
8000f5e: 4b9f ldr r3, [pc, #636] @ (80011dc <MX_GPIO_Init+0x2f4>)
|
|
8000f60: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8000f62: 4a9e ldr r2, [pc, #632] @ (80011dc <MX_GPIO_Init+0x2f4>)
|
|
8000f64: f043 0308 orr.w r3, r3, #8
|
|
8000f68: 64d3 str r3, [r2, #76] @ 0x4c
|
|
8000f6a: 4b9c ldr r3, [pc, #624] @ (80011dc <MX_GPIO_Init+0x2f4>)
|
|
8000f6c: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8000f6e: f003 0308 and.w r3, r3, #8
|
|
8000f72: 603b str r3, [r7, #0]
|
|
8000f74: 683b ldr r3, [r7, #0]
|
|
|
|
/*Configure GPIO pin Output Level */
|
|
HAL_GPIO_WritePin(GPIOE, M24SR64_Y_RF_DISABLE_Pin|M24SR64_Y_GPO_Pin|ISM43362_RST_Pin, GPIO_PIN_RESET);
|
|
8000f76: 2200 movs r2, #0
|
|
8000f78: f44f 718a mov.w r1, #276 @ 0x114
|
|
8000f7c: 4898 ldr r0, [pc, #608] @ (80011e0 <MX_GPIO_Init+0x2f8>)
|
|
8000f7e: f001 f98d bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
/*Configure GPIO pin Output Level */
|
|
HAL_GPIO_WritePin(GPIOA, Led_LCD_Pin|D4_LCD_Pin|D7_LCD_Pin|SPBTLE_RF_RST_Pin
|
|
8000f82: 2200 movs r2, #0
|
|
8000f84: f248 111c movw r1, #33052 @ 0x811c
|
|
8000f88: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
8000f8c: f001 f986 bl 800229c <HAL_GPIO_WritePin>
|
|
|E_LCD_Pin, GPIO_PIN_RESET);
|
|
|
|
/*Configure GPIO pin Output Level */
|
|
HAL_GPIO_WritePin(GPIOB, D6_LCD_Pin|RS_LCD_Pin|ISM43362_BOOT0_Pin|ISM43362_WAKEUP_Pin
|
|
8000f90: 2200 movs r2, #0
|
|
8000f92: f24f 0116 movw r1, #61462 @ 0xf016
|
|
8000f96: 4893 ldr r0, [pc, #588] @ (80011e4 <MX_GPIO_Init+0x2fc>)
|
|
8000f98: f001 f980 bl 800229c <HAL_GPIO_WritePin>
|
|
|verde_Pin|SPSGRF_915_SDN_Pin|D5_LCD_Pin, GPIO_PIN_RESET);
|
|
|
|
/*Configure GPIO pin Output Level */
|
|
HAL_GPIO_WritePin(GPIOD, USB_OTG_FS_PWR_EN_Pin|PMOD_RESET_Pin|STSAFE_A100_RESET_Pin, GPIO_PIN_RESET);
|
|
8000f9c: 2200 movs r2, #0
|
|
8000f9e: f241 0181 movw r1, #4225 @ 0x1081
|
|
8000fa2: 4891 ldr r0, [pc, #580] @ (80011e8 <MX_GPIO_Init+0x300>)
|
|
8000fa4: f001 f97a bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
/*Configure GPIO pin Output Level */
|
|
HAL_GPIO_WritePin(SPBTLE_RF_SPI3_CSN_GPIO_Port, SPBTLE_RF_SPI3_CSN_Pin, GPIO_PIN_SET);
|
|
8000fa8: 2201 movs r2, #1
|
|
8000faa: f44f 5100 mov.w r1, #8192 @ 0x2000
|
|
8000fae: 488e ldr r0, [pc, #568] @ (80011e8 <MX_GPIO_Init+0x300>)
|
|
8000fb0: f001 f974 bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
/*Configure GPIO pin Output Level */
|
|
HAL_GPIO_WritePin(GPIOC, VL53L0X_XSHUT_Pin|amarillo_Pin, GPIO_PIN_RESET);
|
|
8000fb4: 2200 movs r2, #0
|
|
8000fb6: f44f 7110 mov.w r1, #576 @ 0x240
|
|
8000fba: 488c ldr r0, [pc, #560] @ (80011ec <MX_GPIO_Init+0x304>)
|
|
8000fbc: f001 f96e bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
/*Configure GPIO pin Output Level */
|
|
HAL_GPIO_WritePin(SPSGRF_915_SPI3_CSN_GPIO_Port, SPSGRF_915_SPI3_CSN_Pin, GPIO_PIN_SET);
|
|
8000fc0: 2201 movs r2, #1
|
|
8000fc2: 2120 movs r1, #32
|
|
8000fc4: 4887 ldr r0, [pc, #540] @ (80011e4 <MX_GPIO_Init+0x2fc>)
|
|
8000fc6: f001 f969 bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
/*Configure GPIO pin Output Level */
|
|
HAL_GPIO_WritePin(ISM43362_SPI3_CSN_GPIO_Port, ISM43362_SPI3_CSN_Pin, GPIO_PIN_SET);
|
|
8000fca: 2201 movs r2, #1
|
|
8000fcc: 2101 movs r1, #1
|
|
8000fce: 4884 ldr r0, [pc, #528] @ (80011e0 <MX_GPIO_Init+0x2f8>)
|
|
8000fd0: f001 f964 bl 800229c <HAL_GPIO_WritePin>
|
|
|
|
/*Configure GPIO pins : M24SR64_Y_RF_DISABLE_Pin M24SR64_Y_GPO_Pin ISM43362_RST_Pin ISM43362_SPI3_CSN_Pin */
|
|
GPIO_InitStruct.Pin = M24SR64_Y_RF_DISABLE_Pin|M24SR64_Y_GPO_Pin|ISM43362_RST_Pin|ISM43362_SPI3_CSN_Pin;
|
|
8000fd4: f240 1315 movw r3, #277 @ 0x115
|
|
8000fd8: 617b str r3, [r7, #20]
|
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
|
8000fda: 2301 movs r3, #1
|
|
8000fdc: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8000fde: 2300 movs r3, #0
|
|
8000fe0: 61fb str r3, [r7, #28]
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
|
8000fe2: 2300 movs r3, #0
|
|
8000fe4: 623b str r3, [r7, #32]
|
|
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
|
8000fe6: f107 0314 add.w r3, r7, #20
|
|
8000fea: 4619 mov r1, r3
|
|
8000fec: 487c ldr r0, [pc, #496] @ (80011e0 <MX_GPIO_Init+0x2f8>)
|
|
8000fee: f000 ffab bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/*Configure GPIO pins : USB_OTG_FS_OVRCR_EXTI3_Pin SPSGRF_915_GPIO3_EXTI5_Pin SPBTLE_RF_IRQ_EXTI6_Pin ISM43362_DRDY_EXTI1_Pin */
|
|
GPIO_InitStruct.Pin = USB_OTG_FS_OVRCR_EXTI3_Pin|SPSGRF_915_GPIO3_EXTI5_Pin|SPBTLE_RF_IRQ_EXTI6_Pin|ISM43362_DRDY_EXTI1_Pin;
|
|
8000ff2: 236a movs r3, #106 @ 0x6a
|
|
8000ff4: 617b str r3, [r7, #20]
|
|
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
|
|
8000ff6: f44f 1388 mov.w r3, #1114112 @ 0x110000
|
|
8000ffa: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8000ffc: 2300 movs r3, #0
|
|
8000ffe: 61fb str r3, [r7, #28]
|
|
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
|
8001000: f107 0314 add.w r3, r7, #20
|
|
8001004: 4619 mov r1, r3
|
|
8001006: 4876 ldr r0, [pc, #472] @ (80011e0 <MX_GPIO_Init+0x2f8>)
|
|
8001008: f000 ff9e bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/*Configure GPIO pin : BUTTON_EXTI13_Pin */
|
|
GPIO_InitStruct.Pin = BUTTON_EXTI13_Pin;
|
|
800100c: f44f 5300 mov.w r3, #8192 @ 0x2000
|
|
8001010: 617b str r3, [r7, #20]
|
|
GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
|
|
8001012: f44f 1304 mov.w r3, #2162688 @ 0x210000
|
|
8001016: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8001018: 2300 movs r3, #0
|
|
800101a: 61fb str r3, [r7, #28]
|
|
HAL_GPIO_Init(BUTTON_EXTI13_GPIO_Port, &GPIO_InitStruct);
|
|
800101c: f107 0314 add.w r3, r7, #20
|
|
8001020: 4619 mov r1, r3
|
|
8001022: 4872 ldr r0, [pc, #456] @ (80011ec <MX_GPIO_Init+0x304>)
|
|
8001024: f000 ff90 bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/*Configure GPIO pins : ARD_A5_Pin ARD_A4_Pin ARD_A3_Pin ARD_A2_Pin
|
|
ARD_A1_Pin ARD_A0_Pin */
|
|
GPIO_InitStruct.Pin = ARD_A5_Pin|ARD_A4_Pin|ARD_A3_Pin|ARD_A2_Pin
|
|
8001028: 233f movs r3, #63 @ 0x3f
|
|
800102a: 617b str r3, [r7, #20]
|
|
|ARD_A1_Pin|ARD_A0_Pin;
|
|
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG_ADC_CONTROL;
|
|
800102c: 230b movs r3, #11
|
|
800102e: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8001030: 2300 movs r3, #0
|
|
8001032: 61fb str r3, [r7, #28]
|
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
|
8001034: f107 0314 add.w r3, r7, #20
|
|
8001038: 4619 mov r1, r3
|
|
800103a: 486c ldr r0, [pc, #432] @ (80011ec <MX_GPIO_Init+0x304>)
|
|
800103c: f000 ff84 bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/*Configure GPIO pins : ARD_D1_Pin ARD_D0_Pin */
|
|
GPIO_InitStruct.Pin = ARD_D1_Pin|ARD_D0_Pin;
|
|
8001040: 2303 movs r3, #3
|
|
8001042: 617b str r3, [r7, #20]
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
8001044: 2302 movs r3, #2
|
|
8001046: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8001048: 2300 movs r3, #0
|
|
800104a: 61fb str r3, [r7, #28]
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
800104c: 2303 movs r3, #3
|
|
800104e: 623b str r3, [r7, #32]
|
|
GPIO_InitStruct.Alternate = GPIO_AF8_UART4;
|
|
8001050: 2308 movs r3, #8
|
|
8001052: 627b str r3, [r7, #36] @ 0x24
|
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
|
8001054: f107 0314 add.w r3, r7, #20
|
|
8001058: 4619 mov r1, r3
|
|
800105a: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
800105e: f000 ff73 bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/*Configure GPIO pins : Led_LCD_Pin D4_LCD_Pin D7_LCD_Pin SPBTLE_RF_RST_Pin
|
|
E_LCD_Pin */
|
|
GPIO_InitStruct.Pin = Led_LCD_Pin|D4_LCD_Pin|D7_LCD_Pin|SPBTLE_RF_RST_Pin
|
|
8001062: f248 131c movw r3, #33052 @ 0x811c
|
|
8001066: 617b str r3, [r7, #20]
|
|
|E_LCD_Pin;
|
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
|
8001068: 2301 movs r3, #1
|
|
800106a: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
800106c: 2300 movs r3, #0
|
|
800106e: 61fb str r3, [r7, #28]
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
|
8001070: 2300 movs r3, #0
|
|
8001072: 623b str r3, [r7, #32]
|
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
|
8001074: f107 0314 add.w r3, r7, #20
|
|
8001078: 4619 mov r1, r3
|
|
800107a: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
800107e: f000 ff63 bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/*Configure GPIO pins : ARD_D13_Pin ARD_D12_Pin ARD_D11_Pin */
|
|
GPIO_InitStruct.Pin = ARD_D13_Pin|ARD_D12_Pin|ARD_D11_Pin;
|
|
8001082: 23e0 movs r3, #224 @ 0xe0
|
|
8001084: 617b str r3, [r7, #20]
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
8001086: 2302 movs r3, #2
|
|
8001088: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
800108a: 2300 movs r3, #0
|
|
800108c: 61fb str r3, [r7, #28]
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
800108e: 2303 movs r3, #3
|
|
8001090: 623b str r3, [r7, #32]
|
|
GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
|
|
8001092: 2305 movs r3, #5
|
|
8001094: 627b str r3, [r7, #36] @ 0x24
|
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
|
8001096: f107 0314 add.w r3, r7, #20
|
|
800109a: 4619 mov r1, r3
|
|
800109c: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
80010a0: f000 ff52 bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/*Configure GPIO pin : ARD_D3_Pin */
|
|
GPIO_InitStruct.Pin = ARD_D3_Pin;
|
|
80010a4: 2301 movs r3, #1
|
|
80010a6: 617b str r3, [r7, #20]
|
|
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
|
|
80010a8: f44f 1388 mov.w r3, #1114112 @ 0x110000
|
|
80010ac: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
80010ae: 2300 movs r3, #0
|
|
80010b0: 61fb str r3, [r7, #28]
|
|
HAL_GPIO_Init(ARD_D3_GPIO_Port, &GPIO_InitStruct);
|
|
80010b2: f107 0314 add.w r3, r7, #20
|
|
80010b6: 4619 mov r1, r3
|
|
80010b8: 484a ldr r0, [pc, #296] @ (80011e4 <MX_GPIO_Init+0x2fc>)
|
|
80010ba: f000 ff45 bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/*Configure GPIO pins : D6_LCD_Pin RS_LCD_Pin ISM43362_BOOT0_Pin ISM43362_WAKEUP_Pin
|
|
verde_Pin SPSGRF_915_SDN_Pin D5_LCD_Pin SPSGRF_915_SPI3_CSN_Pin */
|
|
GPIO_InitStruct.Pin = D6_LCD_Pin|RS_LCD_Pin|ISM43362_BOOT0_Pin|ISM43362_WAKEUP_Pin
|
|
80010be: f24f 0336 movw r3, #61494 @ 0xf036
|
|
80010c2: 617b str r3, [r7, #20]
|
|
|verde_Pin|SPSGRF_915_SDN_Pin|D5_LCD_Pin|SPSGRF_915_SPI3_CSN_Pin;
|
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
|
80010c4: 2301 movs r3, #1
|
|
80010c6: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
80010c8: 2300 movs r3, #0
|
|
80010ca: 61fb str r3, [r7, #28]
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
|
80010cc: 2300 movs r3, #0
|
|
80010ce: 623b str r3, [r7, #32]
|
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
|
80010d0: f107 0314 add.w r3, r7, #20
|
|
80010d4: 4619 mov r1, r3
|
|
80010d6: 4843 ldr r0, [pc, #268] @ (80011e4 <MX_GPIO_Init+0x2fc>)
|
|
80010d8: f000 ff36 bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/*Configure GPIO pins : LPS22HB_INT_DRDY_EXTI0_Pin LSM6DSL_INT1_EXTI11_Pin ARD_D2_Pin HTS221_DRDY_EXTI15_Pin
|
|
PMOD_IRQ_EXTI12_Pin */
|
|
GPIO_InitStruct.Pin = LPS22HB_INT_DRDY_EXTI0_Pin|LSM6DSL_INT1_EXTI11_Pin|ARD_D2_Pin|HTS221_DRDY_EXTI15_Pin
|
|
80010dc: f64c 4304 movw r3, #52228 @ 0xcc04
|
|
80010e0: 617b str r3, [r7, #20]
|
|
|PMOD_IRQ_EXTI12_Pin;
|
|
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
|
|
80010e2: f44f 1388 mov.w r3, #1114112 @ 0x110000
|
|
80010e6: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
80010e8: 2300 movs r3, #0
|
|
80010ea: 61fb str r3, [r7, #28]
|
|
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
|
80010ec: f107 0314 add.w r3, r7, #20
|
|
80010f0: 4619 mov r1, r3
|
|
80010f2: 483d ldr r0, [pc, #244] @ (80011e8 <MX_GPIO_Init+0x300>)
|
|
80010f4: f000 ff28 bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/*Configure GPIO pins : USB_OTG_FS_PWR_EN_Pin SPBTLE_RF_SPI3_CSN_Pin PMOD_RESET_Pin STSAFE_A100_RESET_Pin */
|
|
GPIO_InitStruct.Pin = USB_OTG_FS_PWR_EN_Pin|SPBTLE_RF_SPI3_CSN_Pin|PMOD_RESET_Pin|STSAFE_A100_RESET_Pin;
|
|
80010f8: f243 0381 movw r3, #12417 @ 0x3081
|
|
80010fc: 617b str r3, [r7, #20]
|
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
|
80010fe: 2301 movs r3, #1
|
|
8001100: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8001102: 2300 movs r3, #0
|
|
8001104: 61fb str r3, [r7, #28]
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
|
8001106: 2300 movs r3, #0
|
|
8001108: 623b str r3, [r7, #32]
|
|
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
|
800110a: f107 0314 add.w r3, r7, #20
|
|
800110e: 4619 mov r1, r3
|
|
8001110: 4835 ldr r0, [pc, #212] @ (80011e8 <MX_GPIO_Init+0x300>)
|
|
8001112: f000 ff19 bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/*Configure GPIO pins : VL53L0X_XSHUT_Pin amarillo_Pin */
|
|
GPIO_InitStruct.Pin = VL53L0X_XSHUT_Pin|amarillo_Pin;
|
|
8001116: f44f 7310 mov.w r3, #576 @ 0x240
|
|
800111a: 617b str r3, [r7, #20]
|
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
|
800111c: 2301 movs r3, #1
|
|
800111e: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8001120: 2300 movs r3, #0
|
|
8001122: 61fb str r3, [r7, #28]
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
|
8001124: 2300 movs r3, #0
|
|
8001126: 623b str r3, [r7, #32]
|
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
|
8001128: f107 0314 add.w r3, r7, #20
|
|
800112c: 4619 mov r1, r3
|
|
800112e: 482f ldr r0, [pc, #188] @ (80011ec <MX_GPIO_Init+0x304>)
|
|
8001130: f000 ff0a bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/*Configure GPIO pins : VL53L0X_GPIO1_EXTI7_Pin LSM3MDL_DRDY_EXTI8_Pin */
|
|
GPIO_InitStruct.Pin = VL53L0X_GPIO1_EXTI7_Pin|LSM3MDL_DRDY_EXTI8_Pin;
|
|
8001134: f44f 73c0 mov.w r3, #384 @ 0x180
|
|
8001138: 617b str r3, [r7, #20]
|
|
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
|
|
800113a: f44f 1388 mov.w r3, #1114112 @ 0x110000
|
|
800113e: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8001140: 2300 movs r3, #0
|
|
8001142: 61fb str r3, [r7, #28]
|
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
|
8001144: f107 0314 add.w r3, r7, #20
|
|
8001148: 4619 mov r1, r3
|
|
800114a: 4828 ldr r0, [pc, #160] @ (80011ec <MX_GPIO_Init+0x304>)
|
|
800114c: f000 fefc bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/*Configure GPIO pin : PMOD_SPI2_SCK_Pin */
|
|
GPIO_InitStruct.Pin = PMOD_SPI2_SCK_Pin;
|
|
8001150: 2302 movs r3, #2
|
|
8001152: 617b str r3, [r7, #20]
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
8001154: 2302 movs r3, #2
|
|
8001156: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8001158: 2300 movs r3, #0
|
|
800115a: 61fb str r3, [r7, #28]
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
800115c: 2303 movs r3, #3
|
|
800115e: 623b str r3, [r7, #32]
|
|
GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
|
|
8001160: 2305 movs r3, #5
|
|
8001162: 627b str r3, [r7, #36] @ 0x24
|
|
HAL_GPIO_Init(PMOD_SPI2_SCK_GPIO_Port, &GPIO_InitStruct);
|
|
8001164: f107 0314 add.w r3, r7, #20
|
|
8001168: 4619 mov r1, r3
|
|
800116a: 481f ldr r0, [pc, #124] @ (80011e8 <MX_GPIO_Init+0x300>)
|
|
800116c: f000 feec bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/*Configure GPIO pins : PMOD_UART2_CTS_Pin PMOD_UART2_RTS_Pin PMOD_UART2_TX_Pin PMOD_UART2_RX_Pin */
|
|
GPIO_InitStruct.Pin = PMOD_UART2_CTS_Pin|PMOD_UART2_RTS_Pin|PMOD_UART2_TX_Pin|PMOD_UART2_RX_Pin;
|
|
8001170: 2378 movs r3, #120 @ 0x78
|
|
8001172: 617b str r3, [r7, #20]
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
8001174: 2302 movs r3, #2
|
|
8001176: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8001178: 2300 movs r3, #0
|
|
800117a: 61fb str r3, [r7, #28]
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
800117c: 2303 movs r3, #3
|
|
800117e: 623b str r3, [r7, #32]
|
|
GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
|
|
8001180: 2307 movs r3, #7
|
|
8001182: 627b str r3, [r7, #36] @ 0x24
|
|
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
|
8001184: f107 0314 add.w r3, r7, #20
|
|
8001188: 4619 mov r1, r3
|
|
800118a: 4817 ldr r0, [pc, #92] @ (80011e8 <MX_GPIO_Init+0x300>)
|
|
800118c: f000 fedc bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/*Configure GPIO pins : ARD_D15_Pin ARD_D14_Pin */
|
|
GPIO_InitStruct.Pin = ARD_D15_Pin|ARD_D14_Pin;
|
|
8001190: f44f 7340 mov.w r3, #768 @ 0x300
|
|
8001194: 617b str r3, [r7, #20]
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
|
|
8001196: 2312 movs r3, #18
|
|
8001198: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
800119a: 2300 movs r3, #0
|
|
800119c: 61fb str r3, [r7, #28]
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
800119e: 2303 movs r3, #3
|
|
80011a0: 623b str r3, [r7, #32]
|
|
GPIO_InitStruct.Alternate = GPIO_AF4_I2C1;
|
|
80011a2: 2304 movs r3, #4
|
|
80011a4: 627b str r3, [r7, #36] @ 0x24
|
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
|
80011a6: f107 0314 add.w r3, r7, #20
|
|
80011aa: 4619 mov r1, r3
|
|
80011ac: 480d ldr r0, [pc, #52] @ (80011e4 <MX_GPIO_Init+0x2fc>)
|
|
80011ae: f000 fecb bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/* EXTI interrupt init*/
|
|
HAL_NVIC_SetPriority(EXTI9_5_IRQn, 5, 0);
|
|
80011b2: 2200 movs r2, #0
|
|
80011b4: 2105 movs r1, #5
|
|
80011b6: 2017 movs r0, #23
|
|
80011b8: f000 fd83 bl 8001cc2 <HAL_NVIC_SetPriority>
|
|
HAL_NVIC_EnableIRQ(EXTI9_5_IRQn);
|
|
80011bc: 2017 movs r0, #23
|
|
80011be: f000 fd9c bl 8001cfa <HAL_NVIC_EnableIRQ>
|
|
|
|
HAL_NVIC_SetPriority(EXTI15_10_IRQn, 5, 0);
|
|
80011c2: 2200 movs r2, #0
|
|
80011c4: 2105 movs r1, #5
|
|
80011c6: 2028 movs r0, #40 @ 0x28
|
|
80011c8: f000 fd7b bl 8001cc2 <HAL_NVIC_SetPriority>
|
|
HAL_NVIC_EnableIRQ(EXTI15_10_IRQn);
|
|
80011cc: 2028 movs r0, #40 @ 0x28
|
|
80011ce: f000 fd94 bl 8001cfa <HAL_NVIC_EnableIRQ>
|
|
|
|
/* USER CODE BEGIN MX_GPIO_Init_2 */
|
|
|
|
/* USER CODE END MX_GPIO_Init_2 */
|
|
}
|
|
80011d2: bf00 nop
|
|
80011d4: 3728 adds r7, #40 @ 0x28
|
|
80011d6: 46bd mov sp, r7
|
|
80011d8: bd80 pop {r7, pc}
|
|
80011da: bf00 nop
|
|
80011dc: 40021000 .word 0x40021000
|
|
80011e0: 48001000 .word 0x48001000
|
|
80011e4: 48000400 .word 0x48000400
|
|
80011e8: 48000c00 .word 0x48000c00
|
|
80011ec: 48000800 .word 0x48000800
|
|
|
|
080011f0 <StartDefaultTask>:
|
|
* @param argument: Not used
|
|
* @retval None
|
|
*/
|
|
/* USER CODE END Header_StartDefaultTask */
|
|
void StartDefaultTask(void *argument)
|
|
{
|
|
80011f0: b580 push {r7, lr}
|
|
80011f2: b082 sub sp, #8
|
|
80011f4: af00 add r7, sp, #0
|
|
80011f6: 6078 str r0, [r7, #4]
|
|
/* USER CODE BEGIN 5 */
|
|
/* Infinite loop */
|
|
osThreadExit();
|
|
80011f8: f004 f87e bl 80052f8 <osThreadExit>
|
|
|
|
080011fc <Start_led_verde>:
|
|
* @param argument: Not used
|
|
* @retval None
|
|
*/
|
|
/* USER CODE END Header_Start_led_verde */
|
|
void Start_led_verde(void *argument)
|
|
{
|
|
80011fc: b580 push {r7, lr}
|
|
80011fe: b082 sub sp, #8
|
|
8001200: af00 add r7, sp, #0
|
|
8001202: 6078 str r0, [r7, #4]
|
|
/* USER CODE BEGIN Start_led_verde */
|
|
/* Infinite loop */
|
|
for(;;)
|
|
{
|
|
HAL_GPIO_WritePin(GPIOB, verde_Pin, GPIO_PIN_SET);
|
|
8001204: 2201 movs r2, #1
|
|
8001206: f44f 4180 mov.w r1, #16384 @ 0x4000
|
|
800120a: 4809 ldr r0, [pc, #36] @ (8001230 <Start_led_verde+0x34>)
|
|
800120c: f001 f846 bl 800229c <HAL_GPIO_WritePin>
|
|
osDelay(300);
|
|
8001210: f44f 7096 mov.w r0, #300 @ 0x12c
|
|
8001214: f004 f877 bl 8005306 <osDelay>
|
|
HAL_GPIO_WritePin(GPIOB, verde_Pin, GPIO_PIN_RESET);
|
|
8001218: 2200 movs r2, #0
|
|
800121a: f44f 4180 mov.w r1, #16384 @ 0x4000
|
|
800121e: 4804 ldr r0, [pc, #16] @ (8001230 <Start_led_verde+0x34>)
|
|
8001220: f001 f83c bl 800229c <HAL_GPIO_WritePin>
|
|
osDelay(300);
|
|
8001224: f44f 7096 mov.w r0, #300 @ 0x12c
|
|
8001228: f004 f86d bl 8005306 <osDelay>
|
|
HAL_GPIO_WritePin(GPIOB, verde_Pin, GPIO_PIN_SET);
|
|
800122c: bf00 nop
|
|
800122e: e7e9 b.n 8001204 <Start_led_verde+0x8>
|
|
8001230: 48000400 .word 0x48000400
|
|
|
|
08001234 <Start_led_amarillo>:
|
|
* @param argument: Not used
|
|
* @retval None
|
|
*/
|
|
/* USER CODE END Header_Start_led_amarillo */
|
|
void Start_led_amarillo(void *argument)
|
|
{
|
|
8001234: b580 push {r7, lr}
|
|
8001236: b082 sub sp, #8
|
|
8001238: af00 add r7, sp, #0
|
|
800123a: 6078 str r0, [r7, #4]
|
|
/* USER CODE BEGIN Start_led_amarillo */
|
|
/* Infinite loop */
|
|
for(;;)
|
|
{
|
|
HAL_GPIO_WritePin(GPIOC, amarillo_Pin, GPIO_PIN_SET);
|
|
800123c: 2201 movs r2, #1
|
|
800123e: f44f 7100 mov.w r1, #512 @ 0x200
|
|
8001242: 4808 ldr r0, [pc, #32] @ (8001264 <Start_led_amarillo+0x30>)
|
|
8001244: f001 f82a bl 800229c <HAL_GPIO_WritePin>
|
|
osDelay(200);
|
|
8001248: 20c8 movs r0, #200 @ 0xc8
|
|
800124a: f004 f85c bl 8005306 <osDelay>
|
|
HAL_GPIO_WritePin(GPIOC, amarillo_Pin, GPIO_PIN_RESET);
|
|
800124e: 2200 movs r2, #0
|
|
8001250: f44f 7100 mov.w r1, #512 @ 0x200
|
|
8001254: 4803 ldr r0, [pc, #12] @ (8001264 <Start_led_amarillo+0x30>)
|
|
8001256: f001 f821 bl 800229c <HAL_GPIO_WritePin>
|
|
osDelay(200);
|
|
800125a: 20c8 movs r0, #200 @ 0xc8
|
|
800125c: f004 f853 bl 8005306 <osDelay>
|
|
HAL_GPIO_WritePin(GPIOC, amarillo_Pin, GPIO_PIN_SET);
|
|
8001260: bf00 nop
|
|
8001262: e7eb b.n 800123c <Start_led_amarillo+0x8>
|
|
8001264: 48000800 .word 0x48000800
|
|
|
|
08001268 <Start_lcd_A>:
|
|
* @param argument: Not used
|
|
* @retval None
|
|
*/
|
|
/* USER CODE END Header_Start_lcd_A */
|
|
void Start_lcd_A(void *argument)
|
|
{
|
|
8001268: b580 push {r7, lr}
|
|
800126a: b084 sub sp, #16
|
|
800126c: af00 add r7, sp, #0
|
|
800126e: 6078 str r0, [r7, #4]
|
|
/* USER CODE BEGIN Start_lcd_A */
|
|
/* Infinite loop */
|
|
int counter = 0;
|
|
8001270: 2300 movs r3, #0
|
|
8001272: 60fb str r3, [r7, #12]
|
|
for(;;)
|
|
{
|
|
osSemaphoreAcquire(myLCDHandle, 0xFFFFFFFF);
|
|
8001274: 4b16 ldr r3, [pc, #88] @ (80012d0 <Start_lcd_A+0x68>)
|
|
8001276: 681b ldr r3, [r3, #0]
|
|
8001278: f04f 31ff mov.w r1, #4294967295
|
|
800127c: 4618 mov r0, r3
|
|
800127e: f004 f8e7 bl 8005450 <osSemaphoreAcquire>
|
|
if(!lcd_init)
|
|
8001282: 4b14 ldr r3, [pc, #80] @ (80012d4 <Start_lcd_A+0x6c>)
|
|
8001284: 781b ldrb r3, [r3, #0]
|
|
8001286: 2b00 cmp r3, #0
|
|
8001288: d10b bne.n 80012a2 <Start_lcd_A+0x3a>
|
|
{
|
|
lcd_reset();
|
|
800128a: f7ff f94f bl 800052c <lcd_reset>
|
|
lcd_display_settings(1,0,0);
|
|
800128e: 2200 movs r2, #0
|
|
8001290: 2100 movs r1, #0
|
|
8001292: 2001 movs r0, #1
|
|
8001294: f7ff fa5a bl 800074c <lcd_display_settings>
|
|
lcd_clear();
|
|
8001298: f7ff fa46 bl 8000728 <lcd_clear>
|
|
lcd_init = 1;
|
|
800129c: 4b0d ldr r3, [pc, #52] @ (80012d4 <Start_lcd_A+0x6c>)
|
|
800129e: 2201 movs r2, #1
|
|
80012a0: 701a strb r2, [r3, #0]
|
|
}
|
|
moveToXY(0,0);
|
|
80012a2: 2100 movs r1, #0
|
|
80012a4: 2000 movs r0, #0
|
|
80012a6: f7ff fb69 bl 800097c <moveToXY>
|
|
lcd_print("Tarea A: ");
|
|
80012aa: 480b ldr r0, [pc, #44] @ (80012d8 <Start_lcd_A+0x70>)
|
|
80012ac: f7ff fa82 bl 80007b4 <lcd_print>
|
|
writeIntegerToLCD(counter++);
|
|
80012b0: 68fb ldr r3, [r7, #12]
|
|
80012b2: 1c5a adds r2, r3, #1
|
|
80012b4: 60fa str r2, [r7, #12]
|
|
80012b6: 4618 mov r0, r3
|
|
80012b8: f7ff faee bl 8000898 <writeIntegerToLCD>
|
|
osSemaphoreRelease(myLCDHandle);
|
|
80012bc: 4b04 ldr r3, [pc, #16] @ (80012d0 <Start_lcd_A+0x68>)
|
|
80012be: 681b ldr r3, [r3, #0]
|
|
80012c0: 4618 mov r0, r3
|
|
80012c2: f004 f917 bl 80054f4 <osSemaphoreRelease>
|
|
osDelay(200);
|
|
80012c6: 20c8 movs r0, #200 @ 0xc8
|
|
80012c8: f004 f81d bl 8005306 <osDelay>
|
|
osSemaphoreAcquire(myLCDHandle, 0xFFFFFFFF);
|
|
80012cc: e7d2 b.n 8001274 <Start_lcd_A+0xc>
|
|
80012ce: bf00 nop
|
|
80012d0: 20000774 .word 0x20000774
|
|
80012d4: 20000778 .word 0x20000778
|
|
80012d8: 080088a4 .word 0x080088a4
|
|
|
|
080012dc <Start_lcd_B>:
|
|
* @param argument: Not used
|
|
* @retval None
|
|
*/
|
|
/* USER CODE END Header_Start_lcd_B */
|
|
void Start_lcd_B(void *argument)
|
|
{
|
|
80012dc: b580 push {r7, lr}
|
|
80012de: b084 sub sp, #16
|
|
80012e0: af00 add r7, sp, #0
|
|
80012e2: 6078 str r0, [r7, #4]
|
|
/* USER CODE BEGIN Start_lcd_B */
|
|
/* Infinite loop */
|
|
int counter = 0;
|
|
80012e4: 2300 movs r3, #0
|
|
80012e6: 60fb str r3, [r7, #12]
|
|
for(;;)
|
|
{
|
|
osSemaphoreAcquire(myLCDHandle, 0xFFFFFFFF);
|
|
80012e8: 4b16 ldr r3, [pc, #88] @ (8001344 <Start_lcd_B+0x68>)
|
|
80012ea: 681b ldr r3, [r3, #0]
|
|
80012ec: f04f 31ff mov.w r1, #4294967295
|
|
80012f0: 4618 mov r0, r3
|
|
80012f2: f004 f8ad bl 8005450 <osSemaphoreAcquire>
|
|
if(!lcd_init)
|
|
80012f6: 4b14 ldr r3, [pc, #80] @ (8001348 <Start_lcd_B+0x6c>)
|
|
80012f8: 781b ldrb r3, [r3, #0]
|
|
80012fa: 2b00 cmp r3, #0
|
|
80012fc: d10b bne.n 8001316 <Start_lcd_B+0x3a>
|
|
{
|
|
lcd_reset();
|
|
80012fe: f7ff f915 bl 800052c <lcd_reset>
|
|
lcd_display_settings(1,0,0);
|
|
8001302: 2200 movs r2, #0
|
|
8001304: 2100 movs r1, #0
|
|
8001306: 2001 movs r0, #1
|
|
8001308: f7ff fa20 bl 800074c <lcd_display_settings>
|
|
lcd_clear();
|
|
800130c: f7ff fa0c bl 8000728 <lcd_clear>
|
|
lcd_init = 1;
|
|
8001310: 4b0d ldr r3, [pc, #52] @ (8001348 <Start_lcd_B+0x6c>)
|
|
8001312: 2201 movs r2, #1
|
|
8001314: 701a strb r2, [r3, #0]
|
|
}
|
|
moveToXY(1,0);
|
|
8001316: 2100 movs r1, #0
|
|
8001318: 2001 movs r0, #1
|
|
800131a: f7ff fb2f bl 800097c <moveToXY>
|
|
lcd_print("Tarea B: ");
|
|
800131e: 480b ldr r0, [pc, #44] @ (800134c <Start_lcd_B+0x70>)
|
|
8001320: f7ff fa48 bl 80007b4 <lcd_print>
|
|
writeIntegerToLCD(counter++);
|
|
8001324: 68fb ldr r3, [r7, #12]
|
|
8001326: 1c5a adds r2, r3, #1
|
|
8001328: 60fa str r2, [r7, #12]
|
|
800132a: 4618 mov r0, r3
|
|
800132c: f7ff fab4 bl 8000898 <writeIntegerToLCD>
|
|
osSemaphoreRelease(myLCDHandle);
|
|
8001330: 4b04 ldr r3, [pc, #16] @ (8001344 <Start_lcd_B+0x68>)
|
|
8001332: 681b ldr r3, [r3, #0]
|
|
8001334: 4618 mov r0, r3
|
|
8001336: f004 f8dd bl 80054f4 <osSemaphoreRelease>
|
|
osDelay(200);
|
|
800133a: 20c8 movs r0, #200 @ 0xc8
|
|
800133c: f003 ffe3 bl 8005306 <osDelay>
|
|
osSemaphoreAcquire(myLCDHandle, 0xFFFFFFFF);
|
|
8001340: e7d2 b.n 80012e8 <Start_lcd_B+0xc>
|
|
8001342: bf00 nop
|
|
8001344: 20000774 .word 0x20000774
|
|
8001348: 20000778 .word 0x20000778
|
|
800134c: 080088b0 .word 0x080088b0
|
|
|
|
08001350 <Error_Handler>:
|
|
/**
|
|
* @brief This function is executed in case of error occurrence.
|
|
* @retval None
|
|
*/
|
|
void Error_Handler(void)
|
|
{
|
|
8001350: b480 push {r7}
|
|
8001352: af00 add r7, sp, #0
|
|
\details Disables IRQ interrupts by setting the I-bit in the CPSR.
|
|
Can only be executed in Privileged modes.
|
|
*/
|
|
__STATIC_FORCEINLINE void __disable_irq(void)
|
|
{
|
|
__ASM volatile ("cpsid i" : : : "memory");
|
|
8001354: b672 cpsid i
|
|
}
|
|
8001356: bf00 nop
|
|
/* USER CODE BEGIN Error_Handler_Debug */
|
|
/* User can add his own implementation to report the HAL error return state */
|
|
__disable_irq();
|
|
while (1)
|
|
8001358: bf00 nop
|
|
800135a: e7fd b.n 8001358 <Error_Handler+0x8>
|
|
|
|
0800135c <HAL_MspInit>:
|
|
/* USER CODE END 0 */
|
|
/**
|
|
* Initializes the Global MSP.
|
|
*/
|
|
void HAL_MspInit(void)
|
|
{
|
|
800135c: b580 push {r7, lr}
|
|
800135e: b082 sub sp, #8
|
|
8001360: af00 add r7, sp, #0
|
|
|
|
/* USER CODE BEGIN MspInit 0 */
|
|
|
|
/* USER CODE END MspInit 0 */
|
|
|
|
__HAL_RCC_SYSCFG_CLK_ENABLE();
|
|
8001362: 4b11 ldr r3, [pc, #68] @ (80013a8 <HAL_MspInit+0x4c>)
|
|
8001364: 6e1b ldr r3, [r3, #96] @ 0x60
|
|
8001366: 4a10 ldr r2, [pc, #64] @ (80013a8 <HAL_MspInit+0x4c>)
|
|
8001368: f043 0301 orr.w r3, r3, #1
|
|
800136c: 6613 str r3, [r2, #96] @ 0x60
|
|
800136e: 4b0e ldr r3, [pc, #56] @ (80013a8 <HAL_MspInit+0x4c>)
|
|
8001370: 6e1b ldr r3, [r3, #96] @ 0x60
|
|
8001372: f003 0301 and.w r3, r3, #1
|
|
8001376: 607b str r3, [r7, #4]
|
|
8001378: 687b ldr r3, [r7, #4]
|
|
__HAL_RCC_PWR_CLK_ENABLE();
|
|
800137a: 4b0b ldr r3, [pc, #44] @ (80013a8 <HAL_MspInit+0x4c>)
|
|
800137c: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
800137e: 4a0a ldr r2, [pc, #40] @ (80013a8 <HAL_MspInit+0x4c>)
|
|
8001380: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000
|
|
8001384: 6593 str r3, [r2, #88] @ 0x58
|
|
8001386: 4b08 ldr r3, [pc, #32] @ (80013a8 <HAL_MspInit+0x4c>)
|
|
8001388: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
800138a: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
|
|
800138e: 603b str r3, [r7, #0]
|
|
8001390: 683b ldr r3, [r7, #0]
|
|
|
|
/* System interrupt init*/
|
|
/* PendSV_IRQn interrupt configuration */
|
|
HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0);
|
|
8001392: 2200 movs r2, #0
|
|
8001394: 210f movs r1, #15
|
|
8001396: f06f 0001 mvn.w r0, #1
|
|
800139a: f000 fc92 bl 8001cc2 <HAL_NVIC_SetPriority>
|
|
|
|
/* USER CODE BEGIN MspInit 1 */
|
|
|
|
/* USER CODE END MspInit 1 */
|
|
}
|
|
800139e: bf00 nop
|
|
80013a0: 3708 adds r7, #8
|
|
80013a2: 46bd mov sp, r7
|
|
80013a4: bd80 pop {r7, pc}
|
|
80013a6: bf00 nop
|
|
80013a8: 40021000 .word 0x40021000
|
|
|
|
080013ac <HAL_DFSDM_ChannelMspInit>:
|
|
* This function configures the hardware resources used in this example
|
|
* @param hdfsdm_channel: DFSDM_Channel handle pointer
|
|
* @retval None
|
|
*/
|
|
void HAL_DFSDM_ChannelMspInit(DFSDM_Channel_HandleTypeDef* hdfsdm_channel)
|
|
{
|
|
80013ac: b580 push {r7, lr}
|
|
80013ae: b0ac sub sp, #176 @ 0xb0
|
|
80013b0: af00 add r7, sp, #0
|
|
80013b2: 6078 str r0, [r7, #4]
|
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
|
80013b4: f107 039c add.w r3, r7, #156 @ 0x9c
|
|
80013b8: 2200 movs r2, #0
|
|
80013ba: 601a str r2, [r3, #0]
|
|
80013bc: 605a str r2, [r3, #4]
|
|
80013be: 609a str r2, [r3, #8]
|
|
80013c0: 60da str r2, [r3, #12]
|
|
80013c2: 611a str r2, [r3, #16]
|
|
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
|
|
80013c4: f107 0314 add.w r3, r7, #20
|
|
80013c8: 2288 movs r2, #136 @ 0x88
|
|
80013ca: 2100 movs r1, #0
|
|
80013cc: 4618 mov r0, r3
|
|
80013ce: f007 fa03 bl 80087d8 <memset>
|
|
if(DFSDM1_Init == 0)
|
|
80013d2: 4b25 ldr r3, [pc, #148] @ (8001468 <HAL_DFSDM_ChannelMspInit+0xbc>)
|
|
80013d4: 681b ldr r3, [r3, #0]
|
|
80013d6: 2b00 cmp r3, #0
|
|
80013d8: d142 bne.n 8001460 <HAL_DFSDM_ChannelMspInit+0xb4>
|
|
|
|
/* USER CODE END DFSDM1_MspInit 0 */
|
|
|
|
/** Initializes the peripherals clock
|
|
*/
|
|
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_DFSDM1;
|
|
80013da: f44f 3380 mov.w r3, #65536 @ 0x10000
|
|
80013de: 617b str r3, [r7, #20]
|
|
PeriphClkInit.Dfsdm1ClockSelection = RCC_DFSDM1CLKSOURCE_PCLK;
|
|
80013e0: 2300 movs r3, #0
|
|
80013e2: f8c7 3094 str.w r3, [r7, #148] @ 0x94
|
|
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
|
|
80013e6: f107 0314 add.w r3, r7, #20
|
|
80013ea: 4618 mov r0, r3
|
|
80013ec: f002 f936 bl 800365c <HAL_RCCEx_PeriphCLKConfig>
|
|
80013f0: 4603 mov r3, r0
|
|
80013f2: 2b00 cmp r3, #0
|
|
80013f4: d001 beq.n 80013fa <HAL_DFSDM_ChannelMspInit+0x4e>
|
|
{
|
|
Error_Handler();
|
|
80013f6: f7ff ffab bl 8001350 <Error_Handler>
|
|
}
|
|
|
|
/* Peripheral clock enable */
|
|
__HAL_RCC_DFSDM1_CLK_ENABLE();
|
|
80013fa: 4b1c ldr r3, [pc, #112] @ (800146c <HAL_DFSDM_ChannelMspInit+0xc0>)
|
|
80013fc: 6e1b ldr r3, [r3, #96] @ 0x60
|
|
80013fe: 4a1b ldr r2, [pc, #108] @ (800146c <HAL_DFSDM_ChannelMspInit+0xc0>)
|
|
8001400: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000
|
|
8001404: 6613 str r3, [r2, #96] @ 0x60
|
|
8001406: 4b19 ldr r3, [pc, #100] @ (800146c <HAL_DFSDM_ChannelMspInit+0xc0>)
|
|
8001408: 6e1b ldr r3, [r3, #96] @ 0x60
|
|
800140a: f003 7380 and.w r3, r3, #16777216 @ 0x1000000
|
|
800140e: 613b str r3, [r7, #16]
|
|
8001410: 693b ldr r3, [r7, #16]
|
|
|
|
__HAL_RCC_GPIOE_CLK_ENABLE();
|
|
8001412: 4b16 ldr r3, [pc, #88] @ (800146c <HAL_DFSDM_ChannelMspInit+0xc0>)
|
|
8001414: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8001416: 4a15 ldr r2, [pc, #84] @ (800146c <HAL_DFSDM_ChannelMspInit+0xc0>)
|
|
8001418: f043 0310 orr.w r3, r3, #16
|
|
800141c: 64d3 str r3, [r2, #76] @ 0x4c
|
|
800141e: 4b13 ldr r3, [pc, #76] @ (800146c <HAL_DFSDM_ChannelMspInit+0xc0>)
|
|
8001420: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8001422: f003 0310 and.w r3, r3, #16
|
|
8001426: 60fb str r3, [r7, #12]
|
|
8001428: 68fb ldr r3, [r7, #12]
|
|
/**DFSDM1 GPIO Configuration
|
|
PE7 ------> DFSDM1_DATIN2
|
|
PE9 ------> DFSDM1_CKOUT
|
|
*/
|
|
GPIO_InitStruct.Pin = DFSDM1_DATIN2_Pin|DFSDM1_CKOUT_Pin;
|
|
800142a: f44f 7320 mov.w r3, #640 @ 0x280
|
|
800142e: f8c7 309c str.w r3, [r7, #156] @ 0x9c
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
8001432: 2302 movs r3, #2
|
|
8001434: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8001438: 2300 movs r3, #0
|
|
800143a: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
|
800143e: 2300 movs r3, #0
|
|
8001440: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8
|
|
GPIO_InitStruct.Alternate = GPIO_AF6_DFSDM1;
|
|
8001444: 2306 movs r3, #6
|
|
8001446: f8c7 30ac str.w r3, [r7, #172] @ 0xac
|
|
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
|
800144a: f107 039c add.w r3, r7, #156 @ 0x9c
|
|
800144e: 4619 mov r1, r3
|
|
8001450: 4807 ldr r0, [pc, #28] @ (8001470 <HAL_DFSDM_ChannelMspInit+0xc4>)
|
|
8001452: f000 fd79 bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/* USER CODE BEGIN DFSDM1_MspInit 1 */
|
|
|
|
/* USER CODE END DFSDM1_MspInit 1 */
|
|
|
|
DFSDM1_Init++;
|
|
8001456: 4b04 ldr r3, [pc, #16] @ (8001468 <HAL_DFSDM_ChannelMspInit+0xbc>)
|
|
8001458: 681b ldr r3, [r3, #0]
|
|
800145a: 3301 adds r3, #1
|
|
800145c: 4a02 ldr r2, [pc, #8] @ (8001468 <HAL_DFSDM_ChannelMspInit+0xbc>)
|
|
800145e: 6013 str r3, [r2, #0]
|
|
}
|
|
|
|
}
|
|
8001460: bf00 nop
|
|
8001462: 37b0 adds r7, #176 @ 0xb0
|
|
8001464: 46bd mov sp, r7
|
|
8001466: bd80 pop {r7, pc}
|
|
8001468: 2000077c .word 0x2000077c
|
|
800146c: 40021000 .word 0x40021000
|
|
8001470: 48001000 .word 0x48001000
|
|
|
|
08001474 <HAL_I2C_MspInit>:
|
|
* This function configures the hardware resources used in this example
|
|
* @param hi2c: I2C handle pointer
|
|
* @retval None
|
|
*/
|
|
void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c)
|
|
{
|
|
8001474: b580 push {r7, lr}
|
|
8001476: b0ac sub sp, #176 @ 0xb0
|
|
8001478: af00 add r7, sp, #0
|
|
800147a: 6078 str r0, [r7, #4]
|
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
|
800147c: f107 039c add.w r3, r7, #156 @ 0x9c
|
|
8001480: 2200 movs r2, #0
|
|
8001482: 601a str r2, [r3, #0]
|
|
8001484: 605a str r2, [r3, #4]
|
|
8001486: 609a str r2, [r3, #8]
|
|
8001488: 60da str r2, [r3, #12]
|
|
800148a: 611a str r2, [r3, #16]
|
|
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
|
|
800148c: f107 0314 add.w r3, r7, #20
|
|
8001490: 2288 movs r2, #136 @ 0x88
|
|
8001492: 2100 movs r1, #0
|
|
8001494: 4618 mov r0, r3
|
|
8001496: f007 f99f bl 80087d8 <memset>
|
|
if(hi2c->Instance==I2C2)
|
|
800149a: 687b ldr r3, [r7, #4]
|
|
800149c: 681b ldr r3, [r3, #0]
|
|
800149e: 4a21 ldr r2, [pc, #132] @ (8001524 <HAL_I2C_MspInit+0xb0>)
|
|
80014a0: 4293 cmp r3, r2
|
|
80014a2: d13b bne.n 800151c <HAL_I2C_MspInit+0xa8>
|
|
|
|
/* USER CODE END I2C2_MspInit 0 */
|
|
|
|
/** Initializes the peripherals clock
|
|
*/
|
|
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_I2C2;
|
|
80014a4: 2380 movs r3, #128 @ 0x80
|
|
80014a6: 617b str r3, [r7, #20]
|
|
PeriphClkInit.I2c2ClockSelection = RCC_I2C2CLKSOURCE_PCLK1;
|
|
80014a8: 2300 movs r3, #0
|
|
80014aa: 66bb str r3, [r7, #104] @ 0x68
|
|
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
|
|
80014ac: f107 0314 add.w r3, r7, #20
|
|
80014b0: 4618 mov r0, r3
|
|
80014b2: f002 f8d3 bl 800365c <HAL_RCCEx_PeriphCLKConfig>
|
|
80014b6: 4603 mov r3, r0
|
|
80014b8: 2b00 cmp r3, #0
|
|
80014ba: d001 beq.n 80014c0 <HAL_I2C_MspInit+0x4c>
|
|
{
|
|
Error_Handler();
|
|
80014bc: f7ff ff48 bl 8001350 <Error_Handler>
|
|
}
|
|
|
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
|
80014c0: 4b19 ldr r3, [pc, #100] @ (8001528 <HAL_I2C_MspInit+0xb4>)
|
|
80014c2: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
80014c4: 4a18 ldr r2, [pc, #96] @ (8001528 <HAL_I2C_MspInit+0xb4>)
|
|
80014c6: f043 0302 orr.w r3, r3, #2
|
|
80014ca: 64d3 str r3, [r2, #76] @ 0x4c
|
|
80014cc: 4b16 ldr r3, [pc, #88] @ (8001528 <HAL_I2C_MspInit+0xb4>)
|
|
80014ce: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
80014d0: f003 0302 and.w r3, r3, #2
|
|
80014d4: 613b str r3, [r7, #16]
|
|
80014d6: 693b ldr r3, [r7, #16]
|
|
/**I2C2 GPIO Configuration
|
|
PB10 ------> I2C2_SCL
|
|
PB11 ------> I2C2_SDA
|
|
*/
|
|
GPIO_InitStruct.Pin = INTERNAL_I2C2_SCL_Pin|INTERNAL_I2C2_SDA_Pin;
|
|
80014d8: f44f 6340 mov.w r3, #3072 @ 0xc00
|
|
80014dc: f8c7 309c str.w r3, [r7, #156] @ 0x9c
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
|
|
80014e0: 2312 movs r3, #18
|
|
80014e2: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0
|
|
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
|
80014e6: 2301 movs r3, #1
|
|
80014e8: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
80014ec: 2303 movs r3, #3
|
|
80014ee: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8
|
|
GPIO_InitStruct.Alternate = GPIO_AF4_I2C2;
|
|
80014f2: 2304 movs r3, #4
|
|
80014f4: f8c7 30ac str.w r3, [r7, #172] @ 0xac
|
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
|
80014f8: f107 039c add.w r3, r7, #156 @ 0x9c
|
|
80014fc: 4619 mov r1, r3
|
|
80014fe: 480b ldr r0, [pc, #44] @ (800152c <HAL_I2C_MspInit+0xb8>)
|
|
8001500: f000 fd22 bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/* Peripheral clock enable */
|
|
__HAL_RCC_I2C2_CLK_ENABLE();
|
|
8001504: 4b08 ldr r3, [pc, #32] @ (8001528 <HAL_I2C_MspInit+0xb4>)
|
|
8001506: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
8001508: 4a07 ldr r2, [pc, #28] @ (8001528 <HAL_I2C_MspInit+0xb4>)
|
|
800150a: f443 0380 orr.w r3, r3, #4194304 @ 0x400000
|
|
800150e: 6593 str r3, [r2, #88] @ 0x58
|
|
8001510: 4b05 ldr r3, [pc, #20] @ (8001528 <HAL_I2C_MspInit+0xb4>)
|
|
8001512: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
8001514: f403 0380 and.w r3, r3, #4194304 @ 0x400000
|
|
8001518: 60fb str r3, [r7, #12]
|
|
800151a: 68fb ldr r3, [r7, #12]
|
|
|
|
/* USER CODE END I2C2_MspInit 1 */
|
|
|
|
}
|
|
|
|
}
|
|
800151c: bf00 nop
|
|
800151e: 37b0 adds r7, #176 @ 0xb0
|
|
8001520: 46bd mov sp, r7
|
|
8001522: bd80 pop {r7, pc}
|
|
8001524: 40005800 .word 0x40005800
|
|
8001528: 40021000 .word 0x40021000
|
|
800152c: 48000400 .word 0x48000400
|
|
|
|
08001530 <HAL_QSPI_MspInit>:
|
|
* This function configures the hardware resources used in this example
|
|
* @param hqspi: QSPI handle pointer
|
|
* @retval None
|
|
*/
|
|
void HAL_QSPI_MspInit(QSPI_HandleTypeDef* hqspi)
|
|
{
|
|
8001530: b580 push {r7, lr}
|
|
8001532: b08a sub sp, #40 @ 0x28
|
|
8001534: af00 add r7, sp, #0
|
|
8001536: 6078 str r0, [r7, #4]
|
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
|
8001538: f107 0314 add.w r3, r7, #20
|
|
800153c: 2200 movs r2, #0
|
|
800153e: 601a str r2, [r3, #0]
|
|
8001540: 605a str r2, [r3, #4]
|
|
8001542: 609a str r2, [r3, #8]
|
|
8001544: 60da str r2, [r3, #12]
|
|
8001546: 611a str r2, [r3, #16]
|
|
if(hqspi->Instance==QUADSPI)
|
|
8001548: 687b ldr r3, [r7, #4]
|
|
800154a: 681b ldr r3, [r3, #0]
|
|
800154c: 4a17 ldr r2, [pc, #92] @ (80015ac <HAL_QSPI_MspInit+0x7c>)
|
|
800154e: 4293 cmp r3, r2
|
|
8001550: d128 bne.n 80015a4 <HAL_QSPI_MspInit+0x74>
|
|
{
|
|
/* USER CODE BEGIN QUADSPI_MspInit 0 */
|
|
|
|
/* USER CODE END QUADSPI_MspInit 0 */
|
|
/* Peripheral clock enable */
|
|
__HAL_RCC_QSPI_CLK_ENABLE();
|
|
8001552: 4b17 ldr r3, [pc, #92] @ (80015b0 <HAL_QSPI_MspInit+0x80>)
|
|
8001554: 6d1b ldr r3, [r3, #80] @ 0x50
|
|
8001556: 4a16 ldr r2, [pc, #88] @ (80015b0 <HAL_QSPI_MspInit+0x80>)
|
|
8001558: f443 7380 orr.w r3, r3, #256 @ 0x100
|
|
800155c: 6513 str r3, [r2, #80] @ 0x50
|
|
800155e: 4b14 ldr r3, [pc, #80] @ (80015b0 <HAL_QSPI_MspInit+0x80>)
|
|
8001560: 6d1b ldr r3, [r3, #80] @ 0x50
|
|
8001562: f403 7380 and.w r3, r3, #256 @ 0x100
|
|
8001566: 613b str r3, [r7, #16]
|
|
8001568: 693b ldr r3, [r7, #16]
|
|
|
|
__HAL_RCC_GPIOE_CLK_ENABLE();
|
|
800156a: 4b11 ldr r3, [pc, #68] @ (80015b0 <HAL_QSPI_MspInit+0x80>)
|
|
800156c: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
800156e: 4a10 ldr r2, [pc, #64] @ (80015b0 <HAL_QSPI_MspInit+0x80>)
|
|
8001570: f043 0310 orr.w r3, r3, #16
|
|
8001574: 64d3 str r3, [r2, #76] @ 0x4c
|
|
8001576: 4b0e ldr r3, [pc, #56] @ (80015b0 <HAL_QSPI_MspInit+0x80>)
|
|
8001578: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
800157a: f003 0310 and.w r3, r3, #16
|
|
800157e: 60fb str r3, [r7, #12]
|
|
8001580: 68fb ldr r3, [r7, #12]
|
|
PE12 ------> QUADSPI_BK1_IO0
|
|
PE13 ------> QUADSPI_BK1_IO1
|
|
PE14 ------> QUADSPI_BK1_IO2
|
|
PE15 ------> QUADSPI_BK1_IO3
|
|
*/
|
|
GPIO_InitStruct.Pin = QUADSPI_CLK_Pin|QUADSPI_NCS_Pin|OQUADSPI_BK1_IO0_Pin|QUADSPI_BK1_IO1_Pin
|
|
8001582: f44f 437c mov.w r3, #64512 @ 0xfc00
|
|
8001586: 617b str r3, [r7, #20]
|
|
|QUAD_SPI_BK1_IO2_Pin|QUAD_SPI_BK1_IO3_Pin;
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
8001588: 2302 movs r3, #2
|
|
800158a: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
800158c: 2300 movs r3, #0
|
|
800158e: 61fb str r3, [r7, #28]
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
8001590: 2303 movs r3, #3
|
|
8001592: 623b str r3, [r7, #32]
|
|
GPIO_InitStruct.Alternate = GPIO_AF10_QUADSPI;
|
|
8001594: 230a movs r3, #10
|
|
8001596: 627b str r3, [r7, #36] @ 0x24
|
|
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
|
8001598: f107 0314 add.w r3, r7, #20
|
|
800159c: 4619 mov r1, r3
|
|
800159e: 4805 ldr r0, [pc, #20] @ (80015b4 <HAL_QSPI_MspInit+0x84>)
|
|
80015a0: f000 fcd2 bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/* USER CODE END QUADSPI_MspInit 1 */
|
|
|
|
}
|
|
|
|
}
|
|
80015a4: bf00 nop
|
|
80015a6: 3728 adds r7, #40 @ 0x28
|
|
80015a8: 46bd mov sp, r7
|
|
80015aa: bd80 pop {r7, pc}
|
|
80015ac: a0001000 .word 0xa0001000
|
|
80015b0: 40021000 .word 0x40021000
|
|
80015b4: 48001000 .word 0x48001000
|
|
|
|
080015b8 <HAL_SPI_MspInit>:
|
|
* This function configures the hardware resources used in this example
|
|
* @param hspi: SPI handle pointer
|
|
* @retval None
|
|
*/
|
|
void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
|
|
{
|
|
80015b8: b580 push {r7, lr}
|
|
80015ba: b08a sub sp, #40 @ 0x28
|
|
80015bc: af00 add r7, sp, #0
|
|
80015be: 6078 str r0, [r7, #4]
|
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
|
80015c0: f107 0314 add.w r3, r7, #20
|
|
80015c4: 2200 movs r2, #0
|
|
80015c6: 601a str r2, [r3, #0]
|
|
80015c8: 605a str r2, [r3, #4]
|
|
80015ca: 609a str r2, [r3, #8]
|
|
80015cc: 60da str r2, [r3, #12]
|
|
80015ce: 611a str r2, [r3, #16]
|
|
if(hspi->Instance==SPI3)
|
|
80015d0: 687b ldr r3, [r7, #4]
|
|
80015d2: 681b ldr r3, [r3, #0]
|
|
80015d4: 4a17 ldr r2, [pc, #92] @ (8001634 <HAL_SPI_MspInit+0x7c>)
|
|
80015d6: 4293 cmp r3, r2
|
|
80015d8: d128 bne.n 800162c <HAL_SPI_MspInit+0x74>
|
|
{
|
|
/* USER CODE BEGIN SPI3_MspInit 0 */
|
|
|
|
/* USER CODE END SPI3_MspInit 0 */
|
|
/* Peripheral clock enable */
|
|
__HAL_RCC_SPI3_CLK_ENABLE();
|
|
80015da: 4b17 ldr r3, [pc, #92] @ (8001638 <HAL_SPI_MspInit+0x80>)
|
|
80015dc: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
80015de: 4a16 ldr r2, [pc, #88] @ (8001638 <HAL_SPI_MspInit+0x80>)
|
|
80015e0: f443 4300 orr.w r3, r3, #32768 @ 0x8000
|
|
80015e4: 6593 str r3, [r2, #88] @ 0x58
|
|
80015e6: 4b14 ldr r3, [pc, #80] @ (8001638 <HAL_SPI_MspInit+0x80>)
|
|
80015e8: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
80015ea: f403 4300 and.w r3, r3, #32768 @ 0x8000
|
|
80015ee: 613b str r3, [r7, #16]
|
|
80015f0: 693b ldr r3, [r7, #16]
|
|
|
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
|
80015f2: 4b11 ldr r3, [pc, #68] @ (8001638 <HAL_SPI_MspInit+0x80>)
|
|
80015f4: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
80015f6: 4a10 ldr r2, [pc, #64] @ (8001638 <HAL_SPI_MspInit+0x80>)
|
|
80015f8: f043 0304 orr.w r3, r3, #4
|
|
80015fc: 64d3 str r3, [r2, #76] @ 0x4c
|
|
80015fe: 4b0e ldr r3, [pc, #56] @ (8001638 <HAL_SPI_MspInit+0x80>)
|
|
8001600: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8001602: f003 0304 and.w r3, r3, #4
|
|
8001606: 60fb str r3, [r7, #12]
|
|
8001608: 68fb ldr r3, [r7, #12]
|
|
/**SPI3 GPIO Configuration
|
|
PC10 ------> SPI3_SCK
|
|
PC11 ------> SPI3_MISO
|
|
PC12 ------> SPI3_MOSI
|
|
*/
|
|
GPIO_InitStruct.Pin = INTERNAL_SPI3_SCK_Pin|INTERNAL_SPI3_MISO_Pin|INTERNAL_SPI3_MOSI_Pin;
|
|
800160a: f44f 53e0 mov.w r3, #7168 @ 0x1c00
|
|
800160e: 617b str r3, [r7, #20]
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
8001610: 2302 movs r3, #2
|
|
8001612: 61bb str r3, [r7, #24]
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8001614: 2300 movs r3, #0
|
|
8001616: 61fb str r3, [r7, #28]
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
8001618: 2303 movs r3, #3
|
|
800161a: 623b str r3, [r7, #32]
|
|
GPIO_InitStruct.Alternate = GPIO_AF6_SPI3;
|
|
800161c: 2306 movs r3, #6
|
|
800161e: 627b str r3, [r7, #36] @ 0x24
|
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
|
8001620: f107 0314 add.w r3, r7, #20
|
|
8001624: 4619 mov r1, r3
|
|
8001626: 4805 ldr r0, [pc, #20] @ (800163c <HAL_SPI_MspInit+0x84>)
|
|
8001628: f000 fc8e bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/* USER CODE END SPI3_MspInit 1 */
|
|
|
|
}
|
|
|
|
}
|
|
800162c: bf00 nop
|
|
800162e: 3728 adds r7, #40 @ 0x28
|
|
8001630: 46bd mov sp, r7
|
|
8001632: bd80 pop {r7, pc}
|
|
8001634: 40003c00 .word 0x40003c00
|
|
8001638: 40021000 .word 0x40021000
|
|
800163c: 48000800 .word 0x48000800
|
|
|
|
08001640 <HAL_UART_MspInit>:
|
|
* This function configures the hardware resources used in this example
|
|
* @param huart: UART handle pointer
|
|
* @retval None
|
|
*/
|
|
void HAL_UART_MspInit(UART_HandleTypeDef* huart)
|
|
{
|
|
8001640: b580 push {r7, lr}
|
|
8001642: b0ae sub sp, #184 @ 0xb8
|
|
8001644: af00 add r7, sp, #0
|
|
8001646: 6078 str r0, [r7, #4]
|
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
|
8001648: f107 03a4 add.w r3, r7, #164 @ 0xa4
|
|
800164c: 2200 movs r2, #0
|
|
800164e: 601a str r2, [r3, #0]
|
|
8001650: 605a str r2, [r3, #4]
|
|
8001652: 609a str r2, [r3, #8]
|
|
8001654: 60da str r2, [r3, #12]
|
|
8001656: 611a str r2, [r3, #16]
|
|
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
|
|
8001658: f107 031c add.w r3, r7, #28
|
|
800165c: 2288 movs r2, #136 @ 0x88
|
|
800165e: 2100 movs r1, #0
|
|
8001660: 4618 mov r0, r3
|
|
8001662: f007 f8b9 bl 80087d8 <memset>
|
|
if(huart->Instance==USART1)
|
|
8001666: 687b ldr r3, [r7, #4]
|
|
8001668: 681b ldr r3, [r3, #0]
|
|
800166a: 4a42 ldr r2, [pc, #264] @ (8001774 <HAL_UART_MspInit+0x134>)
|
|
800166c: 4293 cmp r3, r2
|
|
800166e: d13b bne.n 80016e8 <HAL_UART_MspInit+0xa8>
|
|
|
|
/* USER CODE END USART1_MspInit 0 */
|
|
|
|
/** Initializes the peripherals clock
|
|
*/
|
|
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART1;
|
|
8001670: 2301 movs r3, #1
|
|
8001672: 61fb str r3, [r7, #28]
|
|
PeriphClkInit.Usart1ClockSelection = RCC_USART1CLKSOURCE_PCLK2;
|
|
8001674: 2300 movs r3, #0
|
|
8001676: 657b str r3, [r7, #84] @ 0x54
|
|
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
|
|
8001678: f107 031c add.w r3, r7, #28
|
|
800167c: 4618 mov r0, r3
|
|
800167e: f001 ffed bl 800365c <HAL_RCCEx_PeriphCLKConfig>
|
|
8001682: 4603 mov r3, r0
|
|
8001684: 2b00 cmp r3, #0
|
|
8001686: d001 beq.n 800168c <HAL_UART_MspInit+0x4c>
|
|
{
|
|
Error_Handler();
|
|
8001688: f7ff fe62 bl 8001350 <Error_Handler>
|
|
}
|
|
|
|
/* Peripheral clock enable */
|
|
__HAL_RCC_USART1_CLK_ENABLE();
|
|
800168c: 4b3a ldr r3, [pc, #232] @ (8001778 <HAL_UART_MspInit+0x138>)
|
|
800168e: 6e1b ldr r3, [r3, #96] @ 0x60
|
|
8001690: 4a39 ldr r2, [pc, #228] @ (8001778 <HAL_UART_MspInit+0x138>)
|
|
8001692: f443 4380 orr.w r3, r3, #16384 @ 0x4000
|
|
8001696: 6613 str r3, [r2, #96] @ 0x60
|
|
8001698: 4b37 ldr r3, [pc, #220] @ (8001778 <HAL_UART_MspInit+0x138>)
|
|
800169a: 6e1b ldr r3, [r3, #96] @ 0x60
|
|
800169c: f403 4380 and.w r3, r3, #16384 @ 0x4000
|
|
80016a0: 61bb str r3, [r7, #24]
|
|
80016a2: 69bb ldr r3, [r7, #24]
|
|
|
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
|
80016a4: 4b34 ldr r3, [pc, #208] @ (8001778 <HAL_UART_MspInit+0x138>)
|
|
80016a6: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
80016a8: 4a33 ldr r2, [pc, #204] @ (8001778 <HAL_UART_MspInit+0x138>)
|
|
80016aa: f043 0302 orr.w r3, r3, #2
|
|
80016ae: 64d3 str r3, [r2, #76] @ 0x4c
|
|
80016b0: 4b31 ldr r3, [pc, #196] @ (8001778 <HAL_UART_MspInit+0x138>)
|
|
80016b2: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
80016b4: f003 0302 and.w r3, r3, #2
|
|
80016b8: 617b str r3, [r7, #20]
|
|
80016ba: 697b ldr r3, [r7, #20]
|
|
/**USART1 GPIO Configuration
|
|
PB6 ------> USART1_TX
|
|
PB7 ------> USART1_RX
|
|
*/
|
|
GPIO_InitStruct.Pin = ST_LINK_UART1_TX_Pin|ST_LINK_UART1_RX_Pin;
|
|
80016bc: 23c0 movs r3, #192 @ 0xc0
|
|
80016be: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
80016c2: 2302 movs r3, #2
|
|
80016c4: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
80016c8: 2300 movs r3, #0
|
|
80016ca: f8c7 30ac str.w r3, [r7, #172] @ 0xac
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
80016ce: 2303 movs r3, #3
|
|
80016d0: f8c7 30b0 str.w r3, [r7, #176] @ 0xb0
|
|
GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
|
|
80016d4: 2307 movs r3, #7
|
|
80016d6: f8c7 30b4 str.w r3, [r7, #180] @ 0xb4
|
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
|
80016da: f107 03a4 add.w r3, r7, #164 @ 0xa4
|
|
80016de: 4619 mov r1, r3
|
|
80016e0: 4826 ldr r0, [pc, #152] @ (800177c <HAL_UART_MspInit+0x13c>)
|
|
80016e2: f000 fc31 bl 8001f48 <HAL_GPIO_Init>
|
|
/* USER CODE BEGIN USART3_MspInit 1 */
|
|
|
|
/* USER CODE END USART3_MspInit 1 */
|
|
}
|
|
|
|
}
|
|
80016e6: e040 b.n 800176a <HAL_UART_MspInit+0x12a>
|
|
else if(huart->Instance==USART3)
|
|
80016e8: 687b ldr r3, [r7, #4]
|
|
80016ea: 681b ldr r3, [r3, #0]
|
|
80016ec: 4a24 ldr r2, [pc, #144] @ (8001780 <HAL_UART_MspInit+0x140>)
|
|
80016ee: 4293 cmp r3, r2
|
|
80016f0: d13b bne.n 800176a <HAL_UART_MspInit+0x12a>
|
|
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART3;
|
|
80016f2: 2304 movs r3, #4
|
|
80016f4: 61fb str r3, [r7, #28]
|
|
PeriphClkInit.Usart3ClockSelection = RCC_USART3CLKSOURCE_PCLK1;
|
|
80016f6: 2300 movs r3, #0
|
|
80016f8: 65fb str r3, [r7, #92] @ 0x5c
|
|
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
|
|
80016fa: f107 031c add.w r3, r7, #28
|
|
80016fe: 4618 mov r0, r3
|
|
8001700: f001 ffac bl 800365c <HAL_RCCEx_PeriphCLKConfig>
|
|
8001704: 4603 mov r3, r0
|
|
8001706: 2b00 cmp r3, #0
|
|
8001708: d001 beq.n 800170e <HAL_UART_MspInit+0xce>
|
|
Error_Handler();
|
|
800170a: f7ff fe21 bl 8001350 <Error_Handler>
|
|
__HAL_RCC_USART3_CLK_ENABLE();
|
|
800170e: 4b1a ldr r3, [pc, #104] @ (8001778 <HAL_UART_MspInit+0x138>)
|
|
8001710: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
8001712: 4a19 ldr r2, [pc, #100] @ (8001778 <HAL_UART_MspInit+0x138>)
|
|
8001714: f443 2380 orr.w r3, r3, #262144 @ 0x40000
|
|
8001718: 6593 str r3, [r2, #88] @ 0x58
|
|
800171a: 4b17 ldr r3, [pc, #92] @ (8001778 <HAL_UART_MspInit+0x138>)
|
|
800171c: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
800171e: f403 2380 and.w r3, r3, #262144 @ 0x40000
|
|
8001722: 613b str r3, [r7, #16]
|
|
8001724: 693b ldr r3, [r7, #16]
|
|
__HAL_RCC_GPIOD_CLK_ENABLE();
|
|
8001726: 4b14 ldr r3, [pc, #80] @ (8001778 <HAL_UART_MspInit+0x138>)
|
|
8001728: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
800172a: 4a13 ldr r2, [pc, #76] @ (8001778 <HAL_UART_MspInit+0x138>)
|
|
800172c: f043 0308 orr.w r3, r3, #8
|
|
8001730: 64d3 str r3, [r2, #76] @ 0x4c
|
|
8001732: 4b11 ldr r3, [pc, #68] @ (8001778 <HAL_UART_MspInit+0x138>)
|
|
8001734: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8001736: f003 0308 and.w r3, r3, #8
|
|
800173a: 60fb str r3, [r7, #12]
|
|
800173c: 68fb ldr r3, [r7, #12]
|
|
GPIO_InitStruct.Pin = INTERNAL_UART3_TX_Pin|INTERNAL_UART3_RX_Pin;
|
|
800173e: f44f 7340 mov.w r3, #768 @ 0x300
|
|
8001742: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
8001746: 2302 movs r3, #2
|
|
8001748: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
800174c: 2300 movs r3, #0
|
|
800174e: f8c7 30ac str.w r3, [r7, #172] @ 0xac
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
8001752: 2303 movs r3, #3
|
|
8001754: f8c7 30b0 str.w r3, [r7, #176] @ 0xb0
|
|
GPIO_InitStruct.Alternate = GPIO_AF7_USART3;
|
|
8001758: 2307 movs r3, #7
|
|
800175a: f8c7 30b4 str.w r3, [r7, #180] @ 0xb4
|
|
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
|
800175e: f107 03a4 add.w r3, r7, #164 @ 0xa4
|
|
8001762: 4619 mov r1, r3
|
|
8001764: 4807 ldr r0, [pc, #28] @ (8001784 <HAL_UART_MspInit+0x144>)
|
|
8001766: f000 fbef bl 8001f48 <HAL_GPIO_Init>
|
|
}
|
|
800176a: bf00 nop
|
|
800176c: 37b8 adds r7, #184 @ 0xb8
|
|
800176e: 46bd mov sp, r7
|
|
8001770: bd80 pop {r7, pc}
|
|
8001772: bf00 nop
|
|
8001774: 40013800 .word 0x40013800
|
|
8001778: 40021000 .word 0x40021000
|
|
800177c: 48000400 .word 0x48000400
|
|
8001780: 40004800 .word 0x40004800
|
|
8001784: 48000c00 .word 0x48000c00
|
|
|
|
08001788 <HAL_PCD_MspInit>:
|
|
* This function configures the hardware resources used in this example
|
|
* @param hpcd: PCD handle pointer
|
|
* @retval None
|
|
*/
|
|
void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd)
|
|
{
|
|
8001788: b580 push {r7, lr}
|
|
800178a: b0ac sub sp, #176 @ 0xb0
|
|
800178c: af00 add r7, sp, #0
|
|
800178e: 6078 str r0, [r7, #4]
|
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
|
8001790: f107 039c add.w r3, r7, #156 @ 0x9c
|
|
8001794: 2200 movs r2, #0
|
|
8001796: 601a str r2, [r3, #0]
|
|
8001798: 605a str r2, [r3, #4]
|
|
800179a: 609a str r2, [r3, #8]
|
|
800179c: 60da str r2, [r3, #12]
|
|
800179e: 611a str r2, [r3, #16]
|
|
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
|
|
80017a0: f107 0314 add.w r3, r7, #20
|
|
80017a4: 2288 movs r2, #136 @ 0x88
|
|
80017a6: 2100 movs r1, #0
|
|
80017a8: 4618 mov r0, r3
|
|
80017aa: f007 f815 bl 80087d8 <memset>
|
|
if(hpcd->Instance==USB_OTG_FS)
|
|
80017ae: 687b ldr r3, [r7, #4]
|
|
80017b0: 681b ldr r3, [r3, #0]
|
|
80017b2: f1b3 4fa0 cmp.w r3, #1342177280 @ 0x50000000
|
|
80017b6: d17c bne.n 80018b2 <HAL_PCD_MspInit+0x12a>
|
|
|
|
/* USER CODE END USB_OTG_FS_MspInit 0 */
|
|
|
|
/** Initializes the peripherals clock
|
|
*/
|
|
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB;
|
|
80017b8: f44f 5300 mov.w r3, #8192 @ 0x2000
|
|
80017bc: 617b str r3, [r7, #20]
|
|
PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_PLLSAI1;
|
|
80017be: f04f 6380 mov.w r3, #67108864 @ 0x4000000
|
|
80017c2: f8c7 3080 str.w r3, [r7, #128] @ 0x80
|
|
PeriphClkInit.PLLSAI1.PLLSAI1Source = RCC_PLLSOURCE_MSI;
|
|
80017c6: 2301 movs r3, #1
|
|
80017c8: 61bb str r3, [r7, #24]
|
|
PeriphClkInit.PLLSAI1.PLLSAI1M = 1;
|
|
80017ca: 2301 movs r3, #1
|
|
80017cc: 61fb str r3, [r7, #28]
|
|
PeriphClkInit.PLLSAI1.PLLSAI1N = 24;
|
|
80017ce: 2318 movs r3, #24
|
|
80017d0: 623b str r3, [r7, #32]
|
|
PeriphClkInit.PLLSAI1.PLLSAI1P = RCC_PLLP_DIV7;
|
|
80017d2: 2307 movs r3, #7
|
|
80017d4: 627b str r3, [r7, #36] @ 0x24
|
|
PeriphClkInit.PLLSAI1.PLLSAI1Q = RCC_PLLQ_DIV2;
|
|
80017d6: 2302 movs r3, #2
|
|
80017d8: 62bb str r3, [r7, #40] @ 0x28
|
|
PeriphClkInit.PLLSAI1.PLLSAI1R = RCC_PLLR_DIV2;
|
|
80017da: 2302 movs r3, #2
|
|
80017dc: 62fb str r3, [r7, #44] @ 0x2c
|
|
PeriphClkInit.PLLSAI1.PLLSAI1ClockOut = RCC_PLLSAI1_48M2CLK;
|
|
80017de: f44f 1380 mov.w r3, #1048576 @ 0x100000
|
|
80017e2: 633b str r3, [r7, #48] @ 0x30
|
|
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
|
|
80017e4: f107 0314 add.w r3, r7, #20
|
|
80017e8: 4618 mov r0, r3
|
|
80017ea: f001 ff37 bl 800365c <HAL_RCCEx_PeriphCLKConfig>
|
|
80017ee: 4603 mov r3, r0
|
|
80017f0: 2b00 cmp r3, #0
|
|
80017f2: d001 beq.n 80017f8 <HAL_PCD_MspInit+0x70>
|
|
{
|
|
Error_Handler();
|
|
80017f4: f7ff fdac bl 8001350 <Error_Handler>
|
|
}
|
|
|
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
|
80017f8: 4b30 ldr r3, [pc, #192] @ (80018bc <HAL_PCD_MspInit+0x134>)
|
|
80017fa: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
80017fc: 4a2f ldr r2, [pc, #188] @ (80018bc <HAL_PCD_MspInit+0x134>)
|
|
80017fe: f043 0301 orr.w r3, r3, #1
|
|
8001802: 64d3 str r3, [r2, #76] @ 0x4c
|
|
8001804: 4b2d ldr r3, [pc, #180] @ (80018bc <HAL_PCD_MspInit+0x134>)
|
|
8001806: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8001808: f003 0301 and.w r3, r3, #1
|
|
800180c: 613b str r3, [r7, #16]
|
|
800180e: 693b ldr r3, [r7, #16]
|
|
PA9 ------> USB_OTG_FS_VBUS
|
|
PA10 ------> USB_OTG_FS_ID
|
|
PA11 ------> USB_OTG_FS_DM
|
|
PA12 ------> USB_OTG_FS_DP
|
|
*/
|
|
GPIO_InitStruct.Pin = USB_OTG_FS_VBUS_Pin;
|
|
8001810: f44f 7300 mov.w r3, #512 @ 0x200
|
|
8001814: f8c7 309c str.w r3, [r7, #156] @ 0x9c
|
|
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
|
8001818: 2300 movs r3, #0
|
|
800181a: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
800181e: 2300 movs r3, #0
|
|
8001820: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4
|
|
HAL_GPIO_Init(USB_OTG_FS_VBUS_GPIO_Port, &GPIO_InitStruct);
|
|
8001824: f107 039c add.w r3, r7, #156 @ 0x9c
|
|
8001828: 4619 mov r1, r3
|
|
800182a: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
800182e: f000 fb8b bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
GPIO_InitStruct.Pin = USB_OTG_FS_ID_Pin|USB_OTG_FS_DM_Pin|USB_OTG_FS_DP_Pin;
|
|
8001832: f44f 53e0 mov.w r3, #7168 @ 0x1c00
|
|
8001836: f8c7 309c str.w r3, [r7, #156] @ 0x9c
|
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
800183a: 2302 movs r3, #2
|
|
800183c: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0
|
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
8001840: 2300 movs r3, #0
|
|
8001842: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
|
8001846: 2303 movs r3, #3
|
|
8001848: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8
|
|
GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS;
|
|
800184c: 230a movs r3, #10
|
|
800184e: f8c7 30ac str.w r3, [r7, #172] @ 0xac
|
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
|
8001852: f107 039c add.w r3, r7, #156 @ 0x9c
|
|
8001856: 4619 mov r1, r3
|
|
8001858: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
|
|
800185c: f000 fb74 bl 8001f48 <HAL_GPIO_Init>
|
|
|
|
/* Peripheral clock enable */
|
|
__HAL_RCC_USB_OTG_FS_CLK_ENABLE();
|
|
8001860: 4b16 ldr r3, [pc, #88] @ (80018bc <HAL_PCD_MspInit+0x134>)
|
|
8001862: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8001864: 4a15 ldr r2, [pc, #84] @ (80018bc <HAL_PCD_MspInit+0x134>)
|
|
8001866: f443 5380 orr.w r3, r3, #4096 @ 0x1000
|
|
800186a: 64d3 str r3, [r2, #76] @ 0x4c
|
|
800186c: 4b13 ldr r3, [pc, #76] @ (80018bc <HAL_PCD_MspInit+0x134>)
|
|
800186e: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8001870: f403 5380 and.w r3, r3, #4096 @ 0x1000
|
|
8001874: 60fb str r3, [r7, #12]
|
|
8001876: 68fb ldr r3, [r7, #12]
|
|
|
|
/* Enable VDDUSB */
|
|
if(__HAL_RCC_PWR_IS_CLK_DISABLED())
|
|
8001878: 4b10 ldr r3, [pc, #64] @ (80018bc <HAL_PCD_MspInit+0x134>)
|
|
800187a: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
800187c: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
|
|
8001880: 2b00 cmp r3, #0
|
|
8001882: d114 bne.n 80018ae <HAL_PCD_MspInit+0x126>
|
|
{
|
|
__HAL_RCC_PWR_CLK_ENABLE();
|
|
8001884: 4b0d ldr r3, [pc, #52] @ (80018bc <HAL_PCD_MspInit+0x134>)
|
|
8001886: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
8001888: 4a0c ldr r2, [pc, #48] @ (80018bc <HAL_PCD_MspInit+0x134>)
|
|
800188a: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000
|
|
800188e: 6593 str r3, [r2, #88] @ 0x58
|
|
8001890: 4b0a ldr r3, [pc, #40] @ (80018bc <HAL_PCD_MspInit+0x134>)
|
|
8001892: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
8001894: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
|
|
8001898: 60bb str r3, [r7, #8]
|
|
800189a: 68bb ldr r3, [r7, #8]
|
|
HAL_PWREx_EnableVddUSB();
|
|
800189c: f001 f812 bl 80028c4 <HAL_PWREx_EnableVddUSB>
|
|
__HAL_RCC_PWR_CLK_DISABLE();
|
|
80018a0: 4b06 ldr r3, [pc, #24] @ (80018bc <HAL_PCD_MspInit+0x134>)
|
|
80018a2: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
80018a4: 4a05 ldr r2, [pc, #20] @ (80018bc <HAL_PCD_MspInit+0x134>)
|
|
80018a6: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000
|
|
80018aa: 6593 str r3, [r2, #88] @ 0x58
|
|
|
|
/* USER CODE END USB_OTG_FS_MspInit 1 */
|
|
|
|
}
|
|
|
|
}
|
|
80018ac: e001 b.n 80018b2 <HAL_PCD_MspInit+0x12a>
|
|
HAL_PWREx_EnableVddUSB();
|
|
80018ae: f001 f809 bl 80028c4 <HAL_PWREx_EnableVddUSB>
|
|
}
|
|
80018b2: bf00 nop
|
|
80018b4: 37b0 adds r7, #176 @ 0xb0
|
|
80018b6: 46bd mov sp, r7
|
|
80018b8: bd80 pop {r7, pc}
|
|
80018ba: bf00 nop
|
|
80018bc: 40021000 .word 0x40021000
|
|
|
|
080018c0 <NMI_Handler>:
|
|
/******************************************************************************/
|
|
/**
|
|
* @brief This function handles Non maskable interrupt.
|
|
*/
|
|
void NMI_Handler(void)
|
|
{
|
|
80018c0: b480 push {r7}
|
|
80018c2: af00 add r7, sp, #0
|
|
/* USER CODE BEGIN NonMaskableInt_IRQn 0 */
|
|
|
|
/* USER CODE END NonMaskableInt_IRQn 0 */
|
|
/* USER CODE BEGIN NonMaskableInt_IRQn 1 */
|
|
while (1)
|
|
80018c4: bf00 nop
|
|
80018c6: e7fd b.n 80018c4 <NMI_Handler+0x4>
|
|
|
|
080018c8 <HardFault_Handler>:
|
|
|
|
/**
|
|
* @brief This function handles Hard fault interrupt.
|
|
*/
|
|
void HardFault_Handler(void)
|
|
{
|
|
80018c8: b480 push {r7}
|
|
80018ca: af00 add r7, sp, #0
|
|
/* USER CODE BEGIN HardFault_IRQn 0 */
|
|
|
|
/* USER CODE END HardFault_IRQn 0 */
|
|
while (1)
|
|
80018cc: bf00 nop
|
|
80018ce: e7fd b.n 80018cc <HardFault_Handler+0x4>
|
|
|
|
080018d0 <MemManage_Handler>:
|
|
|
|
/**
|
|
* @brief This function handles Memory management fault.
|
|
*/
|
|
void MemManage_Handler(void)
|
|
{
|
|
80018d0: b480 push {r7}
|
|
80018d2: af00 add r7, sp, #0
|
|
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
|
|
|
|
/* USER CODE END MemoryManagement_IRQn 0 */
|
|
while (1)
|
|
80018d4: bf00 nop
|
|
80018d6: e7fd b.n 80018d4 <MemManage_Handler+0x4>
|
|
|
|
080018d8 <BusFault_Handler>:
|
|
|
|
/**
|
|
* @brief This function handles Prefetch fault, memory access fault.
|
|
*/
|
|
void BusFault_Handler(void)
|
|
{
|
|
80018d8: b480 push {r7}
|
|
80018da: af00 add r7, sp, #0
|
|
/* USER CODE BEGIN BusFault_IRQn 0 */
|
|
|
|
/* USER CODE END BusFault_IRQn 0 */
|
|
while (1)
|
|
80018dc: bf00 nop
|
|
80018de: e7fd b.n 80018dc <BusFault_Handler+0x4>
|
|
|
|
080018e0 <UsageFault_Handler>:
|
|
|
|
/**
|
|
* @brief This function handles Undefined instruction or illegal state.
|
|
*/
|
|
void UsageFault_Handler(void)
|
|
{
|
|
80018e0: b480 push {r7}
|
|
80018e2: af00 add r7, sp, #0
|
|
/* USER CODE BEGIN UsageFault_IRQn 0 */
|
|
|
|
/* USER CODE END UsageFault_IRQn 0 */
|
|
while (1)
|
|
80018e4: bf00 nop
|
|
80018e6: e7fd b.n 80018e4 <UsageFault_Handler+0x4>
|
|
|
|
080018e8 <DebugMon_Handler>:
|
|
|
|
/**
|
|
* @brief This function handles Debug monitor.
|
|
*/
|
|
void DebugMon_Handler(void)
|
|
{
|
|
80018e8: b480 push {r7}
|
|
80018ea: af00 add r7, sp, #0
|
|
|
|
/* USER CODE END DebugMonitor_IRQn 0 */
|
|
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
|
|
|
|
/* USER CODE END DebugMonitor_IRQn 1 */
|
|
}
|
|
80018ec: bf00 nop
|
|
80018ee: 46bd mov sp, r7
|
|
80018f0: f85d 7b04 ldr.w r7, [sp], #4
|
|
80018f4: 4770 bx lr
|
|
|
|
080018f6 <SysTick_Handler>:
|
|
|
|
/**
|
|
* @brief This function handles System tick timer.
|
|
*/
|
|
void SysTick_Handler(void)
|
|
{
|
|
80018f6: b580 push {r7, lr}
|
|
80018f8: af00 add r7, sp, #0
|
|
/* USER CODE BEGIN SysTick_IRQn 0 */
|
|
|
|
/* USER CODE END SysTick_IRQn 0 */
|
|
HAL_IncTick();
|
|
80018fa: f000 f8c3 bl 8001a84 <HAL_IncTick>
|
|
#if (INCLUDE_xTaskGetSchedulerState == 1 )
|
|
if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED)
|
|
80018fe: f005 fdef bl 80074e0 <xTaskGetSchedulerState>
|
|
8001902: 4603 mov r3, r0
|
|
8001904: 2b01 cmp r3, #1
|
|
8001906: d001 beq.n 800190c <SysTick_Handler+0x16>
|
|
{
|
|
#endif /* INCLUDE_xTaskGetSchedulerState */
|
|
xPortSysTickHandler();
|
|
8001908: f006 fce6 bl 80082d8 <xPortSysTickHandler>
|
|
}
|
|
#endif /* INCLUDE_xTaskGetSchedulerState */
|
|
/* USER CODE BEGIN SysTick_IRQn 1 */
|
|
|
|
/* USER CODE END SysTick_IRQn 1 */
|
|
}
|
|
800190c: bf00 nop
|
|
800190e: bd80 pop {r7, pc}
|
|
|
|
08001910 <EXTI9_5_IRQHandler>:
|
|
|
|
/**
|
|
* @brief This function handles EXTI line[9:5] interrupts.
|
|
*/
|
|
void EXTI9_5_IRQHandler(void)
|
|
{
|
|
8001910: b580 push {r7, lr}
|
|
8001912: af00 add r7, sp, #0
|
|
/* USER CODE BEGIN EXTI9_5_IRQn 0 */
|
|
|
|
/* USER CODE END EXTI9_5_IRQn 0 */
|
|
HAL_GPIO_EXTI_IRQHandler(SPSGRF_915_GPIO3_EXTI5_Pin);
|
|
8001914: 2020 movs r0, #32
|
|
8001916: f000 fcd9 bl 80022cc <HAL_GPIO_EXTI_IRQHandler>
|
|
HAL_GPIO_EXTI_IRQHandler(SPBTLE_RF_IRQ_EXTI6_Pin);
|
|
800191a: 2040 movs r0, #64 @ 0x40
|
|
800191c: f000 fcd6 bl 80022cc <HAL_GPIO_EXTI_IRQHandler>
|
|
HAL_GPIO_EXTI_IRQHandler(VL53L0X_GPIO1_EXTI7_Pin);
|
|
8001920: 2080 movs r0, #128 @ 0x80
|
|
8001922: f000 fcd3 bl 80022cc <HAL_GPIO_EXTI_IRQHandler>
|
|
HAL_GPIO_EXTI_IRQHandler(LSM3MDL_DRDY_EXTI8_Pin);
|
|
8001926: f44f 7080 mov.w r0, #256 @ 0x100
|
|
800192a: f000 fccf bl 80022cc <HAL_GPIO_EXTI_IRQHandler>
|
|
/* USER CODE BEGIN EXTI9_5_IRQn 1 */
|
|
|
|
/* USER CODE END EXTI9_5_IRQn 1 */
|
|
}
|
|
800192e: bf00 nop
|
|
8001930: bd80 pop {r7, pc}
|
|
|
|
08001932 <EXTI15_10_IRQHandler>:
|
|
|
|
/**
|
|
* @brief This function handles EXTI line[15:10] interrupts.
|
|
*/
|
|
void EXTI15_10_IRQHandler(void)
|
|
{
|
|
8001932: b580 push {r7, lr}
|
|
8001934: af00 add r7, sp, #0
|
|
/* USER CODE BEGIN EXTI15_10_IRQn 0 */
|
|
|
|
/* USER CODE END EXTI15_10_IRQn 0 */
|
|
HAL_GPIO_EXTI_IRQHandler(LPS22HB_INT_DRDY_EXTI0_Pin);
|
|
8001936: f44f 6080 mov.w r0, #1024 @ 0x400
|
|
800193a: f000 fcc7 bl 80022cc <HAL_GPIO_EXTI_IRQHandler>
|
|
HAL_GPIO_EXTI_IRQHandler(LSM6DSL_INT1_EXTI11_Pin);
|
|
800193e: f44f 6000 mov.w r0, #2048 @ 0x800
|
|
8001942: f000 fcc3 bl 80022cc <HAL_GPIO_EXTI_IRQHandler>
|
|
HAL_GPIO_EXTI_IRQHandler(BUTTON_EXTI13_Pin);
|
|
8001946: f44f 5000 mov.w r0, #8192 @ 0x2000
|
|
800194a: f000 fcbf bl 80022cc <HAL_GPIO_EXTI_IRQHandler>
|
|
HAL_GPIO_EXTI_IRQHandler(ARD_D2_Pin);
|
|
800194e: f44f 4080 mov.w r0, #16384 @ 0x4000
|
|
8001952: f000 fcbb bl 80022cc <HAL_GPIO_EXTI_IRQHandler>
|
|
HAL_GPIO_EXTI_IRQHandler(HTS221_DRDY_EXTI15_Pin);
|
|
8001956: f44f 4000 mov.w r0, #32768 @ 0x8000
|
|
800195a: f000 fcb7 bl 80022cc <HAL_GPIO_EXTI_IRQHandler>
|
|
/* USER CODE BEGIN EXTI15_10_IRQn 1 */
|
|
|
|
/* USER CODE END EXTI15_10_IRQn 1 */
|
|
}
|
|
800195e: bf00 nop
|
|
8001960: bd80 pop {r7, pc}
|
|
...
|
|
|
|
08001964 <SystemInit>:
|
|
* @brief Setup the microcontroller system.
|
|
* @retval None
|
|
*/
|
|
|
|
void SystemInit(void)
|
|
{
|
|
8001964: b480 push {r7}
|
|
8001966: af00 add r7, sp, #0
|
|
SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET;
|
|
#endif
|
|
|
|
/* FPU settings ------------------------------------------------------------*/
|
|
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
|
|
SCB->CPACR |= ((3UL << 20U)|(3UL << 22U)); /* set CP10 and CP11 Full Access */
|
|
8001968: 4b06 ldr r3, [pc, #24] @ (8001984 <SystemInit+0x20>)
|
|
800196a: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
800196e: 4a05 ldr r2, [pc, #20] @ (8001984 <SystemInit+0x20>)
|
|
8001970: f443 0370 orr.w r3, r3, #15728640 @ 0xf00000
|
|
8001974: f8c2 3088 str.w r3, [r2, #136] @ 0x88
|
|
#endif
|
|
}
|
|
8001978: bf00 nop
|
|
800197a: 46bd mov sp, r7
|
|
800197c: f85d 7b04 ldr.w r7, [sp], #4
|
|
8001980: 4770 bx lr
|
|
8001982: bf00 nop
|
|
8001984: e000ed00 .word 0xe000ed00
|
|
|
|
08001988 <Reset_Handler>:
|
|
|
|
.section .text.Reset_Handler
|
|
.weak Reset_Handler
|
|
.type Reset_Handler, %function
|
|
Reset_Handler:
|
|
ldr sp, =_estack /* Set stack pointer */
|
|
8001988: f8df d034 ldr.w sp, [pc, #52] @ 80019c0 <LoopForever+0x2>
|
|
|
|
/* Call the clock system initialization function.*/
|
|
bl SystemInit
|
|
800198c: f7ff ffea bl 8001964 <SystemInit>
|
|
|
|
/* Copy the data segment initializers from flash to SRAM */
|
|
ldr r0, =_sdata
|
|
8001990: 480c ldr r0, [pc, #48] @ (80019c4 <LoopForever+0x6>)
|
|
ldr r1, =_edata
|
|
8001992: 490d ldr r1, [pc, #52] @ (80019c8 <LoopForever+0xa>)
|
|
ldr r2, =_sidata
|
|
8001994: 4a0d ldr r2, [pc, #52] @ (80019cc <LoopForever+0xe>)
|
|
movs r3, #0
|
|
8001996: 2300 movs r3, #0
|
|
b LoopCopyDataInit
|
|
8001998: e002 b.n 80019a0 <LoopCopyDataInit>
|
|
|
|
0800199a <CopyDataInit>:
|
|
|
|
CopyDataInit:
|
|
ldr r4, [r2, r3]
|
|
800199a: 58d4 ldr r4, [r2, r3]
|
|
str r4, [r0, r3]
|
|
800199c: 50c4 str r4, [r0, r3]
|
|
adds r3, r3, #4
|
|
800199e: 3304 adds r3, #4
|
|
|
|
080019a0 <LoopCopyDataInit>:
|
|
|
|
LoopCopyDataInit:
|
|
adds r4, r0, r3
|
|
80019a0: 18c4 adds r4, r0, r3
|
|
cmp r4, r1
|
|
80019a2: 428c cmp r4, r1
|
|
bcc CopyDataInit
|
|
80019a4: d3f9 bcc.n 800199a <CopyDataInit>
|
|
|
|
/* Zero fill the bss segment. */
|
|
ldr r2, =_sbss
|
|
80019a6: 4a0a ldr r2, [pc, #40] @ (80019d0 <LoopForever+0x12>)
|
|
ldr r4, =_ebss
|
|
80019a8: 4c0a ldr r4, [pc, #40] @ (80019d4 <LoopForever+0x16>)
|
|
movs r3, #0
|
|
80019aa: 2300 movs r3, #0
|
|
b LoopFillZerobss
|
|
80019ac: e001 b.n 80019b2 <LoopFillZerobss>
|
|
|
|
080019ae <FillZerobss>:
|
|
|
|
FillZerobss:
|
|
str r3, [r2]
|
|
80019ae: 6013 str r3, [r2, #0]
|
|
adds r2, r2, #4
|
|
80019b0: 3204 adds r2, #4
|
|
|
|
080019b2 <LoopFillZerobss>:
|
|
|
|
LoopFillZerobss:
|
|
cmp r2, r4
|
|
80019b2: 42a2 cmp r2, r4
|
|
bcc FillZerobss
|
|
80019b4: d3fb bcc.n 80019ae <FillZerobss>
|
|
|
|
/* Call static constructors */
|
|
bl __libc_init_array
|
|
80019b6: f006 ff17 bl 80087e8 <__libc_init_array>
|
|
/* Call the application's entry point.*/
|
|
bl main
|
|
80019ba: f7ff f85d bl 8000a78 <main>
|
|
|
|
080019be <LoopForever>:
|
|
|
|
LoopForever:
|
|
b LoopForever
|
|
80019be: e7fe b.n 80019be <LoopForever>
|
|
ldr sp, =_estack /* Set stack pointer */
|
|
80019c0: 20018000 .word 0x20018000
|
|
ldr r0, =_sdata
|
|
80019c4: 20000000 .word 0x20000000
|
|
ldr r1, =_edata
|
|
80019c8: 20000010 .word 0x20000010
|
|
ldr r2, =_sidata
|
|
80019cc: 080089f0 .word 0x080089f0
|
|
ldr r2, =_sbss
|
|
80019d0: 20000010 .word 0x20000010
|
|
ldr r4, =_ebss
|
|
80019d4: 20002498 .word 0x20002498
|
|
|
|
080019d8 <ADC1_2_IRQHandler>:
|
|
* @retval : None
|
|
*/
|
|
.section .text.Default_Handler,"ax",%progbits
|
|
Default_Handler:
|
|
Infinite_Loop:
|
|
b Infinite_Loop
|
|
80019d8: e7fe b.n 80019d8 <ADC1_2_IRQHandler>
|
|
|
|
080019da <HAL_Init>:
|
|
* each 1ms in the SysTick_Handler() interrupt handler.
|
|
*
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef HAL_Init(void)
|
|
{
|
|
80019da: b580 push {r7, lr}
|
|
80019dc: b082 sub sp, #8
|
|
80019de: af00 add r7, sp, #0
|
|
HAL_StatusTypeDef status = HAL_OK;
|
|
80019e0: 2300 movs r3, #0
|
|
80019e2: 71fb strb r3, [r7, #7]
|
|
#if (PREFETCH_ENABLE != 0)
|
|
__HAL_FLASH_PREFETCH_BUFFER_ENABLE();
|
|
#endif /* PREFETCH_ENABLE */
|
|
|
|
/* Set Interrupt Group Priority */
|
|
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
|
|
80019e4: 2003 movs r0, #3
|
|
80019e6: f000 f961 bl 8001cac <HAL_NVIC_SetPriorityGrouping>
|
|
|
|
/* Use SysTick as time base source and configure 1ms tick (default clock after Reset is MSI) */
|
|
if (HAL_InitTick(TICK_INT_PRIORITY) != HAL_OK)
|
|
80019ea: 200f movs r0, #15
|
|
80019ec: f000 f80e bl 8001a0c <HAL_InitTick>
|
|
80019f0: 4603 mov r3, r0
|
|
80019f2: 2b00 cmp r3, #0
|
|
80019f4: d002 beq.n 80019fc <HAL_Init+0x22>
|
|
{
|
|
status = HAL_ERROR;
|
|
80019f6: 2301 movs r3, #1
|
|
80019f8: 71fb strb r3, [r7, #7]
|
|
80019fa: e001 b.n 8001a00 <HAL_Init+0x26>
|
|
}
|
|
else
|
|
{
|
|
/* Init the low level hardware */
|
|
HAL_MspInit();
|
|
80019fc: f7ff fcae bl 800135c <HAL_MspInit>
|
|
}
|
|
|
|
/* Return function status */
|
|
return status;
|
|
8001a00: 79fb ldrb r3, [r7, #7]
|
|
}
|
|
8001a02: 4618 mov r0, r3
|
|
8001a04: 3708 adds r7, #8
|
|
8001a06: 46bd mov sp, r7
|
|
8001a08: bd80 pop {r7, pc}
|
|
...
|
|
|
|
08001a0c <HAL_InitTick>:
|
|
* implementation in user file.
|
|
* @param TickPriority Tick interrupt priority.
|
|
* @retval HAL status
|
|
*/
|
|
__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
|
|
{
|
|
8001a0c: b580 push {r7, lr}
|
|
8001a0e: b084 sub sp, #16
|
|
8001a10: af00 add r7, sp, #0
|
|
8001a12: 6078 str r0, [r7, #4]
|
|
HAL_StatusTypeDef status = HAL_OK;
|
|
8001a14: 2300 movs r3, #0
|
|
8001a16: 73fb strb r3, [r7, #15]
|
|
|
|
/* Check uwTickFreq for MisraC 2012 (even if uwTickFreq is a enum type that doesn't take the value zero)*/
|
|
if ((uint32_t)uwTickFreq != 0U)
|
|
8001a18: 4b17 ldr r3, [pc, #92] @ (8001a78 <HAL_InitTick+0x6c>)
|
|
8001a1a: 781b ldrb r3, [r3, #0]
|
|
8001a1c: 2b00 cmp r3, #0
|
|
8001a1e: d023 beq.n 8001a68 <HAL_InitTick+0x5c>
|
|
{
|
|
/*Configure the SysTick to have interrupt in 1ms time basis*/
|
|
if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / (uint32_t)uwTickFreq)) == 0U)
|
|
8001a20: 4b16 ldr r3, [pc, #88] @ (8001a7c <HAL_InitTick+0x70>)
|
|
8001a22: 681a ldr r2, [r3, #0]
|
|
8001a24: 4b14 ldr r3, [pc, #80] @ (8001a78 <HAL_InitTick+0x6c>)
|
|
8001a26: 781b ldrb r3, [r3, #0]
|
|
8001a28: 4619 mov r1, r3
|
|
8001a2a: f44f 737a mov.w r3, #1000 @ 0x3e8
|
|
8001a2e: fbb3 f3f1 udiv r3, r3, r1
|
|
8001a32: fbb2 f3f3 udiv r3, r2, r3
|
|
8001a36: 4618 mov r0, r3
|
|
8001a38: f000 f96d bl 8001d16 <HAL_SYSTICK_Config>
|
|
8001a3c: 4603 mov r3, r0
|
|
8001a3e: 2b00 cmp r3, #0
|
|
8001a40: d10f bne.n 8001a62 <HAL_InitTick+0x56>
|
|
{
|
|
/* Configure the SysTick IRQ priority */
|
|
if (TickPriority < (1UL << __NVIC_PRIO_BITS))
|
|
8001a42: 687b ldr r3, [r7, #4]
|
|
8001a44: 2b0f cmp r3, #15
|
|
8001a46: d809 bhi.n 8001a5c <HAL_InitTick+0x50>
|
|
{
|
|
HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
|
|
8001a48: 2200 movs r2, #0
|
|
8001a4a: 6879 ldr r1, [r7, #4]
|
|
8001a4c: f04f 30ff mov.w r0, #4294967295
|
|
8001a50: f000 f937 bl 8001cc2 <HAL_NVIC_SetPriority>
|
|
uwTickPrio = TickPriority;
|
|
8001a54: 4a0a ldr r2, [pc, #40] @ (8001a80 <HAL_InitTick+0x74>)
|
|
8001a56: 687b ldr r3, [r7, #4]
|
|
8001a58: 6013 str r3, [r2, #0]
|
|
8001a5a: e007 b.n 8001a6c <HAL_InitTick+0x60>
|
|
}
|
|
else
|
|
{
|
|
status = HAL_ERROR;
|
|
8001a5c: 2301 movs r3, #1
|
|
8001a5e: 73fb strb r3, [r7, #15]
|
|
8001a60: e004 b.n 8001a6c <HAL_InitTick+0x60>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
status = HAL_ERROR;
|
|
8001a62: 2301 movs r3, #1
|
|
8001a64: 73fb strb r3, [r7, #15]
|
|
8001a66: e001 b.n 8001a6c <HAL_InitTick+0x60>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
status = HAL_ERROR;
|
|
8001a68: 2301 movs r3, #1
|
|
8001a6a: 73fb strb r3, [r7, #15]
|
|
}
|
|
|
|
/* Return function status */
|
|
return status;
|
|
8001a6c: 7bfb ldrb r3, [r7, #15]
|
|
}
|
|
8001a6e: 4618 mov r0, r3
|
|
8001a70: 3710 adds r7, #16
|
|
8001a72: 46bd mov sp, r7
|
|
8001a74: bd80 pop {r7, pc}
|
|
8001a76: bf00 nop
|
|
8001a78: 20000008 .word 0x20000008
|
|
8001a7c: 20000000 .word 0x20000000
|
|
8001a80: 20000004 .word 0x20000004
|
|
|
|
08001a84 <HAL_IncTick>:
|
|
* @note This function is declared as __weak to be overwritten in case of other
|
|
* implementations in user file.
|
|
* @retval None
|
|
*/
|
|
__weak void HAL_IncTick(void)
|
|
{
|
|
8001a84: b480 push {r7}
|
|
8001a86: af00 add r7, sp, #0
|
|
uwTick += (uint32_t)uwTickFreq;
|
|
8001a88: 4b06 ldr r3, [pc, #24] @ (8001aa4 <HAL_IncTick+0x20>)
|
|
8001a8a: 781b ldrb r3, [r3, #0]
|
|
8001a8c: 461a mov r2, r3
|
|
8001a8e: 4b06 ldr r3, [pc, #24] @ (8001aa8 <HAL_IncTick+0x24>)
|
|
8001a90: 681b ldr r3, [r3, #0]
|
|
8001a92: 4413 add r3, r2
|
|
8001a94: 4a04 ldr r2, [pc, #16] @ (8001aa8 <HAL_IncTick+0x24>)
|
|
8001a96: 6013 str r3, [r2, #0]
|
|
}
|
|
8001a98: bf00 nop
|
|
8001a9a: 46bd mov sp, r7
|
|
8001a9c: f85d 7b04 ldr.w r7, [sp], #4
|
|
8001aa0: 4770 bx lr
|
|
8001aa2: bf00 nop
|
|
8001aa4: 20000008 .word 0x20000008
|
|
8001aa8: 20000780 .word 0x20000780
|
|
|
|
08001aac <HAL_GetTick>:
|
|
* @note This function is declared as __weak to be overwritten in case of other
|
|
* implementations in user file.
|
|
* @retval tick value
|
|
*/
|
|
__weak uint32_t HAL_GetTick(void)
|
|
{
|
|
8001aac: b480 push {r7}
|
|
8001aae: af00 add r7, sp, #0
|
|
return uwTick;
|
|
8001ab0: 4b03 ldr r3, [pc, #12] @ (8001ac0 <HAL_GetTick+0x14>)
|
|
8001ab2: 681b ldr r3, [r3, #0]
|
|
}
|
|
8001ab4: 4618 mov r0, r3
|
|
8001ab6: 46bd mov sp, r7
|
|
8001ab8: f85d 7b04 ldr.w r7, [sp], #4
|
|
8001abc: 4770 bx lr
|
|
8001abe: bf00 nop
|
|
8001ac0: 20000780 .word 0x20000780
|
|
|
|
08001ac4 <HAL_Delay>:
|
|
* implementations in user file.
|
|
* @param Delay specifies the delay time length, in milliseconds.
|
|
* @retval None
|
|
*/
|
|
__weak void HAL_Delay(uint32_t Delay)
|
|
{
|
|
8001ac4: b580 push {r7, lr}
|
|
8001ac6: b084 sub sp, #16
|
|
8001ac8: af00 add r7, sp, #0
|
|
8001aca: 6078 str r0, [r7, #4]
|
|
uint32_t tickstart = HAL_GetTick();
|
|
8001acc: f7ff ffee bl 8001aac <HAL_GetTick>
|
|
8001ad0: 60b8 str r0, [r7, #8]
|
|
uint32_t wait = Delay;
|
|
8001ad2: 687b ldr r3, [r7, #4]
|
|
8001ad4: 60fb str r3, [r7, #12]
|
|
|
|
/* Add a period to guaranty minimum wait */
|
|
if (wait < HAL_MAX_DELAY)
|
|
8001ad6: 68fb ldr r3, [r7, #12]
|
|
8001ad8: f1b3 3fff cmp.w r3, #4294967295
|
|
8001adc: d005 beq.n 8001aea <HAL_Delay+0x26>
|
|
{
|
|
wait += (uint32_t)uwTickFreq;
|
|
8001ade: 4b0a ldr r3, [pc, #40] @ (8001b08 <HAL_Delay+0x44>)
|
|
8001ae0: 781b ldrb r3, [r3, #0]
|
|
8001ae2: 461a mov r2, r3
|
|
8001ae4: 68fb ldr r3, [r7, #12]
|
|
8001ae6: 4413 add r3, r2
|
|
8001ae8: 60fb str r3, [r7, #12]
|
|
}
|
|
|
|
while ((HAL_GetTick() - tickstart) < wait)
|
|
8001aea: bf00 nop
|
|
8001aec: f7ff ffde bl 8001aac <HAL_GetTick>
|
|
8001af0: 4602 mov r2, r0
|
|
8001af2: 68bb ldr r3, [r7, #8]
|
|
8001af4: 1ad3 subs r3, r2, r3
|
|
8001af6: 68fa ldr r2, [r7, #12]
|
|
8001af8: 429a cmp r2, r3
|
|
8001afa: d8f7 bhi.n 8001aec <HAL_Delay+0x28>
|
|
{
|
|
}
|
|
}
|
|
8001afc: bf00 nop
|
|
8001afe: bf00 nop
|
|
8001b00: 3710 adds r7, #16
|
|
8001b02: 46bd mov sp, r7
|
|
8001b04: bd80 pop {r7, pc}
|
|
8001b06: bf00 nop
|
|
8001b08: 20000008 .word 0x20000008
|
|
|
|
08001b0c <__NVIC_SetPriorityGrouping>:
|
|
In case of a conflict between priority grouping and available
|
|
priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set.
|
|
\param [in] PriorityGroup Priority grouping field.
|
|
*/
|
|
__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
|
|
{
|
|
8001b0c: b480 push {r7}
|
|
8001b0e: b085 sub sp, #20
|
|
8001b10: af00 add r7, sp, #0
|
|
8001b12: 6078 str r0, [r7, #4]
|
|
uint32_t reg_value;
|
|
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
|
|
8001b14: 687b ldr r3, [r7, #4]
|
|
8001b16: f003 0307 and.w r3, r3, #7
|
|
8001b1a: 60fb str r3, [r7, #12]
|
|
|
|
reg_value = SCB->AIRCR; /* read old register configuration */
|
|
8001b1c: 4b0c ldr r3, [pc, #48] @ (8001b50 <__NVIC_SetPriorityGrouping+0x44>)
|
|
8001b1e: 68db ldr r3, [r3, #12]
|
|
8001b20: 60bb str r3, [r7, #8]
|
|
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
|
|
8001b22: 68ba ldr r2, [r7, #8]
|
|
8001b24: f64f 03ff movw r3, #63743 @ 0xf8ff
|
|
8001b28: 4013 ands r3, r2
|
|
8001b2a: 60bb str r3, [r7, #8]
|
|
reg_value = (reg_value |
|
|
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
|
|
(PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
|
|
8001b2c: 68fb ldr r3, [r7, #12]
|
|
8001b2e: 021a lsls r2, r3, #8
|
|
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
|
|
8001b30: 68bb ldr r3, [r7, #8]
|
|
8001b32: 4313 orrs r3, r2
|
|
reg_value = (reg_value |
|
|
8001b34: f043 63bf orr.w r3, r3, #100139008 @ 0x5f80000
|
|
8001b38: f443 3300 orr.w r3, r3, #131072 @ 0x20000
|
|
8001b3c: 60bb str r3, [r7, #8]
|
|
SCB->AIRCR = reg_value;
|
|
8001b3e: 4a04 ldr r2, [pc, #16] @ (8001b50 <__NVIC_SetPriorityGrouping+0x44>)
|
|
8001b40: 68bb ldr r3, [r7, #8]
|
|
8001b42: 60d3 str r3, [r2, #12]
|
|
}
|
|
8001b44: bf00 nop
|
|
8001b46: 3714 adds r7, #20
|
|
8001b48: 46bd mov sp, r7
|
|
8001b4a: f85d 7b04 ldr.w r7, [sp], #4
|
|
8001b4e: 4770 bx lr
|
|
8001b50: e000ed00 .word 0xe000ed00
|
|
|
|
08001b54 <__NVIC_GetPriorityGrouping>:
|
|
\brief Get Priority Grouping
|
|
\details Reads the priority grouping field from the NVIC Interrupt Controller.
|
|
\return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field).
|
|
*/
|
|
__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void)
|
|
{
|
|
8001b54: b480 push {r7}
|
|
8001b56: af00 add r7, sp, #0
|
|
return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
|
|
8001b58: 4b04 ldr r3, [pc, #16] @ (8001b6c <__NVIC_GetPriorityGrouping+0x18>)
|
|
8001b5a: 68db ldr r3, [r3, #12]
|
|
8001b5c: 0a1b lsrs r3, r3, #8
|
|
8001b5e: f003 0307 and.w r3, r3, #7
|
|
}
|
|
8001b62: 4618 mov r0, r3
|
|
8001b64: 46bd mov sp, r7
|
|
8001b66: f85d 7b04 ldr.w r7, [sp], #4
|
|
8001b6a: 4770 bx lr
|
|
8001b6c: e000ed00 .word 0xe000ed00
|
|
|
|
08001b70 <__NVIC_EnableIRQ>:
|
|
\details Enables a device specific interrupt in the NVIC interrupt controller.
|
|
\param [in] IRQn Device specific interrupt number.
|
|
\note IRQn must not be negative.
|
|
*/
|
|
__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
|
|
{
|
|
8001b70: b480 push {r7}
|
|
8001b72: b083 sub sp, #12
|
|
8001b74: af00 add r7, sp, #0
|
|
8001b76: 4603 mov r3, r0
|
|
8001b78: 71fb strb r3, [r7, #7]
|
|
if ((int32_t)(IRQn) >= 0)
|
|
8001b7a: f997 3007 ldrsb.w r3, [r7, #7]
|
|
8001b7e: 2b00 cmp r3, #0
|
|
8001b80: db0b blt.n 8001b9a <__NVIC_EnableIRQ+0x2a>
|
|
{
|
|
__COMPILER_BARRIER();
|
|
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
|
8001b82: 79fb ldrb r3, [r7, #7]
|
|
8001b84: f003 021f and.w r2, r3, #31
|
|
8001b88: 4907 ldr r1, [pc, #28] @ (8001ba8 <__NVIC_EnableIRQ+0x38>)
|
|
8001b8a: f997 3007 ldrsb.w r3, [r7, #7]
|
|
8001b8e: 095b lsrs r3, r3, #5
|
|
8001b90: 2001 movs r0, #1
|
|
8001b92: fa00 f202 lsl.w r2, r0, r2
|
|
8001b96: f841 2023 str.w r2, [r1, r3, lsl #2]
|
|
__COMPILER_BARRIER();
|
|
}
|
|
}
|
|
8001b9a: bf00 nop
|
|
8001b9c: 370c adds r7, #12
|
|
8001b9e: 46bd mov sp, r7
|
|
8001ba0: f85d 7b04 ldr.w r7, [sp], #4
|
|
8001ba4: 4770 bx lr
|
|
8001ba6: bf00 nop
|
|
8001ba8: e000e100 .word 0xe000e100
|
|
|
|
08001bac <__NVIC_SetPriority>:
|
|
\param [in] IRQn Interrupt number.
|
|
\param [in] priority Priority to set.
|
|
\note The priority cannot be set for every processor exception.
|
|
*/
|
|
__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
|
|
{
|
|
8001bac: b480 push {r7}
|
|
8001bae: b083 sub sp, #12
|
|
8001bb0: af00 add r7, sp, #0
|
|
8001bb2: 4603 mov r3, r0
|
|
8001bb4: 6039 str r1, [r7, #0]
|
|
8001bb6: 71fb strb r3, [r7, #7]
|
|
if ((int32_t)(IRQn) >= 0)
|
|
8001bb8: f997 3007 ldrsb.w r3, [r7, #7]
|
|
8001bbc: 2b00 cmp r3, #0
|
|
8001bbe: db0a blt.n 8001bd6 <__NVIC_SetPriority+0x2a>
|
|
{
|
|
NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
|
|
8001bc0: 683b ldr r3, [r7, #0]
|
|
8001bc2: b2da uxtb r2, r3
|
|
8001bc4: 490c ldr r1, [pc, #48] @ (8001bf8 <__NVIC_SetPriority+0x4c>)
|
|
8001bc6: f997 3007 ldrsb.w r3, [r7, #7]
|
|
8001bca: 0112 lsls r2, r2, #4
|
|
8001bcc: b2d2 uxtb r2, r2
|
|
8001bce: 440b add r3, r1
|
|
8001bd0: f883 2300 strb.w r2, [r3, #768] @ 0x300
|
|
}
|
|
else
|
|
{
|
|
SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
|
|
}
|
|
}
|
|
8001bd4: e00a b.n 8001bec <__NVIC_SetPriority+0x40>
|
|
SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
|
|
8001bd6: 683b ldr r3, [r7, #0]
|
|
8001bd8: b2da uxtb r2, r3
|
|
8001bda: 4908 ldr r1, [pc, #32] @ (8001bfc <__NVIC_SetPriority+0x50>)
|
|
8001bdc: 79fb ldrb r3, [r7, #7]
|
|
8001bde: f003 030f and.w r3, r3, #15
|
|
8001be2: 3b04 subs r3, #4
|
|
8001be4: 0112 lsls r2, r2, #4
|
|
8001be6: b2d2 uxtb r2, r2
|
|
8001be8: 440b add r3, r1
|
|
8001bea: 761a strb r2, [r3, #24]
|
|
}
|
|
8001bec: bf00 nop
|
|
8001bee: 370c adds r7, #12
|
|
8001bf0: 46bd mov sp, r7
|
|
8001bf2: f85d 7b04 ldr.w r7, [sp], #4
|
|
8001bf6: 4770 bx lr
|
|
8001bf8: e000e100 .word 0xe000e100
|
|
8001bfc: e000ed00 .word 0xe000ed00
|
|
|
|
08001c00 <NVIC_EncodePriority>:
|
|
\param [in] PreemptPriority Preemptive priority value (starting from 0).
|
|
\param [in] SubPriority Subpriority value (starting from 0).
|
|
\return Encoded priority. Value can be used in the function \ref NVIC_SetPriority().
|
|
*/
|
|
__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
|
|
{
|
|
8001c00: b480 push {r7}
|
|
8001c02: b089 sub sp, #36 @ 0x24
|
|
8001c04: af00 add r7, sp, #0
|
|
8001c06: 60f8 str r0, [r7, #12]
|
|
8001c08: 60b9 str r1, [r7, #8]
|
|
8001c0a: 607a str r2, [r7, #4]
|
|
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
|
|
8001c0c: 68fb ldr r3, [r7, #12]
|
|
8001c0e: f003 0307 and.w r3, r3, #7
|
|
8001c12: 61fb str r3, [r7, #28]
|
|
uint32_t PreemptPriorityBits;
|
|
uint32_t SubPriorityBits;
|
|
|
|
PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp);
|
|
8001c14: 69fb ldr r3, [r7, #28]
|
|
8001c16: f1c3 0307 rsb r3, r3, #7
|
|
8001c1a: 2b04 cmp r3, #4
|
|
8001c1c: bf28 it cs
|
|
8001c1e: 2304 movcs r3, #4
|
|
8001c20: 61bb str r3, [r7, #24]
|
|
SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
|
|
8001c22: 69fb ldr r3, [r7, #28]
|
|
8001c24: 3304 adds r3, #4
|
|
8001c26: 2b06 cmp r3, #6
|
|
8001c28: d902 bls.n 8001c30 <NVIC_EncodePriority+0x30>
|
|
8001c2a: 69fb ldr r3, [r7, #28]
|
|
8001c2c: 3b03 subs r3, #3
|
|
8001c2e: e000 b.n 8001c32 <NVIC_EncodePriority+0x32>
|
|
8001c30: 2300 movs r3, #0
|
|
8001c32: 617b str r3, [r7, #20]
|
|
|
|
return (
|
|
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
|
|
8001c34: f04f 32ff mov.w r2, #4294967295
|
|
8001c38: 69bb ldr r3, [r7, #24]
|
|
8001c3a: fa02 f303 lsl.w r3, r2, r3
|
|
8001c3e: 43da mvns r2, r3
|
|
8001c40: 68bb ldr r3, [r7, #8]
|
|
8001c42: 401a ands r2, r3
|
|
8001c44: 697b ldr r3, [r7, #20]
|
|
8001c46: 409a lsls r2, r3
|
|
((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
|
|
8001c48: f04f 31ff mov.w r1, #4294967295
|
|
8001c4c: 697b ldr r3, [r7, #20]
|
|
8001c4e: fa01 f303 lsl.w r3, r1, r3
|
|
8001c52: 43d9 mvns r1, r3
|
|
8001c54: 687b ldr r3, [r7, #4]
|
|
8001c56: 400b ands r3, r1
|
|
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
|
|
8001c58: 4313 orrs r3, r2
|
|
);
|
|
}
|
|
8001c5a: 4618 mov r0, r3
|
|
8001c5c: 3724 adds r7, #36 @ 0x24
|
|
8001c5e: 46bd mov sp, r7
|
|
8001c60: f85d 7b04 ldr.w r7, [sp], #4
|
|
8001c64: 4770 bx lr
|
|
...
|
|
|
|
08001c68 <SysTick_Config>:
|
|
\note When the variable <b>__Vendor_SysTickConfig</b> is set to 1, then the
|
|
function <b>SysTick_Config</b> is not included. In this case, the file <b><i>device</i>.h</b>
|
|
must contain a vendor-specific implementation of this function.
|
|
*/
|
|
__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
|
|
{
|
|
8001c68: b580 push {r7, lr}
|
|
8001c6a: b082 sub sp, #8
|
|
8001c6c: af00 add r7, sp, #0
|
|
8001c6e: 6078 str r0, [r7, #4]
|
|
if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
|
|
8001c70: 687b ldr r3, [r7, #4]
|
|
8001c72: 3b01 subs r3, #1
|
|
8001c74: f1b3 7f80 cmp.w r3, #16777216 @ 0x1000000
|
|
8001c78: d301 bcc.n 8001c7e <SysTick_Config+0x16>
|
|
{
|
|
return (1UL); /* Reload value impossible */
|
|
8001c7a: 2301 movs r3, #1
|
|
8001c7c: e00f b.n 8001c9e <SysTick_Config+0x36>
|
|
}
|
|
|
|
SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
|
|
8001c7e: 4a0a ldr r2, [pc, #40] @ (8001ca8 <SysTick_Config+0x40>)
|
|
8001c80: 687b ldr r3, [r7, #4]
|
|
8001c82: 3b01 subs r3, #1
|
|
8001c84: 6053 str r3, [r2, #4]
|
|
NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
|
|
8001c86: 210f movs r1, #15
|
|
8001c88: f04f 30ff mov.w r0, #4294967295
|
|
8001c8c: f7ff ff8e bl 8001bac <__NVIC_SetPriority>
|
|
SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
|
|
8001c90: 4b05 ldr r3, [pc, #20] @ (8001ca8 <SysTick_Config+0x40>)
|
|
8001c92: 2200 movs r2, #0
|
|
8001c94: 609a str r2, [r3, #8]
|
|
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
|
|
8001c96: 4b04 ldr r3, [pc, #16] @ (8001ca8 <SysTick_Config+0x40>)
|
|
8001c98: 2207 movs r2, #7
|
|
8001c9a: 601a str r2, [r3, #0]
|
|
SysTick_CTRL_TICKINT_Msk |
|
|
SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
|
|
return (0UL); /* Function successful */
|
|
8001c9c: 2300 movs r3, #0
|
|
}
|
|
8001c9e: 4618 mov r0, r3
|
|
8001ca0: 3708 adds r7, #8
|
|
8001ca2: 46bd mov sp, r7
|
|
8001ca4: bd80 pop {r7, pc}
|
|
8001ca6: bf00 nop
|
|
8001ca8: e000e010 .word 0xe000e010
|
|
|
|
08001cac <HAL_NVIC_SetPriorityGrouping>:
|
|
* @note When the NVIC_PriorityGroup_0 is selected, IRQ pre-emption is no more possible.
|
|
* The pending IRQ priority will be managed only by the subpriority.
|
|
* @retval None
|
|
*/
|
|
void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
|
|
{
|
|
8001cac: b580 push {r7, lr}
|
|
8001cae: b082 sub sp, #8
|
|
8001cb0: af00 add r7, sp, #0
|
|
8001cb2: 6078 str r0, [r7, #4]
|
|
/* Check the parameters */
|
|
assert_param(IS_NVIC_PRIORITY_GROUP(PriorityGroup));
|
|
|
|
/* Set the PRIGROUP[10:8] bits according to the PriorityGroup parameter value */
|
|
NVIC_SetPriorityGrouping(PriorityGroup);
|
|
8001cb4: 6878 ldr r0, [r7, #4]
|
|
8001cb6: f7ff ff29 bl 8001b0c <__NVIC_SetPriorityGrouping>
|
|
}
|
|
8001cba: bf00 nop
|
|
8001cbc: 3708 adds r7, #8
|
|
8001cbe: 46bd mov sp, r7
|
|
8001cc0: bd80 pop {r7, pc}
|
|
|
|
08001cc2 <HAL_NVIC_SetPriority>:
|
|
* This parameter can be a value between 0 and 15
|
|
* A lower priority value indicates a higher priority.
|
|
* @retval None
|
|
*/
|
|
void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
|
|
{
|
|
8001cc2: b580 push {r7, lr}
|
|
8001cc4: b086 sub sp, #24
|
|
8001cc6: af00 add r7, sp, #0
|
|
8001cc8: 4603 mov r3, r0
|
|
8001cca: 60b9 str r1, [r7, #8]
|
|
8001ccc: 607a str r2, [r7, #4]
|
|
8001cce: 73fb strb r3, [r7, #15]
|
|
uint32_t prioritygroup = 0x00;
|
|
8001cd0: 2300 movs r3, #0
|
|
8001cd2: 617b str r3, [r7, #20]
|
|
|
|
/* Check the parameters */
|
|
assert_param(IS_NVIC_SUB_PRIORITY(SubPriority));
|
|
assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority));
|
|
|
|
prioritygroup = NVIC_GetPriorityGrouping();
|
|
8001cd4: f7ff ff3e bl 8001b54 <__NVIC_GetPriorityGrouping>
|
|
8001cd8: 6178 str r0, [r7, #20]
|
|
|
|
NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority));
|
|
8001cda: 687a ldr r2, [r7, #4]
|
|
8001cdc: 68b9 ldr r1, [r7, #8]
|
|
8001cde: 6978 ldr r0, [r7, #20]
|
|
8001ce0: f7ff ff8e bl 8001c00 <NVIC_EncodePriority>
|
|
8001ce4: 4602 mov r2, r0
|
|
8001ce6: f997 300f ldrsb.w r3, [r7, #15]
|
|
8001cea: 4611 mov r1, r2
|
|
8001cec: 4618 mov r0, r3
|
|
8001cee: f7ff ff5d bl 8001bac <__NVIC_SetPriority>
|
|
}
|
|
8001cf2: bf00 nop
|
|
8001cf4: 3718 adds r7, #24
|
|
8001cf6: 46bd mov sp, r7
|
|
8001cf8: bd80 pop {r7, pc}
|
|
|
|
08001cfa <HAL_NVIC_EnableIRQ>:
|
|
* This parameter can be an enumerator of IRQn_Type enumeration
|
|
* (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32l4xxxx.h))
|
|
* @retval None
|
|
*/
|
|
void HAL_NVIC_EnableIRQ(IRQn_Type IRQn)
|
|
{
|
|
8001cfa: b580 push {r7, lr}
|
|
8001cfc: b082 sub sp, #8
|
|
8001cfe: af00 add r7, sp, #0
|
|
8001d00: 4603 mov r3, r0
|
|
8001d02: 71fb strb r3, [r7, #7]
|
|
/* Check the parameters */
|
|
assert_param(IS_NVIC_DEVICE_IRQ(IRQn));
|
|
|
|
/* Enable interrupt */
|
|
NVIC_EnableIRQ(IRQn);
|
|
8001d04: f997 3007 ldrsb.w r3, [r7, #7]
|
|
8001d08: 4618 mov r0, r3
|
|
8001d0a: f7ff ff31 bl 8001b70 <__NVIC_EnableIRQ>
|
|
}
|
|
8001d0e: bf00 nop
|
|
8001d10: 3708 adds r7, #8
|
|
8001d12: 46bd mov sp, r7
|
|
8001d14: bd80 pop {r7, pc}
|
|
|
|
08001d16 <HAL_SYSTICK_Config>:
|
|
* @param TicksNumb: Specifies the ticks Number of ticks between two interrupts.
|
|
* @retval status: - 0 Function succeeded.
|
|
* - 1 Function failed.
|
|
*/
|
|
uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb)
|
|
{
|
|
8001d16: b580 push {r7, lr}
|
|
8001d18: b082 sub sp, #8
|
|
8001d1a: af00 add r7, sp, #0
|
|
8001d1c: 6078 str r0, [r7, #4]
|
|
return SysTick_Config(TicksNumb);
|
|
8001d1e: 6878 ldr r0, [r7, #4]
|
|
8001d20: f7ff ffa2 bl 8001c68 <SysTick_Config>
|
|
8001d24: 4603 mov r3, r0
|
|
}
|
|
8001d26: 4618 mov r0, r3
|
|
8001d28: 3708 adds r7, #8
|
|
8001d2a: 46bd mov sp, r7
|
|
8001d2c: bd80 pop {r7, pc}
|
|
...
|
|
|
|
08001d30 <HAL_DFSDM_ChannelInit>:
|
|
* in the DFSDM_ChannelInitTypeDef structure and initialize the associated handle.
|
|
* @param hdfsdm_channel DFSDM channel handle.
|
|
* @retval HAL status.
|
|
*/
|
|
HAL_StatusTypeDef HAL_DFSDM_ChannelInit(DFSDM_Channel_HandleTypeDef *hdfsdm_channel)
|
|
{
|
|
8001d30: b580 push {r7, lr}
|
|
8001d32: b082 sub sp, #8
|
|
8001d34: af00 add r7, sp, #0
|
|
8001d36: 6078 str r0, [r7, #4]
|
|
/* Check DFSDM Channel handle */
|
|
if (hdfsdm_channel == NULL)
|
|
8001d38: 687b ldr r3, [r7, #4]
|
|
8001d3a: 2b00 cmp r3, #0
|
|
8001d3c: d101 bne.n 8001d42 <HAL_DFSDM_ChannelInit+0x12>
|
|
{
|
|
return HAL_ERROR;
|
|
8001d3e: 2301 movs r3, #1
|
|
8001d40: e0ac b.n 8001e9c <HAL_DFSDM_ChannelInit+0x16c>
|
|
assert_param(IS_DFSDM_CHANNEL_FILTER_OVS_RATIO(hdfsdm_channel->Init.Awd.Oversampling));
|
|
assert_param(IS_DFSDM_CHANNEL_OFFSET(hdfsdm_channel->Init.Offset));
|
|
assert_param(IS_DFSDM_CHANNEL_RIGHT_BIT_SHIFT(hdfsdm_channel->Init.RightBitShift));
|
|
|
|
/* Check that channel has not been already initialized */
|
|
if (a_dfsdm1ChannelHandle[DFSDM_GetChannelFromInstance(hdfsdm_channel->Instance)] != NULL)
|
|
8001d42: 687b ldr r3, [r7, #4]
|
|
8001d44: 681b ldr r3, [r3, #0]
|
|
8001d46: 4618 mov r0, r3
|
|
8001d48: f000 f8b2 bl 8001eb0 <DFSDM_GetChannelFromInstance>
|
|
8001d4c: 4603 mov r3, r0
|
|
8001d4e: 4a55 ldr r2, [pc, #340] @ (8001ea4 <HAL_DFSDM_ChannelInit+0x174>)
|
|
8001d50: f852 3023 ldr.w r3, [r2, r3, lsl #2]
|
|
8001d54: 2b00 cmp r3, #0
|
|
8001d56: d001 beq.n 8001d5c <HAL_DFSDM_ChannelInit+0x2c>
|
|
{
|
|
return HAL_ERROR;
|
|
8001d58: 2301 movs r3, #1
|
|
8001d5a: e09f b.n 8001e9c <HAL_DFSDM_ChannelInit+0x16c>
|
|
hdfsdm_channel->MspInitCallback = HAL_DFSDM_ChannelMspInit;
|
|
}
|
|
hdfsdm_channel->MspInitCallback(hdfsdm_channel);
|
|
#else
|
|
/* Call MSP init function */
|
|
HAL_DFSDM_ChannelMspInit(hdfsdm_channel);
|
|
8001d5c: 6878 ldr r0, [r7, #4]
|
|
8001d5e: f7ff fb25 bl 80013ac <HAL_DFSDM_ChannelMspInit>
|
|
#endif
|
|
|
|
/* Update the channel counter */
|
|
v_dfsdm1ChannelCounter++;
|
|
8001d62: 4b51 ldr r3, [pc, #324] @ (8001ea8 <HAL_DFSDM_ChannelInit+0x178>)
|
|
8001d64: 681b ldr r3, [r3, #0]
|
|
8001d66: 3301 adds r3, #1
|
|
8001d68: 4a4f ldr r2, [pc, #316] @ (8001ea8 <HAL_DFSDM_ChannelInit+0x178>)
|
|
8001d6a: 6013 str r3, [r2, #0]
|
|
|
|
/* Configure output serial clock and enable global DFSDM interface only for first channel */
|
|
if (v_dfsdm1ChannelCounter == 1U)
|
|
8001d6c: 4b4e ldr r3, [pc, #312] @ (8001ea8 <HAL_DFSDM_ChannelInit+0x178>)
|
|
8001d6e: 681b ldr r3, [r3, #0]
|
|
8001d70: 2b01 cmp r3, #1
|
|
8001d72: d125 bne.n 8001dc0 <HAL_DFSDM_ChannelInit+0x90>
|
|
{
|
|
assert_param(IS_DFSDM_CHANNEL_OUTPUT_CLOCK(hdfsdm_channel->Init.OutputClock.Selection));
|
|
/* Set the output serial clock source */
|
|
DFSDM1_Channel0->CHCFGR1 &= ~(DFSDM_CHCFGR1_CKOUTSRC);
|
|
8001d74: 4b4d ldr r3, [pc, #308] @ (8001eac <HAL_DFSDM_ChannelInit+0x17c>)
|
|
8001d76: 681b ldr r3, [r3, #0]
|
|
8001d78: 4a4c ldr r2, [pc, #304] @ (8001eac <HAL_DFSDM_ChannelInit+0x17c>)
|
|
8001d7a: f023 4380 bic.w r3, r3, #1073741824 @ 0x40000000
|
|
8001d7e: 6013 str r3, [r2, #0]
|
|
DFSDM1_Channel0->CHCFGR1 |= hdfsdm_channel->Init.OutputClock.Selection;
|
|
8001d80: 4b4a ldr r3, [pc, #296] @ (8001eac <HAL_DFSDM_ChannelInit+0x17c>)
|
|
8001d82: 681a ldr r2, [r3, #0]
|
|
8001d84: 687b ldr r3, [r7, #4]
|
|
8001d86: 689b ldr r3, [r3, #8]
|
|
8001d88: 4948 ldr r1, [pc, #288] @ (8001eac <HAL_DFSDM_ChannelInit+0x17c>)
|
|
8001d8a: 4313 orrs r3, r2
|
|
8001d8c: 600b str r3, [r1, #0]
|
|
|
|
/* Reset clock divider */
|
|
DFSDM1_Channel0->CHCFGR1 &= ~(DFSDM_CHCFGR1_CKOUTDIV);
|
|
8001d8e: 4b47 ldr r3, [pc, #284] @ (8001eac <HAL_DFSDM_ChannelInit+0x17c>)
|
|
8001d90: 681b ldr r3, [r3, #0]
|
|
8001d92: 4a46 ldr r2, [pc, #280] @ (8001eac <HAL_DFSDM_ChannelInit+0x17c>)
|
|
8001d94: f423 037f bic.w r3, r3, #16711680 @ 0xff0000
|
|
8001d98: 6013 str r3, [r2, #0]
|
|
if (hdfsdm_channel->Init.OutputClock.Activation == ENABLE)
|
|
8001d9a: 687b ldr r3, [r7, #4]
|
|
8001d9c: 791b ldrb r3, [r3, #4]
|
|
8001d9e: 2b01 cmp r3, #1
|
|
8001da0: d108 bne.n 8001db4 <HAL_DFSDM_ChannelInit+0x84>
|
|
{
|
|
assert_param(IS_DFSDM_CHANNEL_OUTPUT_CLOCK_DIVIDER(hdfsdm_channel->Init.OutputClock.Divider));
|
|
/* Set the output clock divider */
|
|
DFSDM1_Channel0->CHCFGR1 |= (uint32_t)((hdfsdm_channel->Init.OutputClock.Divider - 1U) <<
|
|
8001da2: 4b42 ldr r3, [pc, #264] @ (8001eac <HAL_DFSDM_ChannelInit+0x17c>)
|
|
8001da4: 681a ldr r2, [r3, #0]
|
|
8001da6: 687b ldr r3, [r7, #4]
|
|
8001da8: 68db ldr r3, [r3, #12]
|
|
8001daa: 3b01 subs r3, #1
|
|
8001dac: 041b lsls r3, r3, #16
|
|
8001dae: 493f ldr r1, [pc, #252] @ (8001eac <HAL_DFSDM_ChannelInit+0x17c>)
|
|
8001db0: 4313 orrs r3, r2
|
|
8001db2: 600b str r3, [r1, #0]
|
|
DFSDM_CHCFGR1_CKOUTDIV_Pos);
|
|
}
|
|
|
|
/* enable the DFSDM global interface */
|
|
DFSDM1_Channel0->CHCFGR1 |= DFSDM_CHCFGR1_DFSDMEN;
|
|
8001db4: 4b3d ldr r3, [pc, #244] @ (8001eac <HAL_DFSDM_ChannelInit+0x17c>)
|
|
8001db6: 681b ldr r3, [r3, #0]
|
|
8001db8: 4a3c ldr r2, [pc, #240] @ (8001eac <HAL_DFSDM_ChannelInit+0x17c>)
|
|
8001dba: f043 4300 orr.w r3, r3, #2147483648 @ 0x80000000
|
|
8001dbe: 6013 str r3, [r2, #0]
|
|
}
|
|
|
|
/* Set channel input parameters */
|
|
hdfsdm_channel->Instance->CHCFGR1 &= ~(DFSDM_CHCFGR1_DATPACK | DFSDM_CHCFGR1_DATMPX |
|
|
8001dc0: 687b ldr r3, [r7, #4]
|
|
8001dc2: 681b ldr r3, [r3, #0]
|
|
8001dc4: 681a ldr r2, [r3, #0]
|
|
8001dc6: 687b ldr r3, [r7, #4]
|
|
8001dc8: 681b ldr r3, [r3, #0]
|
|
8001dca: f422 4271 bic.w r2, r2, #61696 @ 0xf100
|
|
8001dce: 601a str r2, [r3, #0]
|
|
DFSDM_CHCFGR1_CHINSEL);
|
|
hdfsdm_channel->Instance->CHCFGR1 |= (hdfsdm_channel->Init.Input.Multiplexer |
|
|
8001dd0: 687b ldr r3, [r7, #4]
|
|
8001dd2: 681b ldr r3, [r3, #0]
|
|
8001dd4: 6819 ldr r1, [r3, #0]
|
|
8001dd6: 687b ldr r3, [r7, #4]
|
|
8001dd8: 691a ldr r2, [r3, #16]
|
|
hdfsdm_channel->Init.Input.DataPacking |
|
|
8001dda: 687b ldr r3, [r7, #4]
|
|
8001ddc: 695b ldr r3, [r3, #20]
|
|
hdfsdm_channel->Instance->CHCFGR1 |= (hdfsdm_channel->Init.Input.Multiplexer |
|
|
8001dde: 431a orrs r2, r3
|
|
hdfsdm_channel->Init.Input.Pins);
|
|
8001de0: 687b ldr r3, [r7, #4]
|
|
8001de2: 699b ldr r3, [r3, #24]
|
|
hdfsdm_channel->Init.Input.DataPacking |
|
|
8001de4: 431a orrs r2, r3
|
|
hdfsdm_channel->Instance->CHCFGR1 |= (hdfsdm_channel->Init.Input.Multiplexer |
|
|
8001de6: 687b ldr r3, [r7, #4]
|
|
8001de8: 681b ldr r3, [r3, #0]
|
|
8001dea: 430a orrs r2, r1
|
|
8001dec: 601a str r2, [r3, #0]
|
|
|
|
/* Set serial interface parameters */
|
|
hdfsdm_channel->Instance->CHCFGR1 &= ~(DFSDM_CHCFGR1_SITP | DFSDM_CHCFGR1_SPICKSEL);
|
|
8001dee: 687b ldr r3, [r7, #4]
|
|
8001df0: 681b ldr r3, [r3, #0]
|
|
8001df2: 681a ldr r2, [r3, #0]
|
|
8001df4: 687b ldr r3, [r7, #4]
|
|
8001df6: 681b ldr r3, [r3, #0]
|
|
8001df8: f022 020f bic.w r2, r2, #15
|
|
8001dfc: 601a str r2, [r3, #0]
|
|
hdfsdm_channel->Instance->CHCFGR1 |= (hdfsdm_channel->Init.SerialInterface.Type |
|
|
8001dfe: 687b ldr r3, [r7, #4]
|
|
8001e00: 681b ldr r3, [r3, #0]
|
|
8001e02: 6819 ldr r1, [r3, #0]
|
|
8001e04: 687b ldr r3, [r7, #4]
|
|
8001e06: 69da ldr r2, [r3, #28]
|
|
hdfsdm_channel->Init.SerialInterface.SpiClock);
|
|
8001e08: 687b ldr r3, [r7, #4]
|
|
8001e0a: 6a1b ldr r3, [r3, #32]
|
|
hdfsdm_channel->Instance->CHCFGR1 |= (hdfsdm_channel->Init.SerialInterface.Type |
|
|
8001e0c: 431a orrs r2, r3
|
|
8001e0e: 687b ldr r3, [r7, #4]
|
|
8001e10: 681b ldr r3, [r3, #0]
|
|
8001e12: 430a orrs r2, r1
|
|
8001e14: 601a str r2, [r3, #0]
|
|
|
|
/* Set analog watchdog parameters */
|
|
hdfsdm_channel->Instance->CHAWSCDR &= ~(DFSDM_CHAWSCDR_AWFORD | DFSDM_CHAWSCDR_AWFOSR);
|
|
8001e16: 687b ldr r3, [r7, #4]
|
|
8001e18: 681b ldr r3, [r3, #0]
|
|
8001e1a: 689a ldr r2, [r3, #8]
|
|
8001e1c: 687b ldr r3, [r7, #4]
|
|
8001e1e: 681b ldr r3, [r3, #0]
|
|
8001e20: f422 025f bic.w r2, r2, #14614528 @ 0xdf0000
|
|
8001e24: 609a str r2, [r3, #8]
|
|
hdfsdm_channel->Instance->CHAWSCDR |= (hdfsdm_channel->Init.Awd.FilterOrder |
|
|
8001e26: 687b ldr r3, [r7, #4]
|
|
8001e28: 681b ldr r3, [r3, #0]
|
|
8001e2a: 6899 ldr r1, [r3, #8]
|
|
8001e2c: 687b ldr r3, [r7, #4]
|
|
8001e2e: 6a5a ldr r2, [r3, #36] @ 0x24
|
|
((hdfsdm_channel->Init.Awd.Oversampling - 1U) << DFSDM_CHAWSCDR_AWFOSR_Pos));
|
|
8001e30: 687b ldr r3, [r7, #4]
|
|
8001e32: 6a9b ldr r3, [r3, #40] @ 0x28
|
|
8001e34: 3b01 subs r3, #1
|
|
8001e36: 041b lsls r3, r3, #16
|
|
hdfsdm_channel->Instance->CHAWSCDR |= (hdfsdm_channel->Init.Awd.FilterOrder |
|
|
8001e38: 431a orrs r2, r3
|
|
8001e3a: 687b ldr r3, [r7, #4]
|
|
8001e3c: 681b ldr r3, [r3, #0]
|
|
8001e3e: 430a orrs r2, r1
|
|
8001e40: 609a str r2, [r3, #8]
|
|
|
|
/* Set channel offset and right bit shift */
|
|
hdfsdm_channel->Instance->CHCFGR2 &= ~(DFSDM_CHCFGR2_OFFSET | DFSDM_CHCFGR2_DTRBS);
|
|
8001e42: 687b ldr r3, [r7, #4]
|
|
8001e44: 681b ldr r3, [r3, #0]
|
|
8001e46: 685a ldr r2, [r3, #4]
|
|
8001e48: 687b ldr r3, [r7, #4]
|
|
8001e4a: 681b ldr r3, [r3, #0]
|
|
8001e4c: f002 0207 and.w r2, r2, #7
|
|
8001e50: 605a str r2, [r3, #4]
|
|
hdfsdm_channel->Instance->CHCFGR2 |= (((uint32_t) hdfsdm_channel->Init.Offset << DFSDM_CHCFGR2_OFFSET_Pos) |
|
|
8001e52: 687b ldr r3, [r7, #4]
|
|
8001e54: 681b ldr r3, [r3, #0]
|
|
8001e56: 6859 ldr r1, [r3, #4]
|
|
8001e58: 687b ldr r3, [r7, #4]
|
|
8001e5a: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
8001e5c: 021a lsls r2, r3, #8
|
|
(hdfsdm_channel->Init.RightBitShift << DFSDM_CHCFGR2_DTRBS_Pos));
|
|
8001e5e: 687b ldr r3, [r7, #4]
|
|
8001e60: 6b1b ldr r3, [r3, #48] @ 0x30
|
|
8001e62: 00db lsls r3, r3, #3
|
|
hdfsdm_channel->Instance->CHCFGR2 |= (((uint32_t) hdfsdm_channel->Init.Offset << DFSDM_CHCFGR2_OFFSET_Pos) |
|
|
8001e64: 431a orrs r2, r3
|
|
8001e66: 687b ldr r3, [r7, #4]
|
|
8001e68: 681b ldr r3, [r3, #0]
|
|
8001e6a: 430a orrs r2, r1
|
|
8001e6c: 605a str r2, [r3, #4]
|
|
|
|
/* Enable DFSDM channel */
|
|
hdfsdm_channel->Instance->CHCFGR1 |= DFSDM_CHCFGR1_CHEN;
|
|
8001e6e: 687b ldr r3, [r7, #4]
|
|
8001e70: 681b ldr r3, [r3, #0]
|
|
8001e72: 681a ldr r2, [r3, #0]
|
|
8001e74: 687b ldr r3, [r7, #4]
|
|
8001e76: 681b ldr r3, [r3, #0]
|
|
8001e78: f042 0280 orr.w r2, r2, #128 @ 0x80
|
|
8001e7c: 601a str r2, [r3, #0]
|
|
|
|
/* Set DFSDM Channel to ready state */
|
|
hdfsdm_channel->State = HAL_DFSDM_CHANNEL_STATE_READY;
|
|
8001e7e: 687b ldr r3, [r7, #4]
|
|
8001e80: 2201 movs r2, #1
|
|
8001e82: f883 2034 strb.w r2, [r3, #52] @ 0x34
|
|
|
|
/* Store channel handle in DFSDM channel handle table */
|
|
a_dfsdm1ChannelHandle[DFSDM_GetChannelFromInstance(hdfsdm_channel->Instance)] = hdfsdm_channel;
|
|
8001e86: 687b ldr r3, [r7, #4]
|
|
8001e88: 681b ldr r3, [r3, #0]
|
|
8001e8a: 4618 mov r0, r3
|
|
8001e8c: f000 f810 bl 8001eb0 <DFSDM_GetChannelFromInstance>
|
|
8001e90: 4602 mov r2, r0
|
|
8001e92: 4904 ldr r1, [pc, #16] @ (8001ea4 <HAL_DFSDM_ChannelInit+0x174>)
|
|
8001e94: 687b ldr r3, [r7, #4]
|
|
8001e96: f841 3022 str.w r3, [r1, r2, lsl #2]
|
|
|
|
return HAL_OK;
|
|
8001e9a: 2300 movs r3, #0
|
|
}
|
|
8001e9c: 4618 mov r0, r3
|
|
8001e9e: 3708 adds r7, #8
|
|
8001ea0: 46bd mov sp, r7
|
|
8001ea2: bd80 pop {r7, pc}
|
|
8001ea4: 20000788 .word 0x20000788
|
|
8001ea8: 20000784 .word 0x20000784
|
|
8001eac: 40016000 .word 0x40016000
|
|
|
|
08001eb0 <DFSDM_GetChannelFromInstance>:
|
|
* @brief This function allows to get the channel number from channel instance.
|
|
* @param Instance DFSDM channel instance.
|
|
* @retval Channel number.
|
|
*/
|
|
static uint32_t DFSDM_GetChannelFromInstance(const DFSDM_Channel_TypeDef *Instance)
|
|
{
|
|
8001eb0: b480 push {r7}
|
|
8001eb2: b085 sub sp, #20
|
|
8001eb4: af00 add r7, sp, #0
|
|
8001eb6: 6078 str r0, [r7, #4]
|
|
uint32_t channel;
|
|
|
|
/* Get channel from instance */
|
|
if (Instance == DFSDM1_Channel0)
|
|
8001eb8: 687b ldr r3, [r7, #4]
|
|
8001eba: 4a1c ldr r2, [pc, #112] @ (8001f2c <DFSDM_GetChannelFromInstance+0x7c>)
|
|
8001ebc: 4293 cmp r3, r2
|
|
8001ebe: d102 bne.n 8001ec6 <DFSDM_GetChannelFromInstance+0x16>
|
|
{
|
|
channel = 0;
|
|
8001ec0: 2300 movs r3, #0
|
|
8001ec2: 60fb str r3, [r7, #12]
|
|
8001ec4: e02b b.n 8001f1e <DFSDM_GetChannelFromInstance+0x6e>
|
|
}
|
|
else if (Instance == DFSDM1_Channel1)
|
|
8001ec6: 687b ldr r3, [r7, #4]
|
|
8001ec8: 4a19 ldr r2, [pc, #100] @ (8001f30 <DFSDM_GetChannelFromInstance+0x80>)
|
|
8001eca: 4293 cmp r3, r2
|
|
8001ecc: d102 bne.n 8001ed4 <DFSDM_GetChannelFromInstance+0x24>
|
|
{
|
|
channel = 1;
|
|
8001ece: 2301 movs r3, #1
|
|
8001ed0: 60fb str r3, [r7, #12]
|
|
8001ed2: e024 b.n 8001f1e <DFSDM_GetChannelFromInstance+0x6e>
|
|
}
|
|
else if (Instance == DFSDM1_Channel2)
|
|
8001ed4: 687b ldr r3, [r7, #4]
|
|
8001ed6: 4a17 ldr r2, [pc, #92] @ (8001f34 <DFSDM_GetChannelFromInstance+0x84>)
|
|
8001ed8: 4293 cmp r3, r2
|
|
8001eda: d102 bne.n 8001ee2 <DFSDM_GetChannelFromInstance+0x32>
|
|
{
|
|
channel = 2;
|
|
8001edc: 2302 movs r3, #2
|
|
8001ede: 60fb str r3, [r7, #12]
|
|
8001ee0: e01d b.n 8001f1e <DFSDM_GetChannelFromInstance+0x6e>
|
|
}
|
|
#if defined(STM32L471xx) || defined(STM32L475xx) || defined(STM32L476xx) || defined(STM32L485xx) || defined(STM32L486xx) || \
|
|
defined(STM32L496xx) || defined(STM32L4A6xx) || \
|
|
defined(STM32L4R5xx) || defined(STM32L4R7xx) || defined(STM32L4R9xx) || defined(STM32L4S5xx) || defined(STM32L4S7xx) || defined(STM32L4S9xx)
|
|
else if (Instance == DFSDM1_Channel4)
|
|
8001ee2: 687b ldr r3, [r7, #4]
|
|
8001ee4: 4a14 ldr r2, [pc, #80] @ (8001f38 <DFSDM_GetChannelFromInstance+0x88>)
|
|
8001ee6: 4293 cmp r3, r2
|
|
8001ee8: d102 bne.n 8001ef0 <DFSDM_GetChannelFromInstance+0x40>
|
|
{
|
|
channel = 4;
|
|
8001eea: 2304 movs r3, #4
|
|
8001eec: 60fb str r3, [r7, #12]
|
|
8001eee: e016 b.n 8001f1e <DFSDM_GetChannelFromInstance+0x6e>
|
|
}
|
|
else if (Instance == DFSDM1_Channel5)
|
|
8001ef0: 687b ldr r3, [r7, #4]
|
|
8001ef2: 4a12 ldr r2, [pc, #72] @ (8001f3c <DFSDM_GetChannelFromInstance+0x8c>)
|
|
8001ef4: 4293 cmp r3, r2
|
|
8001ef6: d102 bne.n 8001efe <DFSDM_GetChannelFromInstance+0x4e>
|
|
{
|
|
channel = 5;
|
|
8001ef8: 2305 movs r3, #5
|
|
8001efa: 60fb str r3, [r7, #12]
|
|
8001efc: e00f b.n 8001f1e <DFSDM_GetChannelFromInstance+0x6e>
|
|
}
|
|
else if (Instance == DFSDM1_Channel6)
|
|
8001efe: 687b ldr r3, [r7, #4]
|
|
8001f00: 4a0f ldr r2, [pc, #60] @ (8001f40 <DFSDM_GetChannelFromInstance+0x90>)
|
|
8001f02: 4293 cmp r3, r2
|
|
8001f04: d102 bne.n 8001f0c <DFSDM_GetChannelFromInstance+0x5c>
|
|
{
|
|
channel = 6;
|
|
8001f06: 2306 movs r3, #6
|
|
8001f08: 60fb str r3, [r7, #12]
|
|
8001f0a: e008 b.n 8001f1e <DFSDM_GetChannelFromInstance+0x6e>
|
|
}
|
|
else if (Instance == DFSDM1_Channel7)
|
|
8001f0c: 687b ldr r3, [r7, #4]
|
|
8001f0e: 4a0d ldr r2, [pc, #52] @ (8001f44 <DFSDM_GetChannelFromInstance+0x94>)
|
|
8001f10: 4293 cmp r3, r2
|
|
8001f12: d102 bne.n 8001f1a <DFSDM_GetChannelFromInstance+0x6a>
|
|
{
|
|
channel = 7;
|
|
8001f14: 2307 movs r3, #7
|
|
8001f16: 60fb str r3, [r7, #12]
|
|
8001f18: e001 b.n 8001f1e <DFSDM_GetChannelFromInstance+0x6e>
|
|
}
|
|
#endif /* STM32L471xx || STM32L475xx || STM32L476xx || STM32L485xx || STM32L486xx || STM32L496xx || STM32L4A6xx || STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */
|
|
else /* DFSDM1_Channel3 */
|
|
{
|
|
channel = 3;
|
|
8001f1a: 2303 movs r3, #3
|
|
8001f1c: 60fb str r3, [r7, #12]
|
|
}
|
|
|
|
return channel;
|
|
8001f1e: 68fb ldr r3, [r7, #12]
|
|
}
|
|
8001f20: 4618 mov r0, r3
|
|
8001f22: 3714 adds r7, #20
|
|
8001f24: 46bd mov sp, r7
|
|
8001f26: f85d 7b04 ldr.w r7, [sp], #4
|
|
8001f2a: 4770 bx lr
|
|
8001f2c: 40016000 .word 0x40016000
|
|
8001f30: 40016020 .word 0x40016020
|
|
8001f34: 40016040 .word 0x40016040
|
|
8001f38: 40016080 .word 0x40016080
|
|
8001f3c: 400160a0 .word 0x400160a0
|
|
8001f40: 400160c0 .word 0x400160c0
|
|
8001f44: 400160e0 .word 0x400160e0
|
|
|
|
08001f48 <HAL_GPIO_Init>:
|
|
* @param GPIO_Init pointer to a GPIO_InitTypeDef structure that contains
|
|
* the configuration information for the specified GPIO peripheral.
|
|
* @retval None
|
|
*/
|
|
void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
|
|
{
|
|
8001f48: b480 push {r7}
|
|
8001f4a: b087 sub sp, #28
|
|
8001f4c: af00 add r7, sp, #0
|
|
8001f4e: 6078 str r0, [r7, #4]
|
|
8001f50: 6039 str r1, [r7, #0]
|
|
uint32_t position = 0x00u;
|
|
8001f52: 2300 movs r3, #0
|
|
8001f54: 617b str r3, [r7, #20]
|
|
assert_param(IS_GPIO_ALL_INSTANCE(GPIOx));
|
|
assert_param(IS_GPIO_PIN(GPIO_Init->Pin));
|
|
assert_param(IS_GPIO_MODE(GPIO_Init->Mode));
|
|
|
|
/* Configure the port pins */
|
|
while (((GPIO_Init->Pin) >> position) != 0x00u)
|
|
8001f56: e17f b.n 8002258 <HAL_GPIO_Init+0x310>
|
|
{
|
|
/* Get current io position */
|
|
iocurrent = (GPIO_Init->Pin) & (1uL << position);
|
|
8001f58: 683b ldr r3, [r7, #0]
|
|
8001f5a: 681a ldr r2, [r3, #0]
|
|
8001f5c: 2101 movs r1, #1
|
|
8001f5e: 697b ldr r3, [r7, #20]
|
|
8001f60: fa01 f303 lsl.w r3, r1, r3
|
|
8001f64: 4013 ands r3, r2
|
|
8001f66: 60fb str r3, [r7, #12]
|
|
|
|
if (iocurrent != 0x00u)
|
|
8001f68: 68fb ldr r3, [r7, #12]
|
|
8001f6a: 2b00 cmp r3, #0
|
|
8001f6c: f000 8171 beq.w 8002252 <HAL_GPIO_Init+0x30a>
|
|
{
|
|
/*--------------------- GPIO Mode Configuration ------------------------*/
|
|
/* In case of Output or Alternate function mode selection */
|
|
if (((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF))
|
|
8001f70: 683b ldr r3, [r7, #0]
|
|
8001f72: 685b ldr r3, [r3, #4]
|
|
8001f74: f003 0303 and.w r3, r3, #3
|
|
8001f78: 2b01 cmp r3, #1
|
|
8001f7a: d005 beq.n 8001f88 <HAL_GPIO_Init+0x40>
|
|
8001f7c: 683b ldr r3, [r7, #0]
|
|
8001f7e: 685b ldr r3, [r3, #4]
|
|
8001f80: f003 0303 and.w r3, r3, #3
|
|
8001f84: 2b02 cmp r3, #2
|
|
8001f86: d130 bne.n 8001fea <HAL_GPIO_Init+0xa2>
|
|
{
|
|
/* Check the Speed parameter */
|
|
assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
|
|
|
|
/* Configure the IO Speed */
|
|
temp = GPIOx->OSPEEDR;
|
|
8001f88: 687b ldr r3, [r7, #4]
|
|
8001f8a: 689b ldr r3, [r3, #8]
|
|
8001f8c: 613b str r3, [r7, #16]
|
|
temp &= ~(GPIO_OSPEEDR_OSPEED0 << (position * 2u));
|
|
8001f8e: 697b ldr r3, [r7, #20]
|
|
8001f90: 005b lsls r3, r3, #1
|
|
8001f92: 2203 movs r2, #3
|
|
8001f94: fa02 f303 lsl.w r3, r2, r3
|
|
8001f98: 43db mvns r3, r3
|
|
8001f9a: 693a ldr r2, [r7, #16]
|
|
8001f9c: 4013 ands r3, r2
|
|
8001f9e: 613b str r3, [r7, #16]
|
|
temp |= (GPIO_Init->Speed << (position * 2u));
|
|
8001fa0: 683b ldr r3, [r7, #0]
|
|
8001fa2: 68da ldr r2, [r3, #12]
|
|
8001fa4: 697b ldr r3, [r7, #20]
|
|
8001fa6: 005b lsls r3, r3, #1
|
|
8001fa8: fa02 f303 lsl.w r3, r2, r3
|
|
8001fac: 693a ldr r2, [r7, #16]
|
|
8001fae: 4313 orrs r3, r2
|
|
8001fb0: 613b str r3, [r7, #16]
|
|
GPIOx->OSPEEDR = temp;
|
|
8001fb2: 687b ldr r3, [r7, #4]
|
|
8001fb4: 693a ldr r2, [r7, #16]
|
|
8001fb6: 609a str r2, [r3, #8]
|
|
|
|
/* Configure the IO Output Type */
|
|
temp = GPIOx->OTYPER;
|
|
8001fb8: 687b ldr r3, [r7, #4]
|
|
8001fba: 685b ldr r3, [r3, #4]
|
|
8001fbc: 613b str r3, [r7, #16]
|
|
temp &= ~(GPIO_OTYPER_OT0 << position) ;
|
|
8001fbe: 2201 movs r2, #1
|
|
8001fc0: 697b ldr r3, [r7, #20]
|
|
8001fc2: fa02 f303 lsl.w r3, r2, r3
|
|
8001fc6: 43db mvns r3, r3
|
|
8001fc8: 693a ldr r2, [r7, #16]
|
|
8001fca: 4013 ands r3, r2
|
|
8001fcc: 613b str r3, [r7, #16]
|
|
temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position);
|
|
8001fce: 683b ldr r3, [r7, #0]
|
|
8001fd0: 685b ldr r3, [r3, #4]
|
|
8001fd2: 091b lsrs r3, r3, #4
|
|
8001fd4: f003 0201 and.w r2, r3, #1
|
|
8001fd8: 697b ldr r3, [r7, #20]
|
|
8001fda: fa02 f303 lsl.w r3, r2, r3
|
|
8001fde: 693a ldr r2, [r7, #16]
|
|
8001fe0: 4313 orrs r3, r2
|
|
8001fe2: 613b str r3, [r7, #16]
|
|
GPIOx->OTYPER = temp;
|
|
8001fe4: 687b ldr r3, [r7, #4]
|
|
8001fe6: 693a ldr r2, [r7, #16]
|
|
8001fe8: 605a str r2, [r3, #4]
|
|
}
|
|
|
|
#if defined(STM32L471xx) || defined(STM32L475xx) || defined(STM32L476xx) || defined(STM32L485xx) || defined(STM32L486xx)
|
|
|
|
/* In case of Analog mode, check if ADC control mode is selected */
|
|
if((GPIO_Init->Mode & GPIO_MODE_ANALOG) == GPIO_MODE_ANALOG)
|
|
8001fea: 683b ldr r3, [r7, #0]
|
|
8001fec: 685b ldr r3, [r3, #4]
|
|
8001fee: f003 0303 and.w r3, r3, #3
|
|
8001ff2: 2b03 cmp r3, #3
|
|
8001ff4: d118 bne.n 8002028 <HAL_GPIO_Init+0xe0>
|
|
{
|
|
/* Configure the IO Output Type */
|
|
temp = GPIOx->ASCR;
|
|
8001ff6: 687b ldr r3, [r7, #4]
|
|
8001ff8: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
8001ffa: 613b str r3, [r7, #16]
|
|
temp &= ~(GPIO_ASCR_ASC0 << position) ;
|
|
8001ffc: 2201 movs r2, #1
|
|
8001ffe: 697b ldr r3, [r7, #20]
|
|
8002000: fa02 f303 lsl.w r3, r2, r3
|
|
8002004: 43db mvns r3, r3
|
|
8002006: 693a ldr r2, [r7, #16]
|
|
8002008: 4013 ands r3, r2
|
|
800200a: 613b str r3, [r7, #16]
|
|
temp |= (((GPIO_Init->Mode & GPIO_MODE_ANALOG_ADC_CONTROL) >> 3) << position);
|
|
800200c: 683b ldr r3, [r7, #0]
|
|
800200e: 685b ldr r3, [r3, #4]
|
|
8002010: 08db lsrs r3, r3, #3
|
|
8002012: f003 0201 and.w r2, r3, #1
|
|
8002016: 697b ldr r3, [r7, #20]
|
|
8002018: fa02 f303 lsl.w r3, r2, r3
|
|
800201c: 693a ldr r2, [r7, #16]
|
|
800201e: 4313 orrs r3, r2
|
|
8002020: 613b str r3, [r7, #16]
|
|
GPIOx->ASCR = temp;
|
|
8002022: 687b ldr r3, [r7, #4]
|
|
8002024: 693a ldr r2, [r7, #16]
|
|
8002026: 62da str r2, [r3, #44] @ 0x2c
|
|
}
|
|
|
|
#endif /* STM32L471xx || STM32L475xx || STM32L476xx || STM32L485xx || STM32L486xx */
|
|
|
|
/* Activate the Pull-up or Pull down resistor for the current IO */
|
|
if ((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG)
|
|
8002028: 683b ldr r3, [r7, #0]
|
|
800202a: 685b ldr r3, [r3, #4]
|
|
800202c: f003 0303 and.w r3, r3, #3
|
|
8002030: 2b03 cmp r3, #3
|
|
8002032: d017 beq.n 8002064 <HAL_GPIO_Init+0x11c>
|
|
{
|
|
/* Check the Pull parameter */
|
|
assert_param(IS_GPIO_PULL(GPIO_Init->Pull));
|
|
|
|
temp = GPIOx->PUPDR;
|
|
8002034: 687b ldr r3, [r7, #4]
|
|
8002036: 68db ldr r3, [r3, #12]
|
|
8002038: 613b str r3, [r7, #16]
|
|
temp &= ~(GPIO_PUPDR_PUPD0 << (position * 2U));
|
|
800203a: 697b ldr r3, [r7, #20]
|
|
800203c: 005b lsls r3, r3, #1
|
|
800203e: 2203 movs r2, #3
|
|
8002040: fa02 f303 lsl.w r3, r2, r3
|
|
8002044: 43db mvns r3, r3
|
|
8002046: 693a ldr r2, [r7, #16]
|
|
8002048: 4013 ands r3, r2
|
|
800204a: 613b str r3, [r7, #16]
|
|
temp |= ((GPIO_Init->Pull) << (position * 2U));
|
|
800204c: 683b ldr r3, [r7, #0]
|
|
800204e: 689a ldr r2, [r3, #8]
|
|
8002050: 697b ldr r3, [r7, #20]
|
|
8002052: 005b lsls r3, r3, #1
|
|
8002054: fa02 f303 lsl.w r3, r2, r3
|
|
8002058: 693a ldr r2, [r7, #16]
|
|
800205a: 4313 orrs r3, r2
|
|
800205c: 613b str r3, [r7, #16]
|
|
GPIOx->PUPDR = temp;
|
|
800205e: 687b ldr r3, [r7, #4]
|
|
8002060: 693a ldr r2, [r7, #16]
|
|
8002062: 60da str r2, [r3, #12]
|
|
}
|
|
|
|
/* In case of Alternate function mode selection */
|
|
if ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
|
|
8002064: 683b ldr r3, [r7, #0]
|
|
8002066: 685b ldr r3, [r3, #4]
|
|
8002068: f003 0303 and.w r3, r3, #3
|
|
800206c: 2b02 cmp r3, #2
|
|
800206e: d123 bne.n 80020b8 <HAL_GPIO_Init+0x170>
|
|
/* Check the Alternate function parameters */
|
|
assert_param(IS_GPIO_AF_INSTANCE(GPIOx));
|
|
assert_param(IS_GPIO_AF(GPIO_Init->Alternate));
|
|
|
|
/* Configure Alternate function mapped with the current IO */
|
|
temp = GPIOx->AFR[position >> 3u];
|
|
8002070: 697b ldr r3, [r7, #20]
|
|
8002072: 08da lsrs r2, r3, #3
|
|
8002074: 687b ldr r3, [r7, #4]
|
|
8002076: 3208 adds r2, #8
|
|
8002078: f853 3022 ldr.w r3, [r3, r2, lsl #2]
|
|
800207c: 613b str r3, [r7, #16]
|
|
temp &= ~(0xFu << ((position & 0x07u) * 4u));
|
|
800207e: 697b ldr r3, [r7, #20]
|
|
8002080: f003 0307 and.w r3, r3, #7
|
|
8002084: 009b lsls r3, r3, #2
|
|
8002086: 220f movs r2, #15
|
|
8002088: fa02 f303 lsl.w r3, r2, r3
|
|
800208c: 43db mvns r3, r3
|
|
800208e: 693a ldr r2, [r7, #16]
|
|
8002090: 4013 ands r3, r2
|
|
8002092: 613b str r3, [r7, #16]
|
|
temp |= ((GPIO_Init->Alternate) << ((position & 0x07u) * 4u));
|
|
8002094: 683b ldr r3, [r7, #0]
|
|
8002096: 691a ldr r2, [r3, #16]
|
|
8002098: 697b ldr r3, [r7, #20]
|
|
800209a: f003 0307 and.w r3, r3, #7
|
|
800209e: 009b lsls r3, r3, #2
|
|
80020a0: fa02 f303 lsl.w r3, r2, r3
|
|
80020a4: 693a ldr r2, [r7, #16]
|
|
80020a6: 4313 orrs r3, r2
|
|
80020a8: 613b str r3, [r7, #16]
|
|
GPIOx->AFR[position >> 3u] = temp;
|
|
80020aa: 697b ldr r3, [r7, #20]
|
|
80020ac: 08da lsrs r2, r3, #3
|
|
80020ae: 687b ldr r3, [r7, #4]
|
|
80020b0: 3208 adds r2, #8
|
|
80020b2: 6939 ldr r1, [r7, #16]
|
|
80020b4: f843 1022 str.w r1, [r3, r2, lsl #2]
|
|
}
|
|
|
|
/* Configure IO Direction mode (Input, Output, Alternate or Analog) */
|
|
temp = GPIOx->MODER;
|
|
80020b8: 687b ldr r3, [r7, #4]
|
|
80020ba: 681b ldr r3, [r3, #0]
|
|
80020bc: 613b str r3, [r7, #16]
|
|
temp &= ~(GPIO_MODER_MODE0 << (position * 2u));
|
|
80020be: 697b ldr r3, [r7, #20]
|
|
80020c0: 005b lsls r3, r3, #1
|
|
80020c2: 2203 movs r2, #3
|
|
80020c4: fa02 f303 lsl.w r3, r2, r3
|
|
80020c8: 43db mvns r3, r3
|
|
80020ca: 693a ldr r2, [r7, #16]
|
|
80020cc: 4013 ands r3, r2
|
|
80020ce: 613b str r3, [r7, #16]
|
|
temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2u));
|
|
80020d0: 683b ldr r3, [r7, #0]
|
|
80020d2: 685b ldr r3, [r3, #4]
|
|
80020d4: f003 0203 and.w r2, r3, #3
|
|
80020d8: 697b ldr r3, [r7, #20]
|
|
80020da: 005b lsls r3, r3, #1
|
|
80020dc: fa02 f303 lsl.w r3, r2, r3
|
|
80020e0: 693a ldr r2, [r7, #16]
|
|
80020e2: 4313 orrs r3, r2
|
|
80020e4: 613b str r3, [r7, #16]
|
|
GPIOx->MODER = temp;
|
|
80020e6: 687b ldr r3, [r7, #4]
|
|
80020e8: 693a ldr r2, [r7, #16]
|
|
80020ea: 601a str r2, [r3, #0]
|
|
|
|
/*--------------------- EXTI Mode Configuration ------------------------*/
|
|
/* Configure the External Interrupt or event for the current IO */
|
|
if ((GPIO_Init->Mode & EXTI_MODE) != 0x00u)
|
|
80020ec: 683b ldr r3, [r7, #0]
|
|
80020ee: 685b ldr r3, [r3, #4]
|
|
80020f0: f403 3340 and.w r3, r3, #196608 @ 0x30000
|
|
80020f4: 2b00 cmp r3, #0
|
|
80020f6: f000 80ac beq.w 8002252 <HAL_GPIO_Init+0x30a>
|
|
{
|
|
/* Enable SYSCFG Clock */
|
|
__HAL_RCC_SYSCFG_CLK_ENABLE();
|
|
80020fa: 4b5f ldr r3, [pc, #380] @ (8002278 <HAL_GPIO_Init+0x330>)
|
|
80020fc: 6e1b ldr r3, [r3, #96] @ 0x60
|
|
80020fe: 4a5e ldr r2, [pc, #376] @ (8002278 <HAL_GPIO_Init+0x330>)
|
|
8002100: f043 0301 orr.w r3, r3, #1
|
|
8002104: 6613 str r3, [r2, #96] @ 0x60
|
|
8002106: 4b5c ldr r3, [pc, #368] @ (8002278 <HAL_GPIO_Init+0x330>)
|
|
8002108: 6e1b ldr r3, [r3, #96] @ 0x60
|
|
800210a: f003 0301 and.w r3, r3, #1
|
|
800210e: 60bb str r3, [r7, #8]
|
|
8002110: 68bb ldr r3, [r7, #8]
|
|
|
|
temp = SYSCFG->EXTICR[position >> 2u];
|
|
8002112: 4a5a ldr r2, [pc, #360] @ (800227c <HAL_GPIO_Init+0x334>)
|
|
8002114: 697b ldr r3, [r7, #20]
|
|
8002116: 089b lsrs r3, r3, #2
|
|
8002118: 3302 adds r3, #2
|
|
800211a: f852 3023 ldr.w r3, [r2, r3, lsl #2]
|
|
800211e: 613b str r3, [r7, #16]
|
|
temp &= ~(0x0FuL << (4u * (position & 0x03u)));
|
|
8002120: 697b ldr r3, [r7, #20]
|
|
8002122: f003 0303 and.w r3, r3, #3
|
|
8002126: 009b lsls r3, r3, #2
|
|
8002128: 220f movs r2, #15
|
|
800212a: fa02 f303 lsl.w r3, r2, r3
|
|
800212e: 43db mvns r3, r3
|
|
8002130: 693a ldr r2, [r7, #16]
|
|
8002132: 4013 ands r3, r2
|
|
8002134: 613b str r3, [r7, #16]
|
|
temp |= (GPIO_GET_INDEX(GPIOx) << (4u * (position & 0x03u)));
|
|
8002136: 687b ldr r3, [r7, #4]
|
|
8002138: f1b3 4f90 cmp.w r3, #1207959552 @ 0x48000000
|
|
800213c: d025 beq.n 800218a <HAL_GPIO_Init+0x242>
|
|
800213e: 687b ldr r3, [r7, #4]
|
|
8002140: 4a4f ldr r2, [pc, #316] @ (8002280 <HAL_GPIO_Init+0x338>)
|
|
8002142: 4293 cmp r3, r2
|
|
8002144: d01f beq.n 8002186 <HAL_GPIO_Init+0x23e>
|
|
8002146: 687b ldr r3, [r7, #4]
|
|
8002148: 4a4e ldr r2, [pc, #312] @ (8002284 <HAL_GPIO_Init+0x33c>)
|
|
800214a: 4293 cmp r3, r2
|
|
800214c: d019 beq.n 8002182 <HAL_GPIO_Init+0x23a>
|
|
800214e: 687b ldr r3, [r7, #4]
|
|
8002150: 4a4d ldr r2, [pc, #308] @ (8002288 <HAL_GPIO_Init+0x340>)
|
|
8002152: 4293 cmp r3, r2
|
|
8002154: d013 beq.n 800217e <HAL_GPIO_Init+0x236>
|
|
8002156: 687b ldr r3, [r7, #4]
|
|
8002158: 4a4c ldr r2, [pc, #304] @ (800228c <HAL_GPIO_Init+0x344>)
|
|
800215a: 4293 cmp r3, r2
|
|
800215c: d00d beq.n 800217a <HAL_GPIO_Init+0x232>
|
|
800215e: 687b ldr r3, [r7, #4]
|
|
8002160: 4a4b ldr r2, [pc, #300] @ (8002290 <HAL_GPIO_Init+0x348>)
|
|
8002162: 4293 cmp r3, r2
|
|
8002164: d007 beq.n 8002176 <HAL_GPIO_Init+0x22e>
|
|
8002166: 687b ldr r3, [r7, #4]
|
|
8002168: 4a4a ldr r2, [pc, #296] @ (8002294 <HAL_GPIO_Init+0x34c>)
|
|
800216a: 4293 cmp r3, r2
|
|
800216c: d101 bne.n 8002172 <HAL_GPIO_Init+0x22a>
|
|
800216e: 2306 movs r3, #6
|
|
8002170: e00c b.n 800218c <HAL_GPIO_Init+0x244>
|
|
8002172: 2307 movs r3, #7
|
|
8002174: e00a b.n 800218c <HAL_GPIO_Init+0x244>
|
|
8002176: 2305 movs r3, #5
|
|
8002178: e008 b.n 800218c <HAL_GPIO_Init+0x244>
|
|
800217a: 2304 movs r3, #4
|
|
800217c: e006 b.n 800218c <HAL_GPIO_Init+0x244>
|
|
800217e: 2303 movs r3, #3
|
|
8002180: e004 b.n 800218c <HAL_GPIO_Init+0x244>
|
|
8002182: 2302 movs r3, #2
|
|
8002184: e002 b.n 800218c <HAL_GPIO_Init+0x244>
|
|
8002186: 2301 movs r3, #1
|
|
8002188: e000 b.n 800218c <HAL_GPIO_Init+0x244>
|
|
800218a: 2300 movs r3, #0
|
|
800218c: 697a ldr r2, [r7, #20]
|
|
800218e: f002 0203 and.w r2, r2, #3
|
|
8002192: 0092 lsls r2, r2, #2
|
|
8002194: 4093 lsls r3, r2
|
|
8002196: 693a ldr r2, [r7, #16]
|
|
8002198: 4313 orrs r3, r2
|
|
800219a: 613b str r3, [r7, #16]
|
|
SYSCFG->EXTICR[position >> 2u] = temp;
|
|
800219c: 4937 ldr r1, [pc, #220] @ (800227c <HAL_GPIO_Init+0x334>)
|
|
800219e: 697b ldr r3, [r7, #20]
|
|
80021a0: 089b lsrs r3, r3, #2
|
|
80021a2: 3302 adds r3, #2
|
|
80021a4: 693a ldr r2, [r7, #16]
|
|
80021a6: f841 2023 str.w r2, [r1, r3, lsl #2]
|
|
|
|
/* Clear Rising Falling edge configuration */
|
|
temp = EXTI->RTSR1;
|
|
80021aa: 4b3b ldr r3, [pc, #236] @ (8002298 <HAL_GPIO_Init+0x350>)
|
|
80021ac: 689b ldr r3, [r3, #8]
|
|
80021ae: 613b str r3, [r7, #16]
|
|
temp &= ~(iocurrent);
|
|
80021b0: 68fb ldr r3, [r7, #12]
|
|
80021b2: 43db mvns r3, r3
|
|
80021b4: 693a ldr r2, [r7, #16]
|
|
80021b6: 4013 ands r3, r2
|
|
80021b8: 613b str r3, [r7, #16]
|
|
if ((GPIO_Init->Mode & TRIGGER_RISING) != 0x00u)
|
|
80021ba: 683b ldr r3, [r7, #0]
|
|
80021bc: 685b ldr r3, [r3, #4]
|
|
80021be: f403 1380 and.w r3, r3, #1048576 @ 0x100000
|
|
80021c2: 2b00 cmp r3, #0
|
|
80021c4: d003 beq.n 80021ce <HAL_GPIO_Init+0x286>
|
|
{
|
|
temp |= iocurrent;
|
|
80021c6: 693a ldr r2, [r7, #16]
|
|
80021c8: 68fb ldr r3, [r7, #12]
|
|
80021ca: 4313 orrs r3, r2
|
|
80021cc: 613b str r3, [r7, #16]
|
|
}
|
|
EXTI->RTSR1 = temp;
|
|
80021ce: 4a32 ldr r2, [pc, #200] @ (8002298 <HAL_GPIO_Init+0x350>)
|
|
80021d0: 693b ldr r3, [r7, #16]
|
|
80021d2: 6093 str r3, [r2, #8]
|
|
|
|
temp = EXTI->FTSR1;
|
|
80021d4: 4b30 ldr r3, [pc, #192] @ (8002298 <HAL_GPIO_Init+0x350>)
|
|
80021d6: 68db ldr r3, [r3, #12]
|
|
80021d8: 613b str r3, [r7, #16]
|
|
temp &= ~(iocurrent);
|
|
80021da: 68fb ldr r3, [r7, #12]
|
|
80021dc: 43db mvns r3, r3
|
|
80021de: 693a ldr r2, [r7, #16]
|
|
80021e0: 4013 ands r3, r2
|
|
80021e2: 613b str r3, [r7, #16]
|
|
if ((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00u)
|
|
80021e4: 683b ldr r3, [r7, #0]
|
|
80021e6: 685b ldr r3, [r3, #4]
|
|
80021e8: f403 1300 and.w r3, r3, #2097152 @ 0x200000
|
|
80021ec: 2b00 cmp r3, #0
|
|
80021ee: d003 beq.n 80021f8 <HAL_GPIO_Init+0x2b0>
|
|
{
|
|
temp |= iocurrent;
|
|
80021f0: 693a ldr r2, [r7, #16]
|
|
80021f2: 68fb ldr r3, [r7, #12]
|
|
80021f4: 4313 orrs r3, r2
|
|
80021f6: 613b str r3, [r7, #16]
|
|
}
|
|
EXTI->FTSR1 = temp;
|
|
80021f8: 4a27 ldr r2, [pc, #156] @ (8002298 <HAL_GPIO_Init+0x350>)
|
|
80021fa: 693b ldr r3, [r7, #16]
|
|
80021fc: 60d3 str r3, [r2, #12]
|
|
|
|
/* Clear EXTI line configuration */
|
|
temp = EXTI->EMR1;
|
|
80021fe: 4b26 ldr r3, [pc, #152] @ (8002298 <HAL_GPIO_Init+0x350>)
|
|
8002200: 685b ldr r3, [r3, #4]
|
|
8002202: 613b str r3, [r7, #16]
|
|
temp &= ~(iocurrent);
|
|
8002204: 68fb ldr r3, [r7, #12]
|
|
8002206: 43db mvns r3, r3
|
|
8002208: 693a ldr r2, [r7, #16]
|
|
800220a: 4013 ands r3, r2
|
|
800220c: 613b str r3, [r7, #16]
|
|
if ((GPIO_Init->Mode & EXTI_EVT) != 0x00u)
|
|
800220e: 683b ldr r3, [r7, #0]
|
|
8002210: 685b ldr r3, [r3, #4]
|
|
8002212: f403 3300 and.w r3, r3, #131072 @ 0x20000
|
|
8002216: 2b00 cmp r3, #0
|
|
8002218: d003 beq.n 8002222 <HAL_GPIO_Init+0x2da>
|
|
{
|
|
temp |= iocurrent;
|
|
800221a: 693a ldr r2, [r7, #16]
|
|
800221c: 68fb ldr r3, [r7, #12]
|
|
800221e: 4313 orrs r3, r2
|
|
8002220: 613b str r3, [r7, #16]
|
|
}
|
|
EXTI->EMR1 = temp;
|
|
8002222: 4a1d ldr r2, [pc, #116] @ (8002298 <HAL_GPIO_Init+0x350>)
|
|
8002224: 693b ldr r3, [r7, #16]
|
|
8002226: 6053 str r3, [r2, #4]
|
|
|
|
temp = EXTI->IMR1;
|
|
8002228: 4b1b ldr r3, [pc, #108] @ (8002298 <HAL_GPIO_Init+0x350>)
|
|
800222a: 681b ldr r3, [r3, #0]
|
|
800222c: 613b str r3, [r7, #16]
|
|
temp &= ~(iocurrent);
|
|
800222e: 68fb ldr r3, [r7, #12]
|
|
8002230: 43db mvns r3, r3
|
|
8002232: 693a ldr r2, [r7, #16]
|
|
8002234: 4013 ands r3, r2
|
|
8002236: 613b str r3, [r7, #16]
|
|
if ((GPIO_Init->Mode & EXTI_IT) != 0x00u)
|
|
8002238: 683b ldr r3, [r7, #0]
|
|
800223a: 685b ldr r3, [r3, #4]
|
|
800223c: f403 3380 and.w r3, r3, #65536 @ 0x10000
|
|
8002240: 2b00 cmp r3, #0
|
|
8002242: d003 beq.n 800224c <HAL_GPIO_Init+0x304>
|
|
{
|
|
temp |= iocurrent;
|
|
8002244: 693a ldr r2, [r7, #16]
|
|
8002246: 68fb ldr r3, [r7, #12]
|
|
8002248: 4313 orrs r3, r2
|
|
800224a: 613b str r3, [r7, #16]
|
|
}
|
|
EXTI->IMR1 = temp;
|
|
800224c: 4a12 ldr r2, [pc, #72] @ (8002298 <HAL_GPIO_Init+0x350>)
|
|
800224e: 693b ldr r3, [r7, #16]
|
|
8002250: 6013 str r3, [r2, #0]
|
|
}
|
|
}
|
|
|
|
position++;
|
|
8002252: 697b ldr r3, [r7, #20]
|
|
8002254: 3301 adds r3, #1
|
|
8002256: 617b str r3, [r7, #20]
|
|
while (((GPIO_Init->Pin) >> position) != 0x00u)
|
|
8002258: 683b ldr r3, [r7, #0]
|
|
800225a: 681a ldr r2, [r3, #0]
|
|
800225c: 697b ldr r3, [r7, #20]
|
|
800225e: fa22 f303 lsr.w r3, r2, r3
|
|
8002262: 2b00 cmp r3, #0
|
|
8002264: f47f ae78 bne.w 8001f58 <HAL_GPIO_Init+0x10>
|
|
}
|
|
}
|
|
8002268: bf00 nop
|
|
800226a: bf00 nop
|
|
800226c: 371c adds r7, #28
|
|
800226e: 46bd mov sp, r7
|
|
8002270: f85d 7b04 ldr.w r7, [sp], #4
|
|
8002274: 4770 bx lr
|
|
8002276: bf00 nop
|
|
8002278: 40021000 .word 0x40021000
|
|
800227c: 40010000 .word 0x40010000
|
|
8002280: 48000400 .word 0x48000400
|
|
8002284: 48000800 .word 0x48000800
|
|
8002288: 48000c00 .word 0x48000c00
|
|
800228c: 48001000 .word 0x48001000
|
|
8002290: 48001400 .word 0x48001400
|
|
8002294: 48001800 .word 0x48001800
|
|
8002298: 40010400 .word 0x40010400
|
|
|
|
0800229c <HAL_GPIO_WritePin>:
|
|
* @arg GPIO_PIN_RESET: to clear the port pin
|
|
* @arg GPIO_PIN_SET: to set the port pin
|
|
* @retval None
|
|
*/
|
|
void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState)
|
|
{
|
|
800229c: b480 push {r7}
|
|
800229e: b083 sub sp, #12
|
|
80022a0: af00 add r7, sp, #0
|
|
80022a2: 6078 str r0, [r7, #4]
|
|
80022a4: 460b mov r3, r1
|
|
80022a6: 807b strh r3, [r7, #2]
|
|
80022a8: 4613 mov r3, r2
|
|
80022aa: 707b strb r3, [r7, #1]
|
|
/* Check the parameters */
|
|
assert_param(IS_GPIO_PIN(GPIO_Pin));
|
|
assert_param(IS_GPIO_PIN_ACTION(PinState));
|
|
|
|
if(PinState != GPIO_PIN_RESET)
|
|
80022ac: 787b ldrb r3, [r7, #1]
|
|
80022ae: 2b00 cmp r3, #0
|
|
80022b0: d003 beq.n 80022ba <HAL_GPIO_WritePin+0x1e>
|
|
{
|
|
GPIOx->BSRR = (uint32_t)GPIO_Pin;
|
|
80022b2: 887a ldrh r2, [r7, #2]
|
|
80022b4: 687b ldr r3, [r7, #4]
|
|
80022b6: 619a str r2, [r3, #24]
|
|
}
|
|
else
|
|
{
|
|
GPIOx->BRR = (uint32_t)GPIO_Pin;
|
|
}
|
|
}
|
|
80022b8: e002 b.n 80022c0 <HAL_GPIO_WritePin+0x24>
|
|
GPIOx->BRR = (uint32_t)GPIO_Pin;
|
|
80022ba: 887a ldrh r2, [r7, #2]
|
|
80022bc: 687b ldr r3, [r7, #4]
|
|
80022be: 629a str r2, [r3, #40] @ 0x28
|
|
}
|
|
80022c0: bf00 nop
|
|
80022c2: 370c adds r7, #12
|
|
80022c4: 46bd mov sp, r7
|
|
80022c6: f85d 7b04 ldr.w r7, [sp], #4
|
|
80022ca: 4770 bx lr
|
|
|
|
080022cc <HAL_GPIO_EXTI_IRQHandler>:
|
|
* @brief Handle EXTI interrupt request.
|
|
* @param GPIO_Pin Specifies the port pin connected to corresponding EXTI line.
|
|
* @retval None
|
|
*/
|
|
void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin)
|
|
{
|
|
80022cc: b580 push {r7, lr}
|
|
80022ce: b082 sub sp, #8
|
|
80022d0: af00 add r7, sp, #0
|
|
80022d2: 4603 mov r3, r0
|
|
80022d4: 80fb strh r3, [r7, #6]
|
|
/* EXTI line interrupt detected */
|
|
if(__HAL_GPIO_EXTI_GET_IT(GPIO_Pin) != 0x00u)
|
|
80022d6: 4b08 ldr r3, [pc, #32] @ (80022f8 <HAL_GPIO_EXTI_IRQHandler+0x2c>)
|
|
80022d8: 695a ldr r2, [r3, #20]
|
|
80022da: 88fb ldrh r3, [r7, #6]
|
|
80022dc: 4013 ands r3, r2
|
|
80022de: 2b00 cmp r3, #0
|
|
80022e0: d006 beq.n 80022f0 <HAL_GPIO_EXTI_IRQHandler+0x24>
|
|
{
|
|
__HAL_GPIO_EXTI_CLEAR_IT(GPIO_Pin);
|
|
80022e2: 4a05 ldr r2, [pc, #20] @ (80022f8 <HAL_GPIO_EXTI_IRQHandler+0x2c>)
|
|
80022e4: 88fb ldrh r3, [r7, #6]
|
|
80022e6: 6153 str r3, [r2, #20]
|
|
HAL_GPIO_EXTI_Callback(GPIO_Pin);
|
|
80022e8: 88fb ldrh r3, [r7, #6]
|
|
80022ea: 4618 mov r0, r3
|
|
80022ec: f000 f806 bl 80022fc <HAL_GPIO_EXTI_Callback>
|
|
}
|
|
}
|
|
80022f0: bf00 nop
|
|
80022f2: 3708 adds r7, #8
|
|
80022f4: 46bd mov sp, r7
|
|
80022f6: bd80 pop {r7, pc}
|
|
80022f8: 40010400 .word 0x40010400
|
|
|
|
080022fc <HAL_GPIO_EXTI_Callback>:
|
|
* @brief EXTI line detection callback.
|
|
* @param GPIO_Pin Specifies the port pin connected to corresponding EXTI line.
|
|
* @retval None
|
|
*/
|
|
__weak void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
|
|
{
|
|
80022fc: b480 push {r7}
|
|
80022fe: b083 sub sp, #12
|
|
8002300: af00 add r7, sp, #0
|
|
8002302: 4603 mov r3, r0
|
|
8002304: 80fb strh r3, [r7, #6]
|
|
UNUSED(GPIO_Pin);
|
|
|
|
/* NOTE: This function should not be modified, when the callback is needed,
|
|
the HAL_GPIO_EXTI_Callback could be implemented in the user file
|
|
*/
|
|
}
|
|
8002306: bf00 nop
|
|
8002308: 370c adds r7, #12
|
|
800230a: 46bd mov sp, r7
|
|
800230c: f85d 7b04 ldr.w r7, [sp], #4
|
|
8002310: 4770 bx lr
|
|
|
|
08002312 <HAL_I2C_Init>:
|
|
* @param hi2c Pointer to a I2C_HandleTypeDef structure that contains
|
|
* the configuration information for the specified I2C.
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef HAL_I2C_Init(I2C_HandleTypeDef *hi2c)
|
|
{
|
|
8002312: b580 push {r7, lr}
|
|
8002314: b082 sub sp, #8
|
|
8002316: af00 add r7, sp, #0
|
|
8002318: 6078 str r0, [r7, #4]
|
|
/* Check the I2C handle allocation */
|
|
if (hi2c == NULL)
|
|
800231a: 687b ldr r3, [r7, #4]
|
|
800231c: 2b00 cmp r3, #0
|
|
800231e: d101 bne.n 8002324 <HAL_I2C_Init+0x12>
|
|
{
|
|
return HAL_ERROR;
|
|
8002320: 2301 movs r3, #1
|
|
8002322: e08d b.n 8002440 <HAL_I2C_Init+0x12e>
|
|
assert_param(IS_I2C_OWN_ADDRESS2(hi2c->Init.OwnAddress2));
|
|
assert_param(IS_I2C_OWN_ADDRESS2_MASK(hi2c->Init.OwnAddress2Masks));
|
|
assert_param(IS_I2C_GENERAL_CALL(hi2c->Init.GeneralCallMode));
|
|
assert_param(IS_I2C_NO_STRETCH(hi2c->Init.NoStretchMode));
|
|
|
|
if (hi2c->State == HAL_I2C_STATE_RESET)
|
|
8002324: 687b ldr r3, [r7, #4]
|
|
8002326: f893 3041 ldrb.w r3, [r3, #65] @ 0x41
|
|
800232a: b2db uxtb r3, r3
|
|
800232c: 2b00 cmp r3, #0
|
|
800232e: d106 bne.n 800233e <HAL_I2C_Init+0x2c>
|
|
{
|
|
/* Allocate lock resource and initialize it */
|
|
hi2c->Lock = HAL_UNLOCKED;
|
|
8002330: 687b ldr r3, [r7, #4]
|
|
8002332: 2200 movs r2, #0
|
|
8002334: f883 2040 strb.w r2, [r3, #64] @ 0x40
|
|
|
|
/* Init the low level hardware : GPIO, CLOCK, CORTEX...etc */
|
|
hi2c->MspInitCallback(hi2c);
|
|
#else
|
|
/* Init the low level hardware : GPIO, CLOCK, CORTEX...etc */
|
|
HAL_I2C_MspInit(hi2c);
|
|
8002338: 6878 ldr r0, [r7, #4]
|
|
800233a: f7ff f89b bl 8001474 <HAL_I2C_MspInit>
|
|
#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */
|
|
}
|
|
|
|
hi2c->State = HAL_I2C_STATE_BUSY;
|
|
800233e: 687b ldr r3, [r7, #4]
|
|
8002340: 2224 movs r2, #36 @ 0x24
|
|
8002342: f883 2041 strb.w r2, [r3, #65] @ 0x41
|
|
|
|
/* Disable the selected I2C peripheral */
|
|
__HAL_I2C_DISABLE(hi2c);
|
|
8002346: 687b ldr r3, [r7, #4]
|
|
8002348: 681b ldr r3, [r3, #0]
|
|
800234a: 681a ldr r2, [r3, #0]
|
|
800234c: 687b ldr r3, [r7, #4]
|
|
800234e: 681b ldr r3, [r3, #0]
|
|
8002350: f022 0201 bic.w r2, r2, #1
|
|
8002354: 601a str r2, [r3, #0]
|
|
|
|
/*---------------------------- I2Cx TIMINGR Configuration ------------------*/
|
|
/* Configure I2Cx: Frequency range */
|
|
hi2c->Instance->TIMINGR = hi2c->Init.Timing & TIMING_CLEAR_MASK;
|
|
8002356: 687b ldr r3, [r7, #4]
|
|
8002358: 685a ldr r2, [r3, #4]
|
|
800235a: 687b ldr r3, [r7, #4]
|
|
800235c: 681b ldr r3, [r3, #0]
|
|
800235e: f022 6270 bic.w r2, r2, #251658240 @ 0xf000000
|
|
8002362: 611a str r2, [r3, #16]
|
|
|
|
/*---------------------------- I2Cx OAR1 Configuration ---------------------*/
|
|
/* Disable Own Address1 before set the Own Address1 configuration */
|
|
hi2c->Instance->OAR1 &= ~I2C_OAR1_OA1EN;
|
|
8002364: 687b ldr r3, [r7, #4]
|
|
8002366: 681b ldr r3, [r3, #0]
|
|
8002368: 689a ldr r2, [r3, #8]
|
|
800236a: 687b ldr r3, [r7, #4]
|
|
800236c: 681b ldr r3, [r3, #0]
|
|
800236e: f422 4200 bic.w r2, r2, #32768 @ 0x8000
|
|
8002372: 609a str r2, [r3, #8]
|
|
|
|
/* Configure I2Cx: Own Address1 and ack own address1 mode */
|
|
if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_7BIT)
|
|
8002374: 687b ldr r3, [r7, #4]
|
|
8002376: 68db ldr r3, [r3, #12]
|
|
8002378: 2b01 cmp r3, #1
|
|
800237a: d107 bne.n 800238c <HAL_I2C_Init+0x7a>
|
|
{
|
|
hi2c->Instance->OAR1 = (I2C_OAR1_OA1EN | hi2c->Init.OwnAddress1);
|
|
800237c: 687b ldr r3, [r7, #4]
|
|
800237e: 689a ldr r2, [r3, #8]
|
|
8002380: 687b ldr r3, [r7, #4]
|
|
8002382: 681b ldr r3, [r3, #0]
|
|
8002384: f442 4200 orr.w r2, r2, #32768 @ 0x8000
|
|
8002388: 609a str r2, [r3, #8]
|
|
800238a: e006 b.n 800239a <HAL_I2C_Init+0x88>
|
|
}
|
|
else /* I2C_ADDRESSINGMODE_10BIT */
|
|
{
|
|
hi2c->Instance->OAR1 = (I2C_OAR1_OA1EN | I2C_OAR1_OA1MODE | hi2c->Init.OwnAddress1);
|
|
800238c: 687b ldr r3, [r7, #4]
|
|
800238e: 689a ldr r2, [r3, #8]
|
|
8002390: 687b ldr r3, [r7, #4]
|
|
8002392: 681b ldr r3, [r3, #0]
|
|
8002394: f442 4204 orr.w r2, r2, #33792 @ 0x8400
|
|
8002398: 609a str r2, [r3, #8]
|
|
}
|
|
|
|
/*---------------------------- I2Cx CR2 Configuration ----------------------*/
|
|
/* Configure I2Cx: Addressing Master mode */
|
|
if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_10BIT)
|
|
800239a: 687b ldr r3, [r7, #4]
|
|
800239c: 68db ldr r3, [r3, #12]
|
|
800239e: 2b02 cmp r3, #2
|
|
80023a0: d108 bne.n 80023b4 <HAL_I2C_Init+0xa2>
|
|
{
|
|
SET_BIT(hi2c->Instance->CR2, I2C_CR2_ADD10);
|
|
80023a2: 687b ldr r3, [r7, #4]
|
|
80023a4: 681b ldr r3, [r3, #0]
|
|
80023a6: 685a ldr r2, [r3, #4]
|
|
80023a8: 687b ldr r3, [r7, #4]
|
|
80023aa: 681b ldr r3, [r3, #0]
|
|
80023ac: f442 6200 orr.w r2, r2, #2048 @ 0x800
|
|
80023b0: 605a str r2, [r3, #4]
|
|
80023b2: e007 b.n 80023c4 <HAL_I2C_Init+0xb2>
|
|
}
|
|
else
|
|
{
|
|
/* Clear the I2C ADD10 bit */
|
|
CLEAR_BIT(hi2c->Instance->CR2, I2C_CR2_ADD10);
|
|
80023b4: 687b ldr r3, [r7, #4]
|
|
80023b6: 681b ldr r3, [r3, #0]
|
|
80023b8: 685a ldr r2, [r3, #4]
|
|
80023ba: 687b ldr r3, [r7, #4]
|
|
80023bc: 681b ldr r3, [r3, #0]
|
|
80023be: f422 6200 bic.w r2, r2, #2048 @ 0x800
|
|
80023c2: 605a str r2, [r3, #4]
|
|
}
|
|
/* Enable the AUTOEND by default, and enable NACK (should be disable only during Slave process */
|
|
hi2c->Instance->CR2 |= (I2C_CR2_AUTOEND | I2C_CR2_NACK);
|
|
80023c4: 687b ldr r3, [r7, #4]
|
|
80023c6: 681b ldr r3, [r3, #0]
|
|
80023c8: 685b ldr r3, [r3, #4]
|
|
80023ca: 687a ldr r2, [r7, #4]
|
|
80023cc: 6812 ldr r2, [r2, #0]
|
|
80023ce: f043 7300 orr.w r3, r3, #33554432 @ 0x2000000
|
|
80023d2: f443 4300 orr.w r3, r3, #32768 @ 0x8000
|
|
80023d6: 6053 str r3, [r2, #4]
|
|
|
|
/*---------------------------- I2Cx OAR2 Configuration ---------------------*/
|
|
/* Disable Own Address2 before set the Own Address2 configuration */
|
|
hi2c->Instance->OAR2 &= ~I2C_DUALADDRESS_ENABLE;
|
|
80023d8: 687b ldr r3, [r7, #4]
|
|
80023da: 681b ldr r3, [r3, #0]
|
|
80023dc: 68da ldr r2, [r3, #12]
|
|
80023de: 687b ldr r3, [r7, #4]
|
|
80023e0: 681b ldr r3, [r3, #0]
|
|
80023e2: f422 4200 bic.w r2, r2, #32768 @ 0x8000
|
|
80023e6: 60da str r2, [r3, #12]
|
|
|
|
/* Configure I2Cx: Dual mode and Own Address2 */
|
|
hi2c->Instance->OAR2 = (hi2c->Init.DualAddressMode | hi2c->Init.OwnAddress2 | \
|
|
80023e8: 687b ldr r3, [r7, #4]
|
|
80023ea: 691a ldr r2, [r3, #16]
|
|
80023ec: 687b ldr r3, [r7, #4]
|
|
80023ee: 695b ldr r3, [r3, #20]
|
|
80023f0: ea42 0103 orr.w r1, r2, r3
|
|
(hi2c->Init.OwnAddress2Masks << 8));
|
|
80023f4: 687b ldr r3, [r7, #4]
|
|
80023f6: 699b ldr r3, [r3, #24]
|
|
80023f8: 021a lsls r2, r3, #8
|
|
hi2c->Instance->OAR2 = (hi2c->Init.DualAddressMode | hi2c->Init.OwnAddress2 | \
|
|
80023fa: 687b ldr r3, [r7, #4]
|
|
80023fc: 681b ldr r3, [r3, #0]
|
|
80023fe: 430a orrs r2, r1
|
|
8002400: 60da str r2, [r3, #12]
|
|
|
|
/*---------------------------- I2Cx CR1 Configuration ----------------------*/
|
|
/* Configure I2Cx: Generalcall and NoStretch mode */
|
|
hi2c->Instance->CR1 = (hi2c->Init.GeneralCallMode | hi2c->Init.NoStretchMode);
|
|
8002402: 687b ldr r3, [r7, #4]
|
|
8002404: 69d9 ldr r1, [r3, #28]
|
|
8002406: 687b ldr r3, [r7, #4]
|
|
8002408: 6a1a ldr r2, [r3, #32]
|
|
800240a: 687b ldr r3, [r7, #4]
|
|
800240c: 681b ldr r3, [r3, #0]
|
|
800240e: 430a orrs r2, r1
|
|
8002410: 601a str r2, [r3, #0]
|
|
|
|
/* Enable the selected I2C peripheral */
|
|
__HAL_I2C_ENABLE(hi2c);
|
|
8002412: 687b ldr r3, [r7, #4]
|
|
8002414: 681b ldr r3, [r3, #0]
|
|
8002416: 681a ldr r2, [r3, #0]
|
|
8002418: 687b ldr r3, [r7, #4]
|
|
800241a: 681b ldr r3, [r3, #0]
|
|
800241c: f042 0201 orr.w r2, r2, #1
|
|
8002420: 601a str r2, [r3, #0]
|
|
|
|
hi2c->ErrorCode = HAL_I2C_ERROR_NONE;
|
|
8002422: 687b ldr r3, [r7, #4]
|
|
8002424: 2200 movs r2, #0
|
|
8002426: 645a str r2, [r3, #68] @ 0x44
|
|
hi2c->State = HAL_I2C_STATE_READY;
|
|
8002428: 687b ldr r3, [r7, #4]
|
|
800242a: 2220 movs r2, #32
|
|
800242c: f883 2041 strb.w r2, [r3, #65] @ 0x41
|
|
hi2c->PreviousState = I2C_STATE_NONE;
|
|
8002430: 687b ldr r3, [r7, #4]
|
|
8002432: 2200 movs r2, #0
|
|
8002434: 631a str r2, [r3, #48] @ 0x30
|
|
hi2c->Mode = HAL_I2C_MODE_NONE;
|
|
8002436: 687b ldr r3, [r7, #4]
|
|
8002438: 2200 movs r2, #0
|
|
800243a: f883 2042 strb.w r2, [r3, #66] @ 0x42
|
|
|
|
return HAL_OK;
|
|
800243e: 2300 movs r3, #0
|
|
}
|
|
8002440: 4618 mov r0, r3
|
|
8002442: 3708 adds r7, #8
|
|
8002444: 46bd mov sp, r7
|
|
8002446: bd80 pop {r7, pc}
|
|
|
|
08002448 <HAL_I2CEx_ConfigAnalogFilter>:
|
|
* the configuration information for the specified I2Cx peripheral.
|
|
* @param AnalogFilter New state of the Analog filter.
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter)
|
|
{
|
|
8002448: b480 push {r7}
|
|
800244a: b083 sub sp, #12
|
|
800244c: af00 add r7, sp, #0
|
|
800244e: 6078 str r0, [r7, #4]
|
|
8002450: 6039 str r1, [r7, #0]
|
|
/* Check the parameters */
|
|
assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance));
|
|
assert_param(IS_I2C_ANALOG_FILTER(AnalogFilter));
|
|
|
|
if (hi2c->State == HAL_I2C_STATE_READY)
|
|
8002452: 687b ldr r3, [r7, #4]
|
|
8002454: f893 3041 ldrb.w r3, [r3, #65] @ 0x41
|
|
8002458: b2db uxtb r3, r3
|
|
800245a: 2b20 cmp r3, #32
|
|
800245c: d138 bne.n 80024d0 <HAL_I2CEx_ConfigAnalogFilter+0x88>
|
|
{
|
|
/* Process Locked */
|
|
__HAL_LOCK(hi2c);
|
|
800245e: 687b ldr r3, [r7, #4]
|
|
8002460: f893 3040 ldrb.w r3, [r3, #64] @ 0x40
|
|
8002464: 2b01 cmp r3, #1
|
|
8002466: d101 bne.n 800246c <HAL_I2CEx_ConfigAnalogFilter+0x24>
|
|
8002468: 2302 movs r3, #2
|
|
800246a: e032 b.n 80024d2 <HAL_I2CEx_ConfigAnalogFilter+0x8a>
|
|
800246c: 687b ldr r3, [r7, #4]
|
|
800246e: 2201 movs r2, #1
|
|
8002470: f883 2040 strb.w r2, [r3, #64] @ 0x40
|
|
|
|
hi2c->State = HAL_I2C_STATE_BUSY;
|
|
8002474: 687b ldr r3, [r7, #4]
|
|
8002476: 2224 movs r2, #36 @ 0x24
|
|
8002478: f883 2041 strb.w r2, [r3, #65] @ 0x41
|
|
|
|
/* Disable the selected I2C peripheral */
|
|
__HAL_I2C_DISABLE(hi2c);
|
|
800247c: 687b ldr r3, [r7, #4]
|
|
800247e: 681b ldr r3, [r3, #0]
|
|
8002480: 681a ldr r2, [r3, #0]
|
|
8002482: 687b ldr r3, [r7, #4]
|
|
8002484: 681b ldr r3, [r3, #0]
|
|
8002486: f022 0201 bic.w r2, r2, #1
|
|
800248a: 601a str r2, [r3, #0]
|
|
|
|
/* Reset I2Cx ANOFF bit */
|
|
hi2c->Instance->CR1 &= ~(I2C_CR1_ANFOFF);
|
|
800248c: 687b ldr r3, [r7, #4]
|
|
800248e: 681b ldr r3, [r3, #0]
|
|
8002490: 681a ldr r2, [r3, #0]
|
|
8002492: 687b ldr r3, [r7, #4]
|
|
8002494: 681b ldr r3, [r3, #0]
|
|
8002496: f422 5280 bic.w r2, r2, #4096 @ 0x1000
|
|
800249a: 601a str r2, [r3, #0]
|
|
|
|
/* Set analog filter bit*/
|
|
hi2c->Instance->CR1 |= AnalogFilter;
|
|
800249c: 687b ldr r3, [r7, #4]
|
|
800249e: 681b ldr r3, [r3, #0]
|
|
80024a0: 6819 ldr r1, [r3, #0]
|
|
80024a2: 687b ldr r3, [r7, #4]
|
|
80024a4: 681b ldr r3, [r3, #0]
|
|
80024a6: 683a ldr r2, [r7, #0]
|
|
80024a8: 430a orrs r2, r1
|
|
80024aa: 601a str r2, [r3, #0]
|
|
|
|
__HAL_I2C_ENABLE(hi2c);
|
|
80024ac: 687b ldr r3, [r7, #4]
|
|
80024ae: 681b ldr r3, [r3, #0]
|
|
80024b0: 681a ldr r2, [r3, #0]
|
|
80024b2: 687b ldr r3, [r7, #4]
|
|
80024b4: 681b ldr r3, [r3, #0]
|
|
80024b6: f042 0201 orr.w r2, r2, #1
|
|
80024ba: 601a str r2, [r3, #0]
|
|
|
|
hi2c->State = HAL_I2C_STATE_READY;
|
|
80024bc: 687b ldr r3, [r7, #4]
|
|
80024be: 2220 movs r2, #32
|
|
80024c0: f883 2041 strb.w r2, [r3, #65] @ 0x41
|
|
|
|
/* Process Unlocked */
|
|
__HAL_UNLOCK(hi2c);
|
|
80024c4: 687b ldr r3, [r7, #4]
|
|
80024c6: 2200 movs r2, #0
|
|
80024c8: f883 2040 strb.w r2, [r3, #64] @ 0x40
|
|
|
|
return HAL_OK;
|
|
80024cc: 2300 movs r3, #0
|
|
80024ce: e000 b.n 80024d2 <HAL_I2CEx_ConfigAnalogFilter+0x8a>
|
|
}
|
|
else
|
|
{
|
|
return HAL_BUSY;
|
|
80024d0: 2302 movs r3, #2
|
|
}
|
|
}
|
|
80024d2: 4618 mov r0, r3
|
|
80024d4: 370c adds r7, #12
|
|
80024d6: 46bd mov sp, r7
|
|
80024d8: f85d 7b04 ldr.w r7, [sp], #4
|
|
80024dc: 4770 bx lr
|
|
|
|
080024de <HAL_I2CEx_ConfigDigitalFilter>:
|
|
* the configuration information for the specified I2Cx peripheral.
|
|
* @param DigitalFilter Coefficient of digital noise filter between Min_Data=0x00 and Max_Data=0x0F.
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter)
|
|
{
|
|
80024de: b480 push {r7}
|
|
80024e0: b085 sub sp, #20
|
|
80024e2: af00 add r7, sp, #0
|
|
80024e4: 6078 str r0, [r7, #4]
|
|
80024e6: 6039 str r1, [r7, #0]
|
|
|
|
/* Check the parameters */
|
|
assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance));
|
|
assert_param(IS_I2C_DIGITAL_FILTER(DigitalFilter));
|
|
|
|
if (hi2c->State == HAL_I2C_STATE_READY)
|
|
80024e8: 687b ldr r3, [r7, #4]
|
|
80024ea: f893 3041 ldrb.w r3, [r3, #65] @ 0x41
|
|
80024ee: b2db uxtb r3, r3
|
|
80024f0: 2b20 cmp r3, #32
|
|
80024f2: d139 bne.n 8002568 <HAL_I2CEx_ConfigDigitalFilter+0x8a>
|
|
{
|
|
/* Process Locked */
|
|
__HAL_LOCK(hi2c);
|
|
80024f4: 687b ldr r3, [r7, #4]
|
|
80024f6: f893 3040 ldrb.w r3, [r3, #64] @ 0x40
|
|
80024fa: 2b01 cmp r3, #1
|
|
80024fc: d101 bne.n 8002502 <HAL_I2CEx_ConfigDigitalFilter+0x24>
|
|
80024fe: 2302 movs r3, #2
|
|
8002500: e033 b.n 800256a <HAL_I2CEx_ConfigDigitalFilter+0x8c>
|
|
8002502: 687b ldr r3, [r7, #4]
|
|
8002504: 2201 movs r2, #1
|
|
8002506: f883 2040 strb.w r2, [r3, #64] @ 0x40
|
|
|
|
hi2c->State = HAL_I2C_STATE_BUSY;
|
|
800250a: 687b ldr r3, [r7, #4]
|
|
800250c: 2224 movs r2, #36 @ 0x24
|
|
800250e: f883 2041 strb.w r2, [r3, #65] @ 0x41
|
|
|
|
/* Disable the selected I2C peripheral */
|
|
__HAL_I2C_DISABLE(hi2c);
|
|
8002512: 687b ldr r3, [r7, #4]
|
|
8002514: 681b ldr r3, [r3, #0]
|
|
8002516: 681a ldr r2, [r3, #0]
|
|
8002518: 687b ldr r3, [r7, #4]
|
|
800251a: 681b ldr r3, [r3, #0]
|
|
800251c: f022 0201 bic.w r2, r2, #1
|
|
8002520: 601a str r2, [r3, #0]
|
|
|
|
/* Get the old register value */
|
|
tmpreg = hi2c->Instance->CR1;
|
|
8002522: 687b ldr r3, [r7, #4]
|
|
8002524: 681b ldr r3, [r3, #0]
|
|
8002526: 681b ldr r3, [r3, #0]
|
|
8002528: 60fb str r3, [r7, #12]
|
|
|
|
/* Reset I2Cx DNF bits [11:8] */
|
|
tmpreg &= ~(I2C_CR1_DNF);
|
|
800252a: 68fb ldr r3, [r7, #12]
|
|
800252c: f423 6370 bic.w r3, r3, #3840 @ 0xf00
|
|
8002530: 60fb str r3, [r7, #12]
|
|
|
|
/* Set I2Cx DNF coefficient */
|
|
tmpreg |= DigitalFilter << 8U;
|
|
8002532: 683b ldr r3, [r7, #0]
|
|
8002534: 021b lsls r3, r3, #8
|
|
8002536: 68fa ldr r2, [r7, #12]
|
|
8002538: 4313 orrs r3, r2
|
|
800253a: 60fb str r3, [r7, #12]
|
|
|
|
/* Store the new register value */
|
|
hi2c->Instance->CR1 = tmpreg;
|
|
800253c: 687b ldr r3, [r7, #4]
|
|
800253e: 681b ldr r3, [r3, #0]
|
|
8002540: 68fa ldr r2, [r7, #12]
|
|
8002542: 601a str r2, [r3, #0]
|
|
|
|
__HAL_I2C_ENABLE(hi2c);
|
|
8002544: 687b ldr r3, [r7, #4]
|
|
8002546: 681b ldr r3, [r3, #0]
|
|
8002548: 681a ldr r2, [r3, #0]
|
|
800254a: 687b ldr r3, [r7, #4]
|
|
800254c: 681b ldr r3, [r3, #0]
|
|
800254e: f042 0201 orr.w r2, r2, #1
|
|
8002552: 601a str r2, [r3, #0]
|
|
|
|
hi2c->State = HAL_I2C_STATE_READY;
|
|
8002554: 687b ldr r3, [r7, #4]
|
|
8002556: 2220 movs r2, #32
|
|
8002558: f883 2041 strb.w r2, [r3, #65] @ 0x41
|
|
|
|
/* Process Unlocked */
|
|
__HAL_UNLOCK(hi2c);
|
|
800255c: 687b ldr r3, [r7, #4]
|
|
800255e: 2200 movs r2, #0
|
|
8002560: f883 2040 strb.w r2, [r3, #64] @ 0x40
|
|
|
|
return HAL_OK;
|
|
8002564: 2300 movs r3, #0
|
|
8002566: e000 b.n 800256a <HAL_I2CEx_ConfigDigitalFilter+0x8c>
|
|
}
|
|
else
|
|
{
|
|
return HAL_BUSY;
|
|
8002568: 2302 movs r3, #2
|
|
}
|
|
}
|
|
800256a: 4618 mov r0, r3
|
|
800256c: 3714 adds r7, #20
|
|
800256e: 46bd mov sp, r7
|
|
8002570: f85d 7b04 ldr.w r7, [sp], #4
|
|
8002574: 4770 bx lr
|
|
|
|
08002576 <HAL_PCD_Init>:
|
|
* parameters in the PCD_InitTypeDef and initialize the associated handle.
|
|
* @param hpcd PCD handle
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef HAL_PCD_Init(PCD_HandleTypeDef *hpcd)
|
|
{
|
|
8002576: b580 push {r7, lr}
|
|
8002578: b086 sub sp, #24
|
|
800257a: af02 add r7, sp, #8
|
|
800257c: 6078 str r0, [r7, #4]
|
|
uint8_t i;
|
|
|
|
/* Check the PCD handle allocation */
|
|
if (hpcd == NULL)
|
|
800257e: 687b ldr r3, [r7, #4]
|
|
8002580: 2b00 cmp r3, #0
|
|
8002582: d101 bne.n 8002588 <HAL_PCD_Init+0x12>
|
|
{
|
|
return HAL_ERROR;
|
|
8002584: 2301 movs r3, #1
|
|
8002586: e101 b.n 800278c <HAL_PCD_Init+0x216>
|
|
}
|
|
|
|
/* Check the parameters */
|
|
assert_param(IS_PCD_ALL_INSTANCE(hpcd->Instance));
|
|
|
|
if (hpcd->State == HAL_PCD_STATE_RESET)
|
|
8002588: 687b ldr r3, [r7, #4]
|
|
800258a: f893 3495 ldrb.w r3, [r3, #1173] @ 0x495
|
|
800258e: b2db uxtb r3, r3
|
|
8002590: 2b00 cmp r3, #0
|
|
8002592: d106 bne.n 80025a2 <HAL_PCD_Init+0x2c>
|
|
{
|
|
/* Allocate lock resource and initialize it */
|
|
hpcd->Lock = HAL_UNLOCKED;
|
|
8002594: 687b ldr r3, [r7, #4]
|
|
8002596: 2200 movs r2, #0
|
|
8002598: f883 2494 strb.w r2, [r3, #1172] @ 0x494
|
|
|
|
/* Init the low level hardware */
|
|
hpcd->MspInitCallback(hpcd);
|
|
#else
|
|
/* Init the low level hardware : GPIO, CLOCK, NVIC... */
|
|
HAL_PCD_MspInit(hpcd);
|
|
800259c: 6878 ldr r0, [r7, #4]
|
|
800259e: f7ff f8f3 bl 8001788 <HAL_PCD_MspInit>
|
|
#endif /* (USE_HAL_PCD_REGISTER_CALLBACKS) */
|
|
}
|
|
|
|
hpcd->State = HAL_PCD_STATE_BUSY;
|
|
80025a2: 687b ldr r3, [r7, #4]
|
|
80025a4: 2203 movs r2, #3
|
|
80025a6: f883 2495 strb.w r2, [r3, #1173] @ 0x495
|
|
|
|
/* Disable DMA mode for FS instance */
|
|
hpcd->Init.dma_enable = 0U;
|
|
80025aa: 687b ldr r3, [r7, #4]
|
|
80025ac: 2200 movs r2, #0
|
|
80025ae: 719a strb r2, [r3, #6]
|
|
|
|
/* Disable the Interrupts */
|
|
__HAL_PCD_DISABLE(hpcd);
|
|
80025b0: 687b ldr r3, [r7, #4]
|
|
80025b2: 681b ldr r3, [r3, #0]
|
|
80025b4: 4618 mov r0, r3
|
|
80025b6: f002 fb0f bl 8004bd8 <USB_DisableGlobalInt>
|
|
|
|
/*Init the Core (common init.) */
|
|
if (USB_CoreInit(hpcd->Instance, hpcd->Init) != HAL_OK)
|
|
80025ba: 687b ldr r3, [r7, #4]
|
|
80025bc: 6818 ldr r0, [r3, #0]
|
|
80025be: 687b ldr r3, [r7, #4]
|
|
80025c0: 7c1a ldrb r2, [r3, #16]
|
|
80025c2: f88d 2000 strb.w r2, [sp]
|
|
80025c6: 3304 adds r3, #4
|
|
80025c8: cb0e ldmia r3, {r1, r2, r3}
|
|
80025ca: f002 fad8 bl 8004b7e <USB_CoreInit>
|
|
80025ce: 4603 mov r3, r0
|
|
80025d0: 2b00 cmp r3, #0
|
|
80025d2: d005 beq.n 80025e0 <HAL_PCD_Init+0x6a>
|
|
{
|
|
hpcd->State = HAL_PCD_STATE_ERROR;
|
|
80025d4: 687b ldr r3, [r7, #4]
|
|
80025d6: 2202 movs r2, #2
|
|
80025d8: f883 2495 strb.w r2, [r3, #1173] @ 0x495
|
|
return HAL_ERROR;
|
|
80025dc: 2301 movs r3, #1
|
|
80025de: e0d5 b.n 800278c <HAL_PCD_Init+0x216>
|
|
}
|
|
|
|
/* Force Device Mode */
|
|
if (USB_SetCurrentMode(hpcd->Instance, USB_DEVICE_MODE) != HAL_OK)
|
|
80025e0: 687b ldr r3, [r7, #4]
|
|
80025e2: 681b ldr r3, [r3, #0]
|
|
80025e4: 2100 movs r1, #0
|
|
80025e6: 4618 mov r0, r3
|
|
80025e8: f002 fb07 bl 8004bfa <USB_SetCurrentMode>
|
|
80025ec: 4603 mov r3, r0
|
|
80025ee: 2b00 cmp r3, #0
|
|
80025f0: d005 beq.n 80025fe <HAL_PCD_Init+0x88>
|
|
{
|
|
hpcd->State = HAL_PCD_STATE_ERROR;
|
|
80025f2: 687b ldr r3, [r7, #4]
|
|
80025f4: 2202 movs r2, #2
|
|
80025f6: f883 2495 strb.w r2, [r3, #1173] @ 0x495
|
|
return HAL_ERROR;
|
|
80025fa: 2301 movs r3, #1
|
|
80025fc: e0c6 b.n 800278c <HAL_PCD_Init+0x216>
|
|
}
|
|
|
|
/* Init endpoints structures */
|
|
for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
|
|
80025fe: 2300 movs r3, #0
|
|
8002600: 73fb strb r3, [r7, #15]
|
|
8002602: e04a b.n 800269a <HAL_PCD_Init+0x124>
|
|
{
|
|
/* Init ep structure */
|
|
hpcd->IN_ep[i].is_in = 1U;
|
|
8002604: 7bfa ldrb r2, [r7, #15]
|
|
8002606: 6879 ldr r1, [r7, #4]
|
|
8002608: 4613 mov r3, r2
|
|
800260a: 00db lsls r3, r3, #3
|
|
800260c: 4413 add r3, r2
|
|
800260e: 009b lsls r3, r3, #2
|
|
8002610: 440b add r3, r1
|
|
8002612: 3315 adds r3, #21
|
|
8002614: 2201 movs r2, #1
|
|
8002616: 701a strb r2, [r3, #0]
|
|
hpcd->IN_ep[i].num = i;
|
|
8002618: 7bfa ldrb r2, [r7, #15]
|
|
800261a: 6879 ldr r1, [r7, #4]
|
|
800261c: 4613 mov r3, r2
|
|
800261e: 00db lsls r3, r3, #3
|
|
8002620: 4413 add r3, r2
|
|
8002622: 009b lsls r3, r3, #2
|
|
8002624: 440b add r3, r1
|
|
8002626: 3314 adds r3, #20
|
|
8002628: 7bfa ldrb r2, [r7, #15]
|
|
800262a: 701a strb r2, [r3, #0]
|
|
#if defined (USB_OTG_FS)
|
|
hpcd->IN_ep[i].tx_fifo_num = i;
|
|
800262c: 7bfa ldrb r2, [r7, #15]
|
|
800262e: 7bfb ldrb r3, [r7, #15]
|
|
8002630: b298 uxth r0, r3
|
|
8002632: 6879 ldr r1, [r7, #4]
|
|
8002634: 4613 mov r3, r2
|
|
8002636: 00db lsls r3, r3, #3
|
|
8002638: 4413 add r3, r2
|
|
800263a: 009b lsls r3, r3, #2
|
|
800263c: 440b add r3, r1
|
|
800263e: 332e adds r3, #46 @ 0x2e
|
|
8002640: 4602 mov r2, r0
|
|
8002642: 801a strh r2, [r3, #0]
|
|
#endif /* defined (USB_OTG_FS) */
|
|
/* Control until ep is activated */
|
|
hpcd->IN_ep[i].type = EP_TYPE_CTRL;
|
|
8002644: 7bfa ldrb r2, [r7, #15]
|
|
8002646: 6879 ldr r1, [r7, #4]
|
|
8002648: 4613 mov r3, r2
|
|
800264a: 00db lsls r3, r3, #3
|
|
800264c: 4413 add r3, r2
|
|
800264e: 009b lsls r3, r3, #2
|
|
8002650: 440b add r3, r1
|
|
8002652: 3318 adds r3, #24
|
|
8002654: 2200 movs r2, #0
|
|
8002656: 701a strb r2, [r3, #0]
|
|
hpcd->IN_ep[i].maxpacket = 0U;
|
|
8002658: 7bfa ldrb r2, [r7, #15]
|
|
800265a: 6879 ldr r1, [r7, #4]
|
|
800265c: 4613 mov r3, r2
|
|
800265e: 00db lsls r3, r3, #3
|
|
8002660: 4413 add r3, r2
|
|
8002662: 009b lsls r3, r3, #2
|
|
8002664: 440b add r3, r1
|
|
8002666: 331c adds r3, #28
|
|
8002668: 2200 movs r2, #0
|
|
800266a: 601a str r2, [r3, #0]
|
|
hpcd->IN_ep[i].xfer_buff = 0U;
|
|
800266c: 7bfa ldrb r2, [r7, #15]
|
|
800266e: 6879 ldr r1, [r7, #4]
|
|
8002670: 4613 mov r3, r2
|
|
8002672: 00db lsls r3, r3, #3
|
|
8002674: 4413 add r3, r2
|
|
8002676: 009b lsls r3, r3, #2
|
|
8002678: 440b add r3, r1
|
|
800267a: 3320 adds r3, #32
|
|
800267c: 2200 movs r2, #0
|
|
800267e: 601a str r2, [r3, #0]
|
|
hpcd->IN_ep[i].xfer_len = 0U;
|
|
8002680: 7bfa ldrb r2, [r7, #15]
|
|
8002682: 6879 ldr r1, [r7, #4]
|
|
8002684: 4613 mov r3, r2
|
|
8002686: 00db lsls r3, r3, #3
|
|
8002688: 4413 add r3, r2
|
|
800268a: 009b lsls r3, r3, #2
|
|
800268c: 440b add r3, r1
|
|
800268e: 3324 adds r3, #36 @ 0x24
|
|
8002690: 2200 movs r2, #0
|
|
8002692: 601a str r2, [r3, #0]
|
|
for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
|
|
8002694: 7bfb ldrb r3, [r7, #15]
|
|
8002696: 3301 adds r3, #1
|
|
8002698: 73fb strb r3, [r7, #15]
|
|
800269a: 687b ldr r3, [r7, #4]
|
|
800269c: 791b ldrb r3, [r3, #4]
|
|
800269e: 7bfa ldrb r2, [r7, #15]
|
|
80026a0: 429a cmp r2, r3
|
|
80026a2: d3af bcc.n 8002604 <HAL_PCD_Init+0x8e>
|
|
}
|
|
|
|
for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
|
|
80026a4: 2300 movs r3, #0
|
|
80026a6: 73fb strb r3, [r7, #15]
|
|
80026a8: e044 b.n 8002734 <HAL_PCD_Init+0x1be>
|
|
{
|
|
hpcd->OUT_ep[i].is_in = 0U;
|
|
80026aa: 7bfa ldrb r2, [r7, #15]
|
|
80026ac: 6879 ldr r1, [r7, #4]
|
|
80026ae: 4613 mov r3, r2
|
|
80026b0: 00db lsls r3, r3, #3
|
|
80026b2: 4413 add r3, r2
|
|
80026b4: 009b lsls r3, r3, #2
|
|
80026b6: 440b add r3, r1
|
|
80026b8: f203 2355 addw r3, r3, #597 @ 0x255
|
|
80026bc: 2200 movs r2, #0
|
|
80026be: 701a strb r2, [r3, #0]
|
|
hpcd->OUT_ep[i].num = i;
|
|
80026c0: 7bfa ldrb r2, [r7, #15]
|
|
80026c2: 6879 ldr r1, [r7, #4]
|
|
80026c4: 4613 mov r3, r2
|
|
80026c6: 00db lsls r3, r3, #3
|
|
80026c8: 4413 add r3, r2
|
|
80026ca: 009b lsls r3, r3, #2
|
|
80026cc: 440b add r3, r1
|
|
80026ce: f503 7315 add.w r3, r3, #596 @ 0x254
|
|
80026d2: 7bfa ldrb r2, [r7, #15]
|
|
80026d4: 701a strb r2, [r3, #0]
|
|
/* Control until ep is activated */
|
|
hpcd->OUT_ep[i].type = EP_TYPE_CTRL;
|
|
80026d6: 7bfa ldrb r2, [r7, #15]
|
|
80026d8: 6879 ldr r1, [r7, #4]
|
|
80026da: 4613 mov r3, r2
|
|
80026dc: 00db lsls r3, r3, #3
|
|
80026de: 4413 add r3, r2
|
|
80026e0: 009b lsls r3, r3, #2
|
|
80026e2: 440b add r3, r1
|
|
80026e4: f503 7316 add.w r3, r3, #600 @ 0x258
|
|
80026e8: 2200 movs r2, #0
|
|
80026ea: 701a strb r2, [r3, #0]
|
|
hpcd->OUT_ep[i].maxpacket = 0U;
|
|
80026ec: 7bfa ldrb r2, [r7, #15]
|
|
80026ee: 6879 ldr r1, [r7, #4]
|
|
80026f0: 4613 mov r3, r2
|
|
80026f2: 00db lsls r3, r3, #3
|
|
80026f4: 4413 add r3, r2
|
|
80026f6: 009b lsls r3, r3, #2
|
|
80026f8: 440b add r3, r1
|
|
80026fa: f503 7317 add.w r3, r3, #604 @ 0x25c
|
|
80026fe: 2200 movs r2, #0
|
|
8002700: 601a str r2, [r3, #0]
|
|
hpcd->OUT_ep[i].xfer_buff = 0U;
|
|
8002702: 7bfa ldrb r2, [r7, #15]
|
|
8002704: 6879 ldr r1, [r7, #4]
|
|
8002706: 4613 mov r3, r2
|
|
8002708: 00db lsls r3, r3, #3
|
|
800270a: 4413 add r3, r2
|
|
800270c: 009b lsls r3, r3, #2
|
|
800270e: 440b add r3, r1
|
|
8002710: f503 7318 add.w r3, r3, #608 @ 0x260
|
|
8002714: 2200 movs r2, #0
|
|
8002716: 601a str r2, [r3, #0]
|
|
hpcd->OUT_ep[i].xfer_len = 0U;
|
|
8002718: 7bfa ldrb r2, [r7, #15]
|
|
800271a: 6879 ldr r1, [r7, #4]
|
|
800271c: 4613 mov r3, r2
|
|
800271e: 00db lsls r3, r3, #3
|
|
8002720: 4413 add r3, r2
|
|
8002722: 009b lsls r3, r3, #2
|
|
8002724: 440b add r3, r1
|
|
8002726: f503 7319 add.w r3, r3, #612 @ 0x264
|
|
800272a: 2200 movs r2, #0
|
|
800272c: 601a str r2, [r3, #0]
|
|
for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
|
|
800272e: 7bfb ldrb r3, [r7, #15]
|
|
8002730: 3301 adds r3, #1
|
|
8002732: 73fb strb r3, [r7, #15]
|
|
8002734: 687b ldr r3, [r7, #4]
|
|
8002736: 791b ldrb r3, [r3, #4]
|
|
8002738: 7bfa ldrb r2, [r7, #15]
|
|
800273a: 429a cmp r2, r3
|
|
800273c: d3b5 bcc.n 80026aa <HAL_PCD_Init+0x134>
|
|
}
|
|
|
|
/* Init Device */
|
|
if (USB_DevInit(hpcd->Instance, hpcd->Init) != HAL_OK)
|
|
800273e: 687b ldr r3, [r7, #4]
|
|
8002740: 6818 ldr r0, [r3, #0]
|
|
8002742: 687b ldr r3, [r7, #4]
|
|
8002744: 7c1a ldrb r2, [r3, #16]
|
|
8002746: f88d 2000 strb.w r2, [sp]
|
|
800274a: 3304 adds r3, #4
|
|
800274c: cb0e ldmia r3, {r1, r2, r3}
|
|
800274e: f002 faa1 bl 8004c94 <USB_DevInit>
|
|
8002752: 4603 mov r3, r0
|
|
8002754: 2b00 cmp r3, #0
|
|
8002756: d005 beq.n 8002764 <HAL_PCD_Init+0x1ee>
|
|
{
|
|
hpcd->State = HAL_PCD_STATE_ERROR;
|
|
8002758: 687b ldr r3, [r7, #4]
|
|
800275a: 2202 movs r2, #2
|
|
800275c: f883 2495 strb.w r2, [r3, #1173] @ 0x495
|
|
return HAL_ERROR;
|
|
8002760: 2301 movs r3, #1
|
|
8002762: e013 b.n 800278c <HAL_PCD_Init+0x216>
|
|
}
|
|
|
|
hpcd->USB_Address = 0U;
|
|
8002764: 687b ldr r3, [r7, #4]
|
|
8002766: 2200 movs r2, #0
|
|
8002768: 745a strb r2, [r3, #17]
|
|
hpcd->State = HAL_PCD_STATE_READY;
|
|
800276a: 687b ldr r3, [r7, #4]
|
|
800276c: 2201 movs r2, #1
|
|
800276e: f883 2495 strb.w r2, [r3, #1173] @ 0x495
|
|
|
|
/* Activate LPM */
|
|
if (hpcd->Init.lpm_enable == 1U)
|
|
8002772: 687b ldr r3, [r7, #4]
|
|
8002774: 7b1b ldrb r3, [r3, #12]
|
|
8002776: 2b01 cmp r3, #1
|
|
8002778: d102 bne.n 8002780 <HAL_PCD_Init+0x20a>
|
|
{
|
|
(void)HAL_PCDEx_ActivateLPM(hpcd);
|
|
800277a: 6878 ldr r0, [r7, #4]
|
|
800277c: f000 f80a bl 8002794 <HAL_PCDEx_ActivateLPM>
|
|
}
|
|
|
|
(void)USB_DevDisconnect(hpcd->Instance);
|
|
8002780: 687b ldr r3, [r7, #4]
|
|
8002782: 681b ldr r3, [r3, #0]
|
|
8002784: 4618 mov r0, r3
|
|
8002786: f002 fc46 bl 8005016 <USB_DevDisconnect>
|
|
|
|
return HAL_OK;
|
|
800278a: 2300 movs r3, #0
|
|
}
|
|
800278c: 4618 mov r0, r3
|
|
800278e: 3710 adds r7, #16
|
|
8002790: 46bd mov sp, r7
|
|
8002792: bd80 pop {r7, pc}
|
|
|
|
08002794 <HAL_PCDEx_ActivateLPM>:
|
|
* @brief Activate LPM feature.
|
|
* @param hpcd PCD handle
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef HAL_PCDEx_ActivateLPM(PCD_HandleTypeDef *hpcd)
|
|
{
|
|
8002794: b480 push {r7}
|
|
8002796: b085 sub sp, #20
|
|
8002798: af00 add r7, sp, #0
|
|
800279a: 6078 str r0, [r7, #4]
|
|
USB_OTG_GlobalTypeDef *USBx = hpcd->Instance;
|
|
800279c: 687b ldr r3, [r7, #4]
|
|
800279e: 681b ldr r3, [r3, #0]
|
|
80027a0: 60fb str r3, [r7, #12]
|
|
|
|
hpcd->lpm_active = 1U;
|
|
80027a2: 687b ldr r3, [r7, #4]
|
|
80027a4: 2201 movs r2, #1
|
|
80027a6: f8c3 24d8 str.w r2, [r3, #1240] @ 0x4d8
|
|
hpcd->LPM_State = LPM_L0;
|
|
80027aa: 687b ldr r3, [r7, #4]
|
|
80027ac: 2200 movs r2, #0
|
|
80027ae: f883 24cc strb.w r2, [r3, #1228] @ 0x4cc
|
|
USBx->GINTMSK |= USB_OTG_GINTMSK_LPMINTM;
|
|
80027b2: 68fb ldr r3, [r7, #12]
|
|
80027b4: 699b ldr r3, [r3, #24]
|
|
80027b6: f043 6200 orr.w r2, r3, #134217728 @ 0x8000000
|
|
80027ba: 68fb ldr r3, [r7, #12]
|
|
80027bc: 619a str r2, [r3, #24]
|
|
USBx->GLPMCFG |= (USB_OTG_GLPMCFG_LPMEN | USB_OTG_GLPMCFG_LPMACK | USB_OTG_GLPMCFG_ENBESL);
|
|
80027be: 68fb ldr r3, [r7, #12]
|
|
80027c0: 6d5b ldr r3, [r3, #84] @ 0x54
|
|
80027c2: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000
|
|
80027c6: f043 0303 orr.w r3, r3, #3
|
|
80027ca: 68fa ldr r2, [r7, #12]
|
|
80027cc: 6553 str r3, [r2, #84] @ 0x54
|
|
|
|
return HAL_OK;
|
|
80027ce: 2300 movs r3, #0
|
|
}
|
|
80027d0: 4618 mov r0, r3
|
|
80027d2: 3714 adds r7, #20
|
|
80027d4: 46bd mov sp, r7
|
|
80027d6: f85d 7b04 ldr.w r7, [sp], #4
|
|
80027da: 4770 bx lr
|
|
|
|
080027dc <HAL_PWR_EnableBkUpAccess>:
|
|
* @note LSEON bit that switches on and off the LSE crystal belongs as well to the
|
|
* back-up domain.
|
|
* @retval None
|
|
*/
|
|
void HAL_PWR_EnableBkUpAccess(void)
|
|
{
|
|
80027dc: b480 push {r7}
|
|
80027de: af00 add r7, sp, #0
|
|
SET_BIT(PWR->CR1, PWR_CR1_DBP);
|
|
80027e0: 4b05 ldr r3, [pc, #20] @ (80027f8 <HAL_PWR_EnableBkUpAccess+0x1c>)
|
|
80027e2: 681b ldr r3, [r3, #0]
|
|
80027e4: 4a04 ldr r2, [pc, #16] @ (80027f8 <HAL_PWR_EnableBkUpAccess+0x1c>)
|
|
80027e6: f443 7380 orr.w r3, r3, #256 @ 0x100
|
|
80027ea: 6013 str r3, [r2, #0]
|
|
}
|
|
80027ec: bf00 nop
|
|
80027ee: 46bd mov sp, r7
|
|
80027f0: f85d 7b04 ldr.w r7, [sp], #4
|
|
80027f4: 4770 bx lr
|
|
80027f6: bf00 nop
|
|
80027f8: 40007000 .word 0x40007000
|
|
|
|
080027fc <HAL_PWREx_GetVoltageRange>:
|
|
* @brief Return Voltage Scaling Range.
|
|
* @retval VOS bit field (PWR_REGULATOR_VOLTAGE_SCALE1 or PWR_REGULATOR_VOLTAGE_SCALE2
|
|
* or PWR_REGULATOR_VOLTAGE_SCALE1_BOOST when applicable)
|
|
*/
|
|
uint32_t HAL_PWREx_GetVoltageRange(void)
|
|
{
|
|
80027fc: b480 push {r7}
|
|
80027fe: af00 add r7, sp, #0
|
|
else
|
|
{
|
|
return PWR_REGULATOR_VOLTAGE_SCALE1_BOOST;
|
|
}
|
|
#else
|
|
return (PWR->CR1 & PWR_CR1_VOS);
|
|
8002800: 4b04 ldr r3, [pc, #16] @ (8002814 <HAL_PWREx_GetVoltageRange+0x18>)
|
|
8002802: 681b ldr r3, [r3, #0]
|
|
8002804: f403 63c0 and.w r3, r3, #1536 @ 0x600
|
|
#endif
|
|
}
|
|
8002808: 4618 mov r0, r3
|
|
800280a: 46bd mov sp, r7
|
|
800280c: f85d 7b04 ldr.w r7, [sp], #4
|
|
8002810: 4770 bx lr
|
|
8002812: bf00 nop
|
|
8002814: 40007000 .word 0x40007000
|
|
|
|
08002818 <HAL_PWREx_ControlVoltageScaling>:
|
|
* cleared before returning the status. If the flag is not cleared within
|
|
* 50 microseconds, HAL_TIMEOUT status is reported.
|
|
* @retval HAL Status
|
|
*/
|
|
HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling(uint32_t VoltageScaling)
|
|
{
|
|
8002818: b480 push {r7}
|
|
800281a: b085 sub sp, #20
|
|
800281c: af00 add r7, sp, #0
|
|
800281e: 6078 str r0, [r7, #4]
|
|
}
|
|
|
|
#else
|
|
|
|
/* If Set Range 1 */
|
|
if (VoltageScaling == PWR_REGULATOR_VOLTAGE_SCALE1)
|
|
8002820: 687b ldr r3, [r7, #4]
|
|
8002822: f5b3 7f00 cmp.w r3, #512 @ 0x200
|
|
8002826: d130 bne.n 800288a <HAL_PWREx_ControlVoltageScaling+0x72>
|
|
{
|
|
if (READ_BIT(PWR->CR1, PWR_CR1_VOS) != PWR_REGULATOR_VOLTAGE_SCALE1)
|
|
8002828: 4b23 ldr r3, [pc, #140] @ (80028b8 <HAL_PWREx_ControlVoltageScaling+0xa0>)
|
|
800282a: 681b ldr r3, [r3, #0]
|
|
800282c: f403 63c0 and.w r3, r3, #1536 @ 0x600
|
|
8002830: f5b3 7f00 cmp.w r3, #512 @ 0x200
|
|
8002834: d038 beq.n 80028a8 <HAL_PWREx_ControlVoltageScaling+0x90>
|
|
{
|
|
/* Set Range 1 */
|
|
MODIFY_REG(PWR->CR1, PWR_CR1_VOS, PWR_REGULATOR_VOLTAGE_SCALE1);
|
|
8002836: 4b20 ldr r3, [pc, #128] @ (80028b8 <HAL_PWREx_ControlVoltageScaling+0xa0>)
|
|
8002838: 681b ldr r3, [r3, #0]
|
|
800283a: f423 63c0 bic.w r3, r3, #1536 @ 0x600
|
|
800283e: 4a1e ldr r2, [pc, #120] @ (80028b8 <HAL_PWREx_ControlVoltageScaling+0xa0>)
|
|
8002840: f443 7300 orr.w r3, r3, #512 @ 0x200
|
|
8002844: 6013 str r3, [r2, #0]
|
|
|
|
/* Wait until VOSF is cleared */
|
|
wait_loop_index = ((PWR_FLAG_SETTING_DELAY_US * SystemCoreClock) / 1000000U) + 1U;
|
|
8002846: 4b1d ldr r3, [pc, #116] @ (80028bc <HAL_PWREx_ControlVoltageScaling+0xa4>)
|
|
8002848: 681b ldr r3, [r3, #0]
|
|
800284a: 2232 movs r2, #50 @ 0x32
|
|
800284c: fb02 f303 mul.w r3, r2, r3
|
|
8002850: 4a1b ldr r2, [pc, #108] @ (80028c0 <HAL_PWREx_ControlVoltageScaling+0xa8>)
|
|
8002852: fba2 2303 umull r2, r3, r2, r3
|
|
8002856: 0c9b lsrs r3, r3, #18
|
|
8002858: 3301 adds r3, #1
|
|
800285a: 60fb str r3, [r7, #12]
|
|
while ((HAL_IS_BIT_SET(PWR->SR2, PWR_SR2_VOSF)) && (wait_loop_index != 0U))
|
|
800285c: e002 b.n 8002864 <HAL_PWREx_ControlVoltageScaling+0x4c>
|
|
{
|
|
wait_loop_index--;
|
|
800285e: 68fb ldr r3, [r7, #12]
|
|
8002860: 3b01 subs r3, #1
|
|
8002862: 60fb str r3, [r7, #12]
|
|
while ((HAL_IS_BIT_SET(PWR->SR2, PWR_SR2_VOSF)) && (wait_loop_index != 0U))
|
|
8002864: 4b14 ldr r3, [pc, #80] @ (80028b8 <HAL_PWREx_ControlVoltageScaling+0xa0>)
|
|
8002866: 695b ldr r3, [r3, #20]
|
|
8002868: f403 6380 and.w r3, r3, #1024 @ 0x400
|
|
800286c: f5b3 6f80 cmp.w r3, #1024 @ 0x400
|
|
8002870: d102 bne.n 8002878 <HAL_PWREx_ControlVoltageScaling+0x60>
|
|
8002872: 68fb ldr r3, [r7, #12]
|
|
8002874: 2b00 cmp r3, #0
|
|
8002876: d1f2 bne.n 800285e <HAL_PWREx_ControlVoltageScaling+0x46>
|
|
}
|
|
if (HAL_IS_BIT_SET(PWR->SR2, PWR_SR2_VOSF))
|
|
8002878: 4b0f ldr r3, [pc, #60] @ (80028b8 <HAL_PWREx_ControlVoltageScaling+0xa0>)
|
|
800287a: 695b ldr r3, [r3, #20]
|
|
800287c: f403 6380 and.w r3, r3, #1024 @ 0x400
|
|
8002880: f5b3 6f80 cmp.w r3, #1024 @ 0x400
|
|
8002884: d110 bne.n 80028a8 <HAL_PWREx_ControlVoltageScaling+0x90>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8002886: 2303 movs r3, #3
|
|
8002888: e00f b.n 80028aa <HAL_PWREx_ControlVoltageScaling+0x92>
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (READ_BIT(PWR->CR1, PWR_CR1_VOS) != PWR_REGULATOR_VOLTAGE_SCALE2)
|
|
800288a: 4b0b ldr r3, [pc, #44] @ (80028b8 <HAL_PWREx_ControlVoltageScaling+0xa0>)
|
|
800288c: 681b ldr r3, [r3, #0]
|
|
800288e: f403 63c0 and.w r3, r3, #1536 @ 0x600
|
|
8002892: f5b3 6f80 cmp.w r3, #1024 @ 0x400
|
|
8002896: d007 beq.n 80028a8 <HAL_PWREx_ControlVoltageScaling+0x90>
|
|
{
|
|
/* Set Range 2 */
|
|
MODIFY_REG(PWR->CR1, PWR_CR1_VOS, PWR_REGULATOR_VOLTAGE_SCALE2);
|
|
8002898: 4b07 ldr r3, [pc, #28] @ (80028b8 <HAL_PWREx_ControlVoltageScaling+0xa0>)
|
|
800289a: 681b ldr r3, [r3, #0]
|
|
800289c: f423 63c0 bic.w r3, r3, #1536 @ 0x600
|
|
80028a0: 4a05 ldr r2, [pc, #20] @ (80028b8 <HAL_PWREx_ControlVoltageScaling+0xa0>)
|
|
80028a2: f443 6380 orr.w r3, r3, #1024 @ 0x400
|
|
80028a6: 6013 str r3, [r2, #0]
|
|
/* No need to wait for VOSF to be cleared for this transition */
|
|
}
|
|
}
|
|
#endif
|
|
|
|
return HAL_OK;
|
|
80028a8: 2300 movs r3, #0
|
|
}
|
|
80028aa: 4618 mov r0, r3
|
|
80028ac: 3714 adds r7, #20
|
|
80028ae: 46bd mov sp, r7
|
|
80028b0: f85d 7b04 ldr.w r7, [sp], #4
|
|
80028b4: 4770 bx lr
|
|
80028b6: bf00 nop
|
|
80028b8: 40007000 .word 0x40007000
|
|
80028bc: 20000000 .word 0x20000000
|
|
80028c0: 431bde83 .word 0x431bde83
|
|
|
|
080028c4 <HAL_PWREx_EnableVddUSB>:
|
|
* @brief Enable VDDUSB supply.
|
|
* @note Remove VDDUSB electrical and logical isolation, once VDDUSB supply is present.
|
|
* @retval None
|
|
*/
|
|
void HAL_PWREx_EnableVddUSB(void)
|
|
{
|
|
80028c4: b480 push {r7}
|
|
80028c6: af00 add r7, sp, #0
|
|
SET_BIT(PWR->CR2, PWR_CR2_USV);
|
|
80028c8: 4b05 ldr r3, [pc, #20] @ (80028e0 <HAL_PWREx_EnableVddUSB+0x1c>)
|
|
80028ca: 685b ldr r3, [r3, #4]
|
|
80028cc: 4a04 ldr r2, [pc, #16] @ (80028e0 <HAL_PWREx_EnableVddUSB+0x1c>)
|
|
80028ce: f443 6380 orr.w r3, r3, #1024 @ 0x400
|
|
80028d2: 6053 str r3, [r2, #4]
|
|
}
|
|
80028d4: bf00 nop
|
|
80028d6: 46bd mov sp, r7
|
|
80028d8: f85d 7b04 ldr.w r7, [sp], #4
|
|
80028dc: 4770 bx lr
|
|
80028de: bf00 nop
|
|
80028e0: 40007000 .word 0x40007000
|
|
|
|
080028e4 <HAL_QSPI_Init>:
|
|
* in the QSPI_InitTypeDef and initialize the associated handle.
|
|
* @param hqspi QSPI handle
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef HAL_QSPI_Init(QSPI_HandleTypeDef *hqspi)
|
|
{
|
|
80028e4: b580 push {r7, lr}
|
|
80028e6: b086 sub sp, #24
|
|
80028e8: af02 add r7, sp, #8
|
|
80028ea: 6078 str r0, [r7, #4]
|
|
HAL_StatusTypeDef status;
|
|
uint32_t tickstart = HAL_GetTick();
|
|
80028ec: f7ff f8de bl 8001aac <HAL_GetTick>
|
|
80028f0: 60f8 str r0, [r7, #12]
|
|
|
|
/* Check the QSPI handle allocation */
|
|
if(hqspi == NULL)
|
|
80028f2: 687b ldr r3, [r7, #4]
|
|
80028f4: 2b00 cmp r3, #0
|
|
80028f6: d101 bne.n 80028fc <HAL_QSPI_Init+0x18>
|
|
{
|
|
return HAL_ERROR;
|
|
80028f8: 2301 movs r3, #1
|
|
80028fa: e063 b.n 80029c4 <HAL_QSPI_Init+0xe0>
|
|
{
|
|
assert_param(IS_QSPI_FLASH_ID(hqspi->Init.FlashID));
|
|
}
|
|
#endif
|
|
|
|
if(hqspi->State == HAL_QSPI_STATE_RESET)
|
|
80028fc: 687b ldr r3, [r7, #4]
|
|
80028fe: f893 3039 ldrb.w r3, [r3, #57] @ 0x39
|
|
8002902: b2db uxtb r3, r3
|
|
8002904: 2b00 cmp r3, #0
|
|
8002906: d10b bne.n 8002920 <HAL_QSPI_Init+0x3c>
|
|
{
|
|
/* Allocate lock resource and initialize it */
|
|
hqspi->Lock = HAL_UNLOCKED;
|
|
8002908: 687b ldr r3, [r7, #4]
|
|
800290a: 2200 movs r2, #0
|
|
800290c: f883 2038 strb.w r2, [r3, #56] @ 0x38
|
|
|
|
/* Init the low level hardware */
|
|
hqspi->MspInitCallback(hqspi);
|
|
#else
|
|
/* Init the low level hardware : GPIO, CLOCK */
|
|
HAL_QSPI_MspInit(hqspi);
|
|
8002910: 6878 ldr r0, [r7, #4]
|
|
8002912: f7fe fe0d bl 8001530 <HAL_QSPI_MspInit>
|
|
#endif
|
|
|
|
/* Configure the default timeout for the QSPI memory access */
|
|
HAL_QSPI_SetTimeout(hqspi, HAL_QSPI_TIMEOUT_DEFAULT_VALUE);
|
|
8002916: f241 3188 movw r1, #5000 @ 0x1388
|
|
800291a: 6878 ldr r0, [r7, #4]
|
|
800291c: f000 f858 bl 80029d0 <HAL_QSPI_SetTimeout>
|
|
}
|
|
|
|
/* Configure QSPI FIFO Threshold */
|
|
MODIFY_REG(hqspi->Instance->CR, QUADSPI_CR_FTHRES,
|
|
8002920: 687b ldr r3, [r7, #4]
|
|
8002922: 681b ldr r3, [r3, #0]
|
|
8002924: 681b ldr r3, [r3, #0]
|
|
8002926: f423 6170 bic.w r1, r3, #3840 @ 0xf00
|
|
800292a: 687b ldr r3, [r7, #4]
|
|
800292c: 689b ldr r3, [r3, #8]
|
|
800292e: 3b01 subs r3, #1
|
|
8002930: 021a lsls r2, r3, #8
|
|
8002932: 687b ldr r3, [r7, #4]
|
|
8002934: 681b ldr r3, [r3, #0]
|
|
8002936: 430a orrs r2, r1
|
|
8002938: 601a str r2, [r3, #0]
|
|
((hqspi->Init.FifoThreshold - 1U) << QUADSPI_CR_FTHRES_Pos));
|
|
|
|
/* Wait till BUSY flag reset */
|
|
status = QSPI_WaitFlagStateUntilTimeout(hqspi, QSPI_FLAG_BUSY, RESET, tickstart, hqspi->Timeout);
|
|
800293a: 687b ldr r3, [r7, #4]
|
|
800293c: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
800293e: 9300 str r3, [sp, #0]
|
|
8002940: 68fb ldr r3, [r7, #12]
|
|
8002942: 2200 movs r2, #0
|
|
8002944: 2120 movs r1, #32
|
|
8002946: 6878 ldr r0, [r7, #4]
|
|
8002948: f000 f850 bl 80029ec <QSPI_WaitFlagStateUntilTimeout>
|
|
800294c: 4603 mov r3, r0
|
|
800294e: 72fb strb r3, [r7, #11]
|
|
|
|
if(status == HAL_OK)
|
|
8002950: 7afb ldrb r3, [r7, #11]
|
|
8002952: 2b00 cmp r3, #0
|
|
8002954: d131 bne.n 80029ba <HAL_QSPI_Init+0xd6>
|
|
#if defined(QUADSPI_CR_DFM)
|
|
MODIFY_REG(hqspi->Instance->CR, (QUADSPI_CR_PRESCALER | QUADSPI_CR_SSHIFT | QUADSPI_CR_FSEL | QUADSPI_CR_DFM),
|
|
((hqspi->Init.ClockPrescaler << QUADSPI_CR_PRESCALER_Pos) |
|
|
hqspi->Init.SampleShifting | hqspi->Init.FlashID | hqspi->Init.DualFlash));
|
|
#else
|
|
MODIFY_REG(hqspi->Instance->CR, (QUADSPI_CR_PRESCALER | QUADSPI_CR_SSHIFT),
|
|
8002956: 687b ldr r3, [r7, #4]
|
|
8002958: 681b ldr r3, [r3, #0]
|
|
800295a: 681b ldr r3, [r3, #0]
|
|
800295c: f023 437f bic.w r3, r3, #4278190080 @ 0xff000000
|
|
8002960: f023 0310 bic.w r3, r3, #16
|
|
8002964: 687a ldr r2, [r7, #4]
|
|
8002966: 6852 ldr r2, [r2, #4]
|
|
8002968: 0611 lsls r1, r2, #24
|
|
800296a: 687a ldr r2, [r7, #4]
|
|
800296c: 68d2 ldr r2, [r2, #12]
|
|
800296e: 4311 orrs r1, r2
|
|
8002970: 687a ldr r2, [r7, #4]
|
|
8002972: 6812 ldr r2, [r2, #0]
|
|
8002974: 430b orrs r3, r1
|
|
8002976: 6013 str r3, [r2, #0]
|
|
((hqspi->Init.ClockPrescaler << QUADSPI_CR_PRESCALER_Pos) |
|
|
hqspi->Init.SampleShifting));
|
|
#endif
|
|
|
|
/* Configure QSPI Flash Size, CS High Time and Clock Mode */
|
|
MODIFY_REG(hqspi->Instance->DCR, (QUADSPI_DCR_FSIZE | QUADSPI_DCR_CSHT | QUADSPI_DCR_CKMODE),
|
|
8002978: 687b ldr r3, [r7, #4]
|
|
800297a: 681b ldr r3, [r3, #0]
|
|
800297c: 685a ldr r2, [r3, #4]
|
|
800297e: 4b13 ldr r3, [pc, #76] @ (80029cc <HAL_QSPI_Init+0xe8>)
|
|
8002980: 4013 ands r3, r2
|
|
8002982: 687a ldr r2, [r7, #4]
|
|
8002984: 6912 ldr r2, [r2, #16]
|
|
8002986: 0411 lsls r1, r2, #16
|
|
8002988: 687a ldr r2, [r7, #4]
|
|
800298a: 6952 ldr r2, [r2, #20]
|
|
800298c: 4311 orrs r1, r2
|
|
800298e: 687a ldr r2, [r7, #4]
|
|
8002990: 6992 ldr r2, [r2, #24]
|
|
8002992: 4311 orrs r1, r2
|
|
8002994: 687a ldr r2, [r7, #4]
|
|
8002996: 6812 ldr r2, [r2, #0]
|
|
8002998: 430b orrs r3, r1
|
|
800299a: 6053 str r3, [r2, #4]
|
|
((hqspi->Init.FlashSize << QUADSPI_DCR_FSIZE_Pos) |
|
|
hqspi->Init.ChipSelectHighTime | hqspi->Init.ClockMode));
|
|
|
|
/* Enable the QSPI peripheral */
|
|
__HAL_QSPI_ENABLE(hqspi);
|
|
800299c: 687b ldr r3, [r7, #4]
|
|
800299e: 681b ldr r3, [r3, #0]
|
|
80029a0: 681a ldr r2, [r3, #0]
|
|
80029a2: 687b ldr r3, [r7, #4]
|
|
80029a4: 681b ldr r3, [r3, #0]
|
|
80029a6: f042 0201 orr.w r2, r2, #1
|
|
80029aa: 601a str r2, [r3, #0]
|
|
|
|
/* Set QSPI error code to none */
|
|
hqspi->ErrorCode = HAL_QSPI_ERROR_NONE;
|
|
80029ac: 687b ldr r3, [r7, #4]
|
|
80029ae: 2200 movs r2, #0
|
|
80029b0: 63da str r2, [r3, #60] @ 0x3c
|
|
|
|
/* Initialize the QSPI state */
|
|
hqspi->State = HAL_QSPI_STATE_READY;
|
|
80029b2: 687b ldr r3, [r7, #4]
|
|
80029b4: 2201 movs r2, #1
|
|
80029b6: f883 2039 strb.w r2, [r3, #57] @ 0x39
|
|
}
|
|
|
|
/* Release Lock */
|
|
__HAL_UNLOCK(hqspi);
|
|
80029ba: 687b ldr r3, [r7, #4]
|
|
80029bc: 2200 movs r2, #0
|
|
80029be: f883 2038 strb.w r2, [r3, #56] @ 0x38
|
|
|
|
/* Return function status */
|
|
return status;
|
|
80029c2: 7afb ldrb r3, [r7, #11]
|
|
}
|
|
80029c4: 4618 mov r0, r3
|
|
80029c6: 3710 adds r7, #16
|
|
80029c8: 46bd mov sp, r7
|
|
80029ca: bd80 pop {r7, pc}
|
|
80029cc: ffe0f8fe .word 0xffe0f8fe
|
|
|
|
080029d0 <HAL_QSPI_SetTimeout>:
|
|
* @param hqspi QSPI handle.
|
|
* @param Timeout Timeout for the QSPI memory access.
|
|
* @retval None
|
|
*/
|
|
void HAL_QSPI_SetTimeout(QSPI_HandleTypeDef *hqspi, uint32_t Timeout)
|
|
{
|
|
80029d0: b480 push {r7}
|
|
80029d2: b083 sub sp, #12
|
|
80029d4: af00 add r7, sp, #0
|
|
80029d6: 6078 str r0, [r7, #4]
|
|
80029d8: 6039 str r1, [r7, #0]
|
|
hqspi->Timeout = Timeout;
|
|
80029da: 687b ldr r3, [r7, #4]
|
|
80029dc: 683a ldr r2, [r7, #0]
|
|
80029de: 641a str r2, [r3, #64] @ 0x40
|
|
}
|
|
80029e0: bf00 nop
|
|
80029e2: 370c adds r7, #12
|
|
80029e4: 46bd mov sp, r7
|
|
80029e6: f85d 7b04 ldr.w r7, [sp], #4
|
|
80029ea: 4770 bx lr
|
|
|
|
080029ec <QSPI_WaitFlagStateUntilTimeout>:
|
|
* @param Timeout Duration of the timeout
|
|
* @retval HAL status
|
|
*/
|
|
static HAL_StatusTypeDef QSPI_WaitFlagStateUntilTimeout(QSPI_HandleTypeDef *hqspi, uint32_t Flag,
|
|
FlagStatus State, uint32_t Tickstart, uint32_t Timeout)
|
|
{
|
|
80029ec: b580 push {r7, lr}
|
|
80029ee: b084 sub sp, #16
|
|
80029f0: af00 add r7, sp, #0
|
|
80029f2: 60f8 str r0, [r7, #12]
|
|
80029f4: 60b9 str r1, [r7, #8]
|
|
80029f6: 603b str r3, [r7, #0]
|
|
80029f8: 4613 mov r3, r2
|
|
80029fa: 71fb strb r3, [r7, #7]
|
|
/* Wait until flag is in expected state */
|
|
while((__HAL_QSPI_GET_FLAG(hqspi, Flag)) != State)
|
|
80029fc: e01a b.n 8002a34 <QSPI_WaitFlagStateUntilTimeout+0x48>
|
|
{
|
|
/* Check for the Timeout */
|
|
if (Timeout != HAL_MAX_DELAY)
|
|
80029fe: 69bb ldr r3, [r7, #24]
|
|
8002a00: f1b3 3fff cmp.w r3, #4294967295
|
|
8002a04: d016 beq.n 8002a34 <QSPI_WaitFlagStateUntilTimeout+0x48>
|
|
{
|
|
if(((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
|
|
8002a06: f7ff f851 bl 8001aac <HAL_GetTick>
|
|
8002a0a: 4602 mov r2, r0
|
|
8002a0c: 683b ldr r3, [r7, #0]
|
|
8002a0e: 1ad3 subs r3, r2, r3
|
|
8002a10: 69ba ldr r2, [r7, #24]
|
|
8002a12: 429a cmp r2, r3
|
|
8002a14: d302 bcc.n 8002a1c <QSPI_WaitFlagStateUntilTimeout+0x30>
|
|
8002a16: 69bb ldr r3, [r7, #24]
|
|
8002a18: 2b00 cmp r3, #0
|
|
8002a1a: d10b bne.n 8002a34 <QSPI_WaitFlagStateUntilTimeout+0x48>
|
|
{
|
|
hqspi->State = HAL_QSPI_STATE_ERROR;
|
|
8002a1c: 68fb ldr r3, [r7, #12]
|
|
8002a1e: 2204 movs r2, #4
|
|
8002a20: f883 2039 strb.w r2, [r3, #57] @ 0x39
|
|
hqspi->ErrorCode |= HAL_QSPI_ERROR_TIMEOUT;
|
|
8002a24: 68fb ldr r3, [r7, #12]
|
|
8002a26: 6bdb ldr r3, [r3, #60] @ 0x3c
|
|
8002a28: f043 0201 orr.w r2, r3, #1
|
|
8002a2c: 68fb ldr r3, [r7, #12]
|
|
8002a2e: 63da str r2, [r3, #60] @ 0x3c
|
|
|
|
return HAL_ERROR;
|
|
8002a30: 2301 movs r3, #1
|
|
8002a32: e00e b.n 8002a52 <QSPI_WaitFlagStateUntilTimeout+0x66>
|
|
while((__HAL_QSPI_GET_FLAG(hqspi, Flag)) != State)
|
|
8002a34: 68fb ldr r3, [r7, #12]
|
|
8002a36: 681b ldr r3, [r3, #0]
|
|
8002a38: 689a ldr r2, [r3, #8]
|
|
8002a3a: 68bb ldr r3, [r7, #8]
|
|
8002a3c: 4013 ands r3, r2
|
|
8002a3e: 2b00 cmp r3, #0
|
|
8002a40: bf14 ite ne
|
|
8002a42: 2301 movne r3, #1
|
|
8002a44: 2300 moveq r3, #0
|
|
8002a46: b2db uxtb r3, r3
|
|
8002a48: 461a mov r2, r3
|
|
8002a4a: 79fb ldrb r3, [r7, #7]
|
|
8002a4c: 429a cmp r2, r3
|
|
8002a4e: d1d6 bne.n 80029fe <QSPI_WaitFlagStateUntilTimeout+0x12>
|
|
}
|
|
}
|
|
}
|
|
return HAL_OK;
|
|
8002a50: 2300 movs r3, #0
|
|
}
|
|
8002a52: 4618 mov r0, r3
|
|
8002a54: 3710 adds r7, #16
|
|
8002a56: 46bd mov sp, r7
|
|
8002a58: bd80 pop {r7, pc}
|
|
...
|
|
|
|
08002a5c <HAL_RCC_OscConfig>:
|
|
* @note If HSE failed to start, HSE should be disabled before recalling
|
|
HAL_RCC_OscConfig().
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
|
|
{
|
|
8002a5c: b580 push {r7, lr}
|
|
8002a5e: b088 sub sp, #32
|
|
8002a60: af00 add r7, sp, #0
|
|
8002a62: 6078 str r0, [r7, #4]
|
|
uint32_t tickstart;
|
|
HAL_StatusTypeDef status;
|
|
uint32_t sysclk_source, pll_config;
|
|
|
|
/* Check Null pointer */
|
|
if(RCC_OscInitStruct == NULL)
|
|
8002a64: 687b ldr r3, [r7, #4]
|
|
8002a66: 2b00 cmp r3, #0
|
|
8002a68: d101 bne.n 8002a6e <HAL_RCC_OscConfig+0x12>
|
|
{
|
|
return HAL_ERROR;
|
|
8002a6a: 2301 movs r3, #1
|
|
8002a6c: e3ca b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
}
|
|
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType));
|
|
|
|
sysclk_source = __HAL_RCC_GET_SYSCLK_SOURCE();
|
|
8002a6e: 4b97 ldr r3, [pc, #604] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002a70: 689b ldr r3, [r3, #8]
|
|
8002a72: f003 030c and.w r3, r3, #12
|
|
8002a76: 61bb str r3, [r7, #24]
|
|
pll_config = __HAL_RCC_GET_PLL_OSCSOURCE();
|
|
8002a78: 4b94 ldr r3, [pc, #592] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002a7a: 68db ldr r3, [r3, #12]
|
|
8002a7c: f003 0303 and.w r3, r3, #3
|
|
8002a80: 617b str r3, [r7, #20]
|
|
|
|
/*----------------------------- MSI Configuration --------------------------*/
|
|
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_MSI) == RCC_OSCILLATORTYPE_MSI)
|
|
8002a82: 687b ldr r3, [r7, #4]
|
|
8002a84: 681b ldr r3, [r3, #0]
|
|
8002a86: f003 0310 and.w r3, r3, #16
|
|
8002a8a: 2b00 cmp r3, #0
|
|
8002a8c: f000 80e4 beq.w 8002c58 <HAL_RCC_OscConfig+0x1fc>
|
|
assert_param(IS_RCC_MSI(RCC_OscInitStruct->MSIState));
|
|
assert_param(IS_RCC_MSICALIBRATION_VALUE(RCC_OscInitStruct->MSICalibrationValue));
|
|
assert_param(IS_RCC_MSI_CLOCK_RANGE(RCC_OscInitStruct->MSIClockRange));
|
|
|
|
/* Check if MSI is used as system clock or as PLL source when PLL is selected as system clock */
|
|
if((sysclk_source == RCC_CFGR_SWS_MSI) ||
|
|
8002a90: 69bb ldr r3, [r7, #24]
|
|
8002a92: 2b00 cmp r3, #0
|
|
8002a94: d007 beq.n 8002aa6 <HAL_RCC_OscConfig+0x4a>
|
|
8002a96: 69bb ldr r3, [r7, #24]
|
|
8002a98: 2b0c cmp r3, #12
|
|
8002a9a: f040 808b bne.w 8002bb4 <HAL_RCC_OscConfig+0x158>
|
|
((sysclk_source == RCC_CFGR_SWS_PLL) && (pll_config == RCC_PLLSOURCE_MSI)))
|
|
8002a9e: 697b ldr r3, [r7, #20]
|
|
8002aa0: 2b01 cmp r3, #1
|
|
8002aa2: f040 8087 bne.w 8002bb4 <HAL_RCC_OscConfig+0x158>
|
|
{
|
|
if((READ_BIT(RCC->CR, RCC_CR_MSIRDY) != 0U) && (RCC_OscInitStruct->MSIState == RCC_MSI_OFF))
|
|
8002aa6: 4b89 ldr r3, [pc, #548] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002aa8: 681b ldr r3, [r3, #0]
|
|
8002aaa: f003 0302 and.w r3, r3, #2
|
|
8002aae: 2b00 cmp r3, #0
|
|
8002ab0: d005 beq.n 8002abe <HAL_RCC_OscConfig+0x62>
|
|
8002ab2: 687b ldr r3, [r7, #4]
|
|
8002ab4: 699b ldr r3, [r3, #24]
|
|
8002ab6: 2b00 cmp r3, #0
|
|
8002ab8: d101 bne.n 8002abe <HAL_RCC_OscConfig+0x62>
|
|
{
|
|
return HAL_ERROR;
|
|
8002aba: 2301 movs r3, #1
|
|
8002abc: e3a2 b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
else
|
|
{
|
|
/* To correctly read data from FLASH memory, the number of wait states (LATENCY)
|
|
must be correctly programmed according to the frequency of the CPU clock
|
|
(HCLK) and the supply voltage of the device. */
|
|
if(RCC_OscInitStruct->MSIClockRange > __HAL_RCC_GET_MSI_RANGE())
|
|
8002abe: 687b ldr r3, [r7, #4]
|
|
8002ac0: 6a1a ldr r2, [r3, #32]
|
|
8002ac2: 4b82 ldr r3, [pc, #520] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002ac4: 681b ldr r3, [r3, #0]
|
|
8002ac6: f003 0308 and.w r3, r3, #8
|
|
8002aca: 2b00 cmp r3, #0
|
|
8002acc: d004 beq.n 8002ad8 <HAL_RCC_OscConfig+0x7c>
|
|
8002ace: 4b7f ldr r3, [pc, #508] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002ad0: 681b ldr r3, [r3, #0]
|
|
8002ad2: f003 03f0 and.w r3, r3, #240 @ 0xf0
|
|
8002ad6: e005 b.n 8002ae4 <HAL_RCC_OscConfig+0x88>
|
|
8002ad8: 4b7c ldr r3, [pc, #496] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002ada: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94
|
|
8002ade: 091b lsrs r3, r3, #4
|
|
8002ae0: f003 03f0 and.w r3, r3, #240 @ 0xf0
|
|
8002ae4: 4293 cmp r3, r2
|
|
8002ae6: d223 bcs.n 8002b30 <HAL_RCC_OscConfig+0xd4>
|
|
{
|
|
/* First increase number of wait states update if necessary */
|
|
if(RCC_SetFlashLatencyFromMSIRange(RCC_OscInitStruct->MSIClockRange) != HAL_OK)
|
|
8002ae8: 687b ldr r3, [r7, #4]
|
|
8002aea: 6a1b ldr r3, [r3, #32]
|
|
8002aec: 4618 mov r0, r3
|
|
8002aee: f000 fd55 bl 800359c <RCC_SetFlashLatencyFromMSIRange>
|
|
8002af2: 4603 mov r3, r0
|
|
8002af4: 2b00 cmp r3, #0
|
|
8002af6: d001 beq.n 8002afc <HAL_RCC_OscConfig+0xa0>
|
|
{
|
|
return HAL_ERROR;
|
|
8002af8: 2301 movs r3, #1
|
|
8002afa: e383 b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
}
|
|
|
|
/* Selects the Multiple Speed oscillator (MSI) clock range .*/
|
|
__HAL_RCC_MSI_RANGE_CONFIG(RCC_OscInitStruct->MSIClockRange);
|
|
8002afc: 4b73 ldr r3, [pc, #460] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002afe: 681b ldr r3, [r3, #0]
|
|
8002b00: 4a72 ldr r2, [pc, #456] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002b02: f043 0308 orr.w r3, r3, #8
|
|
8002b06: 6013 str r3, [r2, #0]
|
|
8002b08: 4b70 ldr r3, [pc, #448] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002b0a: 681b ldr r3, [r3, #0]
|
|
8002b0c: f023 02f0 bic.w r2, r3, #240 @ 0xf0
|
|
8002b10: 687b ldr r3, [r7, #4]
|
|
8002b12: 6a1b ldr r3, [r3, #32]
|
|
8002b14: 496d ldr r1, [pc, #436] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002b16: 4313 orrs r3, r2
|
|
8002b18: 600b str r3, [r1, #0]
|
|
/* Adjusts the Multiple Speed oscillator (MSI) calibration value.*/
|
|
__HAL_RCC_MSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->MSICalibrationValue);
|
|
8002b1a: 4b6c ldr r3, [pc, #432] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002b1c: 685b ldr r3, [r3, #4]
|
|
8002b1e: f423 427f bic.w r2, r3, #65280 @ 0xff00
|
|
8002b22: 687b ldr r3, [r7, #4]
|
|
8002b24: 69db ldr r3, [r3, #28]
|
|
8002b26: 021b lsls r3, r3, #8
|
|
8002b28: 4968 ldr r1, [pc, #416] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002b2a: 4313 orrs r3, r2
|
|
8002b2c: 604b str r3, [r1, #4]
|
|
8002b2e: e025 b.n 8002b7c <HAL_RCC_OscConfig+0x120>
|
|
}
|
|
else
|
|
{
|
|
/* Else, keep current flash latency while decreasing applies */
|
|
/* Selects the Multiple Speed oscillator (MSI) clock range .*/
|
|
__HAL_RCC_MSI_RANGE_CONFIG(RCC_OscInitStruct->MSIClockRange);
|
|
8002b30: 4b66 ldr r3, [pc, #408] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002b32: 681b ldr r3, [r3, #0]
|
|
8002b34: 4a65 ldr r2, [pc, #404] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002b36: f043 0308 orr.w r3, r3, #8
|
|
8002b3a: 6013 str r3, [r2, #0]
|
|
8002b3c: 4b63 ldr r3, [pc, #396] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002b3e: 681b ldr r3, [r3, #0]
|
|
8002b40: f023 02f0 bic.w r2, r3, #240 @ 0xf0
|
|
8002b44: 687b ldr r3, [r7, #4]
|
|
8002b46: 6a1b ldr r3, [r3, #32]
|
|
8002b48: 4960 ldr r1, [pc, #384] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002b4a: 4313 orrs r3, r2
|
|
8002b4c: 600b str r3, [r1, #0]
|
|
/* Adjusts the Multiple Speed oscillator (MSI) calibration value.*/
|
|
__HAL_RCC_MSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->MSICalibrationValue);
|
|
8002b4e: 4b5f ldr r3, [pc, #380] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002b50: 685b ldr r3, [r3, #4]
|
|
8002b52: f423 427f bic.w r2, r3, #65280 @ 0xff00
|
|
8002b56: 687b ldr r3, [r7, #4]
|
|
8002b58: 69db ldr r3, [r3, #28]
|
|
8002b5a: 021b lsls r3, r3, #8
|
|
8002b5c: 495b ldr r1, [pc, #364] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002b5e: 4313 orrs r3, r2
|
|
8002b60: 604b str r3, [r1, #4]
|
|
|
|
/* Decrease number of wait states update if necessary */
|
|
/* Only possible when MSI is the System clock source */
|
|
if(sysclk_source == RCC_CFGR_SWS_MSI)
|
|
8002b62: 69bb ldr r3, [r7, #24]
|
|
8002b64: 2b00 cmp r3, #0
|
|
8002b66: d109 bne.n 8002b7c <HAL_RCC_OscConfig+0x120>
|
|
{
|
|
if(RCC_SetFlashLatencyFromMSIRange(RCC_OscInitStruct->MSIClockRange) != HAL_OK)
|
|
8002b68: 687b ldr r3, [r7, #4]
|
|
8002b6a: 6a1b ldr r3, [r3, #32]
|
|
8002b6c: 4618 mov r0, r3
|
|
8002b6e: f000 fd15 bl 800359c <RCC_SetFlashLatencyFromMSIRange>
|
|
8002b72: 4603 mov r3, r0
|
|
8002b74: 2b00 cmp r3, #0
|
|
8002b76: d001 beq.n 8002b7c <HAL_RCC_OscConfig+0x120>
|
|
{
|
|
return HAL_ERROR;
|
|
8002b78: 2301 movs r3, #1
|
|
8002b7a: e343 b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Update the SystemCoreClock global variable */
|
|
SystemCoreClock = HAL_RCC_GetSysClockFreq() >> (AHBPrescTable[READ_BIT(RCC->CFGR, RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos] & 0x1FU);
|
|
8002b7c: f000 fc4a bl 8003414 <HAL_RCC_GetSysClockFreq>
|
|
8002b80: 4602 mov r2, r0
|
|
8002b82: 4b52 ldr r3, [pc, #328] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002b84: 689b ldr r3, [r3, #8]
|
|
8002b86: 091b lsrs r3, r3, #4
|
|
8002b88: f003 030f and.w r3, r3, #15
|
|
8002b8c: 4950 ldr r1, [pc, #320] @ (8002cd0 <HAL_RCC_OscConfig+0x274>)
|
|
8002b8e: 5ccb ldrb r3, [r1, r3]
|
|
8002b90: f003 031f and.w r3, r3, #31
|
|
8002b94: fa22 f303 lsr.w r3, r2, r3
|
|
8002b98: 4a4e ldr r2, [pc, #312] @ (8002cd4 <HAL_RCC_OscConfig+0x278>)
|
|
8002b9a: 6013 str r3, [r2, #0]
|
|
|
|
/* Configure the source of time base considering new system clocks settings*/
|
|
status = HAL_InitTick(uwTickPrio);
|
|
8002b9c: 4b4e ldr r3, [pc, #312] @ (8002cd8 <HAL_RCC_OscConfig+0x27c>)
|
|
8002b9e: 681b ldr r3, [r3, #0]
|
|
8002ba0: 4618 mov r0, r3
|
|
8002ba2: f7fe ff33 bl 8001a0c <HAL_InitTick>
|
|
8002ba6: 4603 mov r3, r0
|
|
8002ba8: 73fb strb r3, [r7, #15]
|
|
if(status != HAL_OK)
|
|
8002baa: 7bfb ldrb r3, [r7, #15]
|
|
8002bac: 2b00 cmp r3, #0
|
|
8002bae: d052 beq.n 8002c56 <HAL_RCC_OscConfig+0x1fa>
|
|
{
|
|
return status;
|
|
8002bb0: 7bfb ldrb r3, [r7, #15]
|
|
8002bb2: e327 b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Check the MSI State */
|
|
if(RCC_OscInitStruct->MSIState != RCC_MSI_OFF)
|
|
8002bb4: 687b ldr r3, [r7, #4]
|
|
8002bb6: 699b ldr r3, [r3, #24]
|
|
8002bb8: 2b00 cmp r3, #0
|
|
8002bba: d032 beq.n 8002c22 <HAL_RCC_OscConfig+0x1c6>
|
|
{
|
|
/* Enable the Internal High Speed oscillator (MSI). */
|
|
__HAL_RCC_MSI_ENABLE();
|
|
8002bbc: 4b43 ldr r3, [pc, #268] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002bbe: 681b ldr r3, [r3, #0]
|
|
8002bc0: 4a42 ldr r2, [pc, #264] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002bc2: f043 0301 orr.w r3, r3, #1
|
|
8002bc6: 6013 str r3, [r2, #0]
|
|
|
|
/* Get timeout */
|
|
tickstart = HAL_GetTick();
|
|
8002bc8: f7fe ff70 bl 8001aac <HAL_GetTick>
|
|
8002bcc: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till MSI is ready */
|
|
while(READ_BIT(RCC->CR, RCC_CR_MSIRDY) == 0U)
|
|
8002bce: e008 b.n 8002be2 <HAL_RCC_OscConfig+0x186>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > MSI_TIMEOUT_VALUE)
|
|
8002bd0: f7fe ff6c bl 8001aac <HAL_GetTick>
|
|
8002bd4: 4602 mov r2, r0
|
|
8002bd6: 693b ldr r3, [r7, #16]
|
|
8002bd8: 1ad3 subs r3, r2, r3
|
|
8002bda: 2b02 cmp r3, #2
|
|
8002bdc: d901 bls.n 8002be2 <HAL_RCC_OscConfig+0x186>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8002bde: 2303 movs r3, #3
|
|
8002be0: e310 b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
while(READ_BIT(RCC->CR, RCC_CR_MSIRDY) == 0U)
|
|
8002be2: 4b3a ldr r3, [pc, #232] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002be4: 681b ldr r3, [r3, #0]
|
|
8002be6: f003 0302 and.w r3, r3, #2
|
|
8002bea: 2b00 cmp r3, #0
|
|
8002bec: d0f0 beq.n 8002bd0 <HAL_RCC_OscConfig+0x174>
|
|
}
|
|
}
|
|
/* Selects the Multiple Speed oscillator (MSI) clock range .*/
|
|
__HAL_RCC_MSI_RANGE_CONFIG(RCC_OscInitStruct->MSIClockRange);
|
|
8002bee: 4b37 ldr r3, [pc, #220] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002bf0: 681b ldr r3, [r3, #0]
|
|
8002bf2: 4a36 ldr r2, [pc, #216] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002bf4: f043 0308 orr.w r3, r3, #8
|
|
8002bf8: 6013 str r3, [r2, #0]
|
|
8002bfa: 4b34 ldr r3, [pc, #208] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002bfc: 681b ldr r3, [r3, #0]
|
|
8002bfe: f023 02f0 bic.w r2, r3, #240 @ 0xf0
|
|
8002c02: 687b ldr r3, [r7, #4]
|
|
8002c04: 6a1b ldr r3, [r3, #32]
|
|
8002c06: 4931 ldr r1, [pc, #196] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002c08: 4313 orrs r3, r2
|
|
8002c0a: 600b str r3, [r1, #0]
|
|
/* Adjusts the Multiple Speed oscillator (MSI) calibration value.*/
|
|
__HAL_RCC_MSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->MSICalibrationValue);
|
|
8002c0c: 4b2f ldr r3, [pc, #188] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002c0e: 685b ldr r3, [r3, #4]
|
|
8002c10: f423 427f bic.w r2, r3, #65280 @ 0xff00
|
|
8002c14: 687b ldr r3, [r7, #4]
|
|
8002c16: 69db ldr r3, [r3, #28]
|
|
8002c18: 021b lsls r3, r3, #8
|
|
8002c1a: 492c ldr r1, [pc, #176] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002c1c: 4313 orrs r3, r2
|
|
8002c1e: 604b str r3, [r1, #4]
|
|
8002c20: e01a b.n 8002c58 <HAL_RCC_OscConfig+0x1fc>
|
|
|
|
}
|
|
else
|
|
{
|
|
/* Disable the Internal High Speed oscillator (MSI). */
|
|
__HAL_RCC_MSI_DISABLE();
|
|
8002c22: 4b2a ldr r3, [pc, #168] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002c24: 681b ldr r3, [r3, #0]
|
|
8002c26: 4a29 ldr r2, [pc, #164] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002c28: f023 0301 bic.w r3, r3, #1
|
|
8002c2c: 6013 str r3, [r2, #0]
|
|
|
|
/* Get timeout */
|
|
tickstart = HAL_GetTick();
|
|
8002c2e: f7fe ff3d bl 8001aac <HAL_GetTick>
|
|
8002c32: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till MSI is ready */
|
|
while(READ_BIT(RCC->CR, RCC_CR_MSIRDY) != 0U)
|
|
8002c34: e008 b.n 8002c48 <HAL_RCC_OscConfig+0x1ec>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > MSI_TIMEOUT_VALUE)
|
|
8002c36: f7fe ff39 bl 8001aac <HAL_GetTick>
|
|
8002c3a: 4602 mov r2, r0
|
|
8002c3c: 693b ldr r3, [r7, #16]
|
|
8002c3e: 1ad3 subs r3, r2, r3
|
|
8002c40: 2b02 cmp r3, #2
|
|
8002c42: d901 bls.n 8002c48 <HAL_RCC_OscConfig+0x1ec>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8002c44: 2303 movs r3, #3
|
|
8002c46: e2dd b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
while(READ_BIT(RCC->CR, RCC_CR_MSIRDY) != 0U)
|
|
8002c48: 4b20 ldr r3, [pc, #128] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002c4a: 681b ldr r3, [r3, #0]
|
|
8002c4c: f003 0302 and.w r3, r3, #2
|
|
8002c50: 2b00 cmp r3, #0
|
|
8002c52: d1f0 bne.n 8002c36 <HAL_RCC_OscConfig+0x1da>
|
|
8002c54: e000 b.n 8002c58 <HAL_RCC_OscConfig+0x1fc>
|
|
if((READ_BIT(RCC->CR, RCC_CR_MSIRDY) != 0U) && (RCC_OscInitStruct->MSIState == RCC_MSI_OFF))
|
|
8002c56: bf00 nop
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/*------------------------------- HSE Configuration ------------------------*/
|
|
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE)
|
|
8002c58: 687b ldr r3, [r7, #4]
|
|
8002c5a: 681b ldr r3, [r3, #0]
|
|
8002c5c: f003 0301 and.w r3, r3, #1
|
|
8002c60: 2b00 cmp r3, #0
|
|
8002c62: d074 beq.n 8002d4e <HAL_RCC_OscConfig+0x2f2>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState));
|
|
|
|
/* When the HSE is used as system clock or clock source for PLL in these cases it is not allowed to be disabled */
|
|
if((sysclk_source == RCC_CFGR_SWS_HSE) ||
|
|
8002c64: 69bb ldr r3, [r7, #24]
|
|
8002c66: 2b08 cmp r3, #8
|
|
8002c68: d005 beq.n 8002c76 <HAL_RCC_OscConfig+0x21a>
|
|
8002c6a: 69bb ldr r3, [r7, #24]
|
|
8002c6c: 2b0c cmp r3, #12
|
|
8002c6e: d10e bne.n 8002c8e <HAL_RCC_OscConfig+0x232>
|
|
((sysclk_source == RCC_CFGR_SWS_PLL) && (pll_config == RCC_PLLSOURCE_HSE)))
|
|
8002c70: 697b ldr r3, [r7, #20]
|
|
8002c72: 2b03 cmp r3, #3
|
|
8002c74: d10b bne.n 8002c8e <HAL_RCC_OscConfig+0x232>
|
|
{
|
|
if((READ_BIT(RCC->CR, RCC_CR_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
|
|
8002c76: 4b15 ldr r3, [pc, #84] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002c78: 681b ldr r3, [r3, #0]
|
|
8002c7a: f403 3300 and.w r3, r3, #131072 @ 0x20000
|
|
8002c7e: 2b00 cmp r3, #0
|
|
8002c80: d064 beq.n 8002d4c <HAL_RCC_OscConfig+0x2f0>
|
|
8002c82: 687b ldr r3, [r7, #4]
|
|
8002c84: 685b ldr r3, [r3, #4]
|
|
8002c86: 2b00 cmp r3, #0
|
|
8002c88: d160 bne.n 8002d4c <HAL_RCC_OscConfig+0x2f0>
|
|
{
|
|
return HAL_ERROR;
|
|
8002c8a: 2301 movs r3, #1
|
|
8002c8c: e2ba b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Set the new HSE configuration ---------------------------------------*/
|
|
__HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
|
|
8002c8e: 687b ldr r3, [r7, #4]
|
|
8002c90: 685b ldr r3, [r3, #4]
|
|
8002c92: f5b3 3f80 cmp.w r3, #65536 @ 0x10000
|
|
8002c96: d106 bne.n 8002ca6 <HAL_RCC_OscConfig+0x24a>
|
|
8002c98: 4b0c ldr r3, [pc, #48] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002c9a: 681b ldr r3, [r3, #0]
|
|
8002c9c: 4a0b ldr r2, [pc, #44] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002c9e: f443 3380 orr.w r3, r3, #65536 @ 0x10000
|
|
8002ca2: 6013 str r3, [r2, #0]
|
|
8002ca4: e026 b.n 8002cf4 <HAL_RCC_OscConfig+0x298>
|
|
8002ca6: 687b ldr r3, [r7, #4]
|
|
8002ca8: 685b ldr r3, [r3, #4]
|
|
8002caa: f5b3 2fa0 cmp.w r3, #327680 @ 0x50000
|
|
8002cae: d115 bne.n 8002cdc <HAL_RCC_OscConfig+0x280>
|
|
8002cb0: 4b06 ldr r3, [pc, #24] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002cb2: 681b ldr r3, [r3, #0]
|
|
8002cb4: 4a05 ldr r2, [pc, #20] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002cb6: f443 2380 orr.w r3, r3, #262144 @ 0x40000
|
|
8002cba: 6013 str r3, [r2, #0]
|
|
8002cbc: 4b03 ldr r3, [pc, #12] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002cbe: 681b ldr r3, [r3, #0]
|
|
8002cc0: 4a02 ldr r2, [pc, #8] @ (8002ccc <HAL_RCC_OscConfig+0x270>)
|
|
8002cc2: f443 3380 orr.w r3, r3, #65536 @ 0x10000
|
|
8002cc6: 6013 str r3, [r2, #0]
|
|
8002cc8: e014 b.n 8002cf4 <HAL_RCC_OscConfig+0x298>
|
|
8002cca: bf00 nop
|
|
8002ccc: 40021000 .word 0x40021000
|
|
8002cd0: 08008998 .word 0x08008998
|
|
8002cd4: 20000000 .word 0x20000000
|
|
8002cd8: 20000004 .word 0x20000004
|
|
8002cdc: 4ba0 ldr r3, [pc, #640] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002cde: 681b ldr r3, [r3, #0]
|
|
8002ce0: 4a9f ldr r2, [pc, #636] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002ce2: f423 3380 bic.w r3, r3, #65536 @ 0x10000
|
|
8002ce6: 6013 str r3, [r2, #0]
|
|
8002ce8: 4b9d ldr r3, [pc, #628] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002cea: 681b ldr r3, [r3, #0]
|
|
8002cec: 4a9c ldr r2, [pc, #624] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002cee: f423 2380 bic.w r3, r3, #262144 @ 0x40000
|
|
8002cf2: 6013 str r3, [r2, #0]
|
|
|
|
/* Check the HSE State */
|
|
if(RCC_OscInitStruct->HSEState != RCC_HSE_OFF)
|
|
8002cf4: 687b ldr r3, [r7, #4]
|
|
8002cf6: 685b ldr r3, [r3, #4]
|
|
8002cf8: 2b00 cmp r3, #0
|
|
8002cfa: d013 beq.n 8002d24 <HAL_RCC_OscConfig+0x2c8>
|
|
{
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
8002cfc: f7fe fed6 bl 8001aac <HAL_GetTick>
|
|
8002d00: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till HSE is ready */
|
|
while(READ_BIT(RCC->CR, RCC_CR_HSERDY) == 0U)
|
|
8002d02: e008 b.n 8002d16 <HAL_RCC_OscConfig+0x2ba>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
|
|
8002d04: f7fe fed2 bl 8001aac <HAL_GetTick>
|
|
8002d08: 4602 mov r2, r0
|
|
8002d0a: 693b ldr r3, [r7, #16]
|
|
8002d0c: 1ad3 subs r3, r2, r3
|
|
8002d0e: 2b64 cmp r3, #100 @ 0x64
|
|
8002d10: d901 bls.n 8002d16 <HAL_RCC_OscConfig+0x2ba>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8002d12: 2303 movs r3, #3
|
|
8002d14: e276 b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
while(READ_BIT(RCC->CR, RCC_CR_HSERDY) == 0U)
|
|
8002d16: 4b92 ldr r3, [pc, #584] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002d18: 681b ldr r3, [r3, #0]
|
|
8002d1a: f403 3300 and.w r3, r3, #131072 @ 0x20000
|
|
8002d1e: 2b00 cmp r3, #0
|
|
8002d20: d0f0 beq.n 8002d04 <HAL_RCC_OscConfig+0x2a8>
|
|
8002d22: e014 b.n 8002d4e <HAL_RCC_OscConfig+0x2f2>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
8002d24: f7fe fec2 bl 8001aac <HAL_GetTick>
|
|
8002d28: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till HSE is disabled */
|
|
while(READ_BIT(RCC->CR, RCC_CR_HSERDY) != 0U)
|
|
8002d2a: e008 b.n 8002d3e <HAL_RCC_OscConfig+0x2e2>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
|
|
8002d2c: f7fe febe bl 8001aac <HAL_GetTick>
|
|
8002d30: 4602 mov r2, r0
|
|
8002d32: 693b ldr r3, [r7, #16]
|
|
8002d34: 1ad3 subs r3, r2, r3
|
|
8002d36: 2b64 cmp r3, #100 @ 0x64
|
|
8002d38: d901 bls.n 8002d3e <HAL_RCC_OscConfig+0x2e2>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8002d3a: 2303 movs r3, #3
|
|
8002d3c: e262 b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
while(READ_BIT(RCC->CR, RCC_CR_HSERDY) != 0U)
|
|
8002d3e: 4b88 ldr r3, [pc, #544] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002d40: 681b ldr r3, [r3, #0]
|
|
8002d42: f403 3300 and.w r3, r3, #131072 @ 0x20000
|
|
8002d46: 2b00 cmp r3, #0
|
|
8002d48: d1f0 bne.n 8002d2c <HAL_RCC_OscConfig+0x2d0>
|
|
8002d4a: e000 b.n 8002d4e <HAL_RCC_OscConfig+0x2f2>
|
|
if((READ_BIT(RCC->CR, RCC_CR_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
|
|
8002d4c: bf00 nop
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/*----------------------------- HSI Configuration --------------------------*/
|
|
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
|
|
8002d4e: 687b ldr r3, [r7, #4]
|
|
8002d50: 681b ldr r3, [r3, #0]
|
|
8002d52: f003 0302 and.w r3, r3, #2
|
|
8002d56: 2b00 cmp r3, #0
|
|
8002d58: d060 beq.n 8002e1c <HAL_RCC_OscConfig+0x3c0>
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState));
|
|
assert_param(IS_RCC_HSI_CALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue));
|
|
|
|
/* Check if HSI is used as system clock or as PLL source when PLL is selected as system clock */
|
|
if((sysclk_source == RCC_CFGR_SWS_HSI) ||
|
|
8002d5a: 69bb ldr r3, [r7, #24]
|
|
8002d5c: 2b04 cmp r3, #4
|
|
8002d5e: d005 beq.n 8002d6c <HAL_RCC_OscConfig+0x310>
|
|
8002d60: 69bb ldr r3, [r7, #24]
|
|
8002d62: 2b0c cmp r3, #12
|
|
8002d64: d119 bne.n 8002d9a <HAL_RCC_OscConfig+0x33e>
|
|
((sysclk_source == RCC_CFGR_SWS_PLL) && (pll_config == RCC_PLLSOURCE_HSI)))
|
|
8002d66: 697b ldr r3, [r7, #20]
|
|
8002d68: 2b02 cmp r3, #2
|
|
8002d6a: d116 bne.n 8002d9a <HAL_RCC_OscConfig+0x33e>
|
|
{
|
|
/* When HSI is used as system clock it will not be disabled */
|
|
if((READ_BIT(RCC->CR, RCC_CR_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF))
|
|
8002d6c: 4b7c ldr r3, [pc, #496] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002d6e: 681b ldr r3, [r3, #0]
|
|
8002d70: f403 6380 and.w r3, r3, #1024 @ 0x400
|
|
8002d74: 2b00 cmp r3, #0
|
|
8002d76: d005 beq.n 8002d84 <HAL_RCC_OscConfig+0x328>
|
|
8002d78: 687b ldr r3, [r7, #4]
|
|
8002d7a: 68db ldr r3, [r3, #12]
|
|
8002d7c: 2b00 cmp r3, #0
|
|
8002d7e: d101 bne.n 8002d84 <HAL_RCC_OscConfig+0x328>
|
|
{
|
|
return HAL_ERROR;
|
|
8002d80: 2301 movs r3, #1
|
|
8002d82: e23f b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
}
|
|
/* Otherwise, just the calibration is allowed */
|
|
else
|
|
{
|
|
/* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
|
|
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
|
|
8002d84: 4b76 ldr r3, [pc, #472] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002d86: 685b ldr r3, [r3, #4]
|
|
8002d88: f023 52f8 bic.w r2, r3, #520093696 @ 0x1f000000
|
|
8002d8c: 687b ldr r3, [r7, #4]
|
|
8002d8e: 691b ldr r3, [r3, #16]
|
|
8002d90: 061b lsls r3, r3, #24
|
|
8002d92: 4973 ldr r1, [pc, #460] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002d94: 4313 orrs r3, r2
|
|
8002d96: 604b str r3, [r1, #4]
|
|
if((READ_BIT(RCC->CR, RCC_CR_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF))
|
|
8002d98: e040 b.n 8002e1c <HAL_RCC_OscConfig+0x3c0>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Check the HSI State */
|
|
if(RCC_OscInitStruct->HSIState != RCC_HSI_OFF)
|
|
8002d9a: 687b ldr r3, [r7, #4]
|
|
8002d9c: 68db ldr r3, [r3, #12]
|
|
8002d9e: 2b00 cmp r3, #0
|
|
8002da0: d023 beq.n 8002dea <HAL_RCC_OscConfig+0x38e>
|
|
{
|
|
/* Enable the Internal High Speed oscillator (HSI). */
|
|
__HAL_RCC_HSI_ENABLE();
|
|
8002da2: 4b6f ldr r3, [pc, #444] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002da4: 681b ldr r3, [r3, #0]
|
|
8002da6: 4a6e ldr r2, [pc, #440] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002da8: f443 7380 orr.w r3, r3, #256 @ 0x100
|
|
8002dac: 6013 str r3, [r2, #0]
|
|
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
8002dae: f7fe fe7d bl 8001aac <HAL_GetTick>
|
|
8002db2: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till HSI is ready */
|
|
while(READ_BIT(RCC->CR, RCC_CR_HSIRDY) == 0U)
|
|
8002db4: e008 b.n 8002dc8 <HAL_RCC_OscConfig+0x36c>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE)
|
|
8002db6: f7fe fe79 bl 8001aac <HAL_GetTick>
|
|
8002dba: 4602 mov r2, r0
|
|
8002dbc: 693b ldr r3, [r7, #16]
|
|
8002dbe: 1ad3 subs r3, r2, r3
|
|
8002dc0: 2b02 cmp r3, #2
|
|
8002dc2: d901 bls.n 8002dc8 <HAL_RCC_OscConfig+0x36c>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8002dc4: 2303 movs r3, #3
|
|
8002dc6: e21d b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
while(READ_BIT(RCC->CR, RCC_CR_HSIRDY) == 0U)
|
|
8002dc8: 4b65 ldr r3, [pc, #404] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002dca: 681b ldr r3, [r3, #0]
|
|
8002dcc: f403 6380 and.w r3, r3, #1024 @ 0x400
|
|
8002dd0: 2b00 cmp r3, #0
|
|
8002dd2: d0f0 beq.n 8002db6 <HAL_RCC_OscConfig+0x35a>
|
|
}
|
|
}
|
|
|
|
/* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
|
|
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
|
|
8002dd4: 4b62 ldr r3, [pc, #392] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002dd6: 685b ldr r3, [r3, #4]
|
|
8002dd8: f023 52f8 bic.w r2, r3, #520093696 @ 0x1f000000
|
|
8002ddc: 687b ldr r3, [r7, #4]
|
|
8002dde: 691b ldr r3, [r3, #16]
|
|
8002de0: 061b lsls r3, r3, #24
|
|
8002de2: 495f ldr r1, [pc, #380] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002de4: 4313 orrs r3, r2
|
|
8002de6: 604b str r3, [r1, #4]
|
|
8002de8: e018 b.n 8002e1c <HAL_RCC_OscConfig+0x3c0>
|
|
}
|
|
else
|
|
{
|
|
/* Disable the Internal High Speed oscillator (HSI). */
|
|
__HAL_RCC_HSI_DISABLE();
|
|
8002dea: 4b5d ldr r3, [pc, #372] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002dec: 681b ldr r3, [r3, #0]
|
|
8002dee: 4a5c ldr r2, [pc, #368] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002df0: f423 7380 bic.w r3, r3, #256 @ 0x100
|
|
8002df4: 6013 str r3, [r2, #0]
|
|
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
8002df6: f7fe fe59 bl 8001aac <HAL_GetTick>
|
|
8002dfa: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till HSI is disabled */
|
|
while(READ_BIT(RCC->CR, RCC_CR_HSIRDY) != 0U)
|
|
8002dfc: e008 b.n 8002e10 <HAL_RCC_OscConfig+0x3b4>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE)
|
|
8002dfe: f7fe fe55 bl 8001aac <HAL_GetTick>
|
|
8002e02: 4602 mov r2, r0
|
|
8002e04: 693b ldr r3, [r7, #16]
|
|
8002e06: 1ad3 subs r3, r2, r3
|
|
8002e08: 2b02 cmp r3, #2
|
|
8002e0a: d901 bls.n 8002e10 <HAL_RCC_OscConfig+0x3b4>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8002e0c: 2303 movs r3, #3
|
|
8002e0e: e1f9 b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
while(READ_BIT(RCC->CR, RCC_CR_HSIRDY) != 0U)
|
|
8002e10: 4b53 ldr r3, [pc, #332] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002e12: 681b ldr r3, [r3, #0]
|
|
8002e14: f403 6380 and.w r3, r3, #1024 @ 0x400
|
|
8002e18: 2b00 cmp r3, #0
|
|
8002e1a: d1f0 bne.n 8002dfe <HAL_RCC_OscConfig+0x3a2>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/*------------------------------ LSI Configuration -------------------------*/
|
|
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
|
|
8002e1c: 687b ldr r3, [r7, #4]
|
|
8002e1e: 681b ldr r3, [r3, #0]
|
|
8002e20: f003 0308 and.w r3, r3, #8
|
|
8002e24: 2b00 cmp r3, #0
|
|
8002e26: d03c beq.n 8002ea2 <HAL_RCC_OscConfig+0x446>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState));
|
|
|
|
/* Check the LSI State */
|
|
if(RCC_OscInitStruct->LSIState != RCC_LSI_OFF)
|
|
8002e28: 687b ldr r3, [r7, #4]
|
|
8002e2a: 695b ldr r3, [r3, #20]
|
|
8002e2c: 2b00 cmp r3, #0
|
|
8002e2e: d01c beq.n 8002e6a <HAL_RCC_OscConfig+0x40e>
|
|
MODIFY_REG(RCC->CSR, RCC_CSR_LSIPREDIV, RCC_OscInitStruct->LSIDiv);
|
|
}
|
|
#endif /* RCC_CSR_LSIPREDIV */
|
|
|
|
/* Enable the Internal Low Speed oscillator (LSI). */
|
|
__HAL_RCC_LSI_ENABLE();
|
|
8002e30: 4b4b ldr r3, [pc, #300] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002e32: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94
|
|
8002e36: 4a4a ldr r2, [pc, #296] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002e38: f043 0301 orr.w r3, r3, #1
|
|
8002e3c: f8c2 3094 str.w r3, [r2, #148] @ 0x94
|
|
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
8002e40: f7fe fe34 bl 8001aac <HAL_GetTick>
|
|
8002e44: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till LSI is ready */
|
|
while(READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) == 0U)
|
|
8002e46: e008 b.n 8002e5a <HAL_RCC_OscConfig+0x3fe>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE)
|
|
8002e48: f7fe fe30 bl 8001aac <HAL_GetTick>
|
|
8002e4c: 4602 mov r2, r0
|
|
8002e4e: 693b ldr r3, [r7, #16]
|
|
8002e50: 1ad3 subs r3, r2, r3
|
|
8002e52: 2b02 cmp r3, #2
|
|
8002e54: d901 bls.n 8002e5a <HAL_RCC_OscConfig+0x3fe>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8002e56: 2303 movs r3, #3
|
|
8002e58: e1d4 b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
while(READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) == 0U)
|
|
8002e5a: 4b41 ldr r3, [pc, #260] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002e5c: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94
|
|
8002e60: f003 0302 and.w r3, r3, #2
|
|
8002e64: 2b00 cmp r3, #0
|
|
8002e66: d0ef beq.n 8002e48 <HAL_RCC_OscConfig+0x3ec>
|
|
8002e68: e01b b.n 8002ea2 <HAL_RCC_OscConfig+0x446>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Disable the Internal Low Speed oscillator (LSI). */
|
|
__HAL_RCC_LSI_DISABLE();
|
|
8002e6a: 4b3d ldr r3, [pc, #244] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002e6c: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94
|
|
8002e70: 4a3b ldr r2, [pc, #236] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002e72: f023 0301 bic.w r3, r3, #1
|
|
8002e76: f8c2 3094 str.w r3, [r2, #148] @ 0x94
|
|
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
8002e7a: f7fe fe17 bl 8001aac <HAL_GetTick>
|
|
8002e7e: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till LSI is disabled */
|
|
while(READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) != 0U)
|
|
8002e80: e008 b.n 8002e94 <HAL_RCC_OscConfig+0x438>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE)
|
|
8002e82: f7fe fe13 bl 8001aac <HAL_GetTick>
|
|
8002e86: 4602 mov r2, r0
|
|
8002e88: 693b ldr r3, [r7, #16]
|
|
8002e8a: 1ad3 subs r3, r2, r3
|
|
8002e8c: 2b02 cmp r3, #2
|
|
8002e8e: d901 bls.n 8002e94 <HAL_RCC_OscConfig+0x438>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8002e90: 2303 movs r3, #3
|
|
8002e92: e1b7 b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
while(READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) != 0U)
|
|
8002e94: 4b32 ldr r3, [pc, #200] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002e96: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94
|
|
8002e9a: f003 0302 and.w r3, r3, #2
|
|
8002e9e: 2b00 cmp r3, #0
|
|
8002ea0: d1ef bne.n 8002e82 <HAL_RCC_OscConfig+0x426>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/*------------------------------ LSE Configuration -------------------------*/
|
|
if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
|
|
8002ea2: 687b ldr r3, [r7, #4]
|
|
8002ea4: 681b ldr r3, [r3, #0]
|
|
8002ea6: f003 0304 and.w r3, r3, #4
|
|
8002eaa: 2b00 cmp r3, #0
|
|
8002eac: f000 80a6 beq.w 8002ffc <HAL_RCC_OscConfig+0x5a0>
|
|
{
|
|
FlagStatus pwrclkchanged = RESET;
|
|
8002eb0: 2300 movs r3, #0
|
|
8002eb2: 77fb strb r3, [r7, #31]
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState));
|
|
|
|
/* Update LSE configuration in Backup Domain control register */
|
|
/* Requires to enable write access to Backup Domain of necessary */
|
|
if(HAL_IS_BIT_CLR(RCC->APB1ENR1, RCC_APB1ENR1_PWREN))
|
|
8002eb4: 4b2a ldr r3, [pc, #168] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002eb6: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
8002eb8: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
|
|
8002ebc: 2b00 cmp r3, #0
|
|
8002ebe: d10d bne.n 8002edc <HAL_RCC_OscConfig+0x480>
|
|
{
|
|
__HAL_RCC_PWR_CLK_ENABLE();
|
|
8002ec0: 4b27 ldr r3, [pc, #156] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002ec2: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
8002ec4: 4a26 ldr r2, [pc, #152] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002ec6: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000
|
|
8002eca: 6593 str r3, [r2, #88] @ 0x58
|
|
8002ecc: 4b24 ldr r3, [pc, #144] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002ece: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
8002ed0: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
|
|
8002ed4: 60bb str r3, [r7, #8]
|
|
8002ed6: 68bb ldr r3, [r7, #8]
|
|
pwrclkchanged = SET;
|
|
8002ed8: 2301 movs r3, #1
|
|
8002eda: 77fb strb r3, [r7, #31]
|
|
}
|
|
|
|
if(HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
|
|
8002edc: 4b21 ldr r3, [pc, #132] @ (8002f64 <HAL_RCC_OscConfig+0x508>)
|
|
8002ede: 681b ldr r3, [r3, #0]
|
|
8002ee0: f403 7380 and.w r3, r3, #256 @ 0x100
|
|
8002ee4: 2b00 cmp r3, #0
|
|
8002ee6: d118 bne.n 8002f1a <HAL_RCC_OscConfig+0x4be>
|
|
{
|
|
/* Enable write access to Backup domain */
|
|
SET_BIT(PWR->CR1, PWR_CR1_DBP);
|
|
8002ee8: 4b1e ldr r3, [pc, #120] @ (8002f64 <HAL_RCC_OscConfig+0x508>)
|
|
8002eea: 681b ldr r3, [r3, #0]
|
|
8002eec: 4a1d ldr r2, [pc, #116] @ (8002f64 <HAL_RCC_OscConfig+0x508>)
|
|
8002eee: f443 7380 orr.w r3, r3, #256 @ 0x100
|
|
8002ef2: 6013 str r3, [r2, #0]
|
|
|
|
/* Wait for Backup domain Write protection disable */
|
|
tickstart = HAL_GetTick();
|
|
8002ef4: f7fe fdda bl 8001aac <HAL_GetTick>
|
|
8002ef8: 6138 str r0, [r7, #16]
|
|
|
|
while(HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
|
|
8002efa: e008 b.n 8002f0e <HAL_RCC_OscConfig+0x4b2>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
|
|
8002efc: f7fe fdd6 bl 8001aac <HAL_GetTick>
|
|
8002f00: 4602 mov r2, r0
|
|
8002f02: 693b ldr r3, [r7, #16]
|
|
8002f04: 1ad3 subs r3, r2, r3
|
|
8002f06: 2b02 cmp r3, #2
|
|
8002f08: d901 bls.n 8002f0e <HAL_RCC_OscConfig+0x4b2>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8002f0a: 2303 movs r3, #3
|
|
8002f0c: e17a b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
while(HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
|
|
8002f0e: 4b15 ldr r3, [pc, #84] @ (8002f64 <HAL_RCC_OscConfig+0x508>)
|
|
8002f10: 681b ldr r3, [r3, #0]
|
|
8002f12: f403 7380 and.w r3, r3, #256 @ 0x100
|
|
8002f16: 2b00 cmp r3, #0
|
|
8002f18: d0f0 beq.n 8002efc <HAL_RCC_OscConfig+0x4a0>
|
|
{
|
|
CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEON);
|
|
CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEBYP);
|
|
}
|
|
#else
|
|
__HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
|
|
8002f1a: 687b ldr r3, [r7, #4]
|
|
8002f1c: 689b ldr r3, [r3, #8]
|
|
8002f1e: 2b01 cmp r3, #1
|
|
8002f20: d108 bne.n 8002f34 <HAL_RCC_OscConfig+0x4d8>
|
|
8002f22: 4b0f ldr r3, [pc, #60] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002f24: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90
|
|
8002f28: 4a0d ldr r2, [pc, #52] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002f2a: f043 0301 orr.w r3, r3, #1
|
|
8002f2e: f8c2 3090 str.w r3, [r2, #144] @ 0x90
|
|
8002f32: e029 b.n 8002f88 <HAL_RCC_OscConfig+0x52c>
|
|
8002f34: 687b ldr r3, [r7, #4]
|
|
8002f36: 689b ldr r3, [r3, #8]
|
|
8002f38: 2b05 cmp r3, #5
|
|
8002f3a: d115 bne.n 8002f68 <HAL_RCC_OscConfig+0x50c>
|
|
8002f3c: 4b08 ldr r3, [pc, #32] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002f3e: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90
|
|
8002f42: 4a07 ldr r2, [pc, #28] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002f44: f043 0304 orr.w r3, r3, #4
|
|
8002f48: f8c2 3090 str.w r3, [r2, #144] @ 0x90
|
|
8002f4c: 4b04 ldr r3, [pc, #16] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002f4e: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90
|
|
8002f52: 4a03 ldr r2, [pc, #12] @ (8002f60 <HAL_RCC_OscConfig+0x504>)
|
|
8002f54: f043 0301 orr.w r3, r3, #1
|
|
8002f58: f8c2 3090 str.w r3, [r2, #144] @ 0x90
|
|
8002f5c: e014 b.n 8002f88 <HAL_RCC_OscConfig+0x52c>
|
|
8002f5e: bf00 nop
|
|
8002f60: 40021000 .word 0x40021000
|
|
8002f64: 40007000 .word 0x40007000
|
|
8002f68: 4b9c ldr r3, [pc, #624] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8002f6a: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90
|
|
8002f6e: 4a9b ldr r2, [pc, #620] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8002f70: f023 0301 bic.w r3, r3, #1
|
|
8002f74: f8c2 3090 str.w r3, [r2, #144] @ 0x90
|
|
8002f78: 4b98 ldr r3, [pc, #608] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8002f7a: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90
|
|
8002f7e: 4a97 ldr r2, [pc, #604] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8002f80: f023 0304 bic.w r3, r3, #4
|
|
8002f84: f8c2 3090 str.w r3, [r2, #144] @ 0x90
|
|
#endif /* RCC_BDCR_LSESYSDIS */
|
|
|
|
/* Check the LSE State */
|
|
if(RCC_OscInitStruct->LSEState != RCC_LSE_OFF)
|
|
8002f88: 687b ldr r3, [r7, #4]
|
|
8002f8a: 689b ldr r3, [r3, #8]
|
|
8002f8c: 2b00 cmp r3, #0
|
|
8002f8e: d016 beq.n 8002fbe <HAL_RCC_OscConfig+0x562>
|
|
{
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
8002f90: f7fe fd8c bl 8001aac <HAL_GetTick>
|
|
8002f94: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till LSE is ready */
|
|
while(READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == 0U)
|
|
8002f96: e00a b.n 8002fae <HAL_RCC_OscConfig+0x552>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
|
|
8002f98: f7fe fd88 bl 8001aac <HAL_GetTick>
|
|
8002f9c: 4602 mov r2, r0
|
|
8002f9e: 693b ldr r3, [r7, #16]
|
|
8002fa0: 1ad3 subs r3, r2, r3
|
|
8002fa2: f241 3288 movw r2, #5000 @ 0x1388
|
|
8002fa6: 4293 cmp r3, r2
|
|
8002fa8: d901 bls.n 8002fae <HAL_RCC_OscConfig+0x552>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8002faa: 2303 movs r3, #3
|
|
8002fac: e12a b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
while(READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == 0U)
|
|
8002fae: 4b8b ldr r3, [pc, #556] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8002fb0: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90
|
|
8002fb4: f003 0302 and.w r3, r3, #2
|
|
8002fb8: 2b00 cmp r3, #0
|
|
8002fba: d0ed beq.n 8002f98 <HAL_RCC_OscConfig+0x53c>
|
|
8002fbc: e015 b.n 8002fea <HAL_RCC_OscConfig+0x58e>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
8002fbe: f7fe fd75 bl 8001aac <HAL_GetTick>
|
|
8002fc2: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till LSE is disabled */
|
|
while(READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) != 0U)
|
|
8002fc4: e00a b.n 8002fdc <HAL_RCC_OscConfig+0x580>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
|
|
8002fc6: f7fe fd71 bl 8001aac <HAL_GetTick>
|
|
8002fca: 4602 mov r2, r0
|
|
8002fcc: 693b ldr r3, [r7, #16]
|
|
8002fce: 1ad3 subs r3, r2, r3
|
|
8002fd0: f241 3288 movw r2, #5000 @ 0x1388
|
|
8002fd4: 4293 cmp r3, r2
|
|
8002fd6: d901 bls.n 8002fdc <HAL_RCC_OscConfig+0x580>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8002fd8: 2303 movs r3, #3
|
|
8002fda: e113 b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
while(READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) != 0U)
|
|
8002fdc: 4b7f ldr r3, [pc, #508] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8002fde: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90
|
|
8002fe2: f003 0302 and.w r3, r3, #2
|
|
8002fe6: 2b00 cmp r3, #0
|
|
8002fe8: d1ed bne.n 8002fc6 <HAL_RCC_OscConfig+0x56a>
|
|
CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSESYSDIS);
|
|
#endif /* RCC_BDCR_LSESYSDIS */
|
|
}
|
|
|
|
/* Restore clock configuration if changed */
|
|
if(pwrclkchanged == SET)
|
|
8002fea: 7ffb ldrb r3, [r7, #31]
|
|
8002fec: 2b01 cmp r3, #1
|
|
8002fee: d105 bne.n 8002ffc <HAL_RCC_OscConfig+0x5a0>
|
|
{
|
|
__HAL_RCC_PWR_CLK_DISABLE();
|
|
8002ff0: 4b7a ldr r3, [pc, #488] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8002ff2: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
8002ff4: 4a79 ldr r2, [pc, #484] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8002ff6: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000
|
|
8002ffa: 6593 str r3, [r2, #88] @ 0x58
|
|
#endif /* RCC_HSI48_SUPPORT */
|
|
/*-------------------------------- PLL Configuration -----------------------*/
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState));
|
|
|
|
if(RCC_OscInitStruct->PLL.PLLState != RCC_PLL_NONE)
|
|
8002ffc: 687b ldr r3, [r7, #4]
|
|
8002ffe: 6a9b ldr r3, [r3, #40] @ 0x28
|
|
8003000: 2b00 cmp r3, #0
|
|
8003002: f000 80fe beq.w 8003202 <HAL_RCC_OscConfig+0x7a6>
|
|
{
|
|
/* PLL On ? */
|
|
if(RCC_OscInitStruct->PLL.PLLState == RCC_PLL_ON)
|
|
8003006: 687b ldr r3, [r7, #4]
|
|
8003008: 6a9b ldr r3, [r3, #40] @ 0x28
|
|
800300a: 2b02 cmp r3, #2
|
|
800300c: f040 80d0 bne.w 80031b0 <HAL_RCC_OscConfig+0x754>
|
|
#endif /* RCC_PLLP_SUPPORT */
|
|
assert_param(IS_RCC_PLLQ_VALUE(RCC_OscInitStruct->PLL.PLLQ));
|
|
assert_param(IS_RCC_PLLR_VALUE(RCC_OscInitStruct->PLL.PLLR));
|
|
|
|
/* Do nothing if PLL configuration is the unchanged */
|
|
pll_config = RCC->PLLCFGR;
|
|
8003010: 4b72 ldr r3, [pc, #456] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8003012: 68db ldr r3, [r3, #12]
|
|
8003014: 617b str r3, [r7, #20]
|
|
if((READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
|
|
8003016: 697b ldr r3, [r7, #20]
|
|
8003018: f003 0203 and.w r2, r3, #3
|
|
800301c: 687b ldr r3, [r7, #4]
|
|
800301e: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
8003020: 429a cmp r2, r3
|
|
8003022: d130 bne.n 8003086 <HAL_RCC_OscConfig+0x62a>
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != ((RCC_OscInitStruct->PLL.PLLM - 1U) << RCC_PLLCFGR_PLLM_Pos)) ||
|
|
8003024: 697b ldr r3, [r7, #20]
|
|
8003026: f003 0270 and.w r2, r3, #112 @ 0x70
|
|
800302a: 687b ldr r3, [r7, #4]
|
|
800302c: 6b1b ldr r3, [r3, #48] @ 0x30
|
|
800302e: 3b01 subs r3, #1
|
|
8003030: 011b lsls r3, r3, #4
|
|
if((READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
|
|
8003032: 429a cmp r2, r3
|
|
8003034: d127 bne.n 8003086 <HAL_RCC_OscConfig+0x62a>
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos)) ||
|
|
8003036: 697b ldr r3, [r7, #20]
|
|
8003038: f403 42fe and.w r2, r3, #32512 @ 0x7f00
|
|
800303c: 687b ldr r3, [r7, #4]
|
|
800303e: 6b5b ldr r3, [r3, #52] @ 0x34
|
|
8003040: 021b lsls r3, r3, #8
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != ((RCC_OscInitStruct->PLL.PLLM - 1U) << RCC_PLLCFGR_PLLM_Pos)) ||
|
|
8003042: 429a cmp r2, r3
|
|
8003044: d11f bne.n 8003086 <HAL_RCC_OscConfig+0x62a>
|
|
#if defined(RCC_PLLP_SUPPORT)
|
|
#if defined(RCC_PLLP_DIV_2_31_SUPPORT)
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLPDIV) != (RCC_OscInitStruct->PLL.PLLP << RCC_PLLCFGR_PLLPDIV_Pos)) ||
|
|
#else
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != ((RCC_OscInitStruct->PLL.PLLP == RCC_PLLP_DIV7) ? 0U : 1U)) ||
|
|
8003046: 697b ldr r3, [r7, #20]
|
|
8003048: f403 3300 and.w r3, r3, #131072 @ 0x20000
|
|
800304c: 687a ldr r2, [r7, #4]
|
|
800304e: 6b92 ldr r2, [r2, #56] @ 0x38
|
|
8003050: 2a07 cmp r2, #7
|
|
8003052: bf14 ite ne
|
|
8003054: 2201 movne r2, #1
|
|
8003056: 2200 moveq r2, #0
|
|
8003058: b2d2 uxtb r2, r2
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos)) ||
|
|
800305a: 4293 cmp r3, r2
|
|
800305c: d113 bne.n 8003086 <HAL_RCC_OscConfig+0x62a>
|
|
#endif
|
|
#endif
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != ((((RCC_OscInitStruct->PLL.PLLQ) >> 1U) - 1U) << RCC_PLLCFGR_PLLQ_Pos)) ||
|
|
800305e: 697b ldr r3, [r7, #20]
|
|
8003060: f403 02c0 and.w r2, r3, #6291456 @ 0x600000
|
|
8003064: 687b ldr r3, [r7, #4]
|
|
8003066: 6bdb ldr r3, [r3, #60] @ 0x3c
|
|
8003068: 085b lsrs r3, r3, #1
|
|
800306a: 3b01 subs r3, #1
|
|
800306c: 055b lsls r3, r3, #21
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != ((RCC_OscInitStruct->PLL.PLLP == RCC_PLLP_DIV7) ? 0U : 1U)) ||
|
|
800306e: 429a cmp r2, r3
|
|
8003070: d109 bne.n 8003086 <HAL_RCC_OscConfig+0x62a>
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLR) != ((((RCC_OscInitStruct->PLL.PLLR) >> 1U) - 1U) << RCC_PLLCFGR_PLLR_Pos)))
|
|
8003072: 697b ldr r3, [r7, #20]
|
|
8003074: f003 62c0 and.w r2, r3, #100663296 @ 0x6000000
|
|
8003078: 687b ldr r3, [r7, #4]
|
|
800307a: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
800307c: 085b lsrs r3, r3, #1
|
|
800307e: 3b01 subs r3, #1
|
|
8003080: 065b lsls r3, r3, #25
|
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != ((((RCC_OscInitStruct->PLL.PLLQ) >> 1U) - 1U) << RCC_PLLCFGR_PLLQ_Pos)) ||
|
|
8003082: 429a cmp r2, r3
|
|
8003084: d06e beq.n 8003164 <HAL_RCC_OscConfig+0x708>
|
|
{
|
|
/* Check if the PLL is used as system clock or not */
|
|
if(sysclk_source != RCC_CFGR_SWS_PLL)
|
|
8003086: 69bb ldr r3, [r7, #24]
|
|
8003088: 2b0c cmp r3, #12
|
|
800308a: d069 beq.n 8003160 <HAL_RCC_OscConfig+0x704>
|
|
{
|
|
#if defined(RCC_PLLSAI1_SUPPORT) || defined(RCC_PLLSAI2_SUPPORT)
|
|
/* Check if main PLL can be updated */
|
|
/* Not possible if the source is shared by other enabled PLLSAIx */
|
|
if((READ_BIT(RCC->CR, RCC_CR_PLLSAI1ON) != 0U)
|
|
800308c: 4b53 ldr r3, [pc, #332] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
800308e: 681b ldr r3, [r3, #0]
|
|
8003090: f003 6380 and.w r3, r3, #67108864 @ 0x4000000
|
|
8003094: 2b00 cmp r3, #0
|
|
8003096: d105 bne.n 80030a4 <HAL_RCC_OscConfig+0x648>
|
|
#if defined(RCC_PLLSAI2_SUPPORT)
|
|
|| (READ_BIT(RCC->CR, RCC_CR_PLLSAI2ON) != 0U)
|
|
8003098: 4b50 ldr r3, [pc, #320] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
800309a: 681b ldr r3, [r3, #0]
|
|
800309c: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
|
|
80030a0: 2b00 cmp r3, #0
|
|
80030a2: d001 beq.n 80030a8 <HAL_RCC_OscConfig+0x64c>
|
|
#endif
|
|
)
|
|
{
|
|
return HAL_ERROR;
|
|
80030a4: 2301 movs r3, #1
|
|
80030a6: e0ad b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
}
|
|
else
|
|
#endif /* RCC_PLLSAI1_SUPPORT || RCC_PLLSAI2_SUPPORT */
|
|
{
|
|
/* Disable the main PLL. */
|
|
__HAL_RCC_PLL_DISABLE();
|
|
80030a8: 4b4c ldr r3, [pc, #304] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
80030aa: 681b ldr r3, [r3, #0]
|
|
80030ac: 4a4b ldr r2, [pc, #300] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
80030ae: f023 7380 bic.w r3, r3, #16777216 @ 0x1000000
|
|
80030b2: 6013 str r3, [r2, #0]
|
|
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
80030b4: f7fe fcfa bl 8001aac <HAL_GetTick>
|
|
80030b8: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till PLL is ready */
|
|
while(READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U)
|
|
80030ba: e008 b.n 80030ce <HAL_RCC_OscConfig+0x672>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
|
|
80030bc: f7fe fcf6 bl 8001aac <HAL_GetTick>
|
|
80030c0: 4602 mov r2, r0
|
|
80030c2: 693b ldr r3, [r7, #16]
|
|
80030c4: 1ad3 subs r3, r2, r3
|
|
80030c6: 2b02 cmp r3, #2
|
|
80030c8: d901 bls.n 80030ce <HAL_RCC_OscConfig+0x672>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
80030ca: 2303 movs r3, #3
|
|
80030cc: e09a b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
while(READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U)
|
|
80030ce: 4b43 ldr r3, [pc, #268] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
80030d0: 681b ldr r3, [r3, #0]
|
|
80030d2: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
|
|
80030d6: 2b00 cmp r3, #0
|
|
80030d8: d1f0 bne.n 80030bc <HAL_RCC_OscConfig+0x660>
|
|
}
|
|
}
|
|
|
|
/* Configure the main PLL clock source, multiplication and division factors. */
|
|
#if defined(RCC_PLLP_SUPPORT)
|
|
__HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource,
|
|
80030da: 4b40 ldr r3, [pc, #256] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
80030dc: 68da ldr r2, [r3, #12]
|
|
80030de: 4b40 ldr r3, [pc, #256] @ (80031e0 <HAL_RCC_OscConfig+0x784>)
|
|
80030e0: 4013 ands r3, r2
|
|
80030e2: 687a ldr r2, [r7, #4]
|
|
80030e4: 6ad1 ldr r1, [r2, #44] @ 0x2c
|
|
80030e6: 687a ldr r2, [r7, #4]
|
|
80030e8: 6b12 ldr r2, [r2, #48] @ 0x30
|
|
80030ea: 3a01 subs r2, #1
|
|
80030ec: 0112 lsls r2, r2, #4
|
|
80030ee: 4311 orrs r1, r2
|
|
80030f0: 687a ldr r2, [r7, #4]
|
|
80030f2: 6b52 ldr r2, [r2, #52] @ 0x34
|
|
80030f4: 0212 lsls r2, r2, #8
|
|
80030f6: 4311 orrs r1, r2
|
|
80030f8: 687a ldr r2, [r7, #4]
|
|
80030fa: 6bd2 ldr r2, [r2, #60] @ 0x3c
|
|
80030fc: 0852 lsrs r2, r2, #1
|
|
80030fe: 3a01 subs r2, #1
|
|
8003100: 0552 lsls r2, r2, #21
|
|
8003102: 4311 orrs r1, r2
|
|
8003104: 687a ldr r2, [r7, #4]
|
|
8003106: 6c12 ldr r2, [r2, #64] @ 0x40
|
|
8003108: 0852 lsrs r2, r2, #1
|
|
800310a: 3a01 subs r2, #1
|
|
800310c: 0652 lsls r2, r2, #25
|
|
800310e: 4311 orrs r1, r2
|
|
8003110: 687a ldr r2, [r7, #4]
|
|
8003112: 6b92 ldr r2, [r2, #56] @ 0x38
|
|
8003114: 0912 lsrs r2, r2, #4
|
|
8003116: 0452 lsls r2, r2, #17
|
|
8003118: 430a orrs r2, r1
|
|
800311a: 4930 ldr r1, [pc, #192] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
800311c: 4313 orrs r3, r2
|
|
800311e: 60cb str r3, [r1, #12]
|
|
RCC_OscInitStruct->PLL.PLLQ,
|
|
RCC_OscInitStruct->PLL.PLLR);
|
|
#endif
|
|
|
|
/* Enable the main PLL. */
|
|
__HAL_RCC_PLL_ENABLE();
|
|
8003120: 4b2e ldr r3, [pc, #184] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8003122: 681b ldr r3, [r3, #0]
|
|
8003124: 4a2d ldr r2, [pc, #180] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8003126: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000
|
|
800312a: 6013 str r3, [r2, #0]
|
|
|
|
/* Enable PLL System Clock output. */
|
|
__HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_SYSCLK);
|
|
800312c: 4b2b ldr r3, [pc, #172] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
800312e: 68db ldr r3, [r3, #12]
|
|
8003130: 4a2a ldr r2, [pc, #168] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8003132: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000
|
|
8003136: 60d3 str r3, [r2, #12]
|
|
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
8003138: f7fe fcb8 bl 8001aac <HAL_GetTick>
|
|
800313c: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till PLL is ready */
|
|
while(READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U)
|
|
800313e: e008 b.n 8003152 <HAL_RCC_OscConfig+0x6f6>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
|
|
8003140: f7fe fcb4 bl 8001aac <HAL_GetTick>
|
|
8003144: 4602 mov r2, r0
|
|
8003146: 693b ldr r3, [r7, #16]
|
|
8003148: 1ad3 subs r3, r2, r3
|
|
800314a: 2b02 cmp r3, #2
|
|
800314c: d901 bls.n 8003152 <HAL_RCC_OscConfig+0x6f6>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
800314e: 2303 movs r3, #3
|
|
8003150: e058 b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
while(READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U)
|
|
8003152: 4b22 ldr r3, [pc, #136] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8003154: 681b ldr r3, [r3, #0]
|
|
8003156: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
|
|
800315a: 2b00 cmp r3, #0
|
|
800315c: d0f0 beq.n 8003140 <HAL_RCC_OscConfig+0x6e4>
|
|
if(sysclk_source != RCC_CFGR_SWS_PLL)
|
|
800315e: e050 b.n 8003202 <HAL_RCC_OscConfig+0x7a6>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* PLL is already used as System core clock */
|
|
return HAL_ERROR;
|
|
8003160: 2301 movs r3, #1
|
|
8003162: e04f b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
}
|
|
else
|
|
{
|
|
/* PLL configuration is unchanged */
|
|
/* Re-enable PLL if it was disabled (ie. low power mode) */
|
|
if(READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U)
|
|
8003164: 4b1d ldr r3, [pc, #116] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8003166: 681b ldr r3, [r3, #0]
|
|
8003168: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
|
|
800316c: 2b00 cmp r3, #0
|
|
800316e: d148 bne.n 8003202 <HAL_RCC_OscConfig+0x7a6>
|
|
{
|
|
/* Enable the main PLL. */
|
|
__HAL_RCC_PLL_ENABLE();
|
|
8003170: 4b1a ldr r3, [pc, #104] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8003172: 681b ldr r3, [r3, #0]
|
|
8003174: 4a19 ldr r2, [pc, #100] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8003176: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000
|
|
800317a: 6013 str r3, [r2, #0]
|
|
|
|
/* Enable PLL System Clock output. */
|
|
__HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_SYSCLK);
|
|
800317c: 4b17 ldr r3, [pc, #92] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
800317e: 68db ldr r3, [r3, #12]
|
|
8003180: 4a16 ldr r2, [pc, #88] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
8003182: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000
|
|
8003186: 60d3 str r3, [r2, #12]
|
|
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
8003188: f7fe fc90 bl 8001aac <HAL_GetTick>
|
|
800318c: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till PLL is ready */
|
|
while(READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U)
|
|
800318e: e008 b.n 80031a2 <HAL_RCC_OscConfig+0x746>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
|
|
8003190: f7fe fc8c bl 8001aac <HAL_GetTick>
|
|
8003194: 4602 mov r2, r0
|
|
8003196: 693b ldr r3, [r7, #16]
|
|
8003198: 1ad3 subs r3, r2, r3
|
|
800319a: 2b02 cmp r3, #2
|
|
800319c: d901 bls.n 80031a2 <HAL_RCC_OscConfig+0x746>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
800319e: 2303 movs r3, #3
|
|
80031a0: e030 b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
while(READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U)
|
|
80031a2: 4b0e ldr r3, [pc, #56] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
80031a4: 681b ldr r3, [r3, #0]
|
|
80031a6: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
|
|
80031aa: 2b00 cmp r3, #0
|
|
80031ac: d0f0 beq.n 8003190 <HAL_RCC_OscConfig+0x734>
|
|
80031ae: e028 b.n 8003202 <HAL_RCC_OscConfig+0x7a6>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Check that PLL is not used as system clock or not */
|
|
if(sysclk_source != RCC_CFGR_SWS_PLL)
|
|
80031b0: 69bb ldr r3, [r7, #24]
|
|
80031b2: 2b0c cmp r3, #12
|
|
80031b4: d023 beq.n 80031fe <HAL_RCC_OscConfig+0x7a2>
|
|
{
|
|
/* Disable the main PLL. */
|
|
__HAL_RCC_PLL_DISABLE();
|
|
80031b6: 4b09 ldr r3, [pc, #36] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
80031b8: 681b ldr r3, [r3, #0]
|
|
80031ba: 4a08 ldr r2, [pc, #32] @ (80031dc <HAL_RCC_OscConfig+0x780>)
|
|
80031bc: f023 7380 bic.w r3, r3, #16777216 @ 0x1000000
|
|
80031c0: 6013 str r3, [r2, #0]
|
|
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
80031c2: f7fe fc73 bl 8001aac <HAL_GetTick>
|
|
80031c6: 6138 str r0, [r7, #16]
|
|
|
|
/* Wait till PLL is disabled */
|
|
while(READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U)
|
|
80031c8: e00c b.n 80031e4 <HAL_RCC_OscConfig+0x788>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
|
|
80031ca: f7fe fc6f bl 8001aac <HAL_GetTick>
|
|
80031ce: 4602 mov r2, r0
|
|
80031d0: 693b ldr r3, [r7, #16]
|
|
80031d2: 1ad3 subs r3, r2, r3
|
|
80031d4: 2b02 cmp r3, #2
|
|
80031d6: d905 bls.n 80031e4 <HAL_RCC_OscConfig+0x788>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
80031d8: 2303 movs r3, #3
|
|
80031da: e013 b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
80031dc: 40021000 .word 0x40021000
|
|
80031e0: f99d808c .word 0xf99d808c
|
|
while(READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U)
|
|
80031e4: 4b09 ldr r3, [pc, #36] @ (800320c <HAL_RCC_OscConfig+0x7b0>)
|
|
80031e6: 681b ldr r3, [r3, #0]
|
|
80031e8: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
|
|
80031ec: 2b00 cmp r3, #0
|
|
80031ee: d1ec bne.n 80031ca <HAL_RCC_OscConfig+0x76e>
|
|
}
|
|
}
|
|
/* Unselect main PLL clock source and disable main PLL outputs to save power */
|
|
#if defined(RCC_PLLSAI2_SUPPORT)
|
|
RCC->PLLCFGR &= ~(RCC_PLLCFGR_PLLSRC | RCC_PLL_SYSCLK | RCC_PLL_48M1CLK | RCC_PLL_SAI3CLK);
|
|
80031f0: 4b06 ldr r3, [pc, #24] @ (800320c <HAL_RCC_OscConfig+0x7b0>)
|
|
80031f2: 68da ldr r2, [r3, #12]
|
|
80031f4: 4905 ldr r1, [pc, #20] @ (800320c <HAL_RCC_OscConfig+0x7b0>)
|
|
80031f6: 4b06 ldr r3, [pc, #24] @ (8003210 <HAL_RCC_OscConfig+0x7b4>)
|
|
80031f8: 4013 ands r3, r2
|
|
80031fa: 60cb str r3, [r1, #12]
|
|
80031fc: e001 b.n 8003202 <HAL_RCC_OscConfig+0x7a6>
|
|
#endif /* RCC_PLLSAI2_SUPPORT */
|
|
}
|
|
else
|
|
{
|
|
/* PLL is already used as System core clock */
|
|
return HAL_ERROR;
|
|
80031fe: 2301 movs r3, #1
|
|
8003200: e000 b.n 8003204 <HAL_RCC_OscConfig+0x7a8>
|
|
}
|
|
}
|
|
}
|
|
return HAL_OK;
|
|
8003202: 2300 movs r3, #0
|
|
}
|
|
8003204: 4618 mov r0, r3
|
|
8003206: 3720 adds r7, #32
|
|
8003208: 46bd mov sp, r7
|
|
800320a: bd80 pop {r7, pc}
|
|
800320c: 40021000 .word 0x40021000
|
|
8003210: feeefffc .word 0xfeeefffc
|
|
|
|
08003214 <HAL_RCC_ClockConfig>:
|
|
* HPRE[3:0] bits to ensure that HCLK not exceed the maximum allowed frequency
|
|
* (for more details refer to section above "Initialization/de-initialization functions")
|
|
* @retval None
|
|
*/
|
|
HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency)
|
|
{
|
|
8003214: b580 push {r7, lr}
|
|
8003216: b084 sub sp, #16
|
|
8003218: af00 add r7, sp, #0
|
|
800321a: 6078 str r0, [r7, #4]
|
|
800321c: 6039 str r1, [r7, #0]
|
|
uint32_t hpre = RCC_SYSCLK_DIV1;
|
|
#endif
|
|
HAL_StatusTypeDef status;
|
|
|
|
/* Check Null pointer */
|
|
if(RCC_ClkInitStruct == NULL)
|
|
800321e: 687b ldr r3, [r7, #4]
|
|
8003220: 2b00 cmp r3, #0
|
|
8003222: d101 bne.n 8003228 <HAL_RCC_ClockConfig+0x14>
|
|
{
|
|
return HAL_ERROR;
|
|
8003224: 2301 movs r3, #1
|
|
8003226: e0e7 b.n 80033f8 <HAL_RCC_ClockConfig+0x1e4>
|
|
/* 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())
|
|
8003228: 4b75 ldr r3, [pc, #468] @ (8003400 <HAL_RCC_ClockConfig+0x1ec>)
|
|
800322a: 681b ldr r3, [r3, #0]
|
|
800322c: f003 0307 and.w r3, r3, #7
|
|
8003230: 683a ldr r2, [r7, #0]
|
|
8003232: 429a cmp r2, r3
|
|
8003234: d910 bls.n 8003258 <HAL_RCC_ClockConfig+0x44>
|
|
{
|
|
/* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
|
|
__HAL_FLASH_SET_LATENCY(FLatency);
|
|
8003236: 4b72 ldr r3, [pc, #456] @ (8003400 <HAL_RCC_ClockConfig+0x1ec>)
|
|
8003238: 681b ldr r3, [r3, #0]
|
|
800323a: f023 0207 bic.w r2, r3, #7
|
|
800323e: 4970 ldr r1, [pc, #448] @ (8003400 <HAL_RCC_ClockConfig+0x1ec>)
|
|
8003240: 683b ldr r3, [r7, #0]
|
|
8003242: 4313 orrs r3, r2
|
|
8003244: 600b str r3, [r1, #0]
|
|
|
|
/* Check that the new number of wait states is taken into account to access the Flash
|
|
memory by reading the FLASH_ACR register */
|
|
if(__HAL_FLASH_GET_LATENCY() != FLatency)
|
|
8003246: 4b6e ldr r3, [pc, #440] @ (8003400 <HAL_RCC_ClockConfig+0x1ec>)
|
|
8003248: 681b ldr r3, [r3, #0]
|
|
800324a: f003 0307 and.w r3, r3, #7
|
|
800324e: 683a ldr r2, [r7, #0]
|
|
8003250: 429a cmp r2, r3
|
|
8003252: d001 beq.n 8003258 <HAL_RCC_ClockConfig+0x44>
|
|
{
|
|
return HAL_ERROR;
|
|
8003254: 2301 movs r3, #1
|
|
8003256: e0cf b.n 80033f8 <HAL_RCC_ClockConfig+0x1e4>
|
|
}
|
|
}
|
|
|
|
/*----------------- HCLK Configuration prior to SYSCLK----------------------*/
|
|
/* Apply higher HCLK prescaler request here to ensure CPU clock is not of of spec when SYSCLK is increased */
|
|
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
|
|
8003258: 687b ldr r3, [r7, #4]
|
|
800325a: 681b ldr r3, [r3, #0]
|
|
800325c: f003 0302 and.w r3, r3, #2
|
|
8003260: 2b00 cmp r3, #0
|
|
8003262: d010 beq.n 8003286 <HAL_RCC_ClockConfig+0x72>
|
|
{
|
|
assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider));
|
|
|
|
if(RCC_ClkInitStruct->AHBCLKDivider > READ_BIT(RCC->CFGR, RCC_CFGR_HPRE))
|
|
8003264: 687b ldr r3, [r7, #4]
|
|
8003266: 689a ldr r2, [r3, #8]
|
|
8003268: 4b66 ldr r3, [pc, #408] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
800326a: 689b ldr r3, [r3, #8]
|
|
800326c: f003 03f0 and.w r3, r3, #240 @ 0xf0
|
|
8003270: 429a cmp r2, r3
|
|
8003272: d908 bls.n 8003286 <HAL_RCC_ClockConfig+0x72>
|
|
{
|
|
MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
|
|
8003274: 4b63 ldr r3, [pc, #396] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
8003276: 689b ldr r3, [r3, #8]
|
|
8003278: f023 02f0 bic.w r2, r3, #240 @ 0xf0
|
|
800327c: 687b ldr r3, [r7, #4]
|
|
800327e: 689b ldr r3, [r3, #8]
|
|
8003280: 4960 ldr r1, [pc, #384] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
8003282: 4313 orrs r3, r2
|
|
8003284: 608b str r3, [r1, #8]
|
|
}
|
|
}
|
|
|
|
/*------------------------- SYSCLK Configuration ---------------------------*/
|
|
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
|
|
8003286: 687b ldr r3, [r7, #4]
|
|
8003288: 681b ldr r3, [r3, #0]
|
|
800328a: f003 0301 and.w r3, r3, #1
|
|
800328e: 2b00 cmp r3, #0
|
|
8003290: d04c beq.n 800332c <HAL_RCC_ClockConfig+0x118>
|
|
{
|
|
assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource));
|
|
|
|
/* PLL is selected as System Clock Source */
|
|
if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK)
|
|
8003292: 687b ldr r3, [r7, #4]
|
|
8003294: 685b ldr r3, [r3, #4]
|
|
8003296: 2b03 cmp r3, #3
|
|
8003298: d107 bne.n 80032aa <HAL_RCC_ClockConfig+0x96>
|
|
{
|
|
/* Check the PLL ready flag */
|
|
if(READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U)
|
|
800329a: 4b5a ldr r3, [pc, #360] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
800329c: 681b ldr r3, [r3, #0]
|
|
800329e: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
|
|
80032a2: 2b00 cmp r3, #0
|
|
80032a4: d121 bne.n 80032ea <HAL_RCC_ClockConfig+0xd6>
|
|
{
|
|
return HAL_ERROR;
|
|
80032a6: 2301 movs r3, #1
|
|
80032a8: e0a6 b.n 80033f8 <HAL_RCC_ClockConfig+0x1e4>
|
|
#endif
|
|
}
|
|
else
|
|
{
|
|
/* HSE is selected as System Clock Source */
|
|
if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE)
|
|
80032aa: 687b ldr r3, [r7, #4]
|
|
80032ac: 685b ldr r3, [r3, #4]
|
|
80032ae: 2b02 cmp r3, #2
|
|
80032b0: d107 bne.n 80032c2 <HAL_RCC_ClockConfig+0xae>
|
|
{
|
|
/* Check the HSE ready flag */
|
|
if(READ_BIT(RCC->CR, RCC_CR_HSERDY) == 0U)
|
|
80032b2: 4b54 ldr r3, [pc, #336] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
80032b4: 681b ldr r3, [r3, #0]
|
|
80032b6: f403 3300 and.w r3, r3, #131072 @ 0x20000
|
|
80032ba: 2b00 cmp r3, #0
|
|
80032bc: d115 bne.n 80032ea <HAL_RCC_ClockConfig+0xd6>
|
|
{
|
|
return HAL_ERROR;
|
|
80032be: 2301 movs r3, #1
|
|
80032c0: e09a b.n 80033f8 <HAL_RCC_ClockConfig+0x1e4>
|
|
}
|
|
}
|
|
/* MSI is selected as System Clock Source */
|
|
else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_MSI)
|
|
80032c2: 687b ldr r3, [r7, #4]
|
|
80032c4: 685b ldr r3, [r3, #4]
|
|
80032c6: 2b00 cmp r3, #0
|
|
80032c8: d107 bne.n 80032da <HAL_RCC_ClockConfig+0xc6>
|
|
{
|
|
/* Check the MSI ready flag */
|
|
if(READ_BIT(RCC->CR, RCC_CR_MSIRDY) == 0U)
|
|
80032ca: 4b4e ldr r3, [pc, #312] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
80032cc: 681b ldr r3, [r3, #0]
|
|
80032ce: f003 0302 and.w r3, r3, #2
|
|
80032d2: 2b00 cmp r3, #0
|
|
80032d4: d109 bne.n 80032ea <HAL_RCC_ClockConfig+0xd6>
|
|
{
|
|
return HAL_ERROR;
|
|
80032d6: 2301 movs r3, #1
|
|
80032d8: e08e b.n 80033f8 <HAL_RCC_ClockConfig+0x1e4>
|
|
}
|
|
/* HSI is selected as System Clock Source */
|
|
else
|
|
{
|
|
/* Check the HSI ready flag */
|
|
if(READ_BIT(RCC->CR, RCC_CR_HSIRDY) == 0U)
|
|
80032da: 4b4a ldr r3, [pc, #296] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
80032dc: 681b ldr r3, [r3, #0]
|
|
80032de: f403 6380 and.w r3, r3, #1024 @ 0x400
|
|
80032e2: 2b00 cmp r3, #0
|
|
80032e4: d101 bne.n 80032ea <HAL_RCC_ClockConfig+0xd6>
|
|
{
|
|
return HAL_ERROR;
|
|
80032e6: 2301 movs r3, #1
|
|
80032e8: e086 b.n 80033f8 <HAL_RCC_ClockConfig+0x1e4>
|
|
}
|
|
#endif
|
|
|
|
}
|
|
|
|
MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, RCC_ClkInitStruct->SYSCLKSource);
|
|
80032ea: 4b46 ldr r3, [pc, #280] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
80032ec: 689b ldr r3, [r3, #8]
|
|
80032ee: f023 0203 bic.w r2, r3, #3
|
|
80032f2: 687b ldr r3, [r7, #4]
|
|
80032f4: 685b ldr r3, [r3, #4]
|
|
80032f6: 4943 ldr r1, [pc, #268] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
80032f8: 4313 orrs r3, r2
|
|
80032fa: 608b str r3, [r1, #8]
|
|
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
80032fc: f7fe fbd6 bl 8001aac <HAL_GetTick>
|
|
8003300: 60f8 str r0, [r7, #12]
|
|
|
|
while(__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
|
|
8003302: e00a b.n 800331a <HAL_RCC_ClockConfig+0x106>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
|
|
8003304: f7fe fbd2 bl 8001aac <HAL_GetTick>
|
|
8003308: 4602 mov r2, r0
|
|
800330a: 68fb ldr r3, [r7, #12]
|
|
800330c: 1ad3 subs r3, r2, r3
|
|
800330e: f241 3288 movw r2, #5000 @ 0x1388
|
|
8003312: 4293 cmp r3, r2
|
|
8003314: d901 bls.n 800331a <HAL_RCC_ClockConfig+0x106>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8003316: 2303 movs r3, #3
|
|
8003318: e06e b.n 80033f8 <HAL_RCC_ClockConfig+0x1e4>
|
|
while(__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
|
|
800331a: 4b3a ldr r3, [pc, #232] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
800331c: 689b ldr r3, [r3, #8]
|
|
800331e: f003 020c and.w r2, r3, #12
|
|
8003322: 687b ldr r3, [r7, #4]
|
|
8003324: 685b ldr r3, [r3, #4]
|
|
8003326: 009b lsls r3, r3, #2
|
|
8003328: 429a cmp r2, r3
|
|
800332a: d1eb bne.n 8003304 <HAL_RCC_ClockConfig+0xf0>
|
|
}
|
|
#endif
|
|
|
|
/*----------------- HCLK Configuration after SYSCLK-------------------------*/
|
|
/* Apply lower HCLK prescaler request here to ensure CPU clock is not of of spec when SYSCLK is set */
|
|
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
|
|
800332c: 687b ldr r3, [r7, #4]
|
|
800332e: 681b ldr r3, [r3, #0]
|
|
8003330: f003 0302 and.w r3, r3, #2
|
|
8003334: 2b00 cmp r3, #0
|
|
8003336: d010 beq.n 800335a <HAL_RCC_ClockConfig+0x146>
|
|
{
|
|
if(RCC_ClkInitStruct->AHBCLKDivider < READ_BIT(RCC->CFGR, RCC_CFGR_HPRE))
|
|
8003338: 687b ldr r3, [r7, #4]
|
|
800333a: 689a ldr r2, [r3, #8]
|
|
800333c: 4b31 ldr r3, [pc, #196] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
800333e: 689b ldr r3, [r3, #8]
|
|
8003340: f003 03f0 and.w r3, r3, #240 @ 0xf0
|
|
8003344: 429a cmp r2, r3
|
|
8003346: d208 bcs.n 800335a <HAL_RCC_ClockConfig+0x146>
|
|
{
|
|
MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
|
|
8003348: 4b2e ldr r3, [pc, #184] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
800334a: 689b ldr r3, [r3, #8]
|
|
800334c: f023 02f0 bic.w r2, r3, #240 @ 0xf0
|
|
8003350: 687b ldr r3, [r7, #4]
|
|
8003352: 689b ldr r3, [r3, #8]
|
|
8003354: 492b ldr r1, [pc, #172] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
8003356: 4313 orrs r3, r2
|
|
8003358: 608b str r3, [r1, #8]
|
|
}
|
|
}
|
|
|
|
/* Allow decreasing of the number of wait states (because of lower CPU frequency expected) */
|
|
if(FLatency < __HAL_FLASH_GET_LATENCY())
|
|
800335a: 4b29 ldr r3, [pc, #164] @ (8003400 <HAL_RCC_ClockConfig+0x1ec>)
|
|
800335c: 681b ldr r3, [r3, #0]
|
|
800335e: f003 0307 and.w r3, r3, #7
|
|
8003362: 683a ldr r2, [r7, #0]
|
|
8003364: 429a cmp r2, r3
|
|
8003366: d210 bcs.n 800338a <HAL_RCC_ClockConfig+0x176>
|
|
{
|
|
/* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
|
|
__HAL_FLASH_SET_LATENCY(FLatency);
|
|
8003368: 4b25 ldr r3, [pc, #148] @ (8003400 <HAL_RCC_ClockConfig+0x1ec>)
|
|
800336a: 681b ldr r3, [r3, #0]
|
|
800336c: f023 0207 bic.w r2, r3, #7
|
|
8003370: 4923 ldr r1, [pc, #140] @ (8003400 <HAL_RCC_ClockConfig+0x1ec>)
|
|
8003372: 683b ldr r3, [r7, #0]
|
|
8003374: 4313 orrs r3, r2
|
|
8003376: 600b str r3, [r1, #0]
|
|
|
|
/* Check that the new number of wait states is taken into account to access the Flash
|
|
memory by reading the FLASH_ACR register */
|
|
if(__HAL_FLASH_GET_LATENCY() != FLatency)
|
|
8003378: 4b21 ldr r3, [pc, #132] @ (8003400 <HAL_RCC_ClockConfig+0x1ec>)
|
|
800337a: 681b ldr r3, [r3, #0]
|
|
800337c: f003 0307 and.w r3, r3, #7
|
|
8003380: 683a ldr r2, [r7, #0]
|
|
8003382: 429a cmp r2, r3
|
|
8003384: d001 beq.n 800338a <HAL_RCC_ClockConfig+0x176>
|
|
{
|
|
return HAL_ERROR;
|
|
8003386: 2301 movs r3, #1
|
|
8003388: e036 b.n 80033f8 <HAL_RCC_ClockConfig+0x1e4>
|
|
}
|
|
}
|
|
|
|
/*-------------------------- PCLK1 Configuration ---------------------------*/
|
|
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
|
|
800338a: 687b ldr r3, [r7, #4]
|
|
800338c: 681b ldr r3, [r3, #0]
|
|
800338e: f003 0304 and.w r3, r3, #4
|
|
8003392: 2b00 cmp r3, #0
|
|
8003394: d008 beq.n 80033a8 <HAL_RCC_ClockConfig+0x194>
|
|
{
|
|
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider));
|
|
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider);
|
|
8003396: 4b1b ldr r3, [pc, #108] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
8003398: 689b ldr r3, [r3, #8]
|
|
800339a: f423 62e0 bic.w r2, r3, #1792 @ 0x700
|
|
800339e: 687b ldr r3, [r7, #4]
|
|
80033a0: 68db ldr r3, [r3, #12]
|
|
80033a2: 4918 ldr r1, [pc, #96] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
80033a4: 4313 orrs r3, r2
|
|
80033a6: 608b str r3, [r1, #8]
|
|
}
|
|
|
|
/*-------------------------- PCLK2 Configuration ---------------------------*/
|
|
if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
|
|
80033a8: 687b ldr r3, [r7, #4]
|
|
80033aa: 681b ldr r3, [r3, #0]
|
|
80033ac: f003 0308 and.w r3, r3, #8
|
|
80033b0: 2b00 cmp r3, #0
|
|
80033b2: d009 beq.n 80033c8 <HAL_RCC_ClockConfig+0x1b4>
|
|
{
|
|
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider));
|
|
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3U));
|
|
80033b4: 4b13 ldr r3, [pc, #76] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
80033b6: 689b ldr r3, [r3, #8]
|
|
80033b8: f423 5260 bic.w r2, r3, #14336 @ 0x3800
|
|
80033bc: 687b ldr r3, [r7, #4]
|
|
80033be: 691b ldr r3, [r3, #16]
|
|
80033c0: 00db lsls r3, r3, #3
|
|
80033c2: 4910 ldr r1, [pc, #64] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
80033c4: 4313 orrs r3, r2
|
|
80033c6: 608b str r3, [r1, #8]
|
|
}
|
|
|
|
/* Update the SystemCoreClock global variable */
|
|
SystemCoreClock = HAL_RCC_GetSysClockFreq() >> (AHBPrescTable[READ_BIT(RCC->CFGR, RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos] & 0x1FU);
|
|
80033c8: f000 f824 bl 8003414 <HAL_RCC_GetSysClockFreq>
|
|
80033cc: 4602 mov r2, r0
|
|
80033ce: 4b0d ldr r3, [pc, #52] @ (8003404 <HAL_RCC_ClockConfig+0x1f0>)
|
|
80033d0: 689b ldr r3, [r3, #8]
|
|
80033d2: 091b lsrs r3, r3, #4
|
|
80033d4: f003 030f and.w r3, r3, #15
|
|
80033d8: 490b ldr r1, [pc, #44] @ (8003408 <HAL_RCC_ClockConfig+0x1f4>)
|
|
80033da: 5ccb ldrb r3, [r1, r3]
|
|
80033dc: f003 031f and.w r3, r3, #31
|
|
80033e0: fa22 f303 lsr.w r3, r2, r3
|
|
80033e4: 4a09 ldr r2, [pc, #36] @ (800340c <HAL_RCC_ClockConfig+0x1f8>)
|
|
80033e6: 6013 str r3, [r2, #0]
|
|
|
|
/* Configure the source of time base considering new system clocks settings*/
|
|
status = HAL_InitTick(uwTickPrio);
|
|
80033e8: 4b09 ldr r3, [pc, #36] @ (8003410 <HAL_RCC_ClockConfig+0x1fc>)
|
|
80033ea: 681b ldr r3, [r3, #0]
|
|
80033ec: 4618 mov r0, r3
|
|
80033ee: f7fe fb0d bl 8001a0c <HAL_InitTick>
|
|
80033f2: 4603 mov r3, r0
|
|
80033f4: 72fb strb r3, [r7, #11]
|
|
|
|
return status;
|
|
80033f6: 7afb ldrb r3, [r7, #11]
|
|
}
|
|
80033f8: 4618 mov r0, r3
|
|
80033fa: 3710 adds r7, #16
|
|
80033fc: 46bd mov sp, r7
|
|
80033fe: bd80 pop {r7, pc}
|
|
8003400: 40022000 .word 0x40022000
|
|
8003404: 40021000 .word 0x40021000
|
|
8003408: 08008998 .word 0x08008998
|
|
800340c: 20000000 .word 0x20000000
|
|
8003410: 20000004 .word 0x20000004
|
|
|
|
08003414 <HAL_RCC_GetSysClockFreq>:
|
|
*
|
|
*
|
|
* @retval SYSCLK frequency
|
|
*/
|
|
uint32_t HAL_RCC_GetSysClockFreq(void)
|
|
{
|
|
8003414: b480 push {r7}
|
|
8003416: b089 sub sp, #36 @ 0x24
|
|
8003418: af00 add r7, sp, #0
|
|
uint32_t msirange = 0U, sysclockfreq = 0U;
|
|
800341a: 2300 movs r3, #0
|
|
800341c: 61fb str r3, [r7, #28]
|
|
800341e: 2300 movs r3, #0
|
|
8003420: 61bb str r3, [r7, #24]
|
|
uint32_t pllvco, pllsource, pllr, pllm; /* no init needed */
|
|
uint32_t sysclk_source, pll_oscsource;
|
|
|
|
sysclk_source = __HAL_RCC_GET_SYSCLK_SOURCE();
|
|
8003422: 4b3e ldr r3, [pc, #248] @ (800351c <HAL_RCC_GetSysClockFreq+0x108>)
|
|
8003424: 689b ldr r3, [r3, #8]
|
|
8003426: f003 030c and.w r3, r3, #12
|
|
800342a: 613b str r3, [r7, #16]
|
|
pll_oscsource = __HAL_RCC_GET_PLL_OSCSOURCE();
|
|
800342c: 4b3b ldr r3, [pc, #236] @ (800351c <HAL_RCC_GetSysClockFreq+0x108>)
|
|
800342e: 68db ldr r3, [r3, #12]
|
|
8003430: f003 0303 and.w r3, r3, #3
|
|
8003434: 60fb str r3, [r7, #12]
|
|
|
|
if((sysclk_source == RCC_CFGR_SWS_MSI) ||
|
|
8003436: 693b ldr r3, [r7, #16]
|
|
8003438: 2b00 cmp r3, #0
|
|
800343a: d005 beq.n 8003448 <HAL_RCC_GetSysClockFreq+0x34>
|
|
800343c: 693b ldr r3, [r7, #16]
|
|
800343e: 2b0c cmp r3, #12
|
|
8003440: d121 bne.n 8003486 <HAL_RCC_GetSysClockFreq+0x72>
|
|
((sysclk_source == RCC_CFGR_SWS_PLL) && (pll_oscsource == RCC_PLLSOURCE_MSI)))
|
|
8003442: 68fb ldr r3, [r7, #12]
|
|
8003444: 2b01 cmp r3, #1
|
|
8003446: d11e bne.n 8003486 <HAL_RCC_GetSysClockFreq+0x72>
|
|
{
|
|
/* MSI or PLL with MSI source used as system clock source */
|
|
|
|
/* Get SYSCLK source */
|
|
if(READ_BIT(RCC->CR, RCC_CR_MSIRGSEL) == 0U)
|
|
8003448: 4b34 ldr r3, [pc, #208] @ (800351c <HAL_RCC_GetSysClockFreq+0x108>)
|
|
800344a: 681b ldr r3, [r3, #0]
|
|
800344c: f003 0308 and.w r3, r3, #8
|
|
8003450: 2b00 cmp r3, #0
|
|
8003452: d107 bne.n 8003464 <HAL_RCC_GetSysClockFreq+0x50>
|
|
{ /* MSISRANGE from RCC_CSR applies */
|
|
msirange = READ_BIT(RCC->CSR, RCC_CSR_MSISRANGE) >> RCC_CSR_MSISRANGE_Pos;
|
|
8003454: 4b31 ldr r3, [pc, #196] @ (800351c <HAL_RCC_GetSysClockFreq+0x108>)
|
|
8003456: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94
|
|
800345a: 0a1b lsrs r3, r3, #8
|
|
800345c: f003 030f and.w r3, r3, #15
|
|
8003460: 61fb str r3, [r7, #28]
|
|
8003462: e005 b.n 8003470 <HAL_RCC_GetSysClockFreq+0x5c>
|
|
}
|
|
else
|
|
{ /* MSIRANGE from RCC_CR applies */
|
|
msirange = READ_BIT(RCC->CR, RCC_CR_MSIRANGE) >> RCC_CR_MSIRANGE_Pos;
|
|
8003464: 4b2d ldr r3, [pc, #180] @ (800351c <HAL_RCC_GetSysClockFreq+0x108>)
|
|
8003466: 681b ldr r3, [r3, #0]
|
|
8003468: 091b lsrs r3, r3, #4
|
|
800346a: f003 030f and.w r3, r3, #15
|
|
800346e: 61fb str r3, [r7, #28]
|
|
}
|
|
/*MSI frequency range in HZ*/
|
|
msirange = MSIRangeTable[msirange];
|
|
8003470: 4a2b ldr r2, [pc, #172] @ (8003520 <HAL_RCC_GetSysClockFreq+0x10c>)
|
|
8003472: 69fb ldr r3, [r7, #28]
|
|
8003474: f852 3023 ldr.w r3, [r2, r3, lsl #2]
|
|
8003478: 61fb str r3, [r7, #28]
|
|
|
|
if(sysclk_source == RCC_CFGR_SWS_MSI)
|
|
800347a: 693b ldr r3, [r7, #16]
|
|
800347c: 2b00 cmp r3, #0
|
|
800347e: d10d bne.n 800349c <HAL_RCC_GetSysClockFreq+0x88>
|
|
{
|
|
/* MSI used as system clock source */
|
|
sysclockfreq = msirange;
|
|
8003480: 69fb ldr r3, [r7, #28]
|
|
8003482: 61bb str r3, [r7, #24]
|
|
if(sysclk_source == RCC_CFGR_SWS_MSI)
|
|
8003484: e00a b.n 800349c <HAL_RCC_GetSysClockFreq+0x88>
|
|
}
|
|
}
|
|
else if(sysclk_source == RCC_CFGR_SWS_HSI)
|
|
8003486: 693b ldr r3, [r7, #16]
|
|
8003488: 2b04 cmp r3, #4
|
|
800348a: d102 bne.n 8003492 <HAL_RCC_GetSysClockFreq+0x7e>
|
|
{
|
|
/* HSI used as system clock source */
|
|
sysclockfreq = HSI_VALUE;
|
|
800348c: 4b25 ldr r3, [pc, #148] @ (8003524 <HAL_RCC_GetSysClockFreq+0x110>)
|
|
800348e: 61bb str r3, [r7, #24]
|
|
8003490: e004 b.n 800349c <HAL_RCC_GetSysClockFreq+0x88>
|
|
}
|
|
else if(sysclk_source == RCC_CFGR_SWS_HSE)
|
|
8003492: 693b ldr r3, [r7, #16]
|
|
8003494: 2b08 cmp r3, #8
|
|
8003496: d101 bne.n 800349c <HAL_RCC_GetSysClockFreq+0x88>
|
|
{
|
|
/* HSE used as system clock source */
|
|
sysclockfreq = HSE_VALUE;
|
|
8003498: 4b23 ldr r3, [pc, #140] @ (8003528 <HAL_RCC_GetSysClockFreq+0x114>)
|
|
800349a: 61bb str r3, [r7, #24]
|
|
else
|
|
{
|
|
/* unexpected case: sysclockfreq at 0 */
|
|
}
|
|
|
|
if(sysclk_source == RCC_CFGR_SWS_PLL)
|
|
800349c: 693b ldr r3, [r7, #16]
|
|
800349e: 2b0c cmp r3, #12
|
|
80034a0: d134 bne.n 800350c <HAL_RCC_GetSysClockFreq+0xf8>
|
|
/* PLL used as system clock source */
|
|
|
|
/* PLL_VCO = (HSE_VALUE or HSI_VALUE or MSI_VALUE) * PLLN / PLLM
|
|
SYSCLK = PLL_VCO / PLLR
|
|
*/
|
|
pllsource = READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC);
|
|
80034a2: 4b1e ldr r3, [pc, #120] @ (800351c <HAL_RCC_GetSysClockFreq+0x108>)
|
|
80034a4: 68db ldr r3, [r3, #12]
|
|
80034a6: f003 0303 and.w r3, r3, #3
|
|
80034aa: 60bb str r3, [r7, #8]
|
|
|
|
switch (pllsource)
|
|
80034ac: 68bb ldr r3, [r7, #8]
|
|
80034ae: 2b02 cmp r3, #2
|
|
80034b0: d003 beq.n 80034ba <HAL_RCC_GetSysClockFreq+0xa6>
|
|
80034b2: 68bb ldr r3, [r7, #8]
|
|
80034b4: 2b03 cmp r3, #3
|
|
80034b6: d003 beq.n 80034c0 <HAL_RCC_GetSysClockFreq+0xac>
|
|
80034b8: e005 b.n 80034c6 <HAL_RCC_GetSysClockFreq+0xb2>
|
|
{
|
|
case RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */
|
|
pllvco = HSI_VALUE;
|
|
80034ba: 4b1a ldr r3, [pc, #104] @ (8003524 <HAL_RCC_GetSysClockFreq+0x110>)
|
|
80034bc: 617b str r3, [r7, #20]
|
|
break;
|
|
80034be: e005 b.n 80034cc <HAL_RCC_GetSysClockFreq+0xb8>
|
|
|
|
case RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */
|
|
pllvco = HSE_VALUE;
|
|
80034c0: 4b19 ldr r3, [pc, #100] @ (8003528 <HAL_RCC_GetSysClockFreq+0x114>)
|
|
80034c2: 617b str r3, [r7, #20]
|
|
break;
|
|
80034c4: e002 b.n 80034cc <HAL_RCC_GetSysClockFreq+0xb8>
|
|
|
|
case RCC_PLLSOURCE_MSI: /* MSI used as PLL clock source */
|
|
default:
|
|
pllvco = msirange;
|
|
80034c6: 69fb ldr r3, [r7, #28]
|
|
80034c8: 617b str r3, [r7, #20]
|
|
break;
|
|
80034ca: bf00 nop
|
|
}
|
|
pllm = (READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLM) >> RCC_PLLCFGR_PLLM_Pos) + 1U ;
|
|
80034cc: 4b13 ldr r3, [pc, #76] @ (800351c <HAL_RCC_GetSysClockFreq+0x108>)
|
|
80034ce: 68db ldr r3, [r3, #12]
|
|
80034d0: 091b lsrs r3, r3, #4
|
|
80034d2: f003 0307 and.w r3, r3, #7
|
|
80034d6: 3301 adds r3, #1
|
|
80034d8: 607b str r3, [r7, #4]
|
|
pllvco = (pllvco * (READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)) / pllm;
|
|
80034da: 4b10 ldr r3, [pc, #64] @ (800351c <HAL_RCC_GetSysClockFreq+0x108>)
|
|
80034dc: 68db ldr r3, [r3, #12]
|
|
80034de: 0a1b lsrs r3, r3, #8
|
|
80034e0: f003 037f and.w r3, r3, #127 @ 0x7f
|
|
80034e4: 697a ldr r2, [r7, #20]
|
|
80034e6: fb03 f202 mul.w r2, r3, r2
|
|
80034ea: 687b ldr r3, [r7, #4]
|
|
80034ec: fbb2 f3f3 udiv r3, r2, r3
|
|
80034f0: 617b str r3, [r7, #20]
|
|
pllr = ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLR) >> RCC_PLLCFGR_PLLR_Pos) + 1U ) * 2U;
|
|
80034f2: 4b0a ldr r3, [pc, #40] @ (800351c <HAL_RCC_GetSysClockFreq+0x108>)
|
|
80034f4: 68db ldr r3, [r3, #12]
|
|
80034f6: 0e5b lsrs r3, r3, #25
|
|
80034f8: f003 0303 and.w r3, r3, #3
|
|
80034fc: 3301 adds r3, #1
|
|
80034fe: 005b lsls r3, r3, #1
|
|
8003500: 603b str r3, [r7, #0]
|
|
sysclockfreq = pllvco / pllr;
|
|
8003502: 697a ldr r2, [r7, #20]
|
|
8003504: 683b ldr r3, [r7, #0]
|
|
8003506: fbb2 f3f3 udiv r3, r2, r3
|
|
800350a: 61bb str r3, [r7, #24]
|
|
}
|
|
|
|
return sysclockfreq;
|
|
800350c: 69bb ldr r3, [r7, #24]
|
|
}
|
|
800350e: 4618 mov r0, r3
|
|
8003510: 3724 adds r7, #36 @ 0x24
|
|
8003512: 46bd mov sp, r7
|
|
8003514: f85d 7b04 ldr.w r7, [sp], #4
|
|
8003518: 4770 bx lr
|
|
800351a: bf00 nop
|
|
800351c: 40021000 .word 0x40021000
|
|
8003520: 080089b0 .word 0x080089b0
|
|
8003524: 00f42400 .word 0x00f42400
|
|
8003528: 007a1200 .word 0x007a1200
|
|
|
|
0800352c <HAL_RCC_GetHCLKFreq>:
|
|
*
|
|
* @note The SystemCoreClock CMSIS variable is used to store System Clock Frequency.
|
|
* @retval HCLK frequency in Hz
|
|
*/
|
|
uint32_t HAL_RCC_GetHCLKFreq(void)
|
|
{
|
|
800352c: b480 push {r7}
|
|
800352e: af00 add r7, sp, #0
|
|
return SystemCoreClock;
|
|
8003530: 4b03 ldr r3, [pc, #12] @ (8003540 <HAL_RCC_GetHCLKFreq+0x14>)
|
|
8003532: 681b ldr r3, [r3, #0]
|
|
}
|
|
8003534: 4618 mov r0, r3
|
|
8003536: 46bd mov sp, r7
|
|
8003538: f85d 7b04 ldr.w r7, [sp], #4
|
|
800353c: 4770 bx lr
|
|
800353e: bf00 nop
|
|
8003540: 20000000 .word 0x20000000
|
|
|
|
08003544 <HAL_RCC_GetPCLK1Freq>:
|
|
* @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 in Hz
|
|
*/
|
|
uint32_t HAL_RCC_GetPCLK1Freq(void)
|
|
{
|
|
8003544: b580 push {r7, lr}
|
|
8003546: af00 add r7, sp, #0
|
|
/* Get HCLK source and Compute PCLK1 frequency ---------------------------*/
|
|
return (HAL_RCC_GetHCLKFreq() >> (APBPrescTable[READ_BIT(RCC->CFGR, RCC_CFGR_PPRE1) >> RCC_CFGR_PPRE1_Pos] & 0x1FU));
|
|
8003548: f7ff fff0 bl 800352c <HAL_RCC_GetHCLKFreq>
|
|
800354c: 4602 mov r2, r0
|
|
800354e: 4b06 ldr r3, [pc, #24] @ (8003568 <HAL_RCC_GetPCLK1Freq+0x24>)
|
|
8003550: 689b ldr r3, [r3, #8]
|
|
8003552: 0a1b lsrs r3, r3, #8
|
|
8003554: f003 0307 and.w r3, r3, #7
|
|
8003558: 4904 ldr r1, [pc, #16] @ (800356c <HAL_RCC_GetPCLK1Freq+0x28>)
|
|
800355a: 5ccb ldrb r3, [r1, r3]
|
|
800355c: f003 031f and.w r3, r3, #31
|
|
8003560: fa22 f303 lsr.w r3, r2, r3
|
|
}
|
|
8003564: 4618 mov r0, r3
|
|
8003566: bd80 pop {r7, pc}
|
|
8003568: 40021000 .word 0x40021000
|
|
800356c: 080089a8 .word 0x080089a8
|
|
|
|
08003570 <HAL_RCC_GetPCLK2Freq>:
|
|
* @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 in Hz
|
|
*/
|
|
uint32_t HAL_RCC_GetPCLK2Freq(void)
|
|
{
|
|
8003570: b580 push {r7, lr}
|
|
8003572: af00 add r7, sp, #0
|
|
/* Get HCLK source and Compute PCLK2 frequency ---------------------------*/
|
|
return (HAL_RCC_GetHCLKFreq()>> (APBPrescTable[READ_BIT(RCC->CFGR, RCC_CFGR_PPRE2) >> RCC_CFGR_PPRE2_Pos] & 0x1FU));
|
|
8003574: f7ff ffda bl 800352c <HAL_RCC_GetHCLKFreq>
|
|
8003578: 4602 mov r2, r0
|
|
800357a: 4b06 ldr r3, [pc, #24] @ (8003594 <HAL_RCC_GetPCLK2Freq+0x24>)
|
|
800357c: 689b ldr r3, [r3, #8]
|
|
800357e: 0adb lsrs r3, r3, #11
|
|
8003580: f003 0307 and.w r3, r3, #7
|
|
8003584: 4904 ldr r1, [pc, #16] @ (8003598 <HAL_RCC_GetPCLK2Freq+0x28>)
|
|
8003586: 5ccb ldrb r3, [r1, r3]
|
|
8003588: f003 031f and.w r3, r3, #31
|
|
800358c: fa22 f303 lsr.w r3, r2, r3
|
|
}
|
|
8003590: 4618 mov r0, r3
|
|
8003592: bd80 pop {r7, pc}
|
|
8003594: 40021000 .word 0x40021000
|
|
8003598: 080089a8 .word 0x080089a8
|
|
|
|
0800359c <RCC_SetFlashLatencyFromMSIRange>:
|
|
voltage range.
|
|
* @param msirange MSI range value from RCC_MSIRANGE_0 to RCC_MSIRANGE_11
|
|
* @retval HAL status
|
|
*/
|
|
static HAL_StatusTypeDef RCC_SetFlashLatencyFromMSIRange(uint32_t msirange)
|
|
{
|
|
800359c: b580 push {r7, lr}
|
|
800359e: b086 sub sp, #24
|
|
80035a0: af00 add r7, sp, #0
|
|
80035a2: 6078 str r0, [r7, #4]
|
|
uint32_t vos;
|
|
uint32_t latency = FLASH_LATENCY_0; /* default value 0WS */
|
|
80035a4: 2300 movs r3, #0
|
|
80035a6: 613b str r3, [r7, #16]
|
|
|
|
if(__HAL_RCC_PWR_IS_CLK_ENABLED())
|
|
80035a8: 4b2a ldr r3, [pc, #168] @ (8003654 <RCC_SetFlashLatencyFromMSIRange+0xb8>)
|
|
80035aa: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
80035ac: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
|
|
80035b0: 2b00 cmp r3, #0
|
|
80035b2: d003 beq.n 80035bc <RCC_SetFlashLatencyFromMSIRange+0x20>
|
|
{
|
|
vos = HAL_PWREx_GetVoltageRange();
|
|
80035b4: f7ff f922 bl 80027fc <HAL_PWREx_GetVoltageRange>
|
|
80035b8: 6178 str r0, [r7, #20]
|
|
80035ba: e014 b.n 80035e6 <RCC_SetFlashLatencyFromMSIRange+0x4a>
|
|
}
|
|
else
|
|
{
|
|
__HAL_RCC_PWR_CLK_ENABLE();
|
|
80035bc: 4b25 ldr r3, [pc, #148] @ (8003654 <RCC_SetFlashLatencyFromMSIRange+0xb8>)
|
|
80035be: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
80035c0: 4a24 ldr r2, [pc, #144] @ (8003654 <RCC_SetFlashLatencyFromMSIRange+0xb8>)
|
|
80035c2: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000
|
|
80035c6: 6593 str r3, [r2, #88] @ 0x58
|
|
80035c8: 4b22 ldr r3, [pc, #136] @ (8003654 <RCC_SetFlashLatencyFromMSIRange+0xb8>)
|
|
80035ca: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
80035cc: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
|
|
80035d0: 60fb str r3, [r7, #12]
|
|
80035d2: 68fb ldr r3, [r7, #12]
|
|
vos = HAL_PWREx_GetVoltageRange();
|
|
80035d4: f7ff f912 bl 80027fc <HAL_PWREx_GetVoltageRange>
|
|
80035d8: 6178 str r0, [r7, #20]
|
|
__HAL_RCC_PWR_CLK_DISABLE();
|
|
80035da: 4b1e ldr r3, [pc, #120] @ (8003654 <RCC_SetFlashLatencyFromMSIRange+0xb8>)
|
|
80035dc: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
80035de: 4a1d ldr r2, [pc, #116] @ (8003654 <RCC_SetFlashLatencyFromMSIRange+0xb8>)
|
|
80035e0: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000
|
|
80035e4: 6593 str r3, [r2, #88] @ 0x58
|
|
}
|
|
|
|
if(vos == PWR_REGULATOR_VOLTAGE_SCALE1)
|
|
80035e6: 697b ldr r3, [r7, #20]
|
|
80035e8: f5b3 7f00 cmp.w r3, #512 @ 0x200
|
|
80035ec: d10b bne.n 8003606 <RCC_SetFlashLatencyFromMSIRange+0x6a>
|
|
{
|
|
if(msirange > RCC_MSIRANGE_8)
|
|
80035ee: 687b ldr r3, [r7, #4]
|
|
80035f0: 2b80 cmp r3, #128 @ 0x80
|
|
80035f2: d919 bls.n 8003628 <RCC_SetFlashLatencyFromMSIRange+0x8c>
|
|
{
|
|
/* MSI > 16Mhz */
|
|
if(msirange > RCC_MSIRANGE_10)
|
|
80035f4: 687b ldr r3, [r7, #4]
|
|
80035f6: 2ba0 cmp r3, #160 @ 0xa0
|
|
80035f8: d902 bls.n 8003600 <RCC_SetFlashLatencyFromMSIRange+0x64>
|
|
{
|
|
/* MSI 48Mhz */
|
|
latency = FLASH_LATENCY_2; /* 2WS */
|
|
80035fa: 2302 movs r3, #2
|
|
80035fc: 613b str r3, [r7, #16]
|
|
80035fe: e013 b.n 8003628 <RCC_SetFlashLatencyFromMSIRange+0x8c>
|
|
}
|
|
else
|
|
{
|
|
/* MSI 24Mhz or 32Mhz */
|
|
latency = FLASH_LATENCY_1; /* 1WS */
|
|
8003600: 2301 movs r3, #1
|
|
8003602: 613b str r3, [r7, #16]
|
|
8003604: e010 b.n 8003628 <RCC_SetFlashLatencyFromMSIRange+0x8c>
|
|
latency = FLASH_LATENCY_1; /* 1WS */
|
|
}
|
|
/* else MSI < 8Mhz default FLASH_LATENCY_0 0WS */
|
|
}
|
|
#else
|
|
if(msirange > RCC_MSIRANGE_8)
|
|
8003606: 687b ldr r3, [r7, #4]
|
|
8003608: 2b80 cmp r3, #128 @ 0x80
|
|
800360a: d902 bls.n 8003612 <RCC_SetFlashLatencyFromMSIRange+0x76>
|
|
{
|
|
/* MSI > 16Mhz */
|
|
latency = FLASH_LATENCY_3; /* 3WS */
|
|
800360c: 2303 movs r3, #3
|
|
800360e: 613b str r3, [r7, #16]
|
|
8003610: e00a b.n 8003628 <RCC_SetFlashLatencyFromMSIRange+0x8c>
|
|
}
|
|
else
|
|
{
|
|
if(msirange == RCC_MSIRANGE_8)
|
|
8003612: 687b ldr r3, [r7, #4]
|
|
8003614: 2b80 cmp r3, #128 @ 0x80
|
|
8003616: d102 bne.n 800361e <RCC_SetFlashLatencyFromMSIRange+0x82>
|
|
{
|
|
/* MSI 16Mhz */
|
|
latency = FLASH_LATENCY_2; /* 2WS */
|
|
8003618: 2302 movs r3, #2
|
|
800361a: 613b str r3, [r7, #16]
|
|
800361c: e004 b.n 8003628 <RCC_SetFlashLatencyFromMSIRange+0x8c>
|
|
}
|
|
else if(msirange == RCC_MSIRANGE_7)
|
|
800361e: 687b ldr r3, [r7, #4]
|
|
8003620: 2b70 cmp r3, #112 @ 0x70
|
|
8003622: d101 bne.n 8003628 <RCC_SetFlashLatencyFromMSIRange+0x8c>
|
|
{
|
|
/* MSI 8Mhz */
|
|
latency = FLASH_LATENCY_1; /* 1WS */
|
|
8003624: 2301 movs r3, #1
|
|
8003626: 613b str r3, [r7, #16]
|
|
}
|
|
}
|
|
#endif
|
|
}
|
|
|
|
__HAL_FLASH_SET_LATENCY(latency);
|
|
8003628: 4b0b ldr r3, [pc, #44] @ (8003658 <RCC_SetFlashLatencyFromMSIRange+0xbc>)
|
|
800362a: 681b ldr r3, [r3, #0]
|
|
800362c: f023 0207 bic.w r2, r3, #7
|
|
8003630: 4909 ldr r1, [pc, #36] @ (8003658 <RCC_SetFlashLatencyFromMSIRange+0xbc>)
|
|
8003632: 693b ldr r3, [r7, #16]
|
|
8003634: 4313 orrs r3, r2
|
|
8003636: 600b str r3, [r1, #0]
|
|
|
|
/* Check that the new number of wait states is taken into account to access the Flash
|
|
memory by reading the FLASH_ACR register */
|
|
if(__HAL_FLASH_GET_LATENCY() != latency)
|
|
8003638: 4b07 ldr r3, [pc, #28] @ (8003658 <RCC_SetFlashLatencyFromMSIRange+0xbc>)
|
|
800363a: 681b ldr r3, [r3, #0]
|
|
800363c: f003 0307 and.w r3, r3, #7
|
|
8003640: 693a ldr r2, [r7, #16]
|
|
8003642: 429a cmp r2, r3
|
|
8003644: d001 beq.n 800364a <RCC_SetFlashLatencyFromMSIRange+0xae>
|
|
{
|
|
return HAL_ERROR;
|
|
8003646: 2301 movs r3, #1
|
|
8003648: e000 b.n 800364c <RCC_SetFlashLatencyFromMSIRange+0xb0>
|
|
}
|
|
|
|
return HAL_OK;
|
|
800364a: 2300 movs r3, #0
|
|
}
|
|
800364c: 4618 mov r0, r3
|
|
800364e: 3718 adds r7, #24
|
|
8003650: 46bd mov sp, r7
|
|
8003652: bd80 pop {r7, pc}
|
|
8003654: 40021000 .word 0x40021000
|
|
8003658: 40022000 .word 0x40022000
|
|
|
|
0800365c <HAL_RCCEx_PeriphCLKConfig>:
|
|
* the RTC clock source: in this case the access to Backup domain is enabled.
|
|
*
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit)
|
|
{
|
|
800365c: b580 push {r7, lr}
|
|
800365e: b086 sub sp, #24
|
|
8003660: af00 add r7, sp, #0
|
|
8003662: 6078 str r0, [r7, #4]
|
|
uint32_t tmpregister, tickstart; /* no init needed */
|
|
HAL_StatusTypeDef ret = HAL_OK; /* Intermediate status */
|
|
8003664: 2300 movs r3, #0
|
|
8003666: 74fb strb r3, [r7, #19]
|
|
HAL_StatusTypeDef status = HAL_OK; /* Final status */
|
|
8003668: 2300 movs r3, #0
|
|
800366a: 74bb strb r3, [r7, #18]
|
|
assert_param(IS_RCC_PERIPHCLOCK(PeriphClkInit->PeriphClockSelection));
|
|
|
|
#if defined(SAI1)
|
|
|
|
/*-------------------------- SAI1 clock source configuration ---------------------*/
|
|
if((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1))
|
|
800366c: 687b ldr r3, [r7, #4]
|
|
800366e: 681b ldr r3, [r3, #0]
|
|
8003670: f403 6300 and.w r3, r3, #2048 @ 0x800
|
|
8003674: 2b00 cmp r3, #0
|
|
8003676: d041 beq.n 80036fc <HAL_RCCEx_PeriphCLKConfig+0xa0>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_SAI1CLK(PeriphClkInit->Sai1ClockSelection));
|
|
|
|
switch(PeriphClkInit->Sai1ClockSelection)
|
|
8003678: 687b ldr r3, [r7, #4]
|
|
800367a: 6e5b ldr r3, [r3, #100] @ 0x64
|
|
800367c: f5b3 0f40 cmp.w r3, #12582912 @ 0xc00000
|
|
8003680: d02a beq.n 80036d8 <HAL_RCCEx_PeriphCLKConfig+0x7c>
|
|
8003682: f5b3 0f40 cmp.w r3, #12582912 @ 0xc00000
|
|
8003686: d824 bhi.n 80036d2 <HAL_RCCEx_PeriphCLKConfig+0x76>
|
|
8003688: f5b3 0f00 cmp.w r3, #8388608 @ 0x800000
|
|
800368c: d008 beq.n 80036a0 <HAL_RCCEx_PeriphCLKConfig+0x44>
|
|
800368e: f5b3 0f00 cmp.w r3, #8388608 @ 0x800000
|
|
8003692: d81e bhi.n 80036d2 <HAL_RCCEx_PeriphCLKConfig+0x76>
|
|
8003694: 2b00 cmp r3, #0
|
|
8003696: d00a beq.n 80036ae <HAL_RCCEx_PeriphCLKConfig+0x52>
|
|
8003698: f5b3 0f80 cmp.w r3, #4194304 @ 0x400000
|
|
800369c: d010 beq.n 80036c0 <HAL_RCCEx_PeriphCLKConfig+0x64>
|
|
800369e: e018 b.n 80036d2 <HAL_RCCEx_PeriphCLKConfig+0x76>
|
|
{
|
|
case RCC_SAI1CLKSOURCE_PLL: /* PLL is used as clock source for SAI1*/
|
|
/* Enable SAI Clock output generated from System PLL . */
|
|
#if defined(RCC_PLLSAI2_SUPPORT)
|
|
__HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_SAI3CLK);
|
|
80036a0: 4b86 ldr r3, [pc, #536] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
80036a2: 68db ldr r3, [r3, #12]
|
|
80036a4: 4a85 ldr r2, [pc, #532] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
80036a6: f443 3380 orr.w r3, r3, #65536 @ 0x10000
|
|
80036aa: 60d3 str r3, [r2, #12]
|
|
#else
|
|
__HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_SAI2CLK);
|
|
#endif /* RCC_PLLSAI2_SUPPORT */
|
|
/* SAI1 clock source config set later after clock selection check */
|
|
break;
|
|
80036ac: e015 b.n 80036da <HAL_RCCEx_PeriphCLKConfig+0x7e>
|
|
|
|
case RCC_SAI1CLKSOURCE_PLLSAI1: /* PLLSAI1 is used as clock source for SAI1*/
|
|
/* PLLSAI1 input clock, parameters M, N & P configuration and clock output (PLLSAI1ClockOut) */
|
|
ret = RCCEx_PLLSAI1_Config(&(PeriphClkInit->PLLSAI1), DIVIDER_P_UPDATE);
|
|
80036ae: 687b ldr r3, [r7, #4]
|
|
80036b0: 3304 adds r3, #4
|
|
80036b2: 2100 movs r1, #0
|
|
80036b4: 4618 mov r0, r3
|
|
80036b6: f000 facb bl 8003c50 <RCCEx_PLLSAI1_Config>
|
|
80036ba: 4603 mov r3, r0
|
|
80036bc: 74fb strb r3, [r7, #19]
|
|
/* SAI1 clock source config set later after clock selection check */
|
|
break;
|
|
80036be: e00c b.n 80036da <HAL_RCCEx_PeriphCLKConfig+0x7e>
|
|
|
|
#if defined(RCC_PLLSAI2_SUPPORT)
|
|
|
|
case RCC_SAI1CLKSOURCE_PLLSAI2: /* PLLSAI2 is used as clock source for SAI1*/
|
|
/* PLLSAI2 input clock, parameters M, N & P configuration clock output (PLLSAI2ClockOut) */
|
|
ret = RCCEx_PLLSAI2_Config(&(PeriphClkInit->PLLSAI2), DIVIDER_P_UPDATE);
|
|
80036c0: 687b ldr r3, [r7, #4]
|
|
80036c2: 3320 adds r3, #32
|
|
80036c4: 2100 movs r1, #0
|
|
80036c6: 4618 mov r0, r3
|
|
80036c8: f000 fbb6 bl 8003e38 <RCCEx_PLLSAI2_Config>
|
|
80036cc: 4603 mov r3, r0
|
|
80036ce: 74fb strb r3, [r7, #19]
|
|
/* SAI1 clock source config set later after clock selection check */
|
|
break;
|
|
80036d0: e003 b.n 80036da <HAL_RCCEx_PeriphCLKConfig+0x7e>
|
|
#endif /* STM32L4P5xx || STM32L4Q5xx || STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */
|
|
/* SAI1 clock source config set later after clock selection check */
|
|
break;
|
|
|
|
default:
|
|
ret = HAL_ERROR;
|
|
80036d2: 2301 movs r3, #1
|
|
80036d4: 74fb strb r3, [r7, #19]
|
|
break;
|
|
80036d6: e000 b.n 80036da <HAL_RCCEx_PeriphCLKConfig+0x7e>
|
|
break;
|
|
80036d8: bf00 nop
|
|
}
|
|
|
|
if(ret == HAL_OK)
|
|
80036da: 7cfb ldrb r3, [r7, #19]
|
|
80036dc: 2b00 cmp r3, #0
|
|
80036de: d10b bne.n 80036f8 <HAL_RCCEx_PeriphCLKConfig+0x9c>
|
|
{
|
|
/* Set the source of SAI1 clock*/
|
|
__HAL_RCC_SAI1_CONFIG(PeriphClkInit->Sai1ClockSelection);
|
|
80036e0: 4b76 ldr r3, [pc, #472] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
80036e2: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
80036e6: f423 0240 bic.w r2, r3, #12582912 @ 0xc00000
|
|
80036ea: 687b ldr r3, [r7, #4]
|
|
80036ec: 6e5b ldr r3, [r3, #100] @ 0x64
|
|
80036ee: 4973 ldr r1, [pc, #460] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
80036f0: 4313 orrs r3, r2
|
|
80036f2: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
80036f6: e001 b.n 80036fc <HAL_RCCEx_PeriphCLKConfig+0xa0>
|
|
}
|
|
else
|
|
{
|
|
/* set overall return value */
|
|
status = ret;
|
|
80036f8: 7cfb ldrb r3, [r7, #19]
|
|
80036fa: 74bb strb r3, [r7, #18]
|
|
#endif /* SAI1 */
|
|
|
|
#if defined(SAI2)
|
|
|
|
/*-------------------------- SAI2 clock source configuration ---------------------*/
|
|
if((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2))
|
|
80036fc: 687b ldr r3, [r7, #4]
|
|
80036fe: 681b ldr r3, [r3, #0]
|
|
8003700: f403 5380 and.w r3, r3, #4096 @ 0x1000
|
|
8003704: 2b00 cmp r3, #0
|
|
8003706: d041 beq.n 800378c <HAL_RCCEx_PeriphCLKConfig+0x130>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_SAI2CLK(PeriphClkInit->Sai2ClockSelection));
|
|
|
|
switch(PeriphClkInit->Sai2ClockSelection)
|
|
8003708: 687b ldr r3, [r7, #4]
|
|
800370a: 6e9b ldr r3, [r3, #104] @ 0x68
|
|
800370c: f1b3 7f40 cmp.w r3, #50331648 @ 0x3000000
|
|
8003710: d02a beq.n 8003768 <HAL_RCCEx_PeriphCLKConfig+0x10c>
|
|
8003712: f1b3 7f40 cmp.w r3, #50331648 @ 0x3000000
|
|
8003716: d824 bhi.n 8003762 <HAL_RCCEx_PeriphCLKConfig+0x106>
|
|
8003718: f1b3 7f00 cmp.w r3, #33554432 @ 0x2000000
|
|
800371c: d008 beq.n 8003730 <HAL_RCCEx_PeriphCLKConfig+0xd4>
|
|
800371e: f1b3 7f00 cmp.w r3, #33554432 @ 0x2000000
|
|
8003722: d81e bhi.n 8003762 <HAL_RCCEx_PeriphCLKConfig+0x106>
|
|
8003724: 2b00 cmp r3, #0
|
|
8003726: d00a beq.n 800373e <HAL_RCCEx_PeriphCLKConfig+0xe2>
|
|
8003728: f1b3 7f80 cmp.w r3, #16777216 @ 0x1000000
|
|
800372c: d010 beq.n 8003750 <HAL_RCCEx_PeriphCLKConfig+0xf4>
|
|
800372e: e018 b.n 8003762 <HAL_RCCEx_PeriphCLKConfig+0x106>
|
|
{
|
|
case RCC_SAI2CLKSOURCE_PLL: /* PLL is used as clock source for SAI2*/
|
|
/* Enable SAI Clock output generated from System PLL . */
|
|
__HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_SAI3CLK);
|
|
8003730: 4b62 ldr r3, [pc, #392] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
8003732: 68db ldr r3, [r3, #12]
|
|
8003734: 4a61 ldr r2, [pc, #388] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
8003736: f443 3380 orr.w r3, r3, #65536 @ 0x10000
|
|
800373a: 60d3 str r3, [r2, #12]
|
|
/* SAI2 clock source config set later after clock selection check */
|
|
break;
|
|
800373c: e015 b.n 800376a <HAL_RCCEx_PeriphCLKConfig+0x10e>
|
|
|
|
case RCC_SAI2CLKSOURCE_PLLSAI1: /* PLLSAI1 is used as clock source for SAI2*/
|
|
/* PLLSAI1 input clock, parameters M, N & P configuration and clock output (PLLSAI1ClockOut) */
|
|
ret = RCCEx_PLLSAI1_Config(&(PeriphClkInit->PLLSAI1), DIVIDER_P_UPDATE);
|
|
800373e: 687b ldr r3, [r7, #4]
|
|
8003740: 3304 adds r3, #4
|
|
8003742: 2100 movs r1, #0
|
|
8003744: 4618 mov r0, r3
|
|
8003746: f000 fa83 bl 8003c50 <RCCEx_PLLSAI1_Config>
|
|
800374a: 4603 mov r3, r0
|
|
800374c: 74fb strb r3, [r7, #19]
|
|
/* SAI2 clock source config set later after clock selection check */
|
|
break;
|
|
800374e: e00c b.n 800376a <HAL_RCCEx_PeriphCLKConfig+0x10e>
|
|
|
|
case RCC_SAI2CLKSOURCE_PLLSAI2: /* PLLSAI2 is used as clock source for SAI2*/
|
|
/* PLLSAI2 input clock, parameters M, N & P configuration and clock output (PLLSAI2ClockOut) */
|
|
ret = RCCEx_PLLSAI2_Config(&(PeriphClkInit->PLLSAI2), DIVIDER_P_UPDATE);
|
|
8003750: 687b ldr r3, [r7, #4]
|
|
8003752: 3320 adds r3, #32
|
|
8003754: 2100 movs r1, #0
|
|
8003756: 4618 mov r0, r3
|
|
8003758: f000 fb6e bl 8003e38 <RCCEx_PLLSAI2_Config>
|
|
800375c: 4603 mov r3, r0
|
|
800375e: 74fb strb r3, [r7, #19]
|
|
/* SAI2 clock source config set later after clock selection check */
|
|
break;
|
|
8003760: e003 b.n 800376a <HAL_RCCEx_PeriphCLKConfig+0x10e>
|
|
#endif /* STM32L4P5xx || STM32L4Q5xx || STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */
|
|
/* SAI2 clock source config set later after clock selection check */
|
|
break;
|
|
|
|
default:
|
|
ret = HAL_ERROR;
|
|
8003762: 2301 movs r3, #1
|
|
8003764: 74fb strb r3, [r7, #19]
|
|
break;
|
|
8003766: e000 b.n 800376a <HAL_RCCEx_PeriphCLKConfig+0x10e>
|
|
break;
|
|
8003768: bf00 nop
|
|
}
|
|
|
|
if(ret == HAL_OK)
|
|
800376a: 7cfb ldrb r3, [r7, #19]
|
|
800376c: 2b00 cmp r3, #0
|
|
800376e: d10b bne.n 8003788 <HAL_RCCEx_PeriphCLKConfig+0x12c>
|
|
{
|
|
/* Set the source of SAI2 clock*/
|
|
__HAL_RCC_SAI2_CONFIG(PeriphClkInit->Sai2ClockSelection);
|
|
8003770: 4b52 ldr r3, [pc, #328] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
8003772: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
8003776: f023 7240 bic.w r2, r3, #50331648 @ 0x3000000
|
|
800377a: 687b ldr r3, [r7, #4]
|
|
800377c: 6e9b ldr r3, [r3, #104] @ 0x68
|
|
800377e: 494f ldr r1, [pc, #316] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
8003780: 4313 orrs r3, r2
|
|
8003782: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
8003786: e001 b.n 800378c <HAL_RCCEx_PeriphCLKConfig+0x130>
|
|
}
|
|
else
|
|
{
|
|
/* set overall return value */
|
|
status = ret;
|
|
8003788: 7cfb ldrb r3, [r7, #19]
|
|
800378a: 74bb strb r3, [r7, #18]
|
|
}
|
|
}
|
|
#endif /* SAI2 */
|
|
|
|
/*-------------------------- RTC clock source configuration ----------------------*/
|
|
if((PeriphClkInit->PeriphClockSelection & RCC_PERIPHCLK_RTC) == RCC_PERIPHCLK_RTC)
|
|
800378c: 687b ldr r3, [r7, #4]
|
|
800378e: 681b ldr r3, [r3, #0]
|
|
8003790: f403 3300 and.w r3, r3, #131072 @ 0x20000
|
|
8003794: 2b00 cmp r3, #0
|
|
8003796: f000 80a0 beq.w 80038da <HAL_RCCEx_PeriphCLKConfig+0x27e>
|
|
{
|
|
FlagStatus pwrclkchanged = RESET;
|
|
800379a: 2300 movs r3, #0
|
|
800379c: 747b strb r3, [r7, #17]
|
|
|
|
/* Check for RTC Parameters used to output RTCCLK */
|
|
assert_param(IS_RCC_RTCCLKSOURCE(PeriphClkInit->RTCClockSelection));
|
|
|
|
/* Enable Power Clock */
|
|
if(__HAL_RCC_PWR_IS_CLK_DISABLED() != 0U)
|
|
800379e: 4b47 ldr r3, [pc, #284] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
80037a0: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
80037a2: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
|
|
80037a6: 2b00 cmp r3, #0
|
|
80037a8: d101 bne.n 80037ae <HAL_RCCEx_PeriphCLKConfig+0x152>
|
|
80037aa: 2301 movs r3, #1
|
|
80037ac: e000 b.n 80037b0 <HAL_RCCEx_PeriphCLKConfig+0x154>
|
|
80037ae: 2300 movs r3, #0
|
|
80037b0: 2b00 cmp r3, #0
|
|
80037b2: d00d beq.n 80037d0 <HAL_RCCEx_PeriphCLKConfig+0x174>
|
|
{
|
|
__HAL_RCC_PWR_CLK_ENABLE();
|
|
80037b4: 4b41 ldr r3, [pc, #260] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
80037b6: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
80037b8: 4a40 ldr r2, [pc, #256] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
80037ba: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000
|
|
80037be: 6593 str r3, [r2, #88] @ 0x58
|
|
80037c0: 4b3e ldr r3, [pc, #248] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
80037c2: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
80037c4: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
|
|
80037c8: 60bb str r3, [r7, #8]
|
|
80037ca: 68bb ldr r3, [r7, #8]
|
|
pwrclkchanged = SET;
|
|
80037cc: 2301 movs r3, #1
|
|
80037ce: 747b strb r3, [r7, #17]
|
|
}
|
|
|
|
/* Enable write access to Backup domain */
|
|
SET_BIT(PWR->CR1, PWR_CR1_DBP);
|
|
80037d0: 4b3b ldr r3, [pc, #236] @ (80038c0 <HAL_RCCEx_PeriphCLKConfig+0x264>)
|
|
80037d2: 681b ldr r3, [r3, #0]
|
|
80037d4: 4a3a ldr r2, [pc, #232] @ (80038c0 <HAL_RCCEx_PeriphCLKConfig+0x264>)
|
|
80037d6: f443 7380 orr.w r3, r3, #256 @ 0x100
|
|
80037da: 6013 str r3, [r2, #0]
|
|
|
|
/* Wait for Backup domain Write protection disable */
|
|
tickstart = HAL_GetTick();
|
|
80037dc: f7fe f966 bl 8001aac <HAL_GetTick>
|
|
80037e0: 60f8 str r0, [r7, #12]
|
|
|
|
while(READ_BIT(PWR->CR1, PWR_CR1_DBP) == 0U)
|
|
80037e2: e009 b.n 80037f8 <HAL_RCCEx_PeriphCLKConfig+0x19c>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
|
|
80037e4: f7fe f962 bl 8001aac <HAL_GetTick>
|
|
80037e8: 4602 mov r2, r0
|
|
80037ea: 68fb ldr r3, [r7, #12]
|
|
80037ec: 1ad3 subs r3, r2, r3
|
|
80037ee: 2b02 cmp r3, #2
|
|
80037f0: d902 bls.n 80037f8 <HAL_RCCEx_PeriphCLKConfig+0x19c>
|
|
{
|
|
ret = HAL_TIMEOUT;
|
|
80037f2: 2303 movs r3, #3
|
|
80037f4: 74fb strb r3, [r7, #19]
|
|
break;
|
|
80037f6: e005 b.n 8003804 <HAL_RCCEx_PeriphCLKConfig+0x1a8>
|
|
while(READ_BIT(PWR->CR1, PWR_CR1_DBP) == 0U)
|
|
80037f8: 4b31 ldr r3, [pc, #196] @ (80038c0 <HAL_RCCEx_PeriphCLKConfig+0x264>)
|
|
80037fa: 681b ldr r3, [r3, #0]
|
|
80037fc: f403 7380 and.w r3, r3, #256 @ 0x100
|
|
8003800: 2b00 cmp r3, #0
|
|
8003802: d0ef beq.n 80037e4 <HAL_RCCEx_PeriphCLKConfig+0x188>
|
|
}
|
|
}
|
|
|
|
if(ret == HAL_OK)
|
|
8003804: 7cfb ldrb r3, [r7, #19]
|
|
8003806: 2b00 cmp r3, #0
|
|
8003808: d15c bne.n 80038c4 <HAL_RCCEx_PeriphCLKConfig+0x268>
|
|
{
|
|
/* Reset the Backup domain only if the RTC Clock source selection is modified from default */
|
|
tmpregister = READ_BIT(RCC->BDCR, RCC_BDCR_RTCSEL);
|
|
800380a: 4b2c ldr r3, [pc, #176] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
800380c: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90
|
|
8003810: f403 7340 and.w r3, r3, #768 @ 0x300
|
|
8003814: 617b str r3, [r7, #20]
|
|
|
|
if((tmpregister != RCC_RTCCLKSOURCE_NONE) && (tmpregister != PeriphClkInit->RTCClockSelection))
|
|
8003816: 697b ldr r3, [r7, #20]
|
|
8003818: 2b00 cmp r3, #0
|
|
800381a: d01f beq.n 800385c <HAL_RCCEx_PeriphCLKConfig+0x200>
|
|
800381c: 687b ldr r3, [r7, #4]
|
|
800381e: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84
|
|
8003822: 697a ldr r2, [r7, #20]
|
|
8003824: 429a cmp r2, r3
|
|
8003826: d019 beq.n 800385c <HAL_RCCEx_PeriphCLKConfig+0x200>
|
|
{
|
|
/* Store the content of BDCR register before the reset of Backup Domain */
|
|
tmpregister = READ_BIT(RCC->BDCR, ~(RCC_BDCR_RTCSEL));
|
|
8003828: 4b24 ldr r3, [pc, #144] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
800382a: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90
|
|
800382e: f423 7340 bic.w r3, r3, #768 @ 0x300
|
|
8003832: 617b str r3, [r7, #20]
|
|
/* RTC Clock selection can be changed only if the Backup Domain is reset */
|
|
__HAL_RCC_BACKUPRESET_FORCE();
|
|
8003834: 4b21 ldr r3, [pc, #132] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
8003836: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90
|
|
800383a: 4a20 ldr r2, [pc, #128] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
800383c: f443 3380 orr.w r3, r3, #65536 @ 0x10000
|
|
8003840: f8c2 3090 str.w r3, [r2, #144] @ 0x90
|
|
__HAL_RCC_BACKUPRESET_RELEASE();
|
|
8003844: 4b1d ldr r3, [pc, #116] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
8003846: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90
|
|
800384a: 4a1c ldr r2, [pc, #112] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
800384c: f423 3380 bic.w r3, r3, #65536 @ 0x10000
|
|
8003850: f8c2 3090 str.w r3, [r2, #144] @ 0x90
|
|
/* Restore the Content of BDCR register */
|
|
RCC->BDCR = tmpregister;
|
|
8003854: 4a19 ldr r2, [pc, #100] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
8003856: 697b ldr r3, [r7, #20]
|
|
8003858: f8c2 3090 str.w r3, [r2, #144] @ 0x90
|
|
}
|
|
|
|
/* Wait for LSE reactivation if LSE was enable prior to Backup Domain reset */
|
|
if (HAL_IS_BIT_SET(tmpregister, RCC_BDCR_LSEON))
|
|
800385c: 697b ldr r3, [r7, #20]
|
|
800385e: f003 0301 and.w r3, r3, #1
|
|
8003862: 2b00 cmp r3, #0
|
|
8003864: d016 beq.n 8003894 <HAL_RCCEx_PeriphCLKConfig+0x238>
|
|
{
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
8003866: f7fe f921 bl 8001aac <HAL_GetTick>
|
|
800386a: 60f8 str r0, [r7, #12]
|
|
|
|
/* Wait till LSE is ready */
|
|
while(READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == 0U)
|
|
800386c: e00b b.n 8003886 <HAL_RCCEx_PeriphCLKConfig+0x22a>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
|
|
800386e: f7fe f91d bl 8001aac <HAL_GetTick>
|
|
8003872: 4602 mov r2, r0
|
|
8003874: 68fb ldr r3, [r7, #12]
|
|
8003876: 1ad3 subs r3, r2, r3
|
|
8003878: f241 3288 movw r2, #5000 @ 0x1388
|
|
800387c: 4293 cmp r3, r2
|
|
800387e: d902 bls.n 8003886 <HAL_RCCEx_PeriphCLKConfig+0x22a>
|
|
{
|
|
ret = HAL_TIMEOUT;
|
|
8003880: 2303 movs r3, #3
|
|
8003882: 74fb strb r3, [r7, #19]
|
|
break;
|
|
8003884: e006 b.n 8003894 <HAL_RCCEx_PeriphCLKConfig+0x238>
|
|
while(READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == 0U)
|
|
8003886: 4b0d ldr r3, [pc, #52] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
8003888: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90
|
|
800388c: f003 0302 and.w r3, r3, #2
|
|
8003890: 2b00 cmp r3, #0
|
|
8003892: d0ec beq.n 800386e <HAL_RCCEx_PeriphCLKConfig+0x212>
|
|
}
|
|
}
|
|
}
|
|
|
|
if(ret == HAL_OK)
|
|
8003894: 7cfb ldrb r3, [r7, #19]
|
|
8003896: 2b00 cmp r3, #0
|
|
8003898: d10c bne.n 80038b4 <HAL_RCCEx_PeriphCLKConfig+0x258>
|
|
{
|
|
/* Apply new RTC clock source selection */
|
|
__HAL_RCC_RTC_CONFIG(PeriphClkInit->RTCClockSelection);
|
|
800389a: 4b08 ldr r3, [pc, #32] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
800389c: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90
|
|
80038a0: f423 7240 bic.w r2, r3, #768 @ 0x300
|
|
80038a4: 687b ldr r3, [r7, #4]
|
|
80038a6: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84
|
|
80038aa: 4904 ldr r1, [pc, #16] @ (80038bc <HAL_RCCEx_PeriphCLKConfig+0x260>)
|
|
80038ac: 4313 orrs r3, r2
|
|
80038ae: f8c1 3090 str.w r3, [r1, #144] @ 0x90
|
|
80038b2: e009 b.n 80038c8 <HAL_RCCEx_PeriphCLKConfig+0x26c>
|
|
}
|
|
else
|
|
{
|
|
/* set overall return value */
|
|
status = ret;
|
|
80038b4: 7cfb ldrb r3, [r7, #19]
|
|
80038b6: 74bb strb r3, [r7, #18]
|
|
80038b8: e006 b.n 80038c8 <HAL_RCCEx_PeriphCLKConfig+0x26c>
|
|
80038ba: bf00 nop
|
|
80038bc: 40021000 .word 0x40021000
|
|
80038c0: 40007000 .word 0x40007000
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* set overall return value */
|
|
status = ret;
|
|
80038c4: 7cfb ldrb r3, [r7, #19]
|
|
80038c6: 74bb strb r3, [r7, #18]
|
|
}
|
|
|
|
/* Restore clock configuration if changed */
|
|
if(pwrclkchanged == SET)
|
|
80038c8: 7c7b ldrb r3, [r7, #17]
|
|
80038ca: 2b01 cmp r3, #1
|
|
80038cc: d105 bne.n 80038da <HAL_RCCEx_PeriphCLKConfig+0x27e>
|
|
{
|
|
__HAL_RCC_PWR_CLK_DISABLE();
|
|
80038ce: 4b9e ldr r3, [pc, #632] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
80038d0: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
80038d2: 4a9d ldr r2, [pc, #628] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
80038d4: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000
|
|
80038d8: 6593 str r3, [r2, #88] @ 0x58
|
|
}
|
|
}
|
|
|
|
/*-------------------------- USART1 clock source configuration -------------------*/
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART1) == RCC_PERIPHCLK_USART1)
|
|
80038da: 687b ldr r3, [r7, #4]
|
|
80038dc: 681b ldr r3, [r3, #0]
|
|
80038de: f003 0301 and.w r3, r3, #1
|
|
80038e2: 2b00 cmp r3, #0
|
|
80038e4: d00a beq.n 80038fc <HAL_RCCEx_PeriphCLKConfig+0x2a0>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_USART1CLKSOURCE(PeriphClkInit->Usart1ClockSelection));
|
|
|
|
/* Configure the USART1 clock source */
|
|
__HAL_RCC_USART1_CONFIG(PeriphClkInit->Usart1ClockSelection);
|
|
80038e6: 4b98 ldr r3, [pc, #608] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
80038e8: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
80038ec: f023 0203 bic.w r2, r3, #3
|
|
80038f0: 687b ldr r3, [r7, #4]
|
|
80038f2: 6b9b ldr r3, [r3, #56] @ 0x38
|
|
80038f4: 4994 ldr r1, [pc, #592] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
80038f6: 4313 orrs r3, r2
|
|
80038f8: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
}
|
|
|
|
/*-------------------------- USART2 clock source configuration -------------------*/
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART2) == RCC_PERIPHCLK_USART2)
|
|
80038fc: 687b ldr r3, [r7, #4]
|
|
80038fe: 681b ldr r3, [r3, #0]
|
|
8003900: f003 0302 and.w r3, r3, #2
|
|
8003904: 2b00 cmp r3, #0
|
|
8003906: d00a beq.n 800391e <HAL_RCCEx_PeriphCLKConfig+0x2c2>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_USART2CLKSOURCE(PeriphClkInit->Usart2ClockSelection));
|
|
|
|
/* Configure the USART2 clock source */
|
|
__HAL_RCC_USART2_CONFIG(PeriphClkInit->Usart2ClockSelection);
|
|
8003908: 4b8f ldr r3, [pc, #572] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
800390a: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
800390e: f023 020c bic.w r2, r3, #12
|
|
8003912: 687b ldr r3, [r7, #4]
|
|
8003914: 6bdb ldr r3, [r3, #60] @ 0x3c
|
|
8003916: 498c ldr r1, [pc, #560] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003918: 4313 orrs r3, r2
|
|
800391a: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
}
|
|
|
|
#if defined(USART3)
|
|
|
|
/*-------------------------- USART3 clock source configuration -------------------*/
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART3) == RCC_PERIPHCLK_USART3)
|
|
800391e: 687b ldr r3, [r7, #4]
|
|
8003920: 681b ldr r3, [r3, #0]
|
|
8003922: f003 0304 and.w r3, r3, #4
|
|
8003926: 2b00 cmp r3, #0
|
|
8003928: d00a beq.n 8003940 <HAL_RCCEx_PeriphCLKConfig+0x2e4>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_USART3CLKSOURCE(PeriphClkInit->Usart3ClockSelection));
|
|
|
|
/* Configure the USART3 clock source */
|
|
__HAL_RCC_USART3_CONFIG(PeriphClkInit->Usart3ClockSelection);
|
|
800392a: 4b87 ldr r3, [pc, #540] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
800392c: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
8003930: f023 0230 bic.w r2, r3, #48 @ 0x30
|
|
8003934: 687b ldr r3, [r7, #4]
|
|
8003936: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
8003938: 4983 ldr r1, [pc, #524] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
800393a: 4313 orrs r3, r2
|
|
800393c: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
#endif /* USART3 */
|
|
|
|
#if defined(UART4)
|
|
|
|
/*-------------------------- UART4 clock source configuration --------------------*/
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_UART4) == RCC_PERIPHCLK_UART4)
|
|
8003940: 687b ldr r3, [r7, #4]
|
|
8003942: 681b ldr r3, [r3, #0]
|
|
8003944: f003 0308 and.w r3, r3, #8
|
|
8003948: 2b00 cmp r3, #0
|
|
800394a: d00a beq.n 8003962 <HAL_RCCEx_PeriphCLKConfig+0x306>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_UART4CLKSOURCE(PeriphClkInit->Uart4ClockSelection));
|
|
|
|
/* Configure the UART4 clock source */
|
|
__HAL_RCC_UART4_CONFIG(PeriphClkInit->Uart4ClockSelection);
|
|
800394c: 4b7e ldr r3, [pc, #504] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
800394e: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
8003952: f023 02c0 bic.w r2, r3, #192 @ 0xc0
|
|
8003956: 687b ldr r3, [r7, #4]
|
|
8003958: 6c5b ldr r3, [r3, #68] @ 0x44
|
|
800395a: 497b ldr r1, [pc, #492] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
800395c: 4313 orrs r3, r2
|
|
800395e: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
#endif /* UART4 */
|
|
|
|
#if defined(UART5)
|
|
|
|
/*-------------------------- UART5 clock source configuration --------------------*/
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_UART5) == RCC_PERIPHCLK_UART5)
|
|
8003962: 687b ldr r3, [r7, #4]
|
|
8003964: 681b ldr r3, [r3, #0]
|
|
8003966: f003 0310 and.w r3, r3, #16
|
|
800396a: 2b00 cmp r3, #0
|
|
800396c: d00a beq.n 8003984 <HAL_RCCEx_PeriphCLKConfig+0x328>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_UART5CLKSOURCE(PeriphClkInit->Uart5ClockSelection));
|
|
|
|
/* Configure the UART5 clock source */
|
|
__HAL_RCC_UART5_CONFIG(PeriphClkInit->Uart5ClockSelection);
|
|
800396e: 4b76 ldr r3, [pc, #472] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003970: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
8003974: f423 7240 bic.w r2, r3, #768 @ 0x300
|
|
8003978: 687b ldr r3, [r7, #4]
|
|
800397a: 6c9b ldr r3, [r3, #72] @ 0x48
|
|
800397c: 4972 ldr r1, [pc, #456] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
800397e: 4313 orrs r3, r2
|
|
8003980: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
}
|
|
|
|
#endif /* UART5 */
|
|
|
|
/*-------------------------- LPUART1 clock source configuration ------------------*/
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPUART1) == RCC_PERIPHCLK_LPUART1)
|
|
8003984: 687b ldr r3, [r7, #4]
|
|
8003986: 681b ldr r3, [r3, #0]
|
|
8003988: f003 0320 and.w r3, r3, #32
|
|
800398c: 2b00 cmp r3, #0
|
|
800398e: d00a beq.n 80039a6 <HAL_RCCEx_PeriphCLKConfig+0x34a>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_LPUART1CLKSOURCE(PeriphClkInit->Lpuart1ClockSelection));
|
|
|
|
/* Configure the LPUART1 clock source */
|
|
__HAL_RCC_LPUART1_CONFIG(PeriphClkInit->Lpuart1ClockSelection);
|
|
8003990: 4b6d ldr r3, [pc, #436] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003992: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
8003996: f423 6240 bic.w r2, r3, #3072 @ 0xc00
|
|
800399a: 687b ldr r3, [r7, #4]
|
|
800399c: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
800399e: 496a ldr r1, [pc, #424] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
80039a0: 4313 orrs r3, r2
|
|
80039a2: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
}
|
|
|
|
/*-------------------------- LPTIM1 clock source configuration -------------------*/
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM1) == (RCC_PERIPHCLK_LPTIM1))
|
|
80039a6: 687b ldr r3, [r7, #4]
|
|
80039a8: 681b ldr r3, [r3, #0]
|
|
80039aa: f403 7300 and.w r3, r3, #512 @ 0x200
|
|
80039ae: 2b00 cmp r3, #0
|
|
80039b0: d00a beq.n 80039c8 <HAL_RCCEx_PeriphCLKConfig+0x36c>
|
|
{
|
|
assert_param(IS_RCC_LPTIM1CLK(PeriphClkInit->Lptim1ClockSelection));
|
|
__HAL_RCC_LPTIM1_CONFIG(PeriphClkInit->Lptim1ClockSelection);
|
|
80039b2: 4b65 ldr r3, [pc, #404] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
80039b4: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
80039b8: f423 2240 bic.w r2, r3, #786432 @ 0xc0000
|
|
80039bc: 687b ldr r3, [r7, #4]
|
|
80039be: 6ddb ldr r3, [r3, #92] @ 0x5c
|
|
80039c0: 4961 ldr r1, [pc, #388] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
80039c2: 4313 orrs r3, r2
|
|
80039c4: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
}
|
|
|
|
/*-------------------------- LPTIM2 clock source configuration -------------------*/
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM2) == (RCC_PERIPHCLK_LPTIM2))
|
|
80039c8: 687b ldr r3, [r7, #4]
|
|
80039ca: 681b ldr r3, [r3, #0]
|
|
80039cc: f403 6380 and.w r3, r3, #1024 @ 0x400
|
|
80039d0: 2b00 cmp r3, #0
|
|
80039d2: d00a beq.n 80039ea <HAL_RCCEx_PeriphCLKConfig+0x38e>
|
|
{
|
|
assert_param(IS_RCC_LPTIM2CLK(PeriphClkInit->Lptim2ClockSelection));
|
|
__HAL_RCC_LPTIM2_CONFIG(PeriphClkInit->Lptim2ClockSelection);
|
|
80039d4: 4b5c ldr r3, [pc, #368] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
80039d6: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
80039da: f423 1240 bic.w r2, r3, #3145728 @ 0x300000
|
|
80039de: 687b ldr r3, [r7, #4]
|
|
80039e0: 6e1b ldr r3, [r3, #96] @ 0x60
|
|
80039e2: 4959 ldr r1, [pc, #356] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
80039e4: 4313 orrs r3, r2
|
|
80039e6: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
}
|
|
|
|
/*-------------------------- I2C1 clock source configuration ---------------------*/
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C1) == RCC_PERIPHCLK_I2C1)
|
|
80039ea: 687b ldr r3, [r7, #4]
|
|
80039ec: 681b ldr r3, [r3, #0]
|
|
80039ee: f003 0340 and.w r3, r3, #64 @ 0x40
|
|
80039f2: 2b00 cmp r3, #0
|
|
80039f4: d00a beq.n 8003a0c <HAL_RCCEx_PeriphCLKConfig+0x3b0>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_I2C1CLKSOURCE(PeriphClkInit->I2c1ClockSelection));
|
|
|
|
/* Configure the I2C1 clock source */
|
|
__HAL_RCC_I2C1_CONFIG(PeriphClkInit->I2c1ClockSelection);
|
|
80039f6: 4b54 ldr r3, [pc, #336] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
80039f8: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
80039fc: f423 5240 bic.w r2, r3, #12288 @ 0x3000
|
|
8003a00: 687b ldr r3, [r7, #4]
|
|
8003a02: 6d1b ldr r3, [r3, #80] @ 0x50
|
|
8003a04: 4950 ldr r1, [pc, #320] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003a06: 4313 orrs r3, r2
|
|
8003a08: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
}
|
|
|
|
#if defined(I2C2)
|
|
|
|
/*-------------------------- I2C2 clock source configuration ---------------------*/
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C2) == RCC_PERIPHCLK_I2C2)
|
|
8003a0c: 687b ldr r3, [r7, #4]
|
|
8003a0e: 681b ldr r3, [r3, #0]
|
|
8003a10: f003 0380 and.w r3, r3, #128 @ 0x80
|
|
8003a14: 2b00 cmp r3, #0
|
|
8003a16: d00a beq.n 8003a2e <HAL_RCCEx_PeriphCLKConfig+0x3d2>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_I2C2CLKSOURCE(PeriphClkInit->I2c2ClockSelection));
|
|
|
|
/* Configure the I2C2 clock source */
|
|
__HAL_RCC_I2C2_CONFIG(PeriphClkInit->I2c2ClockSelection);
|
|
8003a18: 4b4b ldr r3, [pc, #300] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003a1a: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
8003a1e: f423 4240 bic.w r2, r3, #49152 @ 0xc000
|
|
8003a22: 687b ldr r3, [r7, #4]
|
|
8003a24: 6d5b ldr r3, [r3, #84] @ 0x54
|
|
8003a26: 4948 ldr r1, [pc, #288] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003a28: 4313 orrs r3, r2
|
|
8003a2a: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
}
|
|
|
|
#endif /* I2C2 */
|
|
|
|
/*-------------------------- I2C3 clock source configuration ---------------------*/
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C3) == RCC_PERIPHCLK_I2C3)
|
|
8003a2e: 687b ldr r3, [r7, #4]
|
|
8003a30: 681b ldr r3, [r3, #0]
|
|
8003a32: f403 7380 and.w r3, r3, #256 @ 0x100
|
|
8003a36: 2b00 cmp r3, #0
|
|
8003a38: d00a beq.n 8003a50 <HAL_RCCEx_PeriphCLKConfig+0x3f4>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_I2C3CLKSOURCE(PeriphClkInit->I2c3ClockSelection));
|
|
|
|
/* Configure the I2C3 clock source */
|
|
__HAL_RCC_I2C3_CONFIG(PeriphClkInit->I2c3ClockSelection);
|
|
8003a3a: 4b43 ldr r3, [pc, #268] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003a3c: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
8003a40: f423 3240 bic.w r2, r3, #196608 @ 0x30000
|
|
8003a44: 687b ldr r3, [r7, #4]
|
|
8003a46: 6d9b ldr r3, [r3, #88] @ 0x58
|
|
8003a48: 493f ldr r1, [pc, #252] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003a4a: 4313 orrs r3, r2
|
|
8003a4c: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
#endif /* I2C4 */
|
|
|
|
#if defined(USB_OTG_FS) || defined(USB)
|
|
|
|
/*-------------------------- USB clock source configuration ----------------------*/
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USB) == (RCC_PERIPHCLK_USB))
|
|
8003a50: 687b ldr r3, [r7, #4]
|
|
8003a52: 681b ldr r3, [r3, #0]
|
|
8003a54: f403 5300 and.w r3, r3, #8192 @ 0x2000
|
|
8003a58: 2b00 cmp r3, #0
|
|
8003a5a: d028 beq.n 8003aae <HAL_RCCEx_PeriphCLKConfig+0x452>
|
|
{
|
|
assert_param(IS_RCC_USBCLKSOURCE(PeriphClkInit->UsbClockSelection));
|
|
__HAL_RCC_USB_CONFIG(PeriphClkInit->UsbClockSelection);
|
|
8003a5c: 4b3a ldr r3, [pc, #232] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003a5e: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
8003a62: f023 6240 bic.w r2, r3, #201326592 @ 0xc000000
|
|
8003a66: 687b ldr r3, [r7, #4]
|
|
8003a68: 6edb ldr r3, [r3, #108] @ 0x6c
|
|
8003a6a: 4937 ldr r1, [pc, #220] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003a6c: 4313 orrs r3, r2
|
|
8003a6e: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
|
|
if(PeriphClkInit->UsbClockSelection == RCC_USBCLKSOURCE_PLL)
|
|
8003a72: 687b ldr r3, [r7, #4]
|
|
8003a74: 6edb ldr r3, [r3, #108] @ 0x6c
|
|
8003a76: f1b3 6f00 cmp.w r3, #134217728 @ 0x8000000
|
|
8003a7a: d106 bne.n 8003a8a <HAL_RCCEx_PeriphCLKConfig+0x42e>
|
|
{
|
|
/* Enable PLL48M1CLK output clock */
|
|
__HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_48M1CLK);
|
|
8003a7c: 4b32 ldr r3, [pc, #200] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003a7e: 68db ldr r3, [r3, #12]
|
|
8003a80: 4a31 ldr r2, [pc, #196] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003a82: f443 1380 orr.w r3, r3, #1048576 @ 0x100000
|
|
8003a86: 60d3 str r3, [r2, #12]
|
|
8003a88: e011 b.n 8003aae <HAL_RCCEx_PeriphCLKConfig+0x452>
|
|
}
|
|
else
|
|
{
|
|
#if defined(RCC_PLLSAI1_SUPPORT)
|
|
if(PeriphClkInit->UsbClockSelection == RCC_USBCLKSOURCE_PLLSAI1)
|
|
8003a8a: 687b ldr r3, [r7, #4]
|
|
8003a8c: 6edb ldr r3, [r3, #108] @ 0x6c
|
|
8003a8e: f1b3 6f80 cmp.w r3, #67108864 @ 0x4000000
|
|
8003a92: d10c bne.n 8003aae <HAL_RCCEx_PeriphCLKConfig+0x452>
|
|
{
|
|
/* PLLSAI1 input clock, parameters M, N & Q configuration and clock output (PLLSAI1ClockOut) */
|
|
ret = RCCEx_PLLSAI1_Config(&(PeriphClkInit->PLLSAI1), DIVIDER_Q_UPDATE);
|
|
8003a94: 687b ldr r3, [r7, #4]
|
|
8003a96: 3304 adds r3, #4
|
|
8003a98: 2101 movs r1, #1
|
|
8003a9a: 4618 mov r0, r3
|
|
8003a9c: f000 f8d8 bl 8003c50 <RCCEx_PLLSAI1_Config>
|
|
8003aa0: 4603 mov r3, r0
|
|
8003aa2: 74fb strb r3, [r7, #19]
|
|
|
|
if(ret != HAL_OK)
|
|
8003aa4: 7cfb ldrb r3, [r7, #19]
|
|
8003aa6: 2b00 cmp r3, #0
|
|
8003aa8: d001 beq.n 8003aae <HAL_RCCEx_PeriphCLKConfig+0x452>
|
|
{
|
|
/* set overall return value */
|
|
status = ret;
|
|
8003aaa: 7cfb ldrb r3, [r7, #19]
|
|
8003aac: 74bb strb r3, [r7, #18]
|
|
#endif /* USB_OTG_FS || USB */
|
|
|
|
#if defined(SDMMC1)
|
|
|
|
/*-------------------------- SDMMC1 clock source configuration -------------------*/
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SDMMC1) == (RCC_PERIPHCLK_SDMMC1))
|
|
8003aae: 687b ldr r3, [r7, #4]
|
|
8003ab0: 681b ldr r3, [r3, #0]
|
|
8003ab2: f403 2300 and.w r3, r3, #524288 @ 0x80000
|
|
8003ab6: 2b00 cmp r3, #0
|
|
8003ab8: d028 beq.n 8003b0c <HAL_RCCEx_PeriphCLKConfig+0x4b0>
|
|
{
|
|
assert_param(IS_RCC_SDMMC1CLKSOURCE(PeriphClkInit->Sdmmc1ClockSelection));
|
|
__HAL_RCC_SDMMC1_CONFIG(PeriphClkInit->Sdmmc1ClockSelection);
|
|
8003aba: 4b23 ldr r3, [pc, #140] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003abc: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
8003ac0: f023 6240 bic.w r2, r3, #201326592 @ 0xc000000
|
|
8003ac4: 687b ldr r3, [r7, #4]
|
|
8003ac6: 6f1b ldr r3, [r3, #112] @ 0x70
|
|
8003ac8: 491f ldr r1, [pc, #124] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003aca: 4313 orrs r3, r2
|
|
8003acc: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
|
|
if(PeriphClkInit->Sdmmc1ClockSelection == RCC_SDMMC1CLKSOURCE_PLL) /* PLL "Q" ? */
|
|
8003ad0: 687b ldr r3, [r7, #4]
|
|
8003ad2: 6f1b ldr r3, [r3, #112] @ 0x70
|
|
8003ad4: f1b3 6f00 cmp.w r3, #134217728 @ 0x8000000
|
|
8003ad8: d106 bne.n 8003ae8 <HAL_RCCEx_PeriphCLKConfig+0x48c>
|
|
{
|
|
/* Enable PLL48M1CLK output clock */
|
|
__HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_48M1CLK);
|
|
8003ada: 4b1b ldr r3, [pc, #108] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003adc: 68db ldr r3, [r3, #12]
|
|
8003ade: 4a1a ldr r2, [pc, #104] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003ae0: f443 1380 orr.w r3, r3, #1048576 @ 0x100000
|
|
8003ae4: 60d3 str r3, [r2, #12]
|
|
8003ae6: e011 b.n 8003b0c <HAL_RCCEx_PeriphCLKConfig+0x4b0>
|
|
{
|
|
/* Enable PLLSAI3CLK output */
|
|
__HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_SAI3CLK);
|
|
}
|
|
#endif
|
|
else if(PeriphClkInit->Sdmmc1ClockSelection == RCC_SDMMC1CLKSOURCE_PLLSAI1)
|
|
8003ae8: 687b ldr r3, [r7, #4]
|
|
8003aea: 6f1b ldr r3, [r3, #112] @ 0x70
|
|
8003aec: f1b3 6f80 cmp.w r3, #67108864 @ 0x4000000
|
|
8003af0: d10c bne.n 8003b0c <HAL_RCCEx_PeriphCLKConfig+0x4b0>
|
|
{
|
|
/* PLLSAI1 input clock, parameters M, N & Q configuration and clock output (PLLSAI1ClockOut) */
|
|
ret = RCCEx_PLLSAI1_Config(&(PeriphClkInit->PLLSAI1), DIVIDER_Q_UPDATE);
|
|
8003af2: 687b ldr r3, [r7, #4]
|
|
8003af4: 3304 adds r3, #4
|
|
8003af6: 2101 movs r1, #1
|
|
8003af8: 4618 mov r0, r3
|
|
8003afa: f000 f8a9 bl 8003c50 <RCCEx_PLLSAI1_Config>
|
|
8003afe: 4603 mov r3, r0
|
|
8003b00: 74fb strb r3, [r7, #19]
|
|
|
|
if(ret != HAL_OK)
|
|
8003b02: 7cfb ldrb r3, [r7, #19]
|
|
8003b04: 2b00 cmp r3, #0
|
|
8003b06: d001 beq.n 8003b0c <HAL_RCCEx_PeriphCLKConfig+0x4b0>
|
|
{
|
|
/* set overall return value */
|
|
status = ret;
|
|
8003b08: 7cfb ldrb r3, [r7, #19]
|
|
8003b0a: 74bb strb r3, [r7, #18]
|
|
}
|
|
|
|
#endif /* SDMMC1 */
|
|
|
|
/*-------------------------- RNG clock source configuration ----------------------*/
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_RNG) == (RCC_PERIPHCLK_RNG))
|
|
8003b0c: 687b ldr r3, [r7, #4]
|
|
8003b0e: 681b ldr r3, [r3, #0]
|
|
8003b10: f403 2380 and.w r3, r3, #262144 @ 0x40000
|
|
8003b14: 2b00 cmp r3, #0
|
|
8003b16: d02b beq.n 8003b70 <HAL_RCCEx_PeriphCLKConfig+0x514>
|
|
{
|
|
assert_param(IS_RCC_RNGCLKSOURCE(PeriphClkInit->RngClockSelection));
|
|
__HAL_RCC_RNG_CONFIG(PeriphClkInit->RngClockSelection);
|
|
8003b18: 4b0b ldr r3, [pc, #44] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003b1a: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
8003b1e: f023 6240 bic.w r2, r3, #201326592 @ 0xc000000
|
|
8003b22: 687b ldr r3, [r7, #4]
|
|
8003b24: 6f5b ldr r3, [r3, #116] @ 0x74
|
|
8003b26: 4908 ldr r1, [pc, #32] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003b28: 4313 orrs r3, r2
|
|
8003b2a: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
|
|
if(PeriphClkInit->RngClockSelection == RCC_RNGCLKSOURCE_PLL)
|
|
8003b2e: 687b ldr r3, [r7, #4]
|
|
8003b30: 6f5b ldr r3, [r3, #116] @ 0x74
|
|
8003b32: f1b3 6f00 cmp.w r3, #134217728 @ 0x8000000
|
|
8003b36: d109 bne.n 8003b4c <HAL_RCCEx_PeriphCLKConfig+0x4f0>
|
|
{
|
|
/* Enable PLL48M1CLK output clock */
|
|
__HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_48M1CLK);
|
|
8003b38: 4b03 ldr r3, [pc, #12] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003b3a: 68db ldr r3, [r3, #12]
|
|
8003b3c: 4a02 ldr r2, [pc, #8] @ (8003b48 <HAL_RCCEx_PeriphCLKConfig+0x4ec>)
|
|
8003b3e: f443 1380 orr.w r3, r3, #1048576 @ 0x100000
|
|
8003b42: 60d3 str r3, [r2, #12]
|
|
8003b44: e014 b.n 8003b70 <HAL_RCCEx_PeriphCLKConfig+0x514>
|
|
8003b46: bf00 nop
|
|
8003b48: 40021000 .word 0x40021000
|
|
}
|
|
#if defined(RCC_PLLSAI1_SUPPORT)
|
|
else if(PeriphClkInit->RngClockSelection == RCC_RNGCLKSOURCE_PLLSAI1)
|
|
8003b4c: 687b ldr r3, [r7, #4]
|
|
8003b4e: 6f5b ldr r3, [r3, #116] @ 0x74
|
|
8003b50: f1b3 6f80 cmp.w r3, #67108864 @ 0x4000000
|
|
8003b54: d10c bne.n 8003b70 <HAL_RCCEx_PeriphCLKConfig+0x514>
|
|
{
|
|
/* PLLSAI1 input clock, parameters M, N & Q configuration and clock output (PLLSAI1ClockOut) */
|
|
ret = RCCEx_PLLSAI1_Config(&(PeriphClkInit->PLLSAI1), DIVIDER_Q_UPDATE);
|
|
8003b56: 687b ldr r3, [r7, #4]
|
|
8003b58: 3304 adds r3, #4
|
|
8003b5a: 2101 movs r1, #1
|
|
8003b5c: 4618 mov r0, r3
|
|
8003b5e: f000 f877 bl 8003c50 <RCCEx_PLLSAI1_Config>
|
|
8003b62: 4603 mov r3, r0
|
|
8003b64: 74fb strb r3, [r7, #19]
|
|
|
|
if(ret != HAL_OK)
|
|
8003b66: 7cfb ldrb r3, [r7, #19]
|
|
8003b68: 2b00 cmp r3, #0
|
|
8003b6a: d001 beq.n 8003b70 <HAL_RCCEx_PeriphCLKConfig+0x514>
|
|
{
|
|
/* set overall return value */
|
|
status = ret;
|
|
8003b6c: 7cfb ldrb r3, [r7, #19]
|
|
8003b6e: 74bb strb r3, [r7, #18]
|
|
}
|
|
}
|
|
|
|
/*-------------------------- ADC clock source configuration ----------------------*/
|
|
#if !defined(STM32L412xx) && !defined(STM32L422xx)
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_ADC) == RCC_PERIPHCLK_ADC)
|
|
8003b70: 687b ldr r3, [r7, #4]
|
|
8003b72: 681b ldr r3, [r3, #0]
|
|
8003b74: f403 4380 and.w r3, r3, #16384 @ 0x4000
|
|
8003b78: 2b00 cmp r3, #0
|
|
8003b7a: d02f beq.n 8003bdc <HAL_RCCEx_PeriphCLKConfig+0x580>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_ADCCLKSOURCE(PeriphClkInit->AdcClockSelection));
|
|
|
|
/* Configure the ADC interface clock source */
|
|
__HAL_RCC_ADC_CONFIG(PeriphClkInit->AdcClockSelection);
|
|
8003b7c: 4b2b ldr r3, [pc, #172] @ (8003c2c <HAL_RCCEx_PeriphCLKConfig+0x5d0>)
|
|
8003b7e: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
8003b82: f023 5240 bic.w r2, r3, #805306368 @ 0x30000000
|
|
8003b86: 687b ldr r3, [r7, #4]
|
|
8003b88: 6f9b ldr r3, [r3, #120] @ 0x78
|
|
8003b8a: 4928 ldr r1, [pc, #160] @ (8003c2c <HAL_RCCEx_PeriphCLKConfig+0x5d0>)
|
|
8003b8c: 4313 orrs r3, r2
|
|
8003b8e: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
|
|
#if defined(RCC_PLLSAI1_SUPPORT)
|
|
if(PeriphClkInit->AdcClockSelection == RCC_ADCCLKSOURCE_PLLSAI1)
|
|
8003b92: 687b ldr r3, [r7, #4]
|
|
8003b94: 6f9b ldr r3, [r3, #120] @ 0x78
|
|
8003b96: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000
|
|
8003b9a: d10d bne.n 8003bb8 <HAL_RCCEx_PeriphCLKConfig+0x55c>
|
|
{
|
|
/* PLLSAI1 input clock, parameters M, N & R configuration and clock output (PLLSAI1ClockOut) */
|
|
ret = RCCEx_PLLSAI1_Config(&(PeriphClkInit->PLLSAI1), DIVIDER_R_UPDATE);
|
|
8003b9c: 687b ldr r3, [r7, #4]
|
|
8003b9e: 3304 adds r3, #4
|
|
8003ba0: 2102 movs r1, #2
|
|
8003ba2: 4618 mov r0, r3
|
|
8003ba4: f000 f854 bl 8003c50 <RCCEx_PLLSAI1_Config>
|
|
8003ba8: 4603 mov r3, r0
|
|
8003baa: 74fb strb r3, [r7, #19]
|
|
|
|
if(ret != HAL_OK)
|
|
8003bac: 7cfb ldrb r3, [r7, #19]
|
|
8003bae: 2b00 cmp r3, #0
|
|
8003bb0: d014 beq.n 8003bdc <HAL_RCCEx_PeriphCLKConfig+0x580>
|
|
{
|
|
/* set overall return value */
|
|
status = ret;
|
|
8003bb2: 7cfb ldrb r3, [r7, #19]
|
|
8003bb4: 74bb strb r3, [r7, #18]
|
|
8003bb6: e011 b.n 8003bdc <HAL_RCCEx_PeriphCLKConfig+0x580>
|
|
}
|
|
#endif /* RCC_PLLSAI1_SUPPORT */
|
|
|
|
#if defined(STM32L471xx) || defined(STM32L475xx) || defined(STM32L476xx) || defined(STM32L485xx) || defined(STM32L486xx) || defined(STM32L496xx) || defined(STM32L4A6xx)
|
|
|
|
else if(PeriphClkInit->AdcClockSelection == RCC_ADCCLKSOURCE_PLLSAI2)
|
|
8003bb8: 687b ldr r3, [r7, #4]
|
|
8003bba: 6f9b ldr r3, [r3, #120] @ 0x78
|
|
8003bbc: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000
|
|
8003bc0: d10c bne.n 8003bdc <HAL_RCCEx_PeriphCLKConfig+0x580>
|
|
{
|
|
/* PLLSAI2 input clock, parameters M, N & R configuration and clock output (PLLSAI2ClockOut) */
|
|
ret = RCCEx_PLLSAI2_Config(&(PeriphClkInit->PLLSAI2), DIVIDER_R_UPDATE);
|
|
8003bc2: 687b ldr r3, [r7, #4]
|
|
8003bc4: 3320 adds r3, #32
|
|
8003bc6: 2102 movs r1, #2
|
|
8003bc8: 4618 mov r0, r3
|
|
8003bca: f000 f935 bl 8003e38 <RCCEx_PLLSAI2_Config>
|
|
8003bce: 4603 mov r3, r0
|
|
8003bd0: 74fb strb r3, [r7, #19]
|
|
|
|
if(ret != HAL_OK)
|
|
8003bd2: 7cfb ldrb r3, [r7, #19]
|
|
8003bd4: 2b00 cmp r3, #0
|
|
8003bd6: d001 beq.n 8003bdc <HAL_RCCEx_PeriphCLKConfig+0x580>
|
|
{
|
|
/* set overall return value */
|
|
status = ret;
|
|
8003bd8: 7cfb ldrb r3, [r7, #19]
|
|
8003bda: 74bb strb r3, [r7, #18]
|
|
#endif /* !STM32L412xx && !STM32L422xx */
|
|
|
|
#if defined(SWPMI1)
|
|
|
|
/*-------------------------- SWPMI1 clock source configuration -------------------*/
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SWPMI1) == RCC_PERIPHCLK_SWPMI1)
|
|
8003bdc: 687b ldr r3, [r7, #4]
|
|
8003bde: 681b ldr r3, [r3, #0]
|
|
8003be0: f403 4300 and.w r3, r3, #32768 @ 0x8000
|
|
8003be4: 2b00 cmp r3, #0
|
|
8003be6: d00a beq.n 8003bfe <HAL_RCCEx_PeriphCLKConfig+0x5a2>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_SWPMI1CLKSOURCE(PeriphClkInit->Swpmi1ClockSelection));
|
|
|
|
/* Configure the SWPMI1 clock source */
|
|
__HAL_RCC_SWPMI1_CONFIG(PeriphClkInit->Swpmi1ClockSelection);
|
|
8003be8: 4b10 ldr r3, [pc, #64] @ (8003c2c <HAL_RCCEx_PeriphCLKConfig+0x5d0>)
|
|
8003bea: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
8003bee: f023 4280 bic.w r2, r3, #1073741824 @ 0x40000000
|
|
8003bf2: 687b ldr r3, [r7, #4]
|
|
8003bf4: 6fdb ldr r3, [r3, #124] @ 0x7c
|
|
8003bf6: 490d ldr r1, [pc, #52] @ (8003c2c <HAL_RCCEx_PeriphCLKConfig+0x5d0>)
|
|
8003bf8: 4313 orrs r3, r2
|
|
8003bfa: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
#endif /* SWPMI1 */
|
|
|
|
#if defined(DFSDM1_Filter0)
|
|
|
|
/*-------------------------- DFSDM1 clock source configuration -------------------*/
|
|
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_DFSDM1) == RCC_PERIPHCLK_DFSDM1)
|
|
8003bfe: 687b ldr r3, [r7, #4]
|
|
8003c00: 681b ldr r3, [r3, #0]
|
|
8003c02: f403 3380 and.w r3, r3, #65536 @ 0x10000
|
|
8003c06: 2b00 cmp r3, #0
|
|
8003c08: d00b beq.n 8003c22 <HAL_RCCEx_PeriphCLKConfig+0x5c6>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param(IS_RCC_DFSDM1CLKSOURCE(PeriphClkInit->Dfsdm1ClockSelection));
|
|
|
|
/* Configure the DFSDM1 interface clock source */
|
|
__HAL_RCC_DFSDM1_CONFIG(PeriphClkInit->Dfsdm1ClockSelection);
|
|
8003c0a: 4b08 ldr r3, [pc, #32] @ (8003c2c <HAL_RCCEx_PeriphCLKConfig+0x5d0>)
|
|
8003c0c: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
8003c10: f023 4200 bic.w r2, r3, #2147483648 @ 0x80000000
|
|
8003c14: 687b ldr r3, [r7, #4]
|
|
8003c16: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80
|
|
8003c1a: 4904 ldr r1, [pc, #16] @ (8003c2c <HAL_RCCEx_PeriphCLKConfig+0x5d0>)
|
|
8003c1c: 4313 orrs r3, r2
|
|
8003c1e: f8c1 3088 str.w r3, [r1, #136] @ 0x88
|
|
}
|
|
}
|
|
|
|
#endif /* OCTOSPI1 || OCTOSPI2 */
|
|
|
|
return status;
|
|
8003c22: 7cbb ldrb r3, [r7, #18]
|
|
}
|
|
8003c24: 4618 mov r0, r3
|
|
8003c26: 3718 adds r7, #24
|
|
8003c28: 46bd mov sp, r7
|
|
8003c2a: bd80 pop {r7, pc}
|
|
8003c2c: 40021000 .word 0x40021000
|
|
|
|
08003c30 <HAL_RCCEx_EnableMSIPLLMode>:
|
|
* @note Prior to enable the PLL-mode of the MSI for automatic hardware
|
|
* calibration LSE oscillator is to be enabled with HAL_RCC_OscConfig().
|
|
* @retval None
|
|
*/
|
|
void HAL_RCCEx_EnableMSIPLLMode(void)
|
|
{
|
|
8003c30: b480 push {r7}
|
|
8003c32: af00 add r7, sp, #0
|
|
SET_BIT(RCC->CR, RCC_CR_MSIPLLEN) ;
|
|
8003c34: 4b05 ldr r3, [pc, #20] @ (8003c4c <HAL_RCCEx_EnableMSIPLLMode+0x1c>)
|
|
8003c36: 681b ldr r3, [r3, #0]
|
|
8003c38: 4a04 ldr r2, [pc, #16] @ (8003c4c <HAL_RCCEx_EnableMSIPLLMode+0x1c>)
|
|
8003c3a: f043 0304 orr.w r3, r3, #4
|
|
8003c3e: 6013 str r3, [r2, #0]
|
|
}
|
|
8003c40: bf00 nop
|
|
8003c42: 46bd mov sp, r7
|
|
8003c44: f85d 7b04 ldr.w r7, [sp], #4
|
|
8003c48: 4770 bx lr
|
|
8003c4a: bf00 nop
|
|
8003c4c: 40021000 .word 0x40021000
|
|
|
|
08003c50 <RCCEx_PLLSAI1_Config>:
|
|
* @note PLLSAI1 is temporary disable to apply new parameters
|
|
*
|
|
* @retval HAL status
|
|
*/
|
|
static HAL_StatusTypeDef RCCEx_PLLSAI1_Config(RCC_PLLSAI1InitTypeDef *PllSai1, uint32_t Divider)
|
|
{
|
|
8003c50: b580 push {r7, lr}
|
|
8003c52: b084 sub sp, #16
|
|
8003c54: af00 add r7, sp, #0
|
|
8003c56: 6078 str r0, [r7, #4]
|
|
8003c58: 6039 str r1, [r7, #0]
|
|
uint32_t tickstart;
|
|
HAL_StatusTypeDef status = HAL_OK;
|
|
8003c5a: 2300 movs r3, #0
|
|
8003c5c: 73fb strb r3, [r7, #15]
|
|
assert_param(IS_RCC_PLLSAI1M_VALUE(PllSai1->PLLSAI1M));
|
|
assert_param(IS_RCC_PLLSAI1N_VALUE(PllSai1->PLLSAI1N));
|
|
assert_param(IS_RCC_PLLSAI1CLOCKOUT_VALUE(PllSai1->PLLSAI1ClockOut));
|
|
|
|
/* Check that PLLSAI1 clock source and divider M can be applied */
|
|
if(__HAL_RCC_GET_PLL_OSCSOURCE() != RCC_PLLSOURCE_NONE)
|
|
8003c5e: 4b75 ldr r3, [pc, #468] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003c60: 68db ldr r3, [r3, #12]
|
|
8003c62: f003 0303 and.w r3, r3, #3
|
|
8003c66: 2b00 cmp r3, #0
|
|
8003c68: d018 beq.n 8003c9c <RCCEx_PLLSAI1_Config+0x4c>
|
|
{
|
|
/* PLL clock source and divider M already set, check that no request for change */
|
|
if((__HAL_RCC_GET_PLL_OSCSOURCE() != PllSai1->PLLSAI1Source)
|
|
8003c6a: 4b72 ldr r3, [pc, #456] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003c6c: 68db ldr r3, [r3, #12]
|
|
8003c6e: f003 0203 and.w r2, r3, #3
|
|
8003c72: 687b ldr r3, [r7, #4]
|
|
8003c74: 681b ldr r3, [r3, #0]
|
|
8003c76: 429a cmp r2, r3
|
|
8003c78: d10d bne.n 8003c96 <RCCEx_PLLSAI1_Config+0x46>
|
|
||
|
|
(PllSai1->PLLSAI1Source == RCC_PLLSOURCE_NONE)
|
|
8003c7a: 687b ldr r3, [r7, #4]
|
|
8003c7c: 681b ldr r3, [r3, #0]
|
|
||
|
|
8003c7e: 2b00 cmp r3, #0
|
|
8003c80: d009 beq.n 8003c96 <RCCEx_PLLSAI1_Config+0x46>
|
|
#if !defined(RCC_PLLSAI1M_DIV_1_16_SUPPORT)
|
|
||
|
|
(((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLM) >> RCC_PLLCFGR_PLLM_Pos) + 1U) != PllSai1->PLLSAI1M)
|
|
8003c82: 4b6c ldr r3, [pc, #432] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003c84: 68db ldr r3, [r3, #12]
|
|
8003c86: 091b lsrs r3, r3, #4
|
|
8003c88: f003 0307 and.w r3, r3, #7
|
|
8003c8c: 1c5a adds r2, r3, #1
|
|
8003c8e: 687b ldr r3, [r7, #4]
|
|
8003c90: 685b ldr r3, [r3, #4]
|
|
||
|
|
8003c92: 429a cmp r2, r3
|
|
8003c94: d047 beq.n 8003d26 <RCCEx_PLLSAI1_Config+0xd6>
|
|
#endif
|
|
)
|
|
{
|
|
status = HAL_ERROR;
|
|
8003c96: 2301 movs r3, #1
|
|
8003c98: 73fb strb r3, [r7, #15]
|
|
8003c9a: e044 b.n 8003d26 <RCCEx_PLLSAI1_Config+0xd6>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Check PLLSAI1 clock source availability */
|
|
switch(PllSai1->PLLSAI1Source)
|
|
8003c9c: 687b ldr r3, [r7, #4]
|
|
8003c9e: 681b ldr r3, [r3, #0]
|
|
8003ca0: 2b03 cmp r3, #3
|
|
8003ca2: d018 beq.n 8003cd6 <RCCEx_PLLSAI1_Config+0x86>
|
|
8003ca4: 2b03 cmp r3, #3
|
|
8003ca6: d825 bhi.n 8003cf4 <RCCEx_PLLSAI1_Config+0xa4>
|
|
8003ca8: 2b01 cmp r3, #1
|
|
8003caa: d002 beq.n 8003cb2 <RCCEx_PLLSAI1_Config+0x62>
|
|
8003cac: 2b02 cmp r3, #2
|
|
8003cae: d009 beq.n 8003cc4 <RCCEx_PLLSAI1_Config+0x74>
|
|
8003cb0: e020 b.n 8003cf4 <RCCEx_PLLSAI1_Config+0xa4>
|
|
{
|
|
case RCC_PLLSOURCE_MSI:
|
|
if(HAL_IS_BIT_CLR(RCC->CR, RCC_CR_MSIRDY))
|
|
8003cb2: 4b60 ldr r3, [pc, #384] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003cb4: 681b ldr r3, [r3, #0]
|
|
8003cb6: f003 0302 and.w r3, r3, #2
|
|
8003cba: 2b00 cmp r3, #0
|
|
8003cbc: d11d bne.n 8003cfa <RCCEx_PLLSAI1_Config+0xaa>
|
|
{
|
|
status = HAL_ERROR;
|
|
8003cbe: 2301 movs r3, #1
|
|
8003cc0: 73fb strb r3, [r7, #15]
|
|
}
|
|
break;
|
|
8003cc2: e01a b.n 8003cfa <RCCEx_PLLSAI1_Config+0xaa>
|
|
case RCC_PLLSOURCE_HSI:
|
|
if(HAL_IS_BIT_CLR(RCC->CR, RCC_CR_HSIRDY))
|
|
8003cc4: 4b5b ldr r3, [pc, #364] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003cc6: 681b ldr r3, [r3, #0]
|
|
8003cc8: f403 6380 and.w r3, r3, #1024 @ 0x400
|
|
8003ccc: 2b00 cmp r3, #0
|
|
8003cce: d116 bne.n 8003cfe <RCCEx_PLLSAI1_Config+0xae>
|
|
{
|
|
status = HAL_ERROR;
|
|
8003cd0: 2301 movs r3, #1
|
|
8003cd2: 73fb strb r3, [r7, #15]
|
|
}
|
|
break;
|
|
8003cd4: e013 b.n 8003cfe <RCCEx_PLLSAI1_Config+0xae>
|
|
case RCC_PLLSOURCE_HSE:
|
|
if(HAL_IS_BIT_CLR(RCC->CR, RCC_CR_HSERDY))
|
|
8003cd6: 4b57 ldr r3, [pc, #348] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003cd8: 681b ldr r3, [r3, #0]
|
|
8003cda: f403 3300 and.w r3, r3, #131072 @ 0x20000
|
|
8003cde: 2b00 cmp r3, #0
|
|
8003ce0: d10f bne.n 8003d02 <RCCEx_PLLSAI1_Config+0xb2>
|
|
{
|
|
if(HAL_IS_BIT_CLR(RCC->CR, RCC_CR_HSEBYP))
|
|
8003ce2: 4b54 ldr r3, [pc, #336] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003ce4: 681b ldr r3, [r3, #0]
|
|
8003ce6: f403 2380 and.w r3, r3, #262144 @ 0x40000
|
|
8003cea: 2b00 cmp r3, #0
|
|
8003cec: d109 bne.n 8003d02 <RCCEx_PLLSAI1_Config+0xb2>
|
|
{
|
|
status = HAL_ERROR;
|
|
8003cee: 2301 movs r3, #1
|
|
8003cf0: 73fb strb r3, [r7, #15]
|
|
}
|
|
}
|
|
break;
|
|
8003cf2: e006 b.n 8003d02 <RCCEx_PLLSAI1_Config+0xb2>
|
|
default:
|
|
status = HAL_ERROR;
|
|
8003cf4: 2301 movs r3, #1
|
|
8003cf6: 73fb strb r3, [r7, #15]
|
|
break;
|
|
8003cf8: e004 b.n 8003d04 <RCCEx_PLLSAI1_Config+0xb4>
|
|
break;
|
|
8003cfa: bf00 nop
|
|
8003cfc: e002 b.n 8003d04 <RCCEx_PLLSAI1_Config+0xb4>
|
|
break;
|
|
8003cfe: bf00 nop
|
|
8003d00: e000 b.n 8003d04 <RCCEx_PLLSAI1_Config+0xb4>
|
|
break;
|
|
8003d02: bf00 nop
|
|
}
|
|
|
|
if(status == HAL_OK)
|
|
8003d04: 7bfb ldrb r3, [r7, #15]
|
|
8003d06: 2b00 cmp r3, #0
|
|
8003d08: d10d bne.n 8003d26 <RCCEx_PLLSAI1_Config+0xd6>
|
|
#if defined(RCC_PLLSAI1M_DIV_1_16_SUPPORT)
|
|
/* Set PLLSAI1 clock source */
|
|
MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, PllSai1->PLLSAI1Source);
|
|
#else
|
|
/* Set PLLSAI1 clock source and divider M */
|
|
MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM, PllSai1->PLLSAI1Source | (PllSai1->PLLSAI1M - 1U) << RCC_PLLCFGR_PLLM_Pos);
|
|
8003d0a: 4b4a ldr r3, [pc, #296] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003d0c: 68db ldr r3, [r3, #12]
|
|
8003d0e: f023 0273 bic.w r2, r3, #115 @ 0x73
|
|
8003d12: 687b ldr r3, [r7, #4]
|
|
8003d14: 6819 ldr r1, [r3, #0]
|
|
8003d16: 687b ldr r3, [r7, #4]
|
|
8003d18: 685b ldr r3, [r3, #4]
|
|
8003d1a: 3b01 subs r3, #1
|
|
8003d1c: 011b lsls r3, r3, #4
|
|
8003d1e: 430b orrs r3, r1
|
|
8003d20: 4944 ldr r1, [pc, #272] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003d22: 4313 orrs r3, r2
|
|
8003d24: 60cb str r3, [r1, #12]
|
|
#endif
|
|
}
|
|
}
|
|
|
|
if(status == HAL_OK)
|
|
8003d26: 7bfb ldrb r3, [r7, #15]
|
|
8003d28: 2b00 cmp r3, #0
|
|
8003d2a: d17d bne.n 8003e28 <RCCEx_PLLSAI1_Config+0x1d8>
|
|
{
|
|
/* Disable the PLLSAI1 */
|
|
__HAL_RCC_PLLSAI1_DISABLE();
|
|
8003d2c: 4b41 ldr r3, [pc, #260] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003d2e: 681b ldr r3, [r3, #0]
|
|
8003d30: 4a40 ldr r2, [pc, #256] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003d32: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000
|
|
8003d36: 6013 str r3, [r2, #0]
|
|
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
8003d38: f7fd feb8 bl 8001aac <HAL_GetTick>
|
|
8003d3c: 60b8 str r0, [r7, #8]
|
|
|
|
/* Wait till PLLSAI1 is ready to be updated */
|
|
while(READ_BIT(RCC->CR, RCC_CR_PLLSAI1RDY) != 0U)
|
|
8003d3e: e009 b.n 8003d54 <RCCEx_PLLSAI1_Config+0x104>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE)
|
|
8003d40: f7fd feb4 bl 8001aac <HAL_GetTick>
|
|
8003d44: 4602 mov r2, r0
|
|
8003d46: 68bb ldr r3, [r7, #8]
|
|
8003d48: 1ad3 subs r3, r2, r3
|
|
8003d4a: 2b02 cmp r3, #2
|
|
8003d4c: d902 bls.n 8003d54 <RCCEx_PLLSAI1_Config+0x104>
|
|
{
|
|
status = HAL_TIMEOUT;
|
|
8003d4e: 2303 movs r3, #3
|
|
8003d50: 73fb strb r3, [r7, #15]
|
|
break;
|
|
8003d52: e005 b.n 8003d60 <RCCEx_PLLSAI1_Config+0x110>
|
|
while(READ_BIT(RCC->CR, RCC_CR_PLLSAI1RDY) != 0U)
|
|
8003d54: 4b37 ldr r3, [pc, #220] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003d56: 681b ldr r3, [r3, #0]
|
|
8003d58: f003 6300 and.w r3, r3, #134217728 @ 0x8000000
|
|
8003d5c: 2b00 cmp r3, #0
|
|
8003d5e: d1ef bne.n 8003d40 <RCCEx_PLLSAI1_Config+0xf0>
|
|
}
|
|
}
|
|
|
|
if(status == HAL_OK)
|
|
8003d60: 7bfb ldrb r3, [r7, #15]
|
|
8003d62: 2b00 cmp r3, #0
|
|
8003d64: d160 bne.n 8003e28 <RCCEx_PLLSAI1_Config+0x1d8>
|
|
{
|
|
if(Divider == DIVIDER_P_UPDATE)
|
|
8003d66: 683b ldr r3, [r7, #0]
|
|
8003d68: 2b00 cmp r3, #0
|
|
8003d6a: d111 bne.n 8003d90 <RCCEx_PLLSAI1_Config+0x140>
|
|
MODIFY_REG(RCC->PLLSAI1CFGR,
|
|
RCC_PLLSAI1CFGR_PLLSAI1N | RCC_PLLSAI1CFGR_PLLSAI1PDIV,
|
|
(PllSai1->PLLSAI1N << RCC_PLLSAI1CFGR_PLLSAI1N_Pos) |
|
|
(PllSai1->PLLSAI1P << RCC_PLLSAI1CFGR_PLLSAI1PDIV_Pos));
|
|
#else
|
|
MODIFY_REG(RCC->PLLSAI1CFGR,
|
|
8003d6c: 4b31 ldr r3, [pc, #196] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003d6e: 691b ldr r3, [r3, #16]
|
|
8003d70: f423 331f bic.w r3, r3, #162816 @ 0x27c00
|
|
8003d74: f423 7340 bic.w r3, r3, #768 @ 0x300
|
|
8003d78: 687a ldr r2, [r7, #4]
|
|
8003d7a: 6892 ldr r2, [r2, #8]
|
|
8003d7c: 0211 lsls r1, r2, #8
|
|
8003d7e: 687a ldr r2, [r7, #4]
|
|
8003d80: 68d2 ldr r2, [r2, #12]
|
|
8003d82: 0912 lsrs r2, r2, #4
|
|
8003d84: 0452 lsls r2, r2, #17
|
|
8003d86: 430a orrs r2, r1
|
|
8003d88: 492a ldr r1, [pc, #168] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003d8a: 4313 orrs r3, r2
|
|
8003d8c: 610b str r3, [r1, #16]
|
|
8003d8e: e027 b.n 8003de0 <RCCEx_PLLSAI1_Config+0x190>
|
|
((PllSai1->PLLSAI1P >> 4U) << RCC_PLLSAI1CFGR_PLLSAI1P_Pos));
|
|
#endif /* RCC_PLLSAI1P_DIV_2_31_SUPPORT */
|
|
|
|
#endif /* RCC_PLLSAI1M_DIV_1_16_SUPPORT */
|
|
}
|
|
else if(Divider == DIVIDER_Q_UPDATE)
|
|
8003d90: 683b ldr r3, [r7, #0]
|
|
8003d92: 2b01 cmp r3, #1
|
|
8003d94: d112 bne.n 8003dbc <RCCEx_PLLSAI1_Config+0x16c>
|
|
(PllSai1->PLLSAI1N << RCC_PLLSAI1CFGR_PLLSAI1N_Pos) |
|
|
(((PllSai1->PLLSAI1Q >> 1U) - 1U) << RCC_PLLSAI1CFGR_PLLSAI1Q_Pos) |
|
|
((PllSai1->PLLSAI1M - 1U) << RCC_PLLSAI1CFGR_PLLSAI1M_Pos));
|
|
#else
|
|
/* Configure the PLLSAI1 Division factor Q and Multiplication factor N*/
|
|
MODIFY_REG(RCC->PLLSAI1CFGR,
|
|
8003d96: 4b27 ldr r3, [pc, #156] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003d98: 691b ldr r3, [r3, #16]
|
|
8003d9a: f423 03c0 bic.w r3, r3, #6291456 @ 0x600000
|
|
8003d9e: f423 43fe bic.w r3, r3, #32512 @ 0x7f00
|
|
8003da2: 687a ldr r2, [r7, #4]
|
|
8003da4: 6892 ldr r2, [r2, #8]
|
|
8003da6: 0211 lsls r1, r2, #8
|
|
8003da8: 687a ldr r2, [r7, #4]
|
|
8003daa: 6912 ldr r2, [r2, #16]
|
|
8003dac: 0852 lsrs r2, r2, #1
|
|
8003dae: 3a01 subs r2, #1
|
|
8003db0: 0552 lsls r2, r2, #21
|
|
8003db2: 430a orrs r2, r1
|
|
8003db4: 491f ldr r1, [pc, #124] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003db6: 4313 orrs r3, r2
|
|
8003db8: 610b str r3, [r1, #16]
|
|
8003dba: e011 b.n 8003de0 <RCCEx_PLLSAI1_Config+0x190>
|
|
(PllSai1->PLLSAI1N << RCC_PLLSAI1CFGR_PLLSAI1N_Pos) |
|
|
(((PllSai1->PLLSAI1R >> 1U) - 1U) << RCC_PLLSAI1CFGR_PLLSAI1R_Pos) |
|
|
((PllSai1->PLLSAI1M - 1U) << RCC_PLLSAI1CFGR_PLLSAI1M_Pos));
|
|
#else
|
|
/* Configure the PLLSAI1 Division factor R and Multiplication factor N*/
|
|
MODIFY_REG(RCC->PLLSAI1CFGR,
|
|
8003dbc: 4b1d ldr r3, [pc, #116] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003dbe: 691b ldr r3, [r3, #16]
|
|
8003dc0: f023 63c0 bic.w r3, r3, #100663296 @ 0x6000000
|
|
8003dc4: f423 43fe bic.w r3, r3, #32512 @ 0x7f00
|
|
8003dc8: 687a ldr r2, [r7, #4]
|
|
8003dca: 6892 ldr r2, [r2, #8]
|
|
8003dcc: 0211 lsls r1, r2, #8
|
|
8003dce: 687a ldr r2, [r7, #4]
|
|
8003dd0: 6952 ldr r2, [r2, #20]
|
|
8003dd2: 0852 lsrs r2, r2, #1
|
|
8003dd4: 3a01 subs r2, #1
|
|
8003dd6: 0652 lsls r2, r2, #25
|
|
8003dd8: 430a orrs r2, r1
|
|
8003dda: 4916 ldr r1, [pc, #88] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003ddc: 4313 orrs r3, r2
|
|
8003dde: 610b str r3, [r1, #16]
|
|
(((PllSai1->PLLSAI1R >> 1U) - 1U) << RCC_PLLSAI1CFGR_PLLSAI1R_Pos));
|
|
#endif /* RCC_PLLSAI1M_DIV_1_16_SUPPORT */
|
|
}
|
|
|
|
/* Enable the PLLSAI1 again by setting PLLSAI1ON to 1*/
|
|
__HAL_RCC_PLLSAI1_ENABLE();
|
|
8003de0: 4b14 ldr r3, [pc, #80] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003de2: 681b ldr r3, [r3, #0]
|
|
8003de4: 4a13 ldr r2, [pc, #76] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003de6: f043 6380 orr.w r3, r3, #67108864 @ 0x4000000
|
|
8003dea: 6013 str r3, [r2, #0]
|
|
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
8003dec: f7fd fe5e bl 8001aac <HAL_GetTick>
|
|
8003df0: 60b8 str r0, [r7, #8]
|
|
|
|
/* Wait till PLLSAI1 is ready */
|
|
while(READ_BIT(RCC->CR, RCC_CR_PLLSAI1RDY) == 0U)
|
|
8003df2: e009 b.n 8003e08 <RCCEx_PLLSAI1_Config+0x1b8>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE)
|
|
8003df4: f7fd fe5a bl 8001aac <HAL_GetTick>
|
|
8003df8: 4602 mov r2, r0
|
|
8003dfa: 68bb ldr r3, [r7, #8]
|
|
8003dfc: 1ad3 subs r3, r2, r3
|
|
8003dfe: 2b02 cmp r3, #2
|
|
8003e00: d902 bls.n 8003e08 <RCCEx_PLLSAI1_Config+0x1b8>
|
|
{
|
|
status = HAL_TIMEOUT;
|
|
8003e02: 2303 movs r3, #3
|
|
8003e04: 73fb strb r3, [r7, #15]
|
|
break;
|
|
8003e06: e005 b.n 8003e14 <RCCEx_PLLSAI1_Config+0x1c4>
|
|
while(READ_BIT(RCC->CR, RCC_CR_PLLSAI1RDY) == 0U)
|
|
8003e08: 4b0a ldr r3, [pc, #40] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003e0a: 681b ldr r3, [r3, #0]
|
|
8003e0c: f003 6300 and.w r3, r3, #134217728 @ 0x8000000
|
|
8003e10: 2b00 cmp r3, #0
|
|
8003e12: d0ef beq.n 8003df4 <RCCEx_PLLSAI1_Config+0x1a4>
|
|
}
|
|
}
|
|
|
|
if(status == HAL_OK)
|
|
8003e14: 7bfb ldrb r3, [r7, #15]
|
|
8003e16: 2b00 cmp r3, #0
|
|
8003e18: d106 bne.n 8003e28 <RCCEx_PLLSAI1_Config+0x1d8>
|
|
{
|
|
/* Configure the PLLSAI1 Clock output(s) */
|
|
__HAL_RCC_PLLSAI1CLKOUT_ENABLE(PllSai1->PLLSAI1ClockOut);
|
|
8003e1a: 4b06 ldr r3, [pc, #24] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003e1c: 691a ldr r2, [r3, #16]
|
|
8003e1e: 687b ldr r3, [r7, #4]
|
|
8003e20: 699b ldr r3, [r3, #24]
|
|
8003e22: 4904 ldr r1, [pc, #16] @ (8003e34 <RCCEx_PLLSAI1_Config+0x1e4>)
|
|
8003e24: 4313 orrs r3, r2
|
|
8003e26: 610b str r3, [r1, #16]
|
|
}
|
|
}
|
|
}
|
|
|
|
return status;
|
|
8003e28: 7bfb ldrb r3, [r7, #15]
|
|
}
|
|
8003e2a: 4618 mov r0, r3
|
|
8003e2c: 3710 adds r7, #16
|
|
8003e2e: 46bd mov sp, r7
|
|
8003e30: bd80 pop {r7, pc}
|
|
8003e32: bf00 nop
|
|
8003e34: 40021000 .word 0x40021000
|
|
|
|
08003e38 <RCCEx_PLLSAI2_Config>:
|
|
* @note PLLSAI2 is temporary disable to apply new parameters
|
|
*
|
|
* @retval HAL status
|
|
*/
|
|
static HAL_StatusTypeDef RCCEx_PLLSAI2_Config(RCC_PLLSAI2InitTypeDef *PllSai2, uint32_t Divider)
|
|
{
|
|
8003e38: b580 push {r7, lr}
|
|
8003e3a: b084 sub sp, #16
|
|
8003e3c: af00 add r7, sp, #0
|
|
8003e3e: 6078 str r0, [r7, #4]
|
|
8003e40: 6039 str r1, [r7, #0]
|
|
uint32_t tickstart;
|
|
HAL_StatusTypeDef status = HAL_OK;
|
|
8003e42: 2300 movs r3, #0
|
|
8003e44: 73fb strb r3, [r7, #15]
|
|
assert_param(IS_RCC_PLLSAI2M_VALUE(PllSai2->PLLSAI2M));
|
|
assert_param(IS_RCC_PLLSAI2N_VALUE(PllSai2->PLLSAI2N));
|
|
assert_param(IS_RCC_PLLSAI2CLOCKOUT_VALUE(PllSai2->PLLSAI2ClockOut));
|
|
|
|
/* Check that PLLSAI2 clock source and divider M can be applied */
|
|
if(__HAL_RCC_GET_PLL_OSCSOURCE() != RCC_PLLSOURCE_NONE)
|
|
8003e46: 4b6a ldr r3, [pc, #424] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003e48: 68db ldr r3, [r3, #12]
|
|
8003e4a: f003 0303 and.w r3, r3, #3
|
|
8003e4e: 2b00 cmp r3, #0
|
|
8003e50: d018 beq.n 8003e84 <RCCEx_PLLSAI2_Config+0x4c>
|
|
{
|
|
/* PLL clock source and divider M already set, check that no request for change */
|
|
if((__HAL_RCC_GET_PLL_OSCSOURCE() != PllSai2->PLLSAI2Source)
|
|
8003e52: 4b67 ldr r3, [pc, #412] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003e54: 68db ldr r3, [r3, #12]
|
|
8003e56: f003 0203 and.w r2, r3, #3
|
|
8003e5a: 687b ldr r3, [r7, #4]
|
|
8003e5c: 681b ldr r3, [r3, #0]
|
|
8003e5e: 429a cmp r2, r3
|
|
8003e60: d10d bne.n 8003e7e <RCCEx_PLLSAI2_Config+0x46>
|
|
||
|
|
(PllSai2->PLLSAI2Source == RCC_PLLSOURCE_NONE)
|
|
8003e62: 687b ldr r3, [r7, #4]
|
|
8003e64: 681b ldr r3, [r3, #0]
|
|
||
|
|
8003e66: 2b00 cmp r3, #0
|
|
8003e68: d009 beq.n 8003e7e <RCCEx_PLLSAI2_Config+0x46>
|
|
#if !defined(RCC_PLLSAI2M_DIV_1_16_SUPPORT)
|
|
||
|
|
(((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLM) >> RCC_PLLCFGR_PLLM_Pos) + 1U) != PllSai2->PLLSAI2M)
|
|
8003e6a: 4b61 ldr r3, [pc, #388] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003e6c: 68db ldr r3, [r3, #12]
|
|
8003e6e: 091b lsrs r3, r3, #4
|
|
8003e70: f003 0307 and.w r3, r3, #7
|
|
8003e74: 1c5a adds r2, r3, #1
|
|
8003e76: 687b ldr r3, [r7, #4]
|
|
8003e78: 685b ldr r3, [r3, #4]
|
|
||
|
|
8003e7a: 429a cmp r2, r3
|
|
8003e7c: d047 beq.n 8003f0e <RCCEx_PLLSAI2_Config+0xd6>
|
|
#endif
|
|
)
|
|
{
|
|
status = HAL_ERROR;
|
|
8003e7e: 2301 movs r3, #1
|
|
8003e80: 73fb strb r3, [r7, #15]
|
|
8003e82: e044 b.n 8003f0e <RCCEx_PLLSAI2_Config+0xd6>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Check PLLSAI2 clock source availability */
|
|
switch(PllSai2->PLLSAI2Source)
|
|
8003e84: 687b ldr r3, [r7, #4]
|
|
8003e86: 681b ldr r3, [r3, #0]
|
|
8003e88: 2b03 cmp r3, #3
|
|
8003e8a: d018 beq.n 8003ebe <RCCEx_PLLSAI2_Config+0x86>
|
|
8003e8c: 2b03 cmp r3, #3
|
|
8003e8e: d825 bhi.n 8003edc <RCCEx_PLLSAI2_Config+0xa4>
|
|
8003e90: 2b01 cmp r3, #1
|
|
8003e92: d002 beq.n 8003e9a <RCCEx_PLLSAI2_Config+0x62>
|
|
8003e94: 2b02 cmp r3, #2
|
|
8003e96: d009 beq.n 8003eac <RCCEx_PLLSAI2_Config+0x74>
|
|
8003e98: e020 b.n 8003edc <RCCEx_PLLSAI2_Config+0xa4>
|
|
{
|
|
case RCC_PLLSOURCE_MSI:
|
|
if(HAL_IS_BIT_CLR(RCC->CR, RCC_CR_MSIRDY))
|
|
8003e9a: 4b55 ldr r3, [pc, #340] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003e9c: 681b ldr r3, [r3, #0]
|
|
8003e9e: f003 0302 and.w r3, r3, #2
|
|
8003ea2: 2b00 cmp r3, #0
|
|
8003ea4: d11d bne.n 8003ee2 <RCCEx_PLLSAI2_Config+0xaa>
|
|
{
|
|
status = HAL_ERROR;
|
|
8003ea6: 2301 movs r3, #1
|
|
8003ea8: 73fb strb r3, [r7, #15]
|
|
}
|
|
break;
|
|
8003eaa: e01a b.n 8003ee2 <RCCEx_PLLSAI2_Config+0xaa>
|
|
case RCC_PLLSOURCE_HSI:
|
|
if(HAL_IS_BIT_CLR(RCC->CR, RCC_CR_HSIRDY))
|
|
8003eac: 4b50 ldr r3, [pc, #320] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003eae: 681b ldr r3, [r3, #0]
|
|
8003eb0: f403 6380 and.w r3, r3, #1024 @ 0x400
|
|
8003eb4: 2b00 cmp r3, #0
|
|
8003eb6: d116 bne.n 8003ee6 <RCCEx_PLLSAI2_Config+0xae>
|
|
{
|
|
status = HAL_ERROR;
|
|
8003eb8: 2301 movs r3, #1
|
|
8003eba: 73fb strb r3, [r7, #15]
|
|
}
|
|
break;
|
|
8003ebc: e013 b.n 8003ee6 <RCCEx_PLLSAI2_Config+0xae>
|
|
case RCC_PLLSOURCE_HSE:
|
|
if(HAL_IS_BIT_CLR(RCC->CR, RCC_CR_HSERDY))
|
|
8003ebe: 4b4c ldr r3, [pc, #304] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003ec0: 681b ldr r3, [r3, #0]
|
|
8003ec2: f403 3300 and.w r3, r3, #131072 @ 0x20000
|
|
8003ec6: 2b00 cmp r3, #0
|
|
8003ec8: d10f bne.n 8003eea <RCCEx_PLLSAI2_Config+0xb2>
|
|
{
|
|
if(HAL_IS_BIT_CLR(RCC->CR, RCC_CR_HSEBYP))
|
|
8003eca: 4b49 ldr r3, [pc, #292] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003ecc: 681b ldr r3, [r3, #0]
|
|
8003ece: f403 2380 and.w r3, r3, #262144 @ 0x40000
|
|
8003ed2: 2b00 cmp r3, #0
|
|
8003ed4: d109 bne.n 8003eea <RCCEx_PLLSAI2_Config+0xb2>
|
|
{
|
|
status = HAL_ERROR;
|
|
8003ed6: 2301 movs r3, #1
|
|
8003ed8: 73fb strb r3, [r7, #15]
|
|
}
|
|
}
|
|
break;
|
|
8003eda: e006 b.n 8003eea <RCCEx_PLLSAI2_Config+0xb2>
|
|
default:
|
|
status = HAL_ERROR;
|
|
8003edc: 2301 movs r3, #1
|
|
8003ede: 73fb strb r3, [r7, #15]
|
|
break;
|
|
8003ee0: e004 b.n 8003eec <RCCEx_PLLSAI2_Config+0xb4>
|
|
break;
|
|
8003ee2: bf00 nop
|
|
8003ee4: e002 b.n 8003eec <RCCEx_PLLSAI2_Config+0xb4>
|
|
break;
|
|
8003ee6: bf00 nop
|
|
8003ee8: e000 b.n 8003eec <RCCEx_PLLSAI2_Config+0xb4>
|
|
break;
|
|
8003eea: bf00 nop
|
|
}
|
|
|
|
if(status == HAL_OK)
|
|
8003eec: 7bfb ldrb r3, [r7, #15]
|
|
8003eee: 2b00 cmp r3, #0
|
|
8003ef0: d10d bne.n 8003f0e <RCCEx_PLLSAI2_Config+0xd6>
|
|
#if defined(RCC_PLLSAI2M_DIV_1_16_SUPPORT)
|
|
/* Set PLLSAI2 clock source */
|
|
MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, PllSai2->PLLSAI2Source);
|
|
#else
|
|
/* Set PLLSAI2 clock source and divider M */
|
|
MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM, PllSai2->PLLSAI2Source | (PllSai2->PLLSAI2M - 1U) << RCC_PLLCFGR_PLLM_Pos);
|
|
8003ef2: 4b3f ldr r3, [pc, #252] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003ef4: 68db ldr r3, [r3, #12]
|
|
8003ef6: f023 0273 bic.w r2, r3, #115 @ 0x73
|
|
8003efa: 687b ldr r3, [r7, #4]
|
|
8003efc: 6819 ldr r1, [r3, #0]
|
|
8003efe: 687b ldr r3, [r7, #4]
|
|
8003f00: 685b ldr r3, [r3, #4]
|
|
8003f02: 3b01 subs r3, #1
|
|
8003f04: 011b lsls r3, r3, #4
|
|
8003f06: 430b orrs r3, r1
|
|
8003f08: 4939 ldr r1, [pc, #228] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003f0a: 4313 orrs r3, r2
|
|
8003f0c: 60cb str r3, [r1, #12]
|
|
#endif
|
|
}
|
|
}
|
|
|
|
if(status == HAL_OK)
|
|
8003f0e: 7bfb ldrb r3, [r7, #15]
|
|
8003f10: 2b00 cmp r3, #0
|
|
8003f12: d167 bne.n 8003fe4 <RCCEx_PLLSAI2_Config+0x1ac>
|
|
{
|
|
/* Disable the PLLSAI2 */
|
|
__HAL_RCC_PLLSAI2_DISABLE();
|
|
8003f14: 4b36 ldr r3, [pc, #216] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003f16: 681b ldr r3, [r3, #0]
|
|
8003f18: 4a35 ldr r2, [pc, #212] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003f1a: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000
|
|
8003f1e: 6013 str r3, [r2, #0]
|
|
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
8003f20: f7fd fdc4 bl 8001aac <HAL_GetTick>
|
|
8003f24: 60b8 str r0, [r7, #8]
|
|
|
|
/* Wait till PLLSAI2 is ready to be updated */
|
|
while(READ_BIT(RCC->CR, RCC_CR_PLLSAI2RDY) != 0U)
|
|
8003f26: e009 b.n 8003f3c <RCCEx_PLLSAI2_Config+0x104>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > PLLSAI2_TIMEOUT_VALUE)
|
|
8003f28: f7fd fdc0 bl 8001aac <HAL_GetTick>
|
|
8003f2c: 4602 mov r2, r0
|
|
8003f2e: 68bb ldr r3, [r7, #8]
|
|
8003f30: 1ad3 subs r3, r2, r3
|
|
8003f32: 2b02 cmp r3, #2
|
|
8003f34: d902 bls.n 8003f3c <RCCEx_PLLSAI2_Config+0x104>
|
|
{
|
|
status = HAL_TIMEOUT;
|
|
8003f36: 2303 movs r3, #3
|
|
8003f38: 73fb strb r3, [r7, #15]
|
|
break;
|
|
8003f3a: e005 b.n 8003f48 <RCCEx_PLLSAI2_Config+0x110>
|
|
while(READ_BIT(RCC->CR, RCC_CR_PLLSAI2RDY) != 0U)
|
|
8003f3c: 4b2c ldr r3, [pc, #176] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003f3e: 681b ldr r3, [r3, #0]
|
|
8003f40: f003 5300 and.w r3, r3, #536870912 @ 0x20000000
|
|
8003f44: 2b00 cmp r3, #0
|
|
8003f46: d1ef bne.n 8003f28 <RCCEx_PLLSAI2_Config+0xf0>
|
|
}
|
|
}
|
|
|
|
if(status == HAL_OK)
|
|
8003f48: 7bfb ldrb r3, [r7, #15]
|
|
8003f4a: 2b00 cmp r3, #0
|
|
8003f4c: d14a bne.n 8003fe4 <RCCEx_PLLSAI2_Config+0x1ac>
|
|
{
|
|
if(Divider == DIVIDER_P_UPDATE)
|
|
8003f4e: 683b ldr r3, [r7, #0]
|
|
8003f50: 2b00 cmp r3, #0
|
|
8003f52: d111 bne.n 8003f78 <RCCEx_PLLSAI2_Config+0x140>
|
|
MODIFY_REG(RCC->PLLSAI2CFGR,
|
|
RCC_PLLSAI2CFGR_PLLSAI2N | RCC_PLLSAI2CFGR_PLLSAI2PDIV,
|
|
(PllSai2->PLLSAI2N << RCC_PLLSAI2CFGR_PLLSAI2N_Pos) |
|
|
(PllSai2->PLLSAI2P << RCC_PLLSAI2CFGR_PLLSAI2PDIV_Pos));
|
|
#else
|
|
MODIFY_REG(RCC->PLLSAI2CFGR,
|
|
8003f54: 4b26 ldr r3, [pc, #152] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003f56: 695b ldr r3, [r3, #20]
|
|
8003f58: f423 331f bic.w r3, r3, #162816 @ 0x27c00
|
|
8003f5c: f423 7340 bic.w r3, r3, #768 @ 0x300
|
|
8003f60: 687a ldr r2, [r7, #4]
|
|
8003f62: 6892 ldr r2, [r2, #8]
|
|
8003f64: 0211 lsls r1, r2, #8
|
|
8003f66: 687a ldr r2, [r7, #4]
|
|
8003f68: 68d2 ldr r2, [r2, #12]
|
|
8003f6a: 0912 lsrs r2, r2, #4
|
|
8003f6c: 0452 lsls r2, r2, #17
|
|
8003f6e: 430a orrs r2, r1
|
|
8003f70: 491f ldr r1, [pc, #124] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003f72: 4313 orrs r3, r2
|
|
8003f74: 614b str r3, [r1, #20]
|
|
8003f76: e011 b.n 8003f9c <RCCEx_PLLSAI2_Config+0x164>
|
|
(PllSai2->PLLSAI2N << RCC_PLLSAI2CFGR_PLLSAI2N_Pos) |
|
|
(((PllSai2->PLLSAI2R >> 1U) - 1U) << RCC_PLLSAI2CFGR_PLLSAI2R_Pos) |
|
|
((PllSai2->PLLSAI2M - 1U) << RCC_PLLSAI2CFGR_PLLSAI2M_Pos));
|
|
#else
|
|
/* Configure the PLLSAI2 Division factor R and Multiplication factor N*/
|
|
MODIFY_REG(RCC->PLLSAI2CFGR,
|
|
8003f78: 4b1d ldr r3, [pc, #116] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003f7a: 695b ldr r3, [r3, #20]
|
|
8003f7c: f023 63c0 bic.w r3, r3, #100663296 @ 0x6000000
|
|
8003f80: f423 43fe bic.w r3, r3, #32512 @ 0x7f00
|
|
8003f84: 687a ldr r2, [r7, #4]
|
|
8003f86: 6892 ldr r2, [r2, #8]
|
|
8003f88: 0211 lsls r1, r2, #8
|
|
8003f8a: 687a ldr r2, [r7, #4]
|
|
8003f8c: 6912 ldr r2, [r2, #16]
|
|
8003f8e: 0852 lsrs r2, r2, #1
|
|
8003f90: 3a01 subs r2, #1
|
|
8003f92: 0652 lsls r2, r2, #25
|
|
8003f94: 430a orrs r2, r1
|
|
8003f96: 4916 ldr r1, [pc, #88] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003f98: 4313 orrs r3, r2
|
|
8003f9a: 614b str r3, [r1, #20]
|
|
(((PllSai2->PLLSAI2R >> 1U) - 1U) << RCC_PLLSAI2CFGR_PLLSAI2R_Pos));
|
|
#endif /* RCC_PLLSAI2M_DIV_1_16_SUPPORT */
|
|
}
|
|
|
|
/* Enable the PLLSAI2 again by setting PLLSAI2ON to 1*/
|
|
__HAL_RCC_PLLSAI2_ENABLE();
|
|
8003f9c: 4b14 ldr r3, [pc, #80] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003f9e: 681b ldr r3, [r3, #0]
|
|
8003fa0: 4a13 ldr r2, [pc, #76] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003fa2: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000
|
|
8003fa6: 6013 str r3, [r2, #0]
|
|
|
|
/* Get Start Tick*/
|
|
tickstart = HAL_GetTick();
|
|
8003fa8: f7fd fd80 bl 8001aac <HAL_GetTick>
|
|
8003fac: 60b8 str r0, [r7, #8]
|
|
|
|
/* Wait till PLLSAI2 is ready */
|
|
while(READ_BIT(RCC->CR, RCC_CR_PLLSAI2RDY) == 0U)
|
|
8003fae: e009 b.n 8003fc4 <RCCEx_PLLSAI2_Config+0x18c>
|
|
{
|
|
if((HAL_GetTick() - tickstart) > PLLSAI2_TIMEOUT_VALUE)
|
|
8003fb0: f7fd fd7c bl 8001aac <HAL_GetTick>
|
|
8003fb4: 4602 mov r2, r0
|
|
8003fb6: 68bb ldr r3, [r7, #8]
|
|
8003fb8: 1ad3 subs r3, r2, r3
|
|
8003fba: 2b02 cmp r3, #2
|
|
8003fbc: d902 bls.n 8003fc4 <RCCEx_PLLSAI2_Config+0x18c>
|
|
{
|
|
status = HAL_TIMEOUT;
|
|
8003fbe: 2303 movs r3, #3
|
|
8003fc0: 73fb strb r3, [r7, #15]
|
|
break;
|
|
8003fc2: e005 b.n 8003fd0 <RCCEx_PLLSAI2_Config+0x198>
|
|
while(READ_BIT(RCC->CR, RCC_CR_PLLSAI2RDY) == 0U)
|
|
8003fc4: 4b0a ldr r3, [pc, #40] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003fc6: 681b ldr r3, [r3, #0]
|
|
8003fc8: f003 5300 and.w r3, r3, #536870912 @ 0x20000000
|
|
8003fcc: 2b00 cmp r3, #0
|
|
8003fce: d0ef beq.n 8003fb0 <RCCEx_PLLSAI2_Config+0x178>
|
|
}
|
|
}
|
|
|
|
if(status == HAL_OK)
|
|
8003fd0: 7bfb ldrb r3, [r7, #15]
|
|
8003fd2: 2b00 cmp r3, #0
|
|
8003fd4: d106 bne.n 8003fe4 <RCCEx_PLLSAI2_Config+0x1ac>
|
|
{
|
|
/* Configure the PLLSAI2 Clock output(s) */
|
|
__HAL_RCC_PLLSAI2CLKOUT_ENABLE(PllSai2->PLLSAI2ClockOut);
|
|
8003fd6: 4b06 ldr r3, [pc, #24] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003fd8: 695a ldr r2, [r3, #20]
|
|
8003fda: 687b ldr r3, [r7, #4]
|
|
8003fdc: 695b ldr r3, [r3, #20]
|
|
8003fde: 4904 ldr r1, [pc, #16] @ (8003ff0 <RCCEx_PLLSAI2_Config+0x1b8>)
|
|
8003fe0: 4313 orrs r3, r2
|
|
8003fe2: 614b str r3, [r1, #20]
|
|
}
|
|
}
|
|
}
|
|
|
|
return status;
|
|
8003fe4: 7bfb ldrb r3, [r7, #15]
|
|
}
|
|
8003fe6: 4618 mov r0, r3
|
|
8003fe8: 3710 adds r7, #16
|
|
8003fea: 46bd mov sp, r7
|
|
8003fec: bd80 pop {r7, pc}
|
|
8003fee: bf00 nop
|
|
8003ff0: 40021000 .word 0x40021000
|
|
|
|
08003ff4 <HAL_SPI_Init>:
|
|
* @param hspi pointer to a SPI_HandleTypeDef structure that contains
|
|
* the configuration information for SPI module.
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef HAL_SPI_Init(SPI_HandleTypeDef *hspi)
|
|
{
|
|
8003ff4: b580 push {r7, lr}
|
|
8003ff6: b084 sub sp, #16
|
|
8003ff8: af00 add r7, sp, #0
|
|
8003ffa: 6078 str r0, [r7, #4]
|
|
uint32_t frxth;
|
|
|
|
/* Check the SPI handle allocation */
|
|
if (hspi == NULL)
|
|
8003ffc: 687b ldr r3, [r7, #4]
|
|
8003ffe: 2b00 cmp r3, #0
|
|
8004000: d101 bne.n 8004006 <HAL_SPI_Init+0x12>
|
|
{
|
|
return HAL_ERROR;
|
|
8004002: 2301 movs r3, #1
|
|
8004004: e095 b.n 8004132 <HAL_SPI_Init+0x13e>
|
|
assert_param(IS_SPI_NSS(hspi->Init.NSS));
|
|
assert_param(IS_SPI_NSSP(hspi->Init.NSSPMode));
|
|
assert_param(IS_SPI_BAUDRATE_PRESCALER(hspi->Init.BaudRatePrescaler));
|
|
assert_param(IS_SPI_FIRST_BIT(hspi->Init.FirstBit));
|
|
assert_param(IS_SPI_TIMODE(hspi->Init.TIMode));
|
|
if (hspi->Init.TIMode == SPI_TIMODE_DISABLE)
|
|
8004006: 687b ldr r3, [r7, #4]
|
|
8004008: 6a5b ldr r3, [r3, #36] @ 0x24
|
|
800400a: 2b00 cmp r3, #0
|
|
800400c: d108 bne.n 8004020 <HAL_SPI_Init+0x2c>
|
|
{
|
|
assert_param(IS_SPI_CPOL(hspi->Init.CLKPolarity));
|
|
assert_param(IS_SPI_CPHA(hspi->Init.CLKPhase));
|
|
|
|
if (hspi->Init.Mode == SPI_MODE_MASTER)
|
|
800400e: 687b ldr r3, [r7, #4]
|
|
8004010: 685b ldr r3, [r3, #4]
|
|
8004012: f5b3 7f82 cmp.w r3, #260 @ 0x104
|
|
8004016: d009 beq.n 800402c <HAL_SPI_Init+0x38>
|
|
assert_param(IS_SPI_BAUDRATE_PRESCALER(hspi->Init.BaudRatePrescaler));
|
|
}
|
|
else
|
|
{
|
|
/* Baudrate prescaler not use in Motoraola Slave mode. force to default value */
|
|
hspi->Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
|
|
8004018: 687b ldr r3, [r7, #4]
|
|
800401a: 2200 movs r2, #0
|
|
800401c: 61da str r2, [r3, #28]
|
|
800401e: e005 b.n 800402c <HAL_SPI_Init+0x38>
|
|
else
|
|
{
|
|
assert_param(IS_SPI_BAUDRATE_PRESCALER(hspi->Init.BaudRatePrescaler));
|
|
|
|
/* Force polarity and phase to TI protocaol requirements */
|
|
hspi->Init.CLKPolarity = SPI_POLARITY_LOW;
|
|
8004020: 687b ldr r3, [r7, #4]
|
|
8004022: 2200 movs r2, #0
|
|
8004024: 611a str r2, [r3, #16]
|
|
hspi->Init.CLKPhase = SPI_PHASE_1EDGE;
|
|
8004026: 687b ldr r3, [r7, #4]
|
|
8004028: 2200 movs r2, #0
|
|
800402a: 615a str r2, [r3, #20]
|
|
{
|
|
assert_param(IS_SPI_CRC_POLYNOMIAL(hspi->Init.CRCPolynomial));
|
|
assert_param(IS_SPI_CRC_LENGTH(hspi->Init.CRCLength));
|
|
}
|
|
#else
|
|
hspi->Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
|
|
800402c: 687b ldr r3, [r7, #4]
|
|
800402e: 2200 movs r2, #0
|
|
8004030: 629a str r2, [r3, #40] @ 0x28
|
|
#endif /* USE_SPI_CRC */
|
|
|
|
if (hspi->State == HAL_SPI_STATE_RESET)
|
|
8004032: 687b ldr r3, [r7, #4]
|
|
8004034: f893 305d ldrb.w r3, [r3, #93] @ 0x5d
|
|
8004038: b2db uxtb r3, r3
|
|
800403a: 2b00 cmp r3, #0
|
|
800403c: d106 bne.n 800404c <HAL_SPI_Init+0x58>
|
|
{
|
|
/* Allocate lock resource and initialize it */
|
|
hspi->Lock = HAL_UNLOCKED;
|
|
800403e: 687b ldr r3, [r7, #4]
|
|
8004040: 2200 movs r2, #0
|
|
8004042: f883 205c strb.w r2, [r3, #92] @ 0x5c
|
|
|
|
/* Init the low level hardware : GPIO, CLOCK, NVIC... */
|
|
hspi->MspInitCallback(hspi);
|
|
#else
|
|
/* Init the low level hardware : GPIO, CLOCK, NVIC... */
|
|
HAL_SPI_MspInit(hspi);
|
|
8004046: 6878 ldr r0, [r7, #4]
|
|
8004048: f7fd fab6 bl 80015b8 <HAL_SPI_MspInit>
|
|
#endif /* USE_HAL_SPI_REGISTER_CALLBACKS */
|
|
}
|
|
|
|
hspi->State = HAL_SPI_STATE_BUSY;
|
|
800404c: 687b ldr r3, [r7, #4]
|
|
800404e: 2202 movs r2, #2
|
|
8004050: f883 205d strb.w r2, [r3, #93] @ 0x5d
|
|
|
|
/* Disable the selected SPI peripheral */
|
|
__HAL_SPI_DISABLE(hspi);
|
|
8004054: 687b ldr r3, [r7, #4]
|
|
8004056: 681b ldr r3, [r3, #0]
|
|
8004058: 681a ldr r2, [r3, #0]
|
|
800405a: 687b ldr r3, [r7, #4]
|
|
800405c: 681b ldr r3, [r3, #0]
|
|
800405e: f022 0240 bic.w r2, r2, #64 @ 0x40
|
|
8004062: 601a str r2, [r3, #0]
|
|
|
|
/* Align by default the rs fifo threshold on the data size */
|
|
if (hspi->Init.DataSize > SPI_DATASIZE_8BIT)
|
|
8004064: 687b ldr r3, [r7, #4]
|
|
8004066: 68db ldr r3, [r3, #12]
|
|
8004068: f5b3 6fe0 cmp.w r3, #1792 @ 0x700
|
|
800406c: d902 bls.n 8004074 <HAL_SPI_Init+0x80>
|
|
{
|
|
frxth = SPI_RXFIFO_THRESHOLD_HF;
|
|
800406e: 2300 movs r3, #0
|
|
8004070: 60fb str r3, [r7, #12]
|
|
8004072: e002 b.n 800407a <HAL_SPI_Init+0x86>
|
|
}
|
|
else
|
|
{
|
|
frxth = SPI_RXFIFO_THRESHOLD_QF;
|
|
8004074: f44f 5380 mov.w r3, #4096 @ 0x1000
|
|
8004078: 60fb str r3, [r7, #12]
|
|
}
|
|
|
|
/* CRC calculation is valid only for 16Bit and 8 Bit */
|
|
if ((hspi->Init.DataSize != SPI_DATASIZE_16BIT) && (hspi->Init.DataSize != SPI_DATASIZE_8BIT))
|
|
800407a: 687b ldr r3, [r7, #4]
|
|
800407c: 68db ldr r3, [r3, #12]
|
|
800407e: f5b3 6f70 cmp.w r3, #3840 @ 0xf00
|
|
8004082: d007 beq.n 8004094 <HAL_SPI_Init+0xa0>
|
|
8004084: 687b ldr r3, [r7, #4]
|
|
8004086: 68db ldr r3, [r3, #12]
|
|
8004088: f5b3 6fe0 cmp.w r3, #1792 @ 0x700
|
|
800408c: d002 beq.n 8004094 <HAL_SPI_Init+0xa0>
|
|
{
|
|
/* CRC must be disabled */
|
|
hspi->Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
|
|
800408e: 687b ldr r3, [r7, #4]
|
|
8004090: 2200 movs r2, #0
|
|
8004092: 629a str r2, [r3, #40] @ 0x28
|
|
}
|
|
|
|
/*----------------------- SPIx CR1 & CR2 Configuration ---------------------*/
|
|
/* Configure : SPI Mode, Communication Mode, Clock polarity and phase, NSS management,
|
|
Communication speed, First bit and CRC calculation state */
|
|
WRITE_REG(hspi->Instance->CR1, ((hspi->Init.Mode & (SPI_CR1_MSTR | SPI_CR1_SSI)) |
|
|
8004094: 687b ldr r3, [r7, #4]
|
|
8004096: 685b ldr r3, [r3, #4]
|
|
8004098: f403 7282 and.w r2, r3, #260 @ 0x104
|
|
800409c: 687b ldr r3, [r7, #4]
|
|
800409e: 689b ldr r3, [r3, #8]
|
|
80040a0: f403 4304 and.w r3, r3, #33792 @ 0x8400
|
|
80040a4: 431a orrs r2, r3
|
|
80040a6: 687b ldr r3, [r7, #4]
|
|
80040a8: 691b ldr r3, [r3, #16]
|
|
80040aa: f003 0302 and.w r3, r3, #2
|
|
80040ae: 431a orrs r2, r3
|
|
80040b0: 687b ldr r3, [r7, #4]
|
|
80040b2: 695b ldr r3, [r3, #20]
|
|
80040b4: f003 0301 and.w r3, r3, #1
|
|
80040b8: 431a orrs r2, r3
|
|
80040ba: 687b ldr r3, [r7, #4]
|
|
80040bc: 699b ldr r3, [r3, #24]
|
|
80040be: f403 7300 and.w r3, r3, #512 @ 0x200
|
|
80040c2: 431a orrs r2, r3
|
|
80040c4: 687b ldr r3, [r7, #4]
|
|
80040c6: 69db ldr r3, [r3, #28]
|
|
80040c8: f003 0338 and.w r3, r3, #56 @ 0x38
|
|
80040cc: 431a orrs r2, r3
|
|
80040ce: 687b ldr r3, [r7, #4]
|
|
80040d0: 6a1b ldr r3, [r3, #32]
|
|
80040d2: f003 0380 and.w r3, r3, #128 @ 0x80
|
|
80040d6: ea42 0103 orr.w r1, r2, r3
|
|
80040da: 687b ldr r3, [r7, #4]
|
|
80040dc: 6a9b ldr r3, [r3, #40] @ 0x28
|
|
80040de: f403 5200 and.w r2, r3, #8192 @ 0x2000
|
|
80040e2: 687b ldr r3, [r7, #4]
|
|
80040e4: 681b ldr r3, [r3, #0]
|
|
80040e6: 430a orrs r2, r1
|
|
80040e8: 601a str r2, [r3, #0]
|
|
}
|
|
}
|
|
#endif /* USE_SPI_CRC */
|
|
|
|
/* Configure : NSS management, TI Mode, NSS Pulse, Data size and Rx Fifo threshold */
|
|
WRITE_REG(hspi->Instance->CR2, (((hspi->Init.NSS >> 16U) & SPI_CR2_SSOE) |
|
|
80040ea: 687b ldr r3, [r7, #4]
|
|
80040ec: 699b ldr r3, [r3, #24]
|
|
80040ee: 0c1b lsrs r3, r3, #16
|
|
80040f0: f003 0204 and.w r2, r3, #4
|
|
80040f4: 687b ldr r3, [r7, #4]
|
|
80040f6: 6a5b ldr r3, [r3, #36] @ 0x24
|
|
80040f8: f003 0310 and.w r3, r3, #16
|
|
80040fc: 431a orrs r2, r3
|
|
80040fe: 687b ldr r3, [r7, #4]
|
|
8004100: 6b5b ldr r3, [r3, #52] @ 0x34
|
|
8004102: f003 0308 and.w r3, r3, #8
|
|
8004106: 431a orrs r2, r3
|
|
8004108: 687b ldr r3, [r7, #4]
|
|
800410a: 68db ldr r3, [r3, #12]
|
|
800410c: f403 6370 and.w r3, r3, #3840 @ 0xf00
|
|
8004110: ea42 0103 orr.w r1, r2, r3
|
|
8004114: 68fb ldr r3, [r7, #12]
|
|
8004116: f403 5280 and.w r2, r3, #4096 @ 0x1000
|
|
800411a: 687b ldr r3, [r7, #4]
|
|
800411c: 681b ldr r3, [r3, #0]
|
|
800411e: 430a orrs r2, r1
|
|
8004120: 605a str r2, [r3, #4]
|
|
#if defined(SPI_I2SCFGR_I2SMOD)
|
|
/* Activate the SPI mode (Make sure that I2SMOD bit in I2SCFGR register is reset) */
|
|
CLEAR_BIT(hspi->Instance->I2SCFGR, SPI_I2SCFGR_I2SMOD);
|
|
#endif /* SPI_I2SCFGR_I2SMOD */
|
|
|
|
hspi->ErrorCode = HAL_SPI_ERROR_NONE;
|
|
8004122: 687b ldr r3, [r7, #4]
|
|
8004124: 2200 movs r2, #0
|
|
8004126: 661a str r2, [r3, #96] @ 0x60
|
|
hspi->State = HAL_SPI_STATE_READY;
|
|
8004128: 687b ldr r3, [r7, #4]
|
|
800412a: 2201 movs r2, #1
|
|
800412c: f883 205d strb.w r2, [r3, #93] @ 0x5d
|
|
|
|
return HAL_OK;
|
|
8004130: 2300 movs r3, #0
|
|
}
|
|
8004132: 4618 mov r0, r3
|
|
8004134: 3710 adds r7, #16
|
|
8004136: 46bd mov sp, r7
|
|
8004138: bd80 pop {r7, pc}
|
|
|
|
0800413a <HAL_UART_Init>:
|
|
* parameters in the UART_InitTypeDef and initialize the associated handle.
|
|
* @param huart UART handle.
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart)
|
|
{
|
|
800413a: b580 push {r7, lr}
|
|
800413c: b082 sub sp, #8
|
|
800413e: af00 add r7, sp, #0
|
|
8004140: 6078 str r0, [r7, #4]
|
|
/* Check the UART handle allocation */
|
|
if (huart == NULL)
|
|
8004142: 687b ldr r3, [r7, #4]
|
|
8004144: 2b00 cmp r3, #0
|
|
8004146: d101 bne.n 800414c <HAL_UART_Init+0x12>
|
|
{
|
|
return HAL_ERROR;
|
|
8004148: 2301 movs r3, #1
|
|
800414a: e040 b.n 80041ce <HAL_UART_Init+0x94>
|
|
{
|
|
/* Check the parameters */
|
|
assert_param((IS_UART_INSTANCE(huart->Instance)) || (IS_LPUART_INSTANCE(huart->Instance)));
|
|
}
|
|
|
|
if (huart->gState == HAL_UART_STATE_RESET)
|
|
800414c: 687b ldr r3, [r7, #4]
|
|
800414e: 6fdb ldr r3, [r3, #124] @ 0x7c
|
|
8004150: 2b00 cmp r3, #0
|
|
8004152: d106 bne.n 8004162 <HAL_UART_Init+0x28>
|
|
{
|
|
/* Allocate lock resource and initialize it */
|
|
huart->Lock = HAL_UNLOCKED;
|
|
8004154: 687b ldr r3, [r7, #4]
|
|
8004156: 2200 movs r2, #0
|
|
8004158: f883 2078 strb.w r2, [r3, #120] @ 0x78
|
|
|
|
/* Init the low level hardware */
|
|
huart->MspInitCallback(huart);
|
|
#else
|
|
/* Init the low level hardware : GPIO, CLOCK */
|
|
HAL_UART_MspInit(huart);
|
|
800415c: 6878 ldr r0, [r7, #4]
|
|
800415e: f7fd fa6f bl 8001640 <HAL_UART_MspInit>
|
|
#endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */
|
|
}
|
|
|
|
huart->gState = HAL_UART_STATE_BUSY;
|
|
8004162: 687b ldr r3, [r7, #4]
|
|
8004164: 2224 movs r2, #36 @ 0x24
|
|
8004166: 67da str r2, [r3, #124] @ 0x7c
|
|
|
|
__HAL_UART_DISABLE(huart);
|
|
8004168: 687b ldr r3, [r7, #4]
|
|
800416a: 681b ldr r3, [r3, #0]
|
|
800416c: 681a ldr r2, [r3, #0]
|
|
800416e: 687b ldr r3, [r7, #4]
|
|
8004170: 681b ldr r3, [r3, #0]
|
|
8004172: f022 0201 bic.w r2, r2, #1
|
|
8004176: 601a str r2, [r3, #0]
|
|
|
|
/* Perform advanced settings configuration */
|
|
/* For some items, configuration requires to be done prior TE and RE bits are set */
|
|
if (huart->AdvancedInit.AdvFeatureInit != UART_ADVFEATURE_NO_INIT)
|
|
8004178: 687b ldr r3, [r7, #4]
|
|
800417a: 6a5b ldr r3, [r3, #36] @ 0x24
|
|
800417c: 2b00 cmp r3, #0
|
|
800417e: d002 beq.n 8004186 <HAL_UART_Init+0x4c>
|
|
{
|
|
UART_AdvFeatureConfig(huart);
|
|
8004180: 6878 ldr r0, [r7, #4]
|
|
8004182: f000 fae1 bl 8004748 <UART_AdvFeatureConfig>
|
|
}
|
|
|
|
/* Set the UART Communication parameters */
|
|
if (UART_SetConfig(huart) == HAL_ERROR)
|
|
8004186: 6878 ldr r0, [r7, #4]
|
|
8004188: f000 f826 bl 80041d8 <UART_SetConfig>
|
|
800418c: 4603 mov r3, r0
|
|
800418e: 2b01 cmp r3, #1
|
|
8004190: d101 bne.n 8004196 <HAL_UART_Init+0x5c>
|
|
{
|
|
return HAL_ERROR;
|
|
8004192: 2301 movs r3, #1
|
|
8004194: e01b b.n 80041ce <HAL_UART_Init+0x94>
|
|
}
|
|
|
|
/* 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));
|
|
8004196: 687b ldr r3, [r7, #4]
|
|
8004198: 681b ldr r3, [r3, #0]
|
|
800419a: 685a ldr r2, [r3, #4]
|
|
800419c: 687b ldr r3, [r7, #4]
|
|
800419e: 681b ldr r3, [r3, #0]
|
|
80041a0: f422 4290 bic.w r2, r2, #18432 @ 0x4800
|
|
80041a4: 605a str r2, [r3, #4]
|
|
CLEAR_BIT(huart->Instance->CR3, (USART_CR3_SCEN | USART_CR3_HDSEL | USART_CR3_IREN));
|
|
80041a6: 687b ldr r3, [r7, #4]
|
|
80041a8: 681b ldr r3, [r3, #0]
|
|
80041aa: 689a ldr r2, [r3, #8]
|
|
80041ac: 687b ldr r3, [r7, #4]
|
|
80041ae: 681b ldr r3, [r3, #0]
|
|
80041b0: f022 022a bic.w r2, r2, #42 @ 0x2a
|
|
80041b4: 609a str r2, [r3, #8]
|
|
|
|
__HAL_UART_ENABLE(huart);
|
|
80041b6: 687b ldr r3, [r7, #4]
|
|
80041b8: 681b ldr r3, [r3, #0]
|
|
80041ba: 681a ldr r2, [r3, #0]
|
|
80041bc: 687b ldr r3, [r7, #4]
|
|
80041be: 681b ldr r3, [r3, #0]
|
|
80041c0: f042 0201 orr.w r2, r2, #1
|
|
80041c4: 601a str r2, [r3, #0]
|
|
|
|
/* TEACK and/or REACK to check before moving huart->gState and huart->RxState to Ready */
|
|
return (UART_CheckIdleState(huart));
|
|
80041c6: 6878 ldr r0, [r7, #4]
|
|
80041c8: f000 fb60 bl 800488c <UART_CheckIdleState>
|
|
80041cc: 4603 mov r3, r0
|
|
}
|
|
80041ce: 4618 mov r0, r3
|
|
80041d0: 3708 adds r7, #8
|
|
80041d2: 46bd mov sp, r7
|
|
80041d4: bd80 pop {r7, pc}
|
|
...
|
|
|
|
080041d8 <UART_SetConfig>:
|
|
* @brief Configure the UART peripheral.
|
|
* @param huart UART handle.
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef UART_SetConfig(UART_HandleTypeDef *huart)
|
|
{
|
|
80041d8: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr}
|
|
80041dc: b08a sub sp, #40 @ 0x28
|
|
80041de: af00 add r7, sp, #0
|
|
80041e0: 60f8 str r0, [r7, #12]
|
|
uint32_t tmpreg;
|
|
uint16_t brrtemp;
|
|
UART_ClockSourceTypeDef clocksource;
|
|
uint32_t usartdiv;
|
|
HAL_StatusTypeDef ret = HAL_OK;
|
|
80041e2: 2300 movs r3, #0
|
|
80041e4: f887 3022 strb.w r3, [r7, #34] @ 0x22
|
|
* the UART Word Length, Parity, Mode and oversampling:
|
|
* 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 ;
|
|
80041e8: 68fb ldr r3, [r7, #12]
|
|
80041ea: 689a ldr r2, [r3, #8]
|
|
80041ec: 68fb ldr r3, [r7, #12]
|
|
80041ee: 691b ldr r3, [r3, #16]
|
|
80041f0: 431a orrs r2, r3
|
|
80041f2: 68fb ldr r3, [r7, #12]
|
|
80041f4: 695b ldr r3, [r3, #20]
|
|
80041f6: 431a orrs r2, r3
|
|
80041f8: 68fb ldr r3, [r7, #12]
|
|
80041fa: 69db ldr r3, [r3, #28]
|
|
80041fc: 4313 orrs r3, r2
|
|
80041fe: 627b str r3, [r7, #36] @ 0x24
|
|
MODIFY_REG(huart->Instance->CR1, USART_CR1_FIELDS, tmpreg);
|
|
8004200: 68fb ldr r3, [r7, #12]
|
|
8004202: 681b ldr r3, [r3, #0]
|
|
8004204: 681a ldr r2, [r3, #0]
|
|
8004206: 4ba4 ldr r3, [pc, #656] @ (8004498 <UART_SetConfig+0x2c0>)
|
|
8004208: 4013 ands r3, r2
|
|
800420a: 68fa ldr r2, [r7, #12]
|
|
800420c: 6812 ldr r2, [r2, #0]
|
|
800420e: 6a79 ldr r1, [r7, #36] @ 0x24
|
|
8004210: 430b orrs r3, r1
|
|
8004212: 6013 str r3, [r2, #0]
|
|
|
|
/*-------------------------- 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);
|
|
8004214: 68fb ldr r3, [r7, #12]
|
|
8004216: 681b ldr r3, [r3, #0]
|
|
8004218: 685b ldr r3, [r3, #4]
|
|
800421a: f423 5140 bic.w r1, r3, #12288 @ 0x3000
|
|
800421e: 68fb ldr r3, [r7, #12]
|
|
8004220: 68da ldr r2, [r3, #12]
|
|
8004222: 68fb ldr r3, [r7, #12]
|
|
8004224: 681b ldr r3, [r3, #0]
|
|
8004226: 430a orrs r2, r1
|
|
8004228: 605a str r2, [r3, #4]
|
|
/* Configure
|
|
* - UART HardWare Flow Control: set CTSE and RTSE bits according
|
|
* to huart->Init.HwFlowCtl value
|
|
* - one-bit sampling method versus three samples' majority rule according
|
|
* to huart->Init.OneBitSampling (not applicable to LPUART) */
|
|
tmpreg = (uint32_t)huart->Init.HwFlowCtl;
|
|
800422a: 68fb ldr r3, [r7, #12]
|
|
800422c: 699b ldr r3, [r3, #24]
|
|
800422e: 627b str r3, [r7, #36] @ 0x24
|
|
|
|
if (!(UART_INSTANCE_LOWPOWER(huart)))
|
|
8004230: 68fb ldr r3, [r7, #12]
|
|
8004232: 681b ldr r3, [r3, #0]
|
|
8004234: 4a99 ldr r2, [pc, #612] @ (800449c <UART_SetConfig+0x2c4>)
|
|
8004236: 4293 cmp r3, r2
|
|
8004238: d004 beq.n 8004244 <UART_SetConfig+0x6c>
|
|
{
|
|
tmpreg |= huart->Init.OneBitSampling;
|
|
800423a: 68fb ldr r3, [r7, #12]
|
|
800423c: 6a1b ldr r3, [r3, #32]
|
|
800423e: 6a7a ldr r2, [r7, #36] @ 0x24
|
|
8004240: 4313 orrs r3, r2
|
|
8004242: 627b str r3, [r7, #36] @ 0x24
|
|
}
|
|
MODIFY_REG(huart->Instance->CR3, USART_CR3_FIELDS, tmpreg);
|
|
8004244: 68fb ldr r3, [r7, #12]
|
|
8004246: 681b ldr r3, [r3, #0]
|
|
8004248: 689b ldr r3, [r3, #8]
|
|
800424a: f423 6130 bic.w r1, r3, #2816 @ 0xb00
|
|
800424e: 68fb ldr r3, [r7, #12]
|
|
8004250: 681b ldr r3, [r3, #0]
|
|
8004252: 6a7a ldr r2, [r7, #36] @ 0x24
|
|
8004254: 430a orrs r2, r1
|
|
8004256: 609a str r2, [r3, #8]
|
|
* - UART Clock Prescaler : set PRESCALER according to huart->Init.ClockPrescaler value */
|
|
MODIFY_REG(huart->Instance->PRESC, USART_PRESC_PRESCALER, huart->Init.ClockPrescaler);
|
|
#endif /* USART_PRESC_PRESCALER */
|
|
|
|
/*-------------------------- USART BRR Configuration -----------------------*/
|
|
UART_GETCLOCKSOURCE(huart, clocksource);
|
|
8004258: 68fb ldr r3, [r7, #12]
|
|
800425a: 681b ldr r3, [r3, #0]
|
|
800425c: 4a90 ldr r2, [pc, #576] @ (80044a0 <UART_SetConfig+0x2c8>)
|
|
800425e: 4293 cmp r3, r2
|
|
8004260: d126 bne.n 80042b0 <UART_SetConfig+0xd8>
|
|
8004262: 4b90 ldr r3, [pc, #576] @ (80044a4 <UART_SetConfig+0x2cc>)
|
|
8004264: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
8004268: f003 0303 and.w r3, r3, #3
|
|
800426c: 2b03 cmp r3, #3
|
|
800426e: d81b bhi.n 80042a8 <UART_SetConfig+0xd0>
|
|
8004270: a201 add r2, pc, #4 @ (adr r2, 8004278 <UART_SetConfig+0xa0>)
|
|
8004272: f852 f023 ldr.w pc, [r2, r3, lsl #2]
|
|
8004276: bf00 nop
|
|
8004278: 08004289 .word 0x08004289
|
|
800427c: 08004299 .word 0x08004299
|
|
8004280: 08004291 .word 0x08004291
|
|
8004284: 080042a1 .word 0x080042a1
|
|
8004288: 2301 movs r3, #1
|
|
800428a: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
800428e: e116 b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004290: 2302 movs r3, #2
|
|
8004292: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
8004296: e112 b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004298: 2304 movs r3, #4
|
|
800429a: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
800429e: e10e b.n 80044be <UART_SetConfig+0x2e6>
|
|
80042a0: 2308 movs r3, #8
|
|
80042a2: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
80042a6: e10a b.n 80044be <UART_SetConfig+0x2e6>
|
|
80042a8: 2310 movs r3, #16
|
|
80042aa: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
80042ae: e106 b.n 80044be <UART_SetConfig+0x2e6>
|
|
80042b0: 68fb ldr r3, [r7, #12]
|
|
80042b2: 681b ldr r3, [r3, #0]
|
|
80042b4: 4a7c ldr r2, [pc, #496] @ (80044a8 <UART_SetConfig+0x2d0>)
|
|
80042b6: 4293 cmp r3, r2
|
|
80042b8: d138 bne.n 800432c <UART_SetConfig+0x154>
|
|
80042ba: 4b7a ldr r3, [pc, #488] @ (80044a4 <UART_SetConfig+0x2cc>)
|
|
80042bc: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
80042c0: f003 030c and.w r3, r3, #12
|
|
80042c4: 2b0c cmp r3, #12
|
|
80042c6: d82d bhi.n 8004324 <UART_SetConfig+0x14c>
|
|
80042c8: a201 add r2, pc, #4 @ (adr r2, 80042d0 <UART_SetConfig+0xf8>)
|
|
80042ca: f852 f023 ldr.w pc, [r2, r3, lsl #2]
|
|
80042ce: bf00 nop
|
|
80042d0: 08004305 .word 0x08004305
|
|
80042d4: 08004325 .word 0x08004325
|
|
80042d8: 08004325 .word 0x08004325
|
|
80042dc: 08004325 .word 0x08004325
|
|
80042e0: 08004315 .word 0x08004315
|
|
80042e4: 08004325 .word 0x08004325
|
|
80042e8: 08004325 .word 0x08004325
|
|
80042ec: 08004325 .word 0x08004325
|
|
80042f0: 0800430d .word 0x0800430d
|
|
80042f4: 08004325 .word 0x08004325
|
|
80042f8: 08004325 .word 0x08004325
|
|
80042fc: 08004325 .word 0x08004325
|
|
8004300: 0800431d .word 0x0800431d
|
|
8004304: 2300 movs r3, #0
|
|
8004306: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
800430a: e0d8 b.n 80044be <UART_SetConfig+0x2e6>
|
|
800430c: 2302 movs r3, #2
|
|
800430e: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
8004312: e0d4 b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004314: 2304 movs r3, #4
|
|
8004316: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
800431a: e0d0 b.n 80044be <UART_SetConfig+0x2e6>
|
|
800431c: 2308 movs r3, #8
|
|
800431e: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
8004322: e0cc b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004324: 2310 movs r3, #16
|
|
8004326: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
800432a: e0c8 b.n 80044be <UART_SetConfig+0x2e6>
|
|
800432c: 68fb ldr r3, [r7, #12]
|
|
800432e: 681b ldr r3, [r3, #0]
|
|
8004330: 4a5e ldr r2, [pc, #376] @ (80044ac <UART_SetConfig+0x2d4>)
|
|
8004332: 4293 cmp r3, r2
|
|
8004334: d125 bne.n 8004382 <UART_SetConfig+0x1aa>
|
|
8004336: 4b5b ldr r3, [pc, #364] @ (80044a4 <UART_SetConfig+0x2cc>)
|
|
8004338: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
800433c: f003 0330 and.w r3, r3, #48 @ 0x30
|
|
8004340: 2b30 cmp r3, #48 @ 0x30
|
|
8004342: d016 beq.n 8004372 <UART_SetConfig+0x19a>
|
|
8004344: 2b30 cmp r3, #48 @ 0x30
|
|
8004346: d818 bhi.n 800437a <UART_SetConfig+0x1a2>
|
|
8004348: 2b20 cmp r3, #32
|
|
800434a: d00a beq.n 8004362 <UART_SetConfig+0x18a>
|
|
800434c: 2b20 cmp r3, #32
|
|
800434e: d814 bhi.n 800437a <UART_SetConfig+0x1a2>
|
|
8004350: 2b00 cmp r3, #0
|
|
8004352: d002 beq.n 800435a <UART_SetConfig+0x182>
|
|
8004354: 2b10 cmp r3, #16
|
|
8004356: d008 beq.n 800436a <UART_SetConfig+0x192>
|
|
8004358: e00f b.n 800437a <UART_SetConfig+0x1a2>
|
|
800435a: 2300 movs r3, #0
|
|
800435c: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
8004360: e0ad b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004362: 2302 movs r3, #2
|
|
8004364: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
8004368: e0a9 b.n 80044be <UART_SetConfig+0x2e6>
|
|
800436a: 2304 movs r3, #4
|
|
800436c: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
8004370: e0a5 b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004372: 2308 movs r3, #8
|
|
8004374: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
8004378: e0a1 b.n 80044be <UART_SetConfig+0x2e6>
|
|
800437a: 2310 movs r3, #16
|
|
800437c: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
8004380: e09d b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004382: 68fb ldr r3, [r7, #12]
|
|
8004384: 681b ldr r3, [r3, #0]
|
|
8004386: 4a4a ldr r2, [pc, #296] @ (80044b0 <UART_SetConfig+0x2d8>)
|
|
8004388: 4293 cmp r3, r2
|
|
800438a: d125 bne.n 80043d8 <UART_SetConfig+0x200>
|
|
800438c: 4b45 ldr r3, [pc, #276] @ (80044a4 <UART_SetConfig+0x2cc>)
|
|
800438e: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
8004392: f003 03c0 and.w r3, r3, #192 @ 0xc0
|
|
8004396: 2bc0 cmp r3, #192 @ 0xc0
|
|
8004398: d016 beq.n 80043c8 <UART_SetConfig+0x1f0>
|
|
800439a: 2bc0 cmp r3, #192 @ 0xc0
|
|
800439c: d818 bhi.n 80043d0 <UART_SetConfig+0x1f8>
|
|
800439e: 2b80 cmp r3, #128 @ 0x80
|
|
80043a0: d00a beq.n 80043b8 <UART_SetConfig+0x1e0>
|
|
80043a2: 2b80 cmp r3, #128 @ 0x80
|
|
80043a4: d814 bhi.n 80043d0 <UART_SetConfig+0x1f8>
|
|
80043a6: 2b00 cmp r3, #0
|
|
80043a8: d002 beq.n 80043b0 <UART_SetConfig+0x1d8>
|
|
80043aa: 2b40 cmp r3, #64 @ 0x40
|
|
80043ac: d008 beq.n 80043c0 <UART_SetConfig+0x1e8>
|
|
80043ae: e00f b.n 80043d0 <UART_SetConfig+0x1f8>
|
|
80043b0: 2300 movs r3, #0
|
|
80043b2: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
80043b6: e082 b.n 80044be <UART_SetConfig+0x2e6>
|
|
80043b8: 2302 movs r3, #2
|
|
80043ba: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
80043be: e07e b.n 80044be <UART_SetConfig+0x2e6>
|
|
80043c0: 2304 movs r3, #4
|
|
80043c2: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
80043c6: e07a b.n 80044be <UART_SetConfig+0x2e6>
|
|
80043c8: 2308 movs r3, #8
|
|
80043ca: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
80043ce: e076 b.n 80044be <UART_SetConfig+0x2e6>
|
|
80043d0: 2310 movs r3, #16
|
|
80043d2: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
80043d6: e072 b.n 80044be <UART_SetConfig+0x2e6>
|
|
80043d8: 68fb ldr r3, [r7, #12]
|
|
80043da: 681b ldr r3, [r3, #0]
|
|
80043dc: 4a35 ldr r2, [pc, #212] @ (80044b4 <UART_SetConfig+0x2dc>)
|
|
80043de: 4293 cmp r3, r2
|
|
80043e0: d12a bne.n 8004438 <UART_SetConfig+0x260>
|
|
80043e2: 4b30 ldr r3, [pc, #192] @ (80044a4 <UART_SetConfig+0x2cc>)
|
|
80043e4: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
80043e8: f403 7340 and.w r3, r3, #768 @ 0x300
|
|
80043ec: f5b3 7f40 cmp.w r3, #768 @ 0x300
|
|
80043f0: d01a beq.n 8004428 <UART_SetConfig+0x250>
|
|
80043f2: f5b3 7f40 cmp.w r3, #768 @ 0x300
|
|
80043f6: d81b bhi.n 8004430 <UART_SetConfig+0x258>
|
|
80043f8: f5b3 7f00 cmp.w r3, #512 @ 0x200
|
|
80043fc: d00c beq.n 8004418 <UART_SetConfig+0x240>
|
|
80043fe: f5b3 7f00 cmp.w r3, #512 @ 0x200
|
|
8004402: d815 bhi.n 8004430 <UART_SetConfig+0x258>
|
|
8004404: 2b00 cmp r3, #0
|
|
8004406: d003 beq.n 8004410 <UART_SetConfig+0x238>
|
|
8004408: f5b3 7f80 cmp.w r3, #256 @ 0x100
|
|
800440c: d008 beq.n 8004420 <UART_SetConfig+0x248>
|
|
800440e: e00f b.n 8004430 <UART_SetConfig+0x258>
|
|
8004410: 2300 movs r3, #0
|
|
8004412: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
8004416: e052 b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004418: 2302 movs r3, #2
|
|
800441a: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
800441e: e04e b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004420: 2304 movs r3, #4
|
|
8004422: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
8004426: e04a b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004428: 2308 movs r3, #8
|
|
800442a: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
800442e: e046 b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004430: 2310 movs r3, #16
|
|
8004432: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
8004436: e042 b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004438: 68fb ldr r3, [r7, #12]
|
|
800443a: 681b ldr r3, [r3, #0]
|
|
800443c: 4a17 ldr r2, [pc, #92] @ (800449c <UART_SetConfig+0x2c4>)
|
|
800443e: 4293 cmp r3, r2
|
|
8004440: d13a bne.n 80044b8 <UART_SetConfig+0x2e0>
|
|
8004442: 4b18 ldr r3, [pc, #96] @ (80044a4 <UART_SetConfig+0x2cc>)
|
|
8004444: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
|
|
8004448: f403 6340 and.w r3, r3, #3072 @ 0xc00
|
|
800444c: f5b3 6f40 cmp.w r3, #3072 @ 0xc00
|
|
8004450: d01a beq.n 8004488 <UART_SetConfig+0x2b0>
|
|
8004452: f5b3 6f40 cmp.w r3, #3072 @ 0xc00
|
|
8004456: d81b bhi.n 8004490 <UART_SetConfig+0x2b8>
|
|
8004458: f5b3 6f00 cmp.w r3, #2048 @ 0x800
|
|
800445c: d00c beq.n 8004478 <UART_SetConfig+0x2a0>
|
|
800445e: f5b3 6f00 cmp.w r3, #2048 @ 0x800
|
|
8004462: d815 bhi.n 8004490 <UART_SetConfig+0x2b8>
|
|
8004464: 2b00 cmp r3, #0
|
|
8004466: d003 beq.n 8004470 <UART_SetConfig+0x298>
|
|
8004468: f5b3 6f80 cmp.w r3, #1024 @ 0x400
|
|
800446c: d008 beq.n 8004480 <UART_SetConfig+0x2a8>
|
|
800446e: e00f b.n 8004490 <UART_SetConfig+0x2b8>
|
|
8004470: 2300 movs r3, #0
|
|
8004472: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
8004476: e022 b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004478: 2302 movs r3, #2
|
|
800447a: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
800447e: e01e b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004480: 2304 movs r3, #4
|
|
8004482: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
8004486: e01a b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004488: 2308 movs r3, #8
|
|
800448a: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
800448e: e016 b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004490: 2310 movs r3, #16
|
|
8004492: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
8004496: e012 b.n 80044be <UART_SetConfig+0x2e6>
|
|
8004498: efff69f3 .word 0xefff69f3
|
|
800449c: 40008000 .word 0x40008000
|
|
80044a0: 40013800 .word 0x40013800
|
|
80044a4: 40021000 .word 0x40021000
|
|
80044a8: 40004400 .word 0x40004400
|
|
80044ac: 40004800 .word 0x40004800
|
|
80044b0: 40004c00 .word 0x40004c00
|
|
80044b4: 40005000 .word 0x40005000
|
|
80044b8: 2310 movs r3, #16
|
|
80044ba: f887 3023 strb.w r3, [r7, #35] @ 0x23
|
|
|
|
/* Check LPUART instance */
|
|
if (UART_INSTANCE_LOWPOWER(huart))
|
|
80044be: 68fb ldr r3, [r7, #12]
|
|
80044c0: 681b ldr r3, [r3, #0]
|
|
80044c2: 4a9f ldr r2, [pc, #636] @ (8004740 <UART_SetConfig+0x568>)
|
|
80044c4: 4293 cmp r3, r2
|
|
80044c6: d17a bne.n 80045be <UART_SetConfig+0x3e6>
|
|
{
|
|
/* Retrieve frequency clock */
|
|
switch (clocksource)
|
|
80044c8: f897 3023 ldrb.w r3, [r7, #35] @ 0x23
|
|
80044cc: 2b08 cmp r3, #8
|
|
80044ce: d824 bhi.n 800451a <UART_SetConfig+0x342>
|
|
80044d0: a201 add r2, pc, #4 @ (adr r2, 80044d8 <UART_SetConfig+0x300>)
|
|
80044d2: f852 f023 ldr.w pc, [r2, r3, lsl #2]
|
|
80044d6: bf00 nop
|
|
80044d8: 080044fd .word 0x080044fd
|
|
80044dc: 0800451b .word 0x0800451b
|
|
80044e0: 08004505 .word 0x08004505
|
|
80044e4: 0800451b .word 0x0800451b
|
|
80044e8: 0800450b .word 0x0800450b
|
|
80044ec: 0800451b .word 0x0800451b
|
|
80044f0: 0800451b .word 0x0800451b
|
|
80044f4: 0800451b .word 0x0800451b
|
|
80044f8: 08004513 .word 0x08004513
|
|
{
|
|
case UART_CLOCKSOURCE_PCLK1:
|
|
pclk = HAL_RCC_GetPCLK1Freq();
|
|
80044fc: f7ff f822 bl 8003544 <HAL_RCC_GetPCLK1Freq>
|
|
8004500: 61f8 str r0, [r7, #28]
|
|
break;
|
|
8004502: e010 b.n 8004526 <UART_SetConfig+0x34e>
|
|
case UART_CLOCKSOURCE_HSI:
|
|
pclk = (uint32_t) HSI_VALUE;
|
|
8004504: 4b8f ldr r3, [pc, #572] @ (8004744 <UART_SetConfig+0x56c>)
|
|
8004506: 61fb str r3, [r7, #28]
|
|
break;
|
|
8004508: e00d b.n 8004526 <UART_SetConfig+0x34e>
|
|
case UART_CLOCKSOURCE_SYSCLK:
|
|
pclk = HAL_RCC_GetSysClockFreq();
|
|
800450a: f7fe ff83 bl 8003414 <HAL_RCC_GetSysClockFreq>
|
|
800450e: 61f8 str r0, [r7, #28]
|
|
break;
|
|
8004510: e009 b.n 8004526 <UART_SetConfig+0x34e>
|
|
case UART_CLOCKSOURCE_LSE:
|
|
pclk = (uint32_t) LSE_VALUE;
|
|
8004512: f44f 4300 mov.w r3, #32768 @ 0x8000
|
|
8004516: 61fb str r3, [r7, #28]
|
|
break;
|
|
8004518: e005 b.n 8004526 <UART_SetConfig+0x34e>
|
|
default:
|
|
pclk = 0U;
|
|
800451a: 2300 movs r3, #0
|
|
800451c: 61fb str r3, [r7, #28]
|
|
ret = HAL_ERROR;
|
|
800451e: 2301 movs r3, #1
|
|
8004520: f887 3022 strb.w r3, [r7, #34] @ 0x22
|
|
break;
|
|
8004524: bf00 nop
|
|
}
|
|
|
|
/* If proper clock source reported */
|
|
if (pclk != 0U)
|
|
8004526: 69fb ldr r3, [r7, #28]
|
|
8004528: 2b00 cmp r3, #0
|
|
800452a: f000 80fb beq.w 8004724 <UART_SetConfig+0x54c>
|
|
} /* if ( (lpuart_ker_ck_pres < (3 * huart->Init.BaudRate) ) ||
|
|
(lpuart_ker_ck_pres > (4096 * huart->Init.BaudRate) )) */
|
|
#else
|
|
/* No Prescaler applicable */
|
|
/* Ensure that Frequency clock is in the range [3 * baudrate, 4096 * baudrate] */
|
|
if ((pclk < (3U * huart->Init.BaudRate)) ||
|
|
800452e: 68fb ldr r3, [r7, #12]
|
|
8004530: 685a ldr r2, [r3, #4]
|
|
8004532: 4613 mov r3, r2
|
|
8004534: 005b lsls r3, r3, #1
|
|
8004536: 4413 add r3, r2
|
|
8004538: 69fa ldr r2, [r7, #28]
|
|
800453a: 429a cmp r2, r3
|
|
800453c: d305 bcc.n 800454a <UART_SetConfig+0x372>
|
|
(pclk > (4096U * huart->Init.BaudRate)))
|
|
800453e: 68fb ldr r3, [r7, #12]
|
|
8004540: 685b ldr r3, [r3, #4]
|
|
8004542: 031b lsls r3, r3, #12
|
|
if ((pclk < (3U * huart->Init.BaudRate)) ||
|
|
8004544: 69fa ldr r2, [r7, #28]
|
|
8004546: 429a cmp r2, r3
|
|
8004548: d903 bls.n 8004552 <UART_SetConfig+0x37a>
|
|
{
|
|
ret = HAL_ERROR;
|
|
800454a: 2301 movs r3, #1
|
|
800454c: f887 3022 strb.w r3, [r7, #34] @ 0x22
|
|
8004550: e0e8 b.n 8004724 <UART_SetConfig+0x54c>
|
|
}
|
|
else
|
|
{
|
|
usartdiv = (uint32_t)(UART_DIV_LPUART(pclk, huart->Init.BaudRate));
|
|
8004552: 69fb ldr r3, [r7, #28]
|
|
8004554: 2200 movs r2, #0
|
|
8004556: 461c mov r4, r3
|
|
8004558: 4615 mov r5, r2
|
|
800455a: f04f 0200 mov.w r2, #0
|
|
800455e: f04f 0300 mov.w r3, #0
|
|
8004562: 022b lsls r3, r5, #8
|
|
8004564: ea43 6314 orr.w r3, r3, r4, lsr #24
|
|
8004568: 0222 lsls r2, r4, #8
|
|
800456a: 68f9 ldr r1, [r7, #12]
|
|
800456c: 6849 ldr r1, [r1, #4]
|
|
800456e: 0849 lsrs r1, r1, #1
|
|
8004570: 2000 movs r0, #0
|
|
8004572: 4688 mov r8, r1
|
|
8004574: 4681 mov r9, r0
|
|
8004576: eb12 0a08 adds.w sl, r2, r8
|
|
800457a: eb43 0b09 adc.w fp, r3, r9
|
|
800457e: 68fb ldr r3, [r7, #12]
|
|
8004580: 685b ldr r3, [r3, #4]
|
|
8004582: 2200 movs r2, #0
|
|
8004584: 603b str r3, [r7, #0]
|
|
8004586: 607a str r2, [r7, #4]
|
|
8004588: e9d7 2300 ldrd r2, r3, [r7]
|
|
800458c: 4650 mov r0, sl
|
|
800458e: 4659 mov r1, fp
|
|
8004590: f7fb fe1e bl 80001d0 <__aeabi_uldivmod>
|
|
8004594: 4602 mov r2, r0
|
|
8004596: 460b mov r3, r1
|
|
8004598: 4613 mov r3, r2
|
|
800459a: 61bb str r3, [r7, #24]
|
|
if ((usartdiv >= LPUART_BRR_MIN) && (usartdiv <= LPUART_BRR_MAX))
|
|
800459c: 69bb ldr r3, [r7, #24]
|
|
800459e: f5b3 7f40 cmp.w r3, #768 @ 0x300
|
|
80045a2: d308 bcc.n 80045b6 <UART_SetConfig+0x3de>
|
|
80045a4: 69bb ldr r3, [r7, #24]
|
|
80045a6: f5b3 1f80 cmp.w r3, #1048576 @ 0x100000
|
|
80045aa: d204 bcs.n 80045b6 <UART_SetConfig+0x3de>
|
|
{
|
|
huart->Instance->BRR = usartdiv;
|
|
80045ac: 68fb ldr r3, [r7, #12]
|
|
80045ae: 681b ldr r3, [r3, #0]
|
|
80045b0: 69ba ldr r2, [r7, #24]
|
|
80045b2: 60da str r2, [r3, #12]
|
|
80045b4: e0b6 b.n 8004724 <UART_SetConfig+0x54c>
|
|
}
|
|
else
|
|
{
|
|
ret = HAL_ERROR;
|
|
80045b6: 2301 movs r3, #1
|
|
80045b8: f887 3022 strb.w r3, [r7, #34] @ 0x22
|
|
80045bc: e0b2 b.n 8004724 <UART_SetConfig+0x54c>
|
|
} /* if ( (pclk < (3 * huart->Init.BaudRate) ) || (pclk > (4096 * huart->Init.BaudRate) )) */
|
|
#endif /* USART_PRESC_PRESCALER */
|
|
} /* if (pclk != 0) */
|
|
}
|
|
/* Check UART Over Sampling to set Baud Rate Register */
|
|
else if (huart->Init.OverSampling == UART_OVERSAMPLING_8)
|
|
80045be: 68fb ldr r3, [r7, #12]
|
|
80045c0: 69db ldr r3, [r3, #28]
|
|
80045c2: f5b3 4f00 cmp.w r3, #32768 @ 0x8000
|
|
80045c6: d15e bne.n 8004686 <UART_SetConfig+0x4ae>
|
|
{
|
|
switch (clocksource)
|
|
80045c8: f897 3023 ldrb.w r3, [r7, #35] @ 0x23
|
|
80045cc: 2b08 cmp r3, #8
|
|
80045ce: d828 bhi.n 8004622 <UART_SetConfig+0x44a>
|
|
80045d0: a201 add r2, pc, #4 @ (adr r2, 80045d8 <UART_SetConfig+0x400>)
|
|
80045d2: f852 f023 ldr.w pc, [r2, r3, lsl #2]
|
|
80045d6: bf00 nop
|
|
80045d8: 080045fd .word 0x080045fd
|
|
80045dc: 08004605 .word 0x08004605
|
|
80045e0: 0800460d .word 0x0800460d
|
|
80045e4: 08004623 .word 0x08004623
|
|
80045e8: 08004613 .word 0x08004613
|
|
80045ec: 08004623 .word 0x08004623
|
|
80045f0: 08004623 .word 0x08004623
|
|
80045f4: 08004623 .word 0x08004623
|
|
80045f8: 0800461b .word 0x0800461b
|
|
{
|
|
case UART_CLOCKSOURCE_PCLK1:
|
|
pclk = HAL_RCC_GetPCLK1Freq();
|
|
80045fc: f7fe ffa2 bl 8003544 <HAL_RCC_GetPCLK1Freq>
|
|
8004600: 61f8 str r0, [r7, #28]
|
|
break;
|
|
8004602: e014 b.n 800462e <UART_SetConfig+0x456>
|
|
case UART_CLOCKSOURCE_PCLK2:
|
|
pclk = HAL_RCC_GetPCLK2Freq();
|
|
8004604: f7fe ffb4 bl 8003570 <HAL_RCC_GetPCLK2Freq>
|
|
8004608: 61f8 str r0, [r7, #28]
|
|
break;
|
|
800460a: e010 b.n 800462e <UART_SetConfig+0x456>
|
|
case UART_CLOCKSOURCE_HSI:
|
|
pclk = (uint32_t) HSI_VALUE;
|
|
800460c: 4b4d ldr r3, [pc, #308] @ (8004744 <UART_SetConfig+0x56c>)
|
|
800460e: 61fb str r3, [r7, #28]
|
|
break;
|
|
8004610: e00d b.n 800462e <UART_SetConfig+0x456>
|
|
case UART_CLOCKSOURCE_SYSCLK:
|
|
pclk = HAL_RCC_GetSysClockFreq();
|
|
8004612: f7fe feff bl 8003414 <HAL_RCC_GetSysClockFreq>
|
|
8004616: 61f8 str r0, [r7, #28]
|
|
break;
|
|
8004618: e009 b.n 800462e <UART_SetConfig+0x456>
|
|
case UART_CLOCKSOURCE_LSE:
|
|
pclk = (uint32_t) LSE_VALUE;
|
|
800461a: f44f 4300 mov.w r3, #32768 @ 0x8000
|
|
800461e: 61fb str r3, [r7, #28]
|
|
break;
|
|
8004620: e005 b.n 800462e <UART_SetConfig+0x456>
|
|
default:
|
|
pclk = 0U;
|
|
8004622: 2300 movs r3, #0
|
|
8004624: 61fb str r3, [r7, #28]
|
|
ret = HAL_ERROR;
|
|
8004626: 2301 movs r3, #1
|
|
8004628: f887 3022 strb.w r3, [r7, #34] @ 0x22
|
|
break;
|
|
800462c: bf00 nop
|
|
}
|
|
|
|
/* USARTDIV must be greater than or equal to 0d16 */
|
|
if (pclk != 0U)
|
|
800462e: 69fb ldr r3, [r7, #28]
|
|
8004630: 2b00 cmp r3, #0
|
|
8004632: d077 beq.n 8004724 <UART_SetConfig+0x54c>
|
|
{
|
|
#if defined(USART_PRESC_PRESCALER)
|
|
usartdiv = (uint32_t)(UART_DIV_SAMPLING8(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler));
|
|
#else
|
|
usartdiv = (uint32_t)(UART_DIV_SAMPLING8(pclk, huart->Init.BaudRate));
|
|
8004634: 69fb ldr r3, [r7, #28]
|
|
8004636: 005a lsls r2, r3, #1
|
|
8004638: 68fb ldr r3, [r7, #12]
|
|
800463a: 685b ldr r3, [r3, #4]
|
|
800463c: 085b lsrs r3, r3, #1
|
|
800463e: 441a add r2, r3
|
|
8004640: 68fb ldr r3, [r7, #12]
|
|
8004642: 685b ldr r3, [r3, #4]
|
|
8004644: fbb2 f3f3 udiv r3, r2, r3
|
|
8004648: 61bb str r3, [r7, #24]
|
|
#endif /* USART_PRESC_PRESCALER */
|
|
if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX))
|
|
800464a: 69bb ldr r3, [r7, #24]
|
|
800464c: 2b0f cmp r3, #15
|
|
800464e: d916 bls.n 800467e <UART_SetConfig+0x4a6>
|
|
8004650: 69bb ldr r3, [r7, #24]
|
|
8004652: f5b3 3f80 cmp.w r3, #65536 @ 0x10000
|
|
8004656: d212 bcs.n 800467e <UART_SetConfig+0x4a6>
|
|
{
|
|
brrtemp = (uint16_t)(usartdiv & 0xFFF0U);
|
|
8004658: 69bb ldr r3, [r7, #24]
|
|
800465a: b29b uxth r3, r3
|
|
800465c: f023 030f bic.w r3, r3, #15
|
|
8004660: 82fb strh r3, [r7, #22]
|
|
brrtemp |= (uint16_t)((usartdiv & (uint16_t)0x000FU) >> 1U);
|
|
8004662: 69bb ldr r3, [r7, #24]
|
|
8004664: 085b lsrs r3, r3, #1
|
|
8004666: b29b uxth r3, r3
|
|
8004668: f003 0307 and.w r3, r3, #7
|
|
800466c: b29a uxth r2, r3
|
|
800466e: 8afb ldrh r3, [r7, #22]
|
|
8004670: 4313 orrs r3, r2
|
|
8004672: 82fb strh r3, [r7, #22]
|
|
huart->Instance->BRR = brrtemp;
|
|
8004674: 68fb ldr r3, [r7, #12]
|
|
8004676: 681b ldr r3, [r3, #0]
|
|
8004678: 8afa ldrh r2, [r7, #22]
|
|
800467a: 60da str r2, [r3, #12]
|
|
800467c: e052 b.n 8004724 <UART_SetConfig+0x54c>
|
|
}
|
|
else
|
|
{
|
|
ret = HAL_ERROR;
|
|
800467e: 2301 movs r3, #1
|
|
8004680: f887 3022 strb.w r3, [r7, #34] @ 0x22
|
|
8004684: e04e b.n 8004724 <UART_SetConfig+0x54c>
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
switch (clocksource)
|
|
8004686: f897 3023 ldrb.w r3, [r7, #35] @ 0x23
|
|
800468a: 2b08 cmp r3, #8
|
|
800468c: d827 bhi.n 80046de <UART_SetConfig+0x506>
|
|
800468e: a201 add r2, pc, #4 @ (adr r2, 8004694 <UART_SetConfig+0x4bc>)
|
|
8004690: f852 f023 ldr.w pc, [r2, r3, lsl #2]
|
|
8004694: 080046b9 .word 0x080046b9
|
|
8004698: 080046c1 .word 0x080046c1
|
|
800469c: 080046c9 .word 0x080046c9
|
|
80046a0: 080046df .word 0x080046df
|
|
80046a4: 080046cf .word 0x080046cf
|
|
80046a8: 080046df .word 0x080046df
|
|
80046ac: 080046df .word 0x080046df
|
|
80046b0: 080046df .word 0x080046df
|
|
80046b4: 080046d7 .word 0x080046d7
|
|
{
|
|
case UART_CLOCKSOURCE_PCLK1:
|
|
pclk = HAL_RCC_GetPCLK1Freq();
|
|
80046b8: f7fe ff44 bl 8003544 <HAL_RCC_GetPCLK1Freq>
|
|
80046bc: 61f8 str r0, [r7, #28]
|
|
break;
|
|
80046be: e014 b.n 80046ea <UART_SetConfig+0x512>
|
|
case UART_CLOCKSOURCE_PCLK2:
|
|
pclk = HAL_RCC_GetPCLK2Freq();
|
|
80046c0: f7fe ff56 bl 8003570 <HAL_RCC_GetPCLK2Freq>
|
|
80046c4: 61f8 str r0, [r7, #28]
|
|
break;
|
|
80046c6: e010 b.n 80046ea <UART_SetConfig+0x512>
|
|
case UART_CLOCKSOURCE_HSI:
|
|
pclk = (uint32_t) HSI_VALUE;
|
|
80046c8: 4b1e ldr r3, [pc, #120] @ (8004744 <UART_SetConfig+0x56c>)
|
|
80046ca: 61fb str r3, [r7, #28]
|
|
break;
|
|
80046cc: e00d b.n 80046ea <UART_SetConfig+0x512>
|
|
case UART_CLOCKSOURCE_SYSCLK:
|
|
pclk = HAL_RCC_GetSysClockFreq();
|
|
80046ce: f7fe fea1 bl 8003414 <HAL_RCC_GetSysClockFreq>
|
|
80046d2: 61f8 str r0, [r7, #28]
|
|
break;
|
|
80046d4: e009 b.n 80046ea <UART_SetConfig+0x512>
|
|
case UART_CLOCKSOURCE_LSE:
|
|
pclk = (uint32_t) LSE_VALUE;
|
|
80046d6: f44f 4300 mov.w r3, #32768 @ 0x8000
|
|
80046da: 61fb str r3, [r7, #28]
|
|
break;
|
|
80046dc: e005 b.n 80046ea <UART_SetConfig+0x512>
|
|
default:
|
|
pclk = 0U;
|
|
80046de: 2300 movs r3, #0
|
|
80046e0: 61fb str r3, [r7, #28]
|
|
ret = HAL_ERROR;
|
|
80046e2: 2301 movs r3, #1
|
|
80046e4: f887 3022 strb.w r3, [r7, #34] @ 0x22
|
|
break;
|
|
80046e8: bf00 nop
|
|
}
|
|
|
|
if (pclk != 0U)
|
|
80046ea: 69fb ldr r3, [r7, #28]
|
|
80046ec: 2b00 cmp r3, #0
|
|
80046ee: d019 beq.n 8004724 <UART_SetConfig+0x54c>
|
|
{
|
|
/* USARTDIV must be greater than or equal to 0d16 */
|
|
#if defined(USART_PRESC_PRESCALER)
|
|
usartdiv = (uint32_t)(UART_DIV_SAMPLING16(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler));
|
|
#else
|
|
usartdiv = (uint32_t)(UART_DIV_SAMPLING16(pclk, huart->Init.BaudRate));
|
|
80046f0: 68fb ldr r3, [r7, #12]
|
|
80046f2: 685b ldr r3, [r3, #4]
|
|
80046f4: 085a lsrs r2, r3, #1
|
|
80046f6: 69fb ldr r3, [r7, #28]
|
|
80046f8: 441a add r2, r3
|
|
80046fa: 68fb ldr r3, [r7, #12]
|
|
80046fc: 685b ldr r3, [r3, #4]
|
|
80046fe: fbb2 f3f3 udiv r3, r2, r3
|
|
8004702: 61bb str r3, [r7, #24]
|
|
#endif /* USART_PRESC_PRESCALER */
|
|
if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX))
|
|
8004704: 69bb ldr r3, [r7, #24]
|
|
8004706: 2b0f cmp r3, #15
|
|
8004708: d909 bls.n 800471e <UART_SetConfig+0x546>
|
|
800470a: 69bb ldr r3, [r7, #24]
|
|
800470c: f5b3 3f80 cmp.w r3, #65536 @ 0x10000
|
|
8004710: d205 bcs.n 800471e <UART_SetConfig+0x546>
|
|
{
|
|
huart->Instance->BRR = (uint16_t)usartdiv;
|
|
8004712: 69bb ldr r3, [r7, #24]
|
|
8004714: b29a uxth r2, r3
|
|
8004716: 68fb ldr r3, [r7, #12]
|
|
8004718: 681b ldr r3, [r3, #0]
|
|
800471a: 60da str r2, [r3, #12]
|
|
800471c: e002 b.n 8004724 <UART_SetConfig+0x54c>
|
|
}
|
|
else
|
|
{
|
|
ret = HAL_ERROR;
|
|
800471e: 2301 movs r3, #1
|
|
8004720: f887 3022 strb.w r3, [r7, #34] @ 0x22
|
|
huart->NbTxDataToProcess = 1;
|
|
huart->NbRxDataToProcess = 1;
|
|
#endif /* USART_CR1_FIFOEN */
|
|
|
|
/* Clear ISR function pointers */
|
|
huart->RxISR = NULL;
|
|
8004724: 68fb ldr r3, [r7, #12]
|
|
8004726: 2200 movs r2, #0
|
|
8004728: 669a str r2, [r3, #104] @ 0x68
|
|
huart->TxISR = NULL;
|
|
800472a: 68fb ldr r3, [r7, #12]
|
|
800472c: 2200 movs r2, #0
|
|
800472e: 66da str r2, [r3, #108] @ 0x6c
|
|
|
|
return ret;
|
|
8004730: f897 3022 ldrb.w r3, [r7, #34] @ 0x22
|
|
}
|
|
8004734: 4618 mov r0, r3
|
|
8004736: 3728 adds r7, #40 @ 0x28
|
|
8004738: 46bd mov sp, r7
|
|
800473a: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc}
|
|
800473e: bf00 nop
|
|
8004740: 40008000 .word 0x40008000
|
|
8004744: 00f42400 .word 0x00f42400
|
|
|
|
08004748 <UART_AdvFeatureConfig>:
|
|
* @brief Configure the UART peripheral advanced features.
|
|
* @param huart UART handle.
|
|
* @retval None
|
|
*/
|
|
void UART_AdvFeatureConfig(UART_HandleTypeDef *huart)
|
|
{
|
|
8004748: b480 push {r7}
|
|
800474a: b083 sub sp, #12
|
|
800474c: af00 add r7, sp, #0
|
|
800474e: 6078 str r0, [r7, #4]
|
|
/* Check whether the set of advanced features to configure is properly set */
|
|
assert_param(IS_UART_ADVFEATURE_INIT(huart->AdvancedInit.AdvFeatureInit));
|
|
|
|
/* if required, configure RX/TX pins swap */
|
|
if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_SWAP_INIT))
|
|
8004750: 687b ldr r3, [r7, #4]
|
|
8004752: 6a5b ldr r3, [r3, #36] @ 0x24
|
|
8004754: f003 0308 and.w r3, r3, #8
|
|
8004758: 2b00 cmp r3, #0
|
|
800475a: d00a beq.n 8004772 <UART_AdvFeatureConfig+0x2a>
|
|
{
|
|
assert_param(IS_UART_ADVFEATURE_SWAP(huart->AdvancedInit.Swap));
|
|
MODIFY_REG(huart->Instance->CR2, USART_CR2_SWAP, huart->AdvancedInit.Swap);
|
|
800475c: 687b ldr r3, [r7, #4]
|
|
800475e: 681b ldr r3, [r3, #0]
|
|
8004760: 685b ldr r3, [r3, #4]
|
|
8004762: f423 4100 bic.w r1, r3, #32768 @ 0x8000
|
|
8004766: 687b ldr r3, [r7, #4]
|
|
8004768: 6b5a ldr r2, [r3, #52] @ 0x34
|
|
800476a: 687b ldr r3, [r7, #4]
|
|
800476c: 681b ldr r3, [r3, #0]
|
|
800476e: 430a orrs r2, r1
|
|
8004770: 605a str r2, [r3, #4]
|
|
}
|
|
|
|
/* if required, configure TX pin active level inversion */
|
|
if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_TXINVERT_INIT))
|
|
8004772: 687b ldr r3, [r7, #4]
|
|
8004774: 6a5b ldr r3, [r3, #36] @ 0x24
|
|
8004776: f003 0301 and.w r3, r3, #1
|
|
800477a: 2b00 cmp r3, #0
|
|
800477c: d00a beq.n 8004794 <UART_AdvFeatureConfig+0x4c>
|
|
{
|
|
assert_param(IS_UART_ADVFEATURE_TXINV(huart->AdvancedInit.TxPinLevelInvert));
|
|
MODIFY_REG(huart->Instance->CR2, USART_CR2_TXINV, huart->AdvancedInit.TxPinLevelInvert);
|
|
800477e: 687b ldr r3, [r7, #4]
|
|
8004780: 681b ldr r3, [r3, #0]
|
|
8004782: 685b ldr r3, [r3, #4]
|
|
8004784: f423 3100 bic.w r1, r3, #131072 @ 0x20000
|
|
8004788: 687b ldr r3, [r7, #4]
|
|
800478a: 6a9a ldr r2, [r3, #40] @ 0x28
|
|
800478c: 687b ldr r3, [r7, #4]
|
|
800478e: 681b ldr r3, [r3, #0]
|
|
8004790: 430a orrs r2, r1
|
|
8004792: 605a str r2, [r3, #4]
|
|
}
|
|
|
|
/* if required, configure RX pin active level inversion */
|
|
if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_RXINVERT_INIT))
|
|
8004794: 687b ldr r3, [r7, #4]
|
|
8004796: 6a5b ldr r3, [r3, #36] @ 0x24
|
|
8004798: f003 0302 and.w r3, r3, #2
|
|
800479c: 2b00 cmp r3, #0
|
|
800479e: d00a beq.n 80047b6 <UART_AdvFeatureConfig+0x6e>
|
|
{
|
|
assert_param(IS_UART_ADVFEATURE_RXINV(huart->AdvancedInit.RxPinLevelInvert));
|
|
MODIFY_REG(huart->Instance->CR2, USART_CR2_RXINV, huart->AdvancedInit.RxPinLevelInvert);
|
|
80047a0: 687b ldr r3, [r7, #4]
|
|
80047a2: 681b ldr r3, [r3, #0]
|
|
80047a4: 685b ldr r3, [r3, #4]
|
|
80047a6: f423 3180 bic.w r1, r3, #65536 @ 0x10000
|
|
80047aa: 687b ldr r3, [r7, #4]
|
|
80047ac: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
80047ae: 687b ldr r3, [r7, #4]
|
|
80047b0: 681b ldr r3, [r3, #0]
|
|
80047b2: 430a orrs r2, r1
|
|
80047b4: 605a str r2, [r3, #4]
|
|
}
|
|
|
|
/* if required, configure data inversion */
|
|
if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_DATAINVERT_INIT))
|
|
80047b6: 687b ldr r3, [r7, #4]
|
|
80047b8: 6a5b ldr r3, [r3, #36] @ 0x24
|
|
80047ba: f003 0304 and.w r3, r3, #4
|
|
80047be: 2b00 cmp r3, #0
|
|
80047c0: d00a beq.n 80047d8 <UART_AdvFeatureConfig+0x90>
|
|
{
|
|
assert_param(IS_UART_ADVFEATURE_DATAINV(huart->AdvancedInit.DataInvert));
|
|
MODIFY_REG(huart->Instance->CR2, USART_CR2_DATAINV, huart->AdvancedInit.DataInvert);
|
|
80047c2: 687b ldr r3, [r7, #4]
|
|
80047c4: 681b ldr r3, [r3, #0]
|
|
80047c6: 685b ldr r3, [r3, #4]
|
|
80047c8: f423 2180 bic.w r1, r3, #262144 @ 0x40000
|
|
80047cc: 687b ldr r3, [r7, #4]
|
|
80047ce: 6b1a ldr r2, [r3, #48] @ 0x30
|
|
80047d0: 687b ldr r3, [r7, #4]
|
|
80047d2: 681b ldr r3, [r3, #0]
|
|
80047d4: 430a orrs r2, r1
|
|
80047d6: 605a str r2, [r3, #4]
|
|
}
|
|
|
|
/* if required, configure RX overrun detection disabling */
|
|
if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_RXOVERRUNDISABLE_INIT))
|
|
80047d8: 687b ldr r3, [r7, #4]
|
|
80047da: 6a5b ldr r3, [r3, #36] @ 0x24
|
|
80047dc: f003 0310 and.w r3, r3, #16
|
|
80047e0: 2b00 cmp r3, #0
|
|
80047e2: d00a beq.n 80047fa <UART_AdvFeatureConfig+0xb2>
|
|
{
|
|
assert_param(IS_UART_OVERRUN(huart->AdvancedInit.OverrunDisable));
|
|
MODIFY_REG(huart->Instance->CR3, USART_CR3_OVRDIS, huart->AdvancedInit.OverrunDisable);
|
|
80047e4: 687b ldr r3, [r7, #4]
|
|
80047e6: 681b ldr r3, [r3, #0]
|
|
80047e8: 689b ldr r3, [r3, #8]
|
|
80047ea: f423 5180 bic.w r1, r3, #4096 @ 0x1000
|
|
80047ee: 687b ldr r3, [r7, #4]
|
|
80047f0: 6b9a ldr r2, [r3, #56] @ 0x38
|
|
80047f2: 687b ldr r3, [r7, #4]
|
|
80047f4: 681b ldr r3, [r3, #0]
|
|
80047f6: 430a orrs r2, r1
|
|
80047f8: 609a str r2, [r3, #8]
|
|
}
|
|
|
|
/* if required, configure DMA disabling on reception error */
|
|
if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_DMADISABLEONERROR_INIT))
|
|
80047fa: 687b ldr r3, [r7, #4]
|
|
80047fc: 6a5b ldr r3, [r3, #36] @ 0x24
|
|
80047fe: f003 0320 and.w r3, r3, #32
|
|
8004802: 2b00 cmp r3, #0
|
|
8004804: d00a beq.n 800481c <UART_AdvFeatureConfig+0xd4>
|
|
{
|
|
assert_param(IS_UART_ADVFEATURE_DMAONRXERROR(huart->AdvancedInit.DMADisableonRxError));
|
|
MODIFY_REG(huart->Instance->CR3, USART_CR3_DDRE, huart->AdvancedInit.DMADisableonRxError);
|
|
8004806: 687b ldr r3, [r7, #4]
|
|
8004808: 681b ldr r3, [r3, #0]
|
|
800480a: 689b ldr r3, [r3, #8]
|
|
800480c: f423 5100 bic.w r1, r3, #8192 @ 0x2000
|
|
8004810: 687b ldr r3, [r7, #4]
|
|
8004812: 6bda ldr r2, [r3, #60] @ 0x3c
|
|
8004814: 687b ldr r3, [r7, #4]
|
|
8004816: 681b ldr r3, [r3, #0]
|
|
8004818: 430a orrs r2, r1
|
|
800481a: 609a str r2, [r3, #8]
|
|
}
|
|
|
|
/* if required, configure auto Baud rate detection scheme */
|
|
if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_AUTOBAUDRATE_INIT))
|
|
800481c: 687b ldr r3, [r7, #4]
|
|
800481e: 6a5b ldr r3, [r3, #36] @ 0x24
|
|
8004820: f003 0340 and.w r3, r3, #64 @ 0x40
|
|
8004824: 2b00 cmp r3, #0
|
|
8004826: d01a beq.n 800485e <UART_AdvFeatureConfig+0x116>
|
|
{
|
|
assert_param(IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(huart->Instance));
|
|
assert_param(IS_UART_ADVFEATURE_AUTOBAUDRATE(huart->AdvancedInit.AutoBaudRateEnable));
|
|
MODIFY_REG(huart->Instance->CR2, USART_CR2_ABREN, huart->AdvancedInit.AutoBaudRateEnable);
|
|
8004828: 687b ldr r3, [r7, #4]
|
|
800482a: 681b ldr r3, [r3, #0]
|
|
800482c: 685b ldr r3, [r3, #4]
|
|
800482e: f423 1180 bic.w r1, r3, #1048576 @ 0x100000
|
|
8004832: 687b ldr r3, [r7, #4]
|
|
8004834: 6c1a ldr r2, [r3, #64] @ 0x40
|
|
8004836: 687b ldr r3, [r7, #4]
|
|
8004838: 681b ldr r3, [r3, #0]
|
|
800483a: 430a orrs r2, r1
|
|
800483c: 605a str r2, [r3, #4]
|
|
/* set auto Baudrate detection parameters if detection is enabled */
|
|
if (huart->AdvancedInit.AutoBaudRateEnable == UART_ADVFEATURE_AUTOBAUDRATE_ENABLE)
|
|
800483e: 687b ldr r3, [r7, #4]
|
|
8004840: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
8004842: f5b3 1f80 cmp.w r3, #1048576 @ 0x100000
|
|
8004846: d10a bne.n 800485e <UART_AdvFeatureConfig+0x116>
|
|
{
|
|
assert_param(IS_UART_ADVFEATURE_AUTOBAUDRATEMODE(huart->AdvancedInit.AutoBaudRateMode));
|
|
MODIFY_REG(huart->Instance->CR2, USART_CR2_ABRMODE, huart->AdvancedInit.AutoBaudRateMode);
|
|
8004848: 687b ldr r3, [r7, #4]
|
|
800484a: 681b ldr r3, [r3, #0]
|
|
800484c: 685b ldr r3, [r3, #4]
|
|
800484e: f423 01c0 bic.w r1, r3, #6291456 @ 0x600000
|
|
8004852: 687b ldr r3, [r7, #4]
|
|
8004854: 6c5a ldr r2, [r3, #68] @ 0x44
|
|
8004856: 687b ldr r3, [r7, #4]
|
|
8004858: 681b ldr r3, [r3, #0]
|
|
800485a: 430a orrs r2, r1
|
|
800485c: 605a str r2, [r3, #4]
|
|
}
|
|
}
|
|
|
|
/* if required, configure MSB first on communication line */
|
|
if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_MSBFIRST_INIT))
|
|
800485e: 687b ldr r3, [r7, #4]
|
|
8004860: 6a5b ldr r3, [r3, #36] @ 0x24
|
|
8004862: f003 0380 and.w r3, r3, #128 @ 0x80
|
|
8004866: 2b00 cmp r3, #0
|
|
8004868: d00a beq.n 8004880 <UART_AdvFeatureConfig+0x138>
|
|
{
|
|
assert_param(IS_UART_ADVFEATURE_MSBFIRST(huart->AdvancedInit.MSBFirst));
|
|
MODIFY_REG(huart->Instance->CR2, USART_CR2_MSBFIRST, huart->AdvancedInit.MSBFirst);
|
|
800486a: 687b ldr r3, [r7, #4]
|
|
800486c: 681b ldr r3, [r3, #0]
|
|
800486e: 685b ldr r3, [r3, #4]
|
|
8004870: f423 2100 bic.w r1, r3, #524288 @ 0x80000
|
|
8004874: 687b ldr r3, [r7, #4]
|
|
8004876: 6c9a ldr r2, [r3, #72] @ 0x48
|
|
8004878: 687b ldr r3, [r7, #4]
|
|
800487a: 681b ldr r3, [r3, #0]
|
|
800487c: 430a orrs r2, r1
|
|
800487e: 605a str r2, [r3, #4]
|
|
}
|
|
}
|
|
8004880: bf00 nop
|
|
8004882: 370c adds r7, #12
|
|
8004884: 46bd mov sp, r7
|
|
8004886: f85d 7b04 ldr.w r7, [sp], #4
|
|
800488a: 4770 bx lr
|
|
|
|
0800488c <UART_CheckIdleState>:
|
|
* @brief Check the UART Idle State.
|
|
* @param huart UART handle.
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef UART_CheckIdleState(UART_HandleTypeDef *huart)
|
|
{
|
|
800488c: b580 push {r7, lr}
|
|
800488e: b098 sub sp, #96 @ 0x60
|
|
8004890: af02 add r7, sp, #8
|
|
8004892: 6078 str r0, [r7, #4]
|
|
uint32_t tickstart;
|
|
|
|
/* Initialize the UART ErrorCode */
|
|
huart->ErrorCode = HAL_UART_ERROR_NONE;
|
|
8004894: 687b ldr r3, [r7, #4]
|
|
8004896: 2200 movs r2, #0
|
|
8004898: f8c3 2084 str.w r2, [r3, #132] @ 0x84
|
|
|
|
/* Init tickstart for timeout management */
|
|
tickstart = HAL_GetTick();
|
|
800489c: f7fd f906 bl 8001aac <HAL_GetTick>
|
|
80048a0: 6578 str r0, [r7, #84] @ 0x54
|
|
|
|
/* Check if the Transmitter is enabled */
|
|
if ((huart->Instance->CR1 & USART_CR1_TE) == USART_CR1_TE)
|
|
80048a2: 687b ldr r3, [r7, #4]
|
|
80048a4: 681b ldr r3, [r3, #0]
|
|
80048a6: 681b ldr r3, [r3, #0]
|
|
80048a8: f003 0308 and.w r3, r3, #8
|
|
80048ac: 2b08 cmp r3, #8
|
|
80048ae: d12e bne.n 800490e <UART_CheckIdleState+0x82>
|
|
{
|
|
/* Wait until TEACK flag is set */
|
|
if (UART_WaitOnFlagUntilTimeout(huart, USART_ISR_TEACK, RESET, tickstart, HAL_UART_TIMEOUT_VALUE) != HAL_OK)
|
|
80048b0: f06f 437e mvn.w r3, #4261412864 @ 0xfe000000
|
|
80048b4: 9300 str r3, [sp, #0]
|
|
80048b6: 6d7b ldr r3, [r7, #84] @ 0x54
|
|
80048b8: 2200 movs r2, #0
|
|
80048ba: f44f 1100 mov.w r1, #2097152 @ 0x200000
|
|
80048be: 6878 ldr r0, [r7, #4]
|
|
80048c0: f000 f88c bl 80049dc <UART_WaitOnFlagUntilTimeout>
|
|
80048c4: 4603 mov r3, r0
|
|
80048c6: 2b00 cmp r3, #0
|
|
80048c8: d021 beq.n 800490e <UART_CheckIdleState+0x82>
|
|
{
|
|
/* Disable TXE interrupt for the interrupt process */
|
|
#if defined(USART_CR1_FIFOEN)
|
|
ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_TXEIE_TXFNFIE));
|
|
#else
|
|
ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_TXEIE));
|
|
80048ca: 687b ldr r3, [r7, #4]
|
|
80048cc: 681b ldr r3, [r3, #0]
|
|
80048ce: 63bb str r3, [r7, #56] @ 0x38
|
|
*/
|
|
__STATIC_FORCEINLINE uint32_t __LDREXW(volatile uint32_t *addr)
|
|
{
|
|
uint32_t result;
|
|
|
|
__ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) );
|
|
80048d0: 6bbb ldr r3, [r7, #56] @ 0x38
|
|
80048d2: e853 3f00 ldrex r3, [r3]
|
|
80048d6: 637b str r3, [r7, #52] @ 0x34
|
|
return(result);
|
|
80048d8: 6b7b ldr r3, [r7, #52] @ 0x34
|
|
80048da: f023 0380 bic.w r3, r3, #128 @ 0x80
|
|
80048de: 653b str r3, [r7, #80] @ 0x50
|
|
80048e0: 687b ldr r3, [r7, #4]
|
|
80048e2: 681b ldr r3, [r3, #0]
|
|
80048e4: 461a mov r2, r3
|
|
80048e6: 6d3b ldr r3, [r7, #80] @ 0x50
|
|
80048e8: 647b str r3, [r7, #68] @ 0x44
|
|
80048ea: 643a str r2, [r7, #64] @ 0x40
|
|
*/
|
|
__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) );
|
|
80048ec: 6c39 ldr r1, [r7, #64] @ 0x40
|
|
80048ee: 6c7a ldr r2, [r7, #68] @ 0x44
|
|
80048f0: e841 2300 strex r3, r2, [r1]
|
|
80048f4: 63fb str r3, [r7, #60] @ 0x3c
|
|
return(result);
|
|
80048f6: 6bfb ldr r3, [r7, #60] @ 0x3c
|
|
80048f8: 2b00 cmp r3, #0
|
|
80048fa: d1e6 bne.n 80048ca <UART_CheckIdleState+0x3e>
|
|
#endif /* USART_CR1_FIFOEN */
|
|
|
|
huart->gState = HAL_UART_STATE_READY;
|
|
80048fc: 687b ldr r3, [r7, #4]
|
|
80048fe: 2220 movs r2, #32
|
|
8004900: 67da str r2, [r3, #124] @ 0x7c
|
|
|
|
__HAL_UNLOCK(huart);
|
|
8004902: 687b ldr r3, [r7, #4]
|
|
8004904: 2200 movs r2, #0
|
|
8004906: f883 2078 strb.w r2, [r3, #120] @ 0x78
|
|
|
|
/* Timeout occurred */
|
|
return HAL_TIMEOUT;
|
|
800490a: 2303 movs r3, #3
|
|
800490c: e062 b.n 80049d4 <UART_CheckIdleState+0x148>
|
|
}
|
|
}
|
|
|
|
/* Check if the Receiver is enabled */
|
|
if ((huart->Instance->CR1 & USART_CR1_RE) == USART_CR1_RE)
|
|
800490e: 687b ldr r3, [r7, #4]
|
|
8004910: 681b ldr r3, [r3, #0]
|
|
8004912: 681b ldr r3, [r3, #0]
|
|
8004914: f003 0304 and.w r3, r3, #4
|
|
8004918: 2b04 cmp r3, #4
|
|
800491a: d149 bne.n 80049b0 <UART_CheckIdleState+0x124>
|
|
{
|
|
/* Wait until REACK flag is set */
|
|
if (UART_WaitOnFlagUntilTimeout(huart, USART_ISR_REACK, RESET, tickstart, HAL_UART_TIMEOUT_VALUE) != HAL_OK)
|
|
800491c: f06f 437e mvn.w r3, #4261412864 @ 0xfe000000
|
|
8004920: 9300 str r3, [sp, #0]
|
|
8004922: 6d7b ldr r3, [r7, #84] @ 0x54
|
|
8004924: 2200 movs r2, #0
|
|
8004926: f44f 0180 mov.w r1, #4194304 @ 0x400000
|
|
800492a: 6878 ldr r0, [r7, #4]
|
|
800492c: f000 f856 bl 80049dc <UART_WaitOnFlagUntilTimeout>
|
|
8004930: 4603 mov r3, r0
|
|
8004932: 2b00 cmp r3, #0
|
|
8004934: d03c beq.n 80049b0 <UART_CheckIdleState+0x124>
|
|
/* Disable RXNE, PE and ERR (Frame error, noise error, overrun error)
|
|
interrupts for the interrupt process */
|
|
#if defined(USART_CR1_FIFOEN)
|
|
ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE));
|
|
#else
|
|
ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE));
|
|
8004936: 687b ldr r3, [r7, #4]
|
|
8004938: 681b ldr r3, [r3, #0]
|
|
800493a: 627b str r3, [r7, #36] @ 0x24
|
|
__ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) );
|
|
800493c: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
800493e: e853 3f00 ldrex r3, [r3]
|
|
8004942: 623b str r3, [r7, #32]
|
|
return(result);
|
|
8004944: 6a3b ldr r3, [r7, #32]
|
|
8004946: f423 7390 bic.w r3, r3, #288 @ 0x120
|
|
800494a: 64fb str r3, [r7, #76] @ 0x4c
|
|
800494c: 687b ldr r3, [r7, #4]
|
|
800494e: 681b ldr r3, [r3, #0]
|
|
8004950: 461a mov r2, r3
|
|
8004952: 6cfb ldr r3, [r7, #76] @ 0x4c
|
|
8004954: 633b str r3, [r7, #48] @ 0x30
|
|
8004956: 62fa str r2, [r7, #44] @ 0x2c
|
|
__ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) );
|
|
8004958: 6af9 ldr r1, [r7, #44] @ 0x2c
|
|
800495a: 6b3a ldr r2, [r7, #48] @ 0x30
|
|
800495c: e841 2300 strex r3, r2, [r1]
|
|
8004960: 62bb str r3, [r7, #40] @ 0x28
|
|
return(result);
|
|
8004962: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8004964: 2b00 cmp r3, #0
|
|
8004966: d1e6 bne.n 8004936 <UART_CheckIdleState+0xaa>
|
|
#endif /* USART_CR1_FIFOEN */
|
|
ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
|
|
8004968: 687b ldr r3, [r7, #4]
|
|
800496a: 681b ldr r3, [r3, #0]
|
|
800496c: 3308 adds r3, #8
|
|
800496e: 613b str r3, [r7, #16]
|
|
__ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) );
|
|
8004970: 693b ldr r3, [r7, #16]
|
|
8004972: e853 3f00 ldrex r3, [r3]
|
|
8004976: 60fb str r3, [r7, #12]
|
|
return(result);
|
|
8004978: 68fb ldr r3, [r7, #12]
|
|
800497a: f023 0301 bic.w r3, r3, #1
|
|
800497e: 64bb str r3, [r7, #72] @ 0x48
|
|
8004980: 687b ldr r3, [r7, #4]
|
|
8004982: 681b ldr r3, [r3, #0]
|
|
8004984: 3308 adds r3, #8
|
|
8004986: 6cba ldr r2, [r7, #72] @ 0x48
|
|
8004988: 61fa str r2, [r7, #28]
|
|
800498a: 61bb str r3, [r7, #24]
|
|
__ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) );
|
|
800498c: 69b9 ldr r1, [r7, #24]
|
|
800498e: 69fa ldr r2, [r7, #28]
|
|
8004990: e841 2300 strex r3, r2, [r1]
|
|
8004994: 617b str r3, [r7, #20]
|
|
return(result);
|
|
8004996: 697b ldr r3, [r7, #20]
|
|
8004998: 2b00 cmp r3, #0
|
|
800499a: d1e5 bne.n 8004968 <UART_CheckIdleState+0xdc>
|
|
|
|
huart->RxState = HAL_UART_STATE_READY;
|
|
800499c: 687b ldr r3, [r7, #4]
|
|
800499e: 2220 movs r2, #32
|
|
80049a0: f8c3 2080 str.w r2, [r3, #128] @ 0x80
|
|
|
|
__HAL_UNLOCK(huart);
|
|
80049a4: 687b ldr r3, [r7, #4]
|
|
80049a6: 2200 movs r2, #0
|
|
80049a8: f883 2078 strb.w r2, [r3, #120] @ 0x78
|
|
|
|
/* Timeout occurred */
|
|
return HAL_TIMEOUT;
|
|
80049ac: 2303 movs r3, #3
|
|
80049ae: e011 b.n 80049d4 <UART_CheckIdleState+0x148>
|
|
}
|
|
}
|
|
|
|
/* Initialize the UART State */
|
|
huart->gState = HAL_UART_STATE_READY;
|
|
80049b0: 687b ldr r3, [r7, #4]
|
|
80049b2: 2220 movs r2, #32
|
|
80049b4: 67da str r2, [r3, #124] @ 0x7c
|
|
huart->RxState = HAL_UART_STATE_READY;
|
|
80049b6: 687b ldr r3, [r7, #4]
|
|
80049b8: 2220 movs r2, #32
|
|
80049ba: f8c3 2080 str.w r2, [r3, #128] @ 0x80
|
|
huart->ReceptionType = HAL_UART_RECEPTION_STANDARD;
|
|
80049be: 687b ldr r3, [r7, #4]
|
|
80049c0: 2200 movs r2, #0
|
|
80049c2: 661a str r2, [r3, #96] @ 0x60
|
|
huart->RxEventType = HAL_UART_RXEVENT_TC;
|
|
80049c4: 687b ldr r3, [r7, #4]
|
|
80049c6: 2200 movs r2, #0
|
|
80049c8: 665a str r2, [r3, #100] @ 0x64
|
|
|
|
__HAL_UNLOCK(huart);
|
|
80049ca: 687b ldr r3, [r7, #4]
|
|
80049cc: 2200 movs r2, #0
|
|
80049ce: f883 2078 strb.w r2, [r3, #120] @ 0x78
|
|
|
|
return HAL_OK;
|
|
80049d2: 2300 movs r3, #0
|
|
}
|
|
80049d4: 4618 mov r0, r3
|
|
80049d6: 3758 adds r7, #88 @ 0x58
|
|
80049d8: 46bd mov sp, r7
|
|
80049da: bd80 pop {r7, pc}
|
|
|
|
080049dc <UART_WaitOnFlagUntilTimeout>:
|
|
* @param Timeout Timeout duration
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout(UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status,
|
|
uint32_t Tickstart, uint32_t Timeout)
|
|
{
|
|
80049dc: b580 push {r7, lr}
|
|
80049de: b084 sub sp, #16
|
|
80049e0: af00 add r7, sp, #0
|
|
80049e2: 60f8 str r0, [r7, #12]
|
|
80049e4: 60b9 str r1, [r7, #8]
|
|
80049e6: 603b str r3, [r7, #0]
|
|
80049e8: 4613 mov r3, r2
|
|
80049ea: 71fb strb r3, [r7, #7]
|
|
/* Wait until flag is set */
|
|
while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
|
|
80049ec: e04f b.n 8004a8e <UART_WaitOnFlagUntilTimeout+0xb2>
|
|
{
|
|
/* Check for the Timeout */
|
|
if (Timeout != HAL_MAX_DELAY)
|
|
80049ee: 69bb ldr r3, [r7, #24]
|
|
80049f0: f1b3 3fff cmp.w r3, #4294967295
|
|
80049f4: d04b beq.n 8004a8e <UART_WaitOnFlagUntilTimeout+0xb2>
|
|
{
|
|
if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
|
|
80049f6: f7fd f859 bl 8001aac <HAL_GetTick>
|
|
80049fa: 4602 mov r2, r0
|
|
80049fc: 683b ldr r3, [r7, #0]
|
|
80049fe: 1ad3 subs r3, r2, r3
|
|
8004a00: 69ba ldr r2, [r7, #24]
|
|
8004a02: 429a cmp r2, r3
|
|
8004a04: d302 bcc.n 8004a0c <UART_WaitOnFlagUntilTimeout+0x30>
|
|
8004a06: 69bb ldr r3, [r7, #24]
|
|
8004a08: 2b00 cmp r3, #0
|
|
8004a0a: d101 bne.n 8004a10 <UART_WaitOnFlagUntilTimeout+0x34>
|
|
{
|
|
|
|
return HAL_TIMEOUT;
|
|
8004a0c: 2303 movs r3, #3
|
|
8004a0e: e04e b.n 8004aae <UART_WaitOnFlagUntilTimeout+0xd2>
|
|
}
|
|
|
|
if ((READ_BIT(huart->Instance->CR1, USART_CR1_RE) != 0U) && (Flag != UART_FLAG_TXE) && (Flag != UART_FLAG_TC))
|
|
8004a10: 68fb ldr r3, [r7, #12]
|
|
8004a12: 681b ldr r3, [r3, #0]
|
|
8004a14: 681b ldr r3, [r3, #0]
|
|
8004a16: f003 0304 and.w r3, r3, #4
|
|
8004a1a: 2b00 cmp r3, #0
|
|
8004a1c: d037 beq.n 8004a8e <UART_WaitOnFlagUntilTimeout+0xb2>
|
|
8004a1e: 68bb ldr r3, [r7, #8]
|
|
8004a20: 2b80 cmp r3, #128 @ 0x80
|
|
8004a22: d034 beq.n 8004a8e <UART_WaitOnFlagUntilTimeout+0xb2>
|
|
8004a24: 68bb ldr r3, [r7, #8]
|
|
8004a26: 2b40 cmp r3, #64 @ 0x40
|
|
8004a28: d031 beq.n 8004a8e <UART_WaitOnFlagUntilTimeout+0xb2>
|
|
{
|
|
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_ORE) == SET)
|
|
8004a2a: 68fb ldr r3, [r7, #12]
|
|
8004a2c: 681b ldr r3, [r3, #0]
|
|
8004a2e: 69db ldr r3, [r3, #28]
|
|
8004a30: f003 0308 and.w r3, r3, #8
|
|
8004a34: 2b08 cmp r3, #8
|
|
8004a36: d110 bne.n 8004a5a <UART_WaitOnFlagUntilTimeout+0x7e>
|
|
{
|
|
/* Clear Overrun Error flag*/
|
|
__HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_OREF);
|
|
8004a38: 68fb ldr r3, [r7, #12]
|
|
8004a3a: 681b ldr r3, [r3, #0]
|
|
8004a3c: 2208 movs r2, #8
|
|
8004a3e: 621a str r2, [r3, #32]
|
|
|
|
/* Blocking error : transfer is aborted
|
|
Set the UART state ready to be able to start again the process,
|
|
Disable Rx Interrupts if ongoing */
|
|
UART_EndRxTransfer(huart);
|
|
8004a40: 68f8 ldr r0, [r7, #12]
|
|
8004a42: f000 f838 bl 8004ab6 <UART_EndRxTransfer>
|
|
|
|
huart->ErrorCode = HAL_UART_ERROR_ORE;
|
|
8004a46: 68fb ldr r3, [r7, #12]
|
|
8004a48: 2208 movs r2, #8
|
|
8004a4a: f8c3 2084 str.w r2, [r3, #132] @ 0x84
|
|
|
|
/* Process Unlocked */
|
|
__HAL_UNLOCK(huart);
|
|
8004a4e: 68fb ldr r3, [r7, #12]
|
|
8004a50: 2200 movs r2, #0
|
|
8004a52: f883 2078 strb.w r2, [r3, #120] @ 0x78
|
|
|
|
return HAL_ERROR;
|
|
8004a56: 2301 movs r3, #1
|
|
8004a58: e029 b.n 8004aae <UART_WaitOnFlagUntilTimeout+0xd2>
|
|
}
|
|
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RTOF) == SET)
|
|
8004a5a: 68fb ldr r3, [r7, #12]
|
|
8004a5c: 681b ldr r3, [r3, #0]
|
|
8004a5e: 69db ldr r3, [r3, #28]
|
|
8004a60: f403 6300 and.w r3, r3, #2048 @ 0x800
|
|
8004a64: f5b3 6f00 cmp.w r3, #2048 @ 0x800
|
|
8004a68: d111 bne.n 8004a8e <UART_WaitOnFlagUntilTimeout+0xb2>
|
|
{
|
|
/* Clear Receiver Timeout flag*/
|
|
__HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_RTOF);
|
|
8004a6a: 68fb ldr r3, [r7, #12]
|
|
8004a6c: 681b ldr r3, [r3, #0]
|
|
8004a6e: f44f 6200 mov.w r2, #2048 @ 0x800
|
|
8004a72: 621a str r2, [r3, #32]
|
|
|
|
/* Blocking error : transfer is aborted
|
|
Set the UART state ready to be able to start again the process,
|
|
Disable Rx Interrupts if ongoing */
|
|
UART_EndRxTransfer(huart);
|
|
8004a74: 68f8 ldr r0, [r7, #12]
|
|
8004a76: f000 f81e bl 8004ab6 <UART_EndRxTransfer>
|
|
|
|
huart->ErrorCode = HAL_UART_ERROR_RTO;
|
|
8004a7a: 68fb ldr r3, [r7, #12]
|
|
8004a7c: 2220 movs r2, #32
|
|
8004a7e: f8c3 2084 str.w r2, [r3, #132] @ 0x84
|
|
|
|
/* Process Unlocked */
|
|
__HAL_UNLOCK(huart);
|
|
8004a82: 68fb ldr r3, [r7, #12]
|
|
8004a84: 2200 movs r2, #0
|
|
8004a86: f883 2078 strb.w r2, [r3, #120] @ 0x78
|
|
|
|
return HAL_TIMEOUT;
|
|
8004a8a: 2303 movs r3, #3
|
|
8004a8c: e00f b.n 8004aae <UART_WaitOnFlagUntilTimeout+0xd2>
|
|
while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
|
|
8004a8e: 68fb ldr r3, [r7, #12]
|
|
8004a90: 681b ldr r3, [r3, #0]
|
|
8004a92: 69da ldr r2, [r3, #28]
|
|
8004a94: 68bb ldr r3, [r7, #8]
|
|
8004a96: 4013 ands r3, r2
|
|
8004a98: 68ba ldr r2, [r7, #8]
|
|
8004a9a: 429a cmp r2, r3
|
|
8004a9c: bf0c ite eq
|
|
8004a9e: 2301 moveq r3, #1
|
|
8004aa0: 2300 movne r3, #0
|
|
8004aa2: b2db uxtb r3, r3
|
|
8004aa4: 461a mov r2, r3
|
|
8004aa6: 79fb ldrb r3, [r7, #7]
|
|
8004aa8: 429a cmp r2, r3
|
|
8004aaa: d0a0 beq.n 80049ee <UART_WaitOnFlagUntilTimeout+0x12>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return HAL_OK;
|
|
8004aac: 2300 movs r3, #0
|
|
}
|
|
8004aae: 4618 mov r0, r3
|
|
8004ab0: 3710 adds r7, #16
|
|
8004ab2: 46bd mov sp, r7
|
|
8004ab4: bd80 pop {r7, pc}
|
|
|
|
08004ab6 <UART_EndRxTransfer>:
|
|
* @brief End ongoing Rx transfer on UART peripheral (following error detection or Reception completion).
|
|
* @param huart UART handle.
|
|
* @retval None
|
|
*/
|
|
static void UART_EndRxTransfer(UART_HandleTypeDef *huart)
|
|
{
|
|
8004ab6: b480 push {r7}
|
|
8004ab8: b095 sub sp, #84 @ 0x54
|
|
8004aba: af00 add r7, sp, #0
|
|
8004abc: 6078 str r0, [r7, #4]
|
|
/* Disable RXNE, PE and ERR (Frame error, noise error, overrun error) interrupts */
|
|
#if defined(USART_CR1_FIFOEN)
|
|
ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE));
|
|
ATOMIC_CLEAR_BIT(huart->Instance->CR3, (USART_CR3_EIE | USART_CR3_RXFTIE));
|
|
#else
|
|
ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE));
|
|
8004abe: 687b ldr r3, [r7, #4]
|
|
8004ac0: 681b ldr r3, [r3, #0]
|
|
8004ac2: 637b str r3, [r7, #52] @ 0x34
|
|
__ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) );
|
|
8004ac4: 6b7b ldr r3, [r7, #52] @ 0x34
|
|
8004ac6: e853 3f00 ldrex r3, [r3]
|
|
8004aca: 633b str r3, [r7, #48] @ 0x30
|
|
return(result);
|
|
8004acc: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8004ace: f423 7390 bic.w r3, r3, #288 @ 0x120
|
|
8004ad2: 64fb str r3, [r7, #76] @ 0x4c
|
|
8004ad4: 687b ldr r3, [r7, #4]
|
|
8004ad6: 681b ldr r3, [r3, #0]
|
|
8004ad8: 461a mov r2, r3
|
|
8004ada: 6cfb ldr r3, [r7, #76] @ 0x4c
|
|
8004adc: 643b str r3, [r7, #64] @ 0x40
|
|
8004ade: 63fa str r2, [r7, #60] @ 0x3c
|
|
__ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) );
|
|
8004ae0: 6bf9 ldr r1, [r7, #60] @ 0x3c
|
|
8004ae2: 6c3a ldr r2, [r7, #64] @ 0x40
|
|
8004ae4: e841 2300 strex r3, r2, [r1]
|
|
8004ae8: 63bb str r3, [r7, #56] @ 0x38
|
|
return(result);
|
|
8004aea: 6bbb ldr r3, [r7, #56] @ 0x38
|
|
8004aec: 2b00 cmp r3, #0
|
|
8004aee: d1e6 bne.n 8004abe <UART_EndRxTransfer+0x8>
|
|
ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
|
|
8004af0: 687b ldr r3, [r7, #4]
|
|
8004af2: 681b ldr r3, [r3, #0]
|
|
8004af4: 3308 adds r3, #8
|
|
8004af6: 623b str r3, [r7, #32]
|
|
__ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) );
|
|
8004af8: 6a3b ldr r3, [r7, #32]
|
|
8004afa: e853 3f00 ldrex r3, [r3]
|
|
8004afe: 61fb str r3, [r7, #28]
|
|
return(result);
|
|
8004b00: 69fb ldr r3, [r7, #28]
|
|
8004b02: f023 0301 bic.w r3, r3, #1
|
|
8004b06: 64bb str r3, [r7, #72] @ 0x48
|
|
8004b08: 687b ldr r3, [r7, #4]
|
|
8004b0a: 681b ldr r3, [r3, #0]
|
|
8004b0c: 3308 adds r3, #8
|
|
8004b0e: 6cba ldr r2, [r7, #72] @ 0x48
|
|
8004b10: 62fa str r2, [r7, #44] @ 0x2c
|
|
8004b12: 62bb str r3, [r7, #40] @ 0x28
|
|
__ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) );
|
|
8004b14: 6ab9 ldr r1, [r7, #40] @ 0x28
|
|
8004b16: 6afa ldr r2, [r7, #44] @ 0x2c
|
|
8004b18: e841 2300 strex r3, r2, [r1]
|
|
8004b1c: 627b str r3, [r7, #36] @ 0x24
|
|
return(result);
|
|
8004b1e: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
8004b20: 2b00 cmp r3, #0
|
|
8004b22: d1e5 bne.n 8004af0 <UART_EndRxTransfer+0x3a>
|
|
#endif /* USART_CR1_FIFOEN */
|
|
|
|
/* In case of reception waiting for IDLE event, disable also the IDLE IE interrupt source */
|
|
if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE)
|
|
8004b24: 687b ldr r3, [r7, #4]
|
|
8004b26: 6e1b ldr r3, [r3, #96] @ 0x60
|
|
8004b28: 2b01 cmp r3, #1
|
|
8004b2a: d118 bne.n 8004b5e <UART_EndRxTransfer+0xa8>
|
|
{
|
|
ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE);
|
|
8004b2c: 687b ldr r3, [r7, #4]
|
|
8004b2e: 681b ldr r3, [r3, #0]
|
|
8004b30: 60fb str r3, [r7, #12]
|
|
__ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) );
|
|
8004b32: 68fb ldr r3, [r7, #12]
|
|
8004b34: e853 3f00 ldrex r3, [r3]
|
|
8004b38: 60bb str r3, [r7, #8]
|
|
return(result);
|
|
8004b3a: 68bb ldr r3, [r7, #8]
|
|
8004b3c: f023 0310 bic.w r3, r3, #16
|
|
8004b40: 647b str r3, [r7, #68] @ 0x44
|
|
8004b42: 687b ldr r3, [r7, #4]
|
|
8004b44: 681b ldr r3, [r3, #0]
|
|
8004b46: 461a mov r2, r3
|
|
8004b48: 6c7b ldr r3, [r7, #68] @ 0x44
|
|
8004b4a: 61bb str r3, [r7, #24]
|
|
8004b4c: 617a str r2, [r7, #20]
|
|
__ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) );
|
|
8004b4e: 6979 ldr r1, [r7, #20]
|
|
8004b50: 69ba ldr r2, [r7, #24]
|
|
8004b52: e841 2300 strex r3, r2, [r1]
|
|
8004b56: 613b str r3, [r7, #16]
|
|
return(result);
|
|
8004b58: 693b ldr r3, [r7, #16]
|
|
8004b5a: 2b00 cmp r3, #0
|
|
8004b5c: d1e6 bne.n 8004b2c <UART_EndRxTransfer+0x76>
|
|
}
|
|
|
|
/* At end of Rx process, restore huart->RxState to Ready */
|
|
huart->RxState = HAL_UART_STATE_READY;
|
|
8004b5e: 687b ldr r3, [r7, #4]
|
|
8004b60: 2220 movs r2, #32
|
|
8004b62: f8c3 2080 str.w r2, [r3, #128] @ 0x80
|
|
huart->ReceptionType = HAL_UART_RECEPTION_STANDARD;
|
|
8004b66: 687b ldr r3, [r7, #4]
|
|
8004b68: 2200 movs r2, #0
|
|
8004b6a: 661a str r2, [r3, #96] @ 0x60
|
|
|
|
/* Reset RxIsr function pointer */
|
|
huart->RxISR = NULL;
|
|
8004b6c: 687b ldr r3, [r7, #4]
|
|
8004b6e: 2200 movs r2, #0
|
|
8004b70: 669a str r2, [r3, #104] @ 0x68
|
|
}
|
|
8004b72: bf00 nop
|
|
8004b74: 3754 adds r7, #84 @ 0x54
|
|
8004b76: 46bd mov sp, r7
|
|
8004b78: f85d 7b04 ldr.w r7, [sp], #4
|
|
8004b7c: 4770 bx lr
|
|
|
|
08004b7e <USB_CoreInit>:
|
|
* @param cfg pointer to a USB_OTG_CfgTypeDef structure that contains
|
|
* the configuration information for the specified USBx peripheral.
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef USB_CoreInit(USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef cfg)
|
|
{
|
|
8004b7e: b084 sub sp, #16
|
|
8004b80: b580 push {r7, lr}
|
|
8004b82: b084 sub sp, #16
|
|
8004b84: af00 add r7, sp, #0
|
|
8004b86: 6078 str r0, [r7, #4]
|
|
8004b88: f107 001c add.w r0, r7, #28
|
|
8004b8c: e880 000e stmia.w r0, {r1, r2, r3}
|
|
HAL_StatusTypeDef ret;
|
|
|
|
/* Select FS Embedded PHY */
|
|
USBx->GUSBCFG |= USB_OTG_GUSBCFG_PHYSEL;
|
|
8004b90: 687b ldr r3, [r7, #4]
|
|
8004b92: 68db ldr r3, [r3, #12]
|
|
8004b94: f043 0240 orr.w r2, r3, #64 @ 0x40
|
|
8004b98: 687b ldr r3, [r7, #4]
|
|
8004b9a: 60da str r2, [r3, #12]
|
|
|
|
/* Reset after a PHY select */
|
|
ret = USB_CoreReset(USBx);
|
|
8004b9c: 6878 ldr r0, [r7, #4]
|
|
8004b9e: f000 fa69 bl 8005074 <USB_CoreReset>
|
|
8004ba2: 4603 mov r3, r0
|
|
8004ba4: 73fb strb r3, [r7, #15]
|
|
|
|
if (cfg.battery_charging_enable == 0U)
|
|
8004ba6: f897 3025 ldrb.w r3, [r7, #37] @ 0x25
|
|
8004baa: 2b00 cmp r3, #0
|
|
8004bac: d106 bne.n 8004bbc <USB_CoreInit+0x3e>
|
|
{
|
|
/* Activate the USB Transceiver */
|
|
USBx->GCCFG |= USB_OTG_GCCFG_PWRDWN;
|
|
8004bae: 687b ldr r3, [r7, #4]
|
|
8004bb0: 6b9b ldr r3, [r3, #56] @ 0x38
|
|
8004bb2: f443 3280 orr.w r2, r3, #65536 @ 0x10000
|
|
8004bb6: 687b ldr r3, [r7, #4]
|
|
8004bb8: 639a str r2, [r3, #56] @ 0x38
|
|
8004bba: e005 b.n 8004bc8 <USB_CoreInit+0x4a>
|
|
}
|
|
else
|
|
{
|
|
/* Deactivate the USB Transceiver */
|
|
USBx->GCCFG &= ~(USB_OTG_GCCFG_PWRDWN);
|
|
8004bbc: 687b ldr r3, [r7, #4]
|
|
8004bbe: 6b9b ldr r3, [r3, #56] @ 0x38
|
|
8004bc0: f423 3280 bic.w r2, r3, #65536 @ 0x10000
|
|
8004bc4: 687b ldr r3, [r7, #4]
|
|
8004bc6: 639a str r2, [r3, #56] @ 0x38
|
|
}
|
|
|
|
return ret;
|
|
8004bc8: 7bfb ldrb r3, [r7, #15]
|
|
}
|
|
8004bca: 4618 mov r0, r3
|
|
8004bcc: 3710 adds r7, #16
|
|
8004bce: 46bd mov sp, r7
|
|
8004bd0: e8bd 4080 ldmia.w sp!, {r7, lr}
|
|
8004bd4: b004 add sp, #16
|
|
8004bd6: 4770 bx lr
|
|
|
|
08004bd8 <USB_DisableGlobalInt>:
|
|
* Disable the controller's Global Int in the AHB Config reg
|
|
* @param USBx Selected device
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef USB_DisableGlobalInt(USB_OTG_GlobalTypeDef *USBx)
|
|
{
|
|
8004bd8: b480 push {r7}
|
|
8004bda: b083 sub sp, #12
|
|
8004bdc: af00 add r7, sp, #0
|
|
8004bde: 6078 str r0, [r7, #4]
|
|
USBx->GAHBCFG &= ~USB_OTG_GAHBCFG_GINT;
|
|
8004be0: 687b ldr r3, [r7, #4]
|
|
8004be2: 689b ldr r3, [r3, #8]
|
|
8004be4: f023 0201 bic.w r2, r3, #1
|
|
8004be8: 687b ldr r3, [r7, #4]
|
|
8004bea: 609a str r2, [r3, #8]
|
|
return HAL_OK;
|
|
8004bec: 2300 movs r3, #0
|
|
}
|
|
8004bee: 4618 mov r0, r3
|
|
8004bf0: 370c adds r7, #12
|
|
8004bf2: 46bd mov sp, r7
|
|
8004bf4: f85d 7b04 ldr.w r7, [sp], #4
|
|
8004bf8: 4770 bx lr
|
|
|
|
08004bfa <USB_SetCurrentMode>:
|
|
* @arg USB_DEVICE_MODE Peripheral mode
|
|
* @arg USB_HOST_MODE Host mode
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef USB_SetCurrentMode(USB_OTG_GlobalTypeDef *USBx, USB_ModeTypeDef mode)
|
|
{
|
|
8004bfa: b580 push {r7, lr}
|
|
8004bfc: b084 sub sp, #16
|
|
8004bfe: af00 add r7, sp, #0
|
|
8004c00: 6078 str r0, [r7, #4]
|
|
8004c02: 460b mov r3, r1
|
|
8004c04: 70fb strb r3, [r7, #3]
|
|
uint32_t ms = 0U;
|
|
8004c06: 2300 movs r3, #0
|
|
8004c08: 60fb str r3, [r7, #12]
|
|
|
|
USBx->GUSBCFG &= ~(USB_OTG_GUSBCFG_FHMOD | USB_OTG_GUSBCFG_FDMOD);
|
|
8004c0a: 687b ldr r3, [r7, #4]
|
|
8004c0c: 68db ldr r3, [r3, #12]
|
|
8004c0e: f023 42c0 bic.w r2, r3, #1610612736 @ 0x60000000
|
|
8004c12: 687b ldr r3, [r7, #4]
|
|
8004c14: 60da str r2, [r3, #12]
|
|
|
|
if (mode == USB_HOST_MODE)
|
|
8004c16: 78fb ldrb r3, [r7, #3]
|
|
8004c18: 2b01 cmp r3, #1
|
|
8004c1a: d115 bne.n 8004c48 <USB_SetCurrentMode+0x4e>
|
|
{
|
|
USBx->GUSBCFG |= USB_OTG_GUSBCFG_FHMOD;
|
|
8004c1c: 687b ldr r3, [r7, #4]
|
|
8004c1e: 68db ldr r3, [r3, #12]
|
|
8004c20: f043 5200 orr.w r2, r3, #536870912 @ 0x20000000
|
|
8004c24: 687b ldr r3, [r7, #4]
|
|
8004c26: 60da str r2, [r3, #12]
|
|
|
|
do
|
|
{
|
|
HAL_Delay(10U);
|
|
8004c28: 200a movs r0, #10
|
|
8004c2a: f7fc ff4b bl 8001ac4 <HAL_Delay>
|
|
ms += 10U;
|
|
8004c2e: 68fb ldr r3, [r7, #12]
|
|
8004c30: 330a adds r3, #10
|
|
8004c32: 60fb str r3, [r7, #12]
|
|
} while ((USB_GetMode(USBx) != (uint32_t)USB_HOST_MODE) && (ms < HAL_USB_CURRENT_MODE_MAX_DELAY_MS));
|
|
8004c34: 6878 ldr r0, [r7, #4]
|
|
8004c36: f000 fa0f bl 8005058 <USB_GetMode>
|
|
8004c3a: 4603 mov r3, r0
|
|
8004c3c: 2b01 cmp r3, #1
|
|
8004c3e: d01e beq.n 8004c7e <USB_SetCurrentMode+0x84>
|
|
8004c40: 68fb ldr r3, [r7, #12]
|
|
8004c42: 2bc7 cmp r3, #199 @ 0xc7
|
|
8004c44: d9f0 bls.n 8004c28 <USB_SetCurrentMode+0x2e>
|
|
8004c46: e01a b.n 8004c7e <USB_SetCurrentMode+0x84>
|
|
}
|
|
else if (mode == USB_DEVICE_MODE)
|
|
8004c48: 78fb ldrb r3, [r7, #3]
|
|
8004c4a: 2b00 cmp r3, #0
|
|
8004c4c: d115 bne.n 8004c7a <USB_SetCurrentMode+0x80>
|
|
{
|
|
USBx->GUSBCFG |= USB_OTG_GUSBCFG_FDMOD;
|
|
8004c4e: 687b ldr r3, [r7, #4]
|
|
8004c50: 68db ldr r3, [r3, #12]
|
|
8004c52: f043 4280 orr.w r2, r3, #1073741824 @ 0x40000000
|
|
8004c56: 687b ldr r3, [r7, #4]
|
|
8004c58: 60da str r2, [r3, #12]
|
|
|
|
do
|
|
{
|
|
HAL_Delay(10U);
|
|
8004c5a: 200a movs r0, #10
|
|
8004c5c: f7fc ff32 bl 8001ac4 <HAL_Delay>
|
|
ms += 10U;
|
|
8004c60: 68fb ldr r3, [r7, #12]
|
|
8004c62: 330a adds r3, #10
|
|
8004c64: 60fb str r3, [r7, #12]
|
|
} while ((USB_GetMode(USBx) != (uint32_t)USB_DEVICE_MODE) && (ms < HAL_USB_CURRENT_MODE_MAX_DELAY_MS));
|
|
8004c66: 6878 ldr r0, [r7, #4]
|
|
8004c68: f000 f9f6 bl 8005058 <USB_GetMode>
|
|
8004c6c: 4603 mov r3, r0
|
|
8004c6e: 2b00 cmp r3, #0
|
|
8004c70: d005 beq.n 8004c7e <USB_SetCurrentMode+0x84>
|
|
8004c72: 68fb ldr r3, [r7, #12]
|
|
8004c74: 2bc7 cmp r3, #199 @ 0xc7
|
|
8004c76: d9f0 bls.n 8004c5a <USB_SetCurrentMode+0x60>
|
|
8004c78: e001 b.n 8004c7e <USB_SetCurrentMode+0x84>
|
|
}
|
|
else
|
|
{
|
|
return HAL_ERROR;
|
|
8004c7a: 2301 movs r3, #1
|
|
8004c7c: e005 b.n 8004c8a <USB_SetCurrentMode+0x90>
|
|
}
|
|
|
|
if (ms == HAL_USB_CURRENT_MODE_MAX_DELAY_MS)
|
|
8004c7e: 68fb ldr r3, [r7, #12]
|
|
8004c80: 2bc8 cmp r3, #200 @ 0xc8
|
|
8004c82: d101 bne.n 8004c88 <USB_SetCurrentMode+0x8e>
|
|
{
|
|
return HAL_ERROR;
|
|
8004c84: 2301 movs r3, #1
|
|
8004c86: e000 b.n 8004c8a <USB_SetCurrentMode+0x90>
|
|
}
|
|
|
|
return HAL_OK;
|
|
8004c88: 2300 movs r3, #0
|
|
}
|
|
8004c8a: 4618 mov r0, r3
|
|
8004c8c: 3710 adds r7, #16
|
|
8004c8e: 46bd mov sp, r7
|
|
8004c90: bd80 pop {r7, pc}
|
|
...
|
|
|
|
08004c94 <USB_DevInit>:
|
|
* @param cfg pointer to a USB_OTG_CfgTypeDef structure that contains
|
|
* the configuration information for the specified USBx peripheral.
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef USB_DevInit(USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef cfg)
|
|
{
|
|
8004c94: b084 sub sp, #16
|
|
8004c96: b580 push {r7, lr}
|
|
8004c98: b086 sub sp, #24
|
|
8004c9a: af00 add r7, sp, #0
|
|
8004c9c: 6078 str r0, [r7, #4]
|
|
8004c9e: f107 0024 add.w r0, r7, #36 @ 0x24
|
|
8004ca2: e880 000e stmia.w r0, {r1, r2, r3}
|
|
HAL_StatusTypeDef ret = HAL_OK;
|
|
8004ca6: 2300 movs r3, #0
|
|
8004ca8: 75fb strb r3, [r7, #23]
|
|
uint32_t USBx_BASE = (uint32_t)USBx;
|
|
8004caa: 687b ldr r3, [r7, #4]
|
|
8004cac: 60fb str r3, [r7, #12]
|
|
uint32_t i;
|
|
|
|
for (i = 0U; i < 15U; i++)
|
|
8004cae: 2300 movs r3, #0
|
|
8004cb0: 613b str r3, [r7, #16]
|
|
8004cb2: e009 b.n 8004cc8 <USB_DevInit+0x34>
|
|
{
|
|
USBx->DIEPTXF[i] = 0U;
|
|
8004cb4: 687a ldr r2, [r7, #4]
|
|
8004cb6: 693b ldr r3, [r7, #16]
|
|
8004cb8: 3340 adds r3, #64 @ 0x40
|
|
8004cba: 009b lsls r3, r3, #2
|
|
8004cbc: 4413 add r3, r2
|
|
8004cbe: 2200 movs r2, #0
|
|
8004cc0: 605a str r2, [r3, #4]
|
|
for (i = 0U; i < 15U; i++)
|
|
8004cc2: 693b ldr r3, [r7, #16]
|
|
8004cc4: 3301 adds r3, #1
|
|
8004cc6: 613b str r3, [r7, #16]
|
|
8004cc8: 693b ldr r3, [r7, #16]
|
|
8004cca: 2b0e cmp r3, #14
|
|
8004ccc: d9f2 bls.n 8004cb4 <USB_DevInit+0x20>
|
|
}
|
|
|
|
/* VBUS Sensing setup */
|
|
if (cfg.vbus_sensing_enable == 0U)
|
|
8004cce: f897 302e ldrb.w r3, [r7, #46] @ 0x2e
|
|
8004cd2: 2b00 cmp r3, #0
|
|
8004cd4: d11c bne.n 8004d10 <USB_DevInit+0x7c>
|
|
{
|
|
USBx_DEVICE->DCTL |= USB_OTG_DCTL_SDIS;
|
|
8004cd6: 68fb ldr r3, [r7, #12]
|
|
8004cd8: f503 6300 add.w r3, r3, #2048 @ 0x800
|
|
8004cdc: 685b ldr r3, [r3, #4]
|
|
8004cde: 68fa ldr r2, [r7, #12]
|
|
8004ce0: f502 6200 add.w r2, r2, #2048 @ 0x800
|
|
8004ce4: f043 0302 orr.w r3, r3, #2
|
|
8004ce8: 6053 str r3, [r2, #4]
|
|
|
|
/* Deactivate VBUS Sensing B */
|
|
USBx->GCCFG &= ~USB_OTG_GCCFG_VBDEN;
|
|
8004cea: 687b ldr r3, [r7, #4]
|
|
8004cec: 6b9b ldr r3, [r3, #56] @ 0x38
|
|
8004cee: f423 1200 bic.w r2, r3, #2097152 @ 0x200000
|
|
8004cf2: 687b ldr r3, [r7, #4]
|
|
8004cf4: 639a str r2, [r3, #56] @ 0x38
|
|
|
|
/* B-peripheral session valid override enable */
|
|
USBx->GOTGCTL |= USB_OTG_GOTGCTL_BVALOEN;
|
|
8004cf6: 687b ldr r3, [r7, #4]
|
|
8004cf8: 681b ldr r3, [r3, #0]
|
|
8004cfa: f043 0240 orr.w r2, r3, #64 @ 0x40
|
|
8004cfe: 687b ldr r3, [r7, #4]
|
|
8004d00: 601a str r2, [r3, #0]
|
|
USBx->GOTGCTL |= USB_OTG_GOTGCTL_BVALOVAL;
|
|
8004d02: 687b ldr r3, [r7, #4]
|
|
8004d04: 681b ldr r3, [r3, #0]
|
|
8004d06: f043 0280 orr.w r2, r3, #128 @ 0x80
|
|
8004d0a: 687b ldr r3, [r7, #4]
|
|
8004d0c: 601a str r2, [r3, #0]
|
|
8004d0e: e005 b.n 8004d1c <USB_DevInit+0x88>
|
|
}
|
|
else
|
|
{
|
|
/* Enable HW VBUS sensing */
|
|
USBx->GCCFG |= USB_OTG_GCCFG_VBDEN;
|
|
8004d10: 687b ldr r3, [r7, #4]
|
|
8004d12: 6b9b ldr r3, [r3, #56] @ 0x38
|
|
8004d14: f443 1200 orr.w r2, r3, #2097152 @ 0x200000
|
|
8004d18: 687b ldr r3, [r7, #4]
|
|
8004d1a: 639a str r2, [r3, #56] @ 0x38
|
|
}
|
|
|
|
/* Restart the Phy Clock */
|
|
USBx_PCGCCTL = 0U;
|
|
8004d1c: 68fb ldr r3, [r7, #12]
|
|
8004d1e: f503 6360 add.w r3, r3, #3584 @ 0xe00
|
|
8004d22: 461a mov r2, r3
|
|
8004d24: 2300 movs r3, #0
|
|
8004d26: 6013 str r3, [r2, #0]
|
|
|
|
/* Set Core speed to Full speed mode */
|
|
(void)USB_SetDevSpeed(USBx, USB_OTG_SPEED_FULL);
|
|
8004d28: 2103 movs r1, #3
|
|
8004d2a: 6878 ldr r0, [r7, #4]
|
|
8004d2c: f000 f95a bl 8004fe4 <USB_SetDevSpeed>
|
|
|
|
/* Flush the FIFOs */
|
|
if (USB_FlushTxFifo(USBx, 0x10U) != HAL_OK) /* all Tx FIFOs */
|
|
8004d30: 2110 movs r1, #16
|
|
8004d32: 6878 ldr r0, [r7, #4]
|
|
8004d34: f000 f8f6 bl 8004f24 <USB_FlushTxFifo>
|
|
8004d38: 4603 mov r3, r0
|
|
8004d3a: 2b00 cmp r3, #0
|
|
8004d3c: d001 beq.n 8004d42 <USB_DevInit+0xae>
|
|
{
|
|
ret = HAL_ERROR;
|
|
8004d3e: 2301 movs r3, #1
|
|
8004d40: 75fb strb r3, [r7, #23]
|
|
}
|
|
|
|
if (USB_FlushRxFifo(USBx) != HAL_OK)
|
|
8004d42: 6878 ldr r0, [r7, #4]
|
|
8004d44: f000 f920 bl 8004f88 <USB_FlushRxFifo>
|
|
8004d48: 4603 mov r3, r0
|
|
8004d4a: 2b00 cmp r3, #0
|
|
8004d4c: d001 beq.n 8004d52 <USB_DevInit+0xbe>
|
|
{
|
|
ret = HAL_ERROR;
|
|
8004d4e: 2301 movs r3, #1
|
|
8004d50: 75fb strb r3, [r7, #23]
|
|
}
|
|
|
|
/* Clear all pending Device Interrupts */
|
|
USBx_DEVICE->DIEPMSK = 0U;
|
|
8004d52: 68fb ldr r3, [r7, #12]
|
|
8004d54: f503 6300 add.w r3, r3, #2048 @ 0x800
|
|
8004d58: 461a mov r2, r3
|
|
8004d5a: 2300 movs r3, #0
|
|
8004d5c: 6113 str r3, [r2, #16]
|
|
USBx_DEVICE->DOEPMSK = 0U;
|
|
8004d5e: 68fb ldr r3, [r7, #12]
|
|
8004d60: f503 6300 add.w r3, r3, #2048 @ 0x800
|
|
8004d64: 461a mov r2, r3
|
|
8004d66: 2300 movs r3, #0
|
|
8004d68: 6153 str r3, [r2, #20]
|
|
USBx_DEVICE->DAINTMSK = 0U;
|
|
8004d6a: 68fb ldr r3, [r7, #12]
|
|
8004d6c: f503 6300 add.w r3, r3, #2048 @ 0x800
|
|
8004d70: 461a mov r2, r3
|
|
8004d72: 2300 movs r3, #0
|
|
8004d74: 61d3 str r3, [r2, #28]
|
|
|
|
for (i = 0U; i < cfg.dev_endpoints; i++)
|
|
8004d76: 2300 movs r3, #0
|
|
8004d78: 613b str r3, [r7, #16]
|
|
8004d7a: e043 b.n 8004e04 <USB_DevInit+0x170>
|
|
{
|
|
if ((USBx_INEP(i)->DIEPCTL & USB_OTG_DIEPCTL_EPENA) == USB_OTG_DIEPCTL_EPENA)
|
|
8004d7c: 693b ldr r3, [r7, #16]
|
|
8004d7e: 015a lsls r2, r3, #5
|
|
8004d80: 68fb ldr r3, [r7, #12]
|
|
8004d82: 4413 add r3, r2
|
|
8004d84: f503 6310 add.w r3, r3, #2304 @ 0x900
|
|
8004d88: 681b ldr r3, [r3, #0]
|
|
8004d8a: f003 4300 and.w r3, r3, #2147483648 @ 0x80000000
|
|
8004d8e: f1b3 4f00 cmp.w r3, #2147483648 @ 0x80000000
|
|
8004d92: d118 bne.n 8004dc6 <USB_DevInit+0x132>
|
|
{
|
|
if (i == 0U)
|
|
8004d94: 693b ldr r3, [r7, #16]
|
|
8004d96: 2b00 cmp r3, #0
|
|
8004d98: d10a bne.n 8004db0 <USB_DevInit+0x11c>
|
|
{
|
|
USBx_INEP(i)->DIEPCTL = USB_OTG_DIEPCTL_SNAK;
|
|
8004d9a: 693b ldr r3, [r7, #16]
|
|
8004d9c: 015a lsls r2, r3, #5
|
|
8004d9e: 68fb ldr r3, [r7, #12]
|
|
8004da0: 4413 add r3, r2
|
|
8004da2: f503 6310 add.w r3, r3, #2304 @ 0x900
|
|
8004da6: 461a mov r2, r3
|
|
8004da8: f04f 6300 mov.w r3, #134217728 @ 0x8000000
|
|
8004dac: 6013 str r3, [r2, #0]
|
|
8004dae: e013 b.n 8004dd8 <USB_DevInit+0x144>
|
|
}
|
|
else
|
|
{
|
|
USBx_INEP(i)->DIEPCTL = USB_OTG_DIEPCTL_EPDIS | USB_OTG_DIEPCTL_SNAK;
|
|
8004db0: 693b ldr r3, [r7, #16]
|
|
8004db2: 015a lsls r2, r3, #5
|
|
8004db4: 68fb ldr r3, [r7, #12]
|
|
8004db6: 4413 add r3, r2
|
|
8004db8: f503 6310 add.w r3, r3, #2304 @ 0x900
|
|
8004dbc: 461a mov r2, r3
|
|
8004dbe: f04f 4390 mov.w r3, #1207959552 @ 0x48000000
|
|
8004dc2: 6013 str r3, [r2, #0]
|
|
8004dc4: e008 b.n 8004dd8 <USB_DevInit+0x144>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
USBx_INEP(i)->DIEPCTL = 0U;
|
|
8004dc6: 693b ldr r3, [r7, #16]
|
|
8004dc8: 015a lsls r2, r3, #5
|
|
8004dca: 68fb ldr r3, [r7, #12]
|
|
8004dcc: 4413 add r3, r2
|
|
8004dce: f503 6310 add.w r3, r3, #2304 @ 0x900
|
|
8004dd2: 461a mov r2, r3
|
|
8004dd4: 2300 movs r3, #0
|
|
8004dd6: 6013 str r3, [r2, #0]
|
|
}
|
|
|
|
USBx_INEP(i)->DIEPTSIZ = 0U;
|
|
8004dd8: 693b ldr r3, [r7, #16]
|
|
8004dda: 015a lsls r2, r3, #5
|
|
8004ddc: 68fb ldr r3, [r7, #12]
|
|
8004dde: 4413 add r3, r2
|
|
8004de0: f503 6310 add.w r3, r3, #2304 @ 0x900
|
|
8004de4: 461a mov r2, r3
|
|
8004de6: 2300 movs r3, #0
|
|
8004de8: 6113 str r3, [r2, #16]
|
|
USBx_INEP(i)->DIEPINT = 0xFB7FU;
|
|
8004dea: 693b ldr r3, [r7, #16]
|
|
8004dec: 015a lsls r2, r3, #5
|
|
8004dee: 68fb ldr r3, [r7, #12]
|
|
8004df0: 4413 add r3, r2
|
|
8004df2: f503 6310 add.w r3, r3, #2304 @ 0x900
|
|
8004df6: 461a mov r2, r3
|
|
8004df8: f64f 337f movw r3, #64383 @ 0xfb7f
|
|
8004dfc: 6093 str r3, [r2, #8]
|
|
for (i = 0U; i < cfg.dev_endpoints; i++)
|
|
8004dfe: 693b ldr r3, [r7, #16]
|
|
8004e00: 3301 adds r3, #1
|
|
8004e02: 613b str r3, [r7, #16]
|
|
8004e04: f897 3024 ldrb.w r3, [r7, #36] @ 0x24
|
|
8004e08: 461a mov r2, r3
|
|
8004e0a: 693b ldr r3, [r7, #16]
|
|
8004e0c: 4293 cmp r3, r2
|
|
8004e0e: d3b5 bcc.n 8004d7c <USB_DevInit+0xe8>
|
|
}
|
|
|
|
for (i = 0U; i < cfg.dev_endpoints; i++)
|
|
8004e10: 2300 movs r3, #0
|
|
8004e12: 613b str r3, [r7, #16]
|
|
8004e14: e043 b.n 8004e9e <USB_DevInit+0x20a>
|
|
{
|
|
if ((USBx_OUTEP(i)->DOEPCTL & USB_OTG_DOEPCTL_EPENA) == USB_OTG_DOEPCTL_EPENA)
|
|
8004e16: 693b ldr r3, [r7, #16]
|
|
8004e18: 015a lsls r2, r3, #5
|
|
8004e1a: 68fb ldr r3, [r7, #12]
|
|
8004e1c: 4413 add r3, r2
|
|
8004e1e: f503 6330 add.w r3, r3, #2816 @ 0xb00
|
|
8004e22: 681b ldr r3, [r3, #0]
|
|
8004e24: f003 4300 and.w r3, r3, #2147483648 @ 0x80000000
|
|
8004e28: f1b3 4f00 cmp.w r3, #2147483648 @ 0x80000000
|
|
8004e2c: d118 bne.n 8004e60 <USB_DevInit+0x1cc>
|
|
{
|
|
if (i == 0U)
|
|
8004e2e: 693b ldr r3, [r7, #16]
|
|
8004e30: 2b00 cmp r3, #0
|
|
8004e32: d10a bne.n 8004e4a <USB_DevInit+0x1b6>
|
|
{
|
|
USBx_OUTEP(i)->DOEPCTL = USB_OTG_DOEPCTL_SNAK;
|
|
8004e34: 693b ldr r3, [r7, #16]
|
|
8004e36: 015a lsls r2, r3, #5
|
|
8004e38: 68fb ldr r3, [r7, #12]
|
|
8004e3a: 4413 add r3, r2
|
|
8004e3c: f503 6330 add.w r3, r3, #2816 @ 0xb00
|
|
8004e40: 461a mov r2, r3
|
|
8004e42: f04f 6300 mov.w r3, #134217728 @ 0x8000000
|
|
8004e46: 6013 str r3, [r2, #0]
|
|
8004e48: e013 b.n 8004e72 <USB_DevInit+0x1de>
|
|
}
|
|
else
|
|
{
|
|
USBx_OUTEP(i)->DOEPCTL = USB_OTG_DOEPCTL_EPDIS | USB_OTG_DOEPCTL_SNAK;
|
|
8004e4a: 693b ldr r3, [r7, #16]
|
|
8004e4c: 015a lsls r2, r3, #5
|
|
8004e4e: 68fb ldr r3, [r7, #12]
|
|
8004e50: 4413 add r3, r2
|
|
8004e52: f503 6330 add.w r3, r3, #2816 @ 0xb00
|
|
8004e56: 461a mov r2, r3
|
|
8004e58: f04f 4390 mov.w r3, #1207959552 @ 0x48000000
|
|
8004e5c: 6013 str r3, [r2, #0]
|
|
8004e5e: e008 b.n 8004e72 <USB_DevInit+0x1de>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
USBx_OUTEP(i)->DOEPCTL = 0U;
|
|
8004e60: 693b ldr r3, [r7, #16]
|
|
8004e62: 015a lsls r2, r3, #5
|
|
8004e64: 68fb ldr r3, [r7, #12]
|
|
8004e66: 4413 add r3, r2
|
|
8004e68: f503 6330 add.w r3, r3, #2816 @ 0xb00
|
|
8004e6c: 461a mov r2, r3
|
|
8004e6e: 2300 movs r3, #0
|
|
8004e70: 6013 str r3, [r2, #0]
|
|
}
|
|
|
|
USBx_OUTEP(i)->DOEPTSIZ = 0U;
|
|
8004e72: 693b ldr r3, [r7, #16]
|
|
8004e74: 015a lsls r2, r3, #5
|
|
8004e76: 68fb ldr r3, [r7, #12]
|
|
8004e78: 4413 add r3, r2
|
|
8004e7a: f503 6330 add.w r3, r3, #2816 @ 0xb00
|
|
8004e7e: 461a mov r2, r3
|
|
8004e80: 2300 movs r3, #0
|
|
8004e82: 6113 str r3, [r2, #16]
|
|
USBx_OUTEP(i)->DOEPINT = 0xFB7FU;
|
|
8004e84: 693b ldr r3, [r7, #16]
|
|
8004e86: 015a lsls r2, r3, #5
|
|
8004e88: 68fb ldr r3, [r7, #12]
|
|
8004e8a: 4413 add r3, r2
|
|
8004e8c: f503 6330 add.w r3, r3, #2816 @ 0xb00
|
|
8004e90: 461a mov r2, r3
|
|
8004e92: f64f 337f movw r3, #64383 @ 0xfb7f
|
|
8004e96: 6093 str r3, [r2, #8]
|
|
for (i = 0U; i < cfg.dev_endpoints; i++)
|
|
8004e98: 693b ldr r3, [r7, #16]
|
|
8004e9a: 3301 adds r3, #1
|
|
8004e9c: 613b str r3, [r7, #16]
|
|
8004e9e: f897 3024 ldrb.w r3, [r7, #36] @ 0x24
|
|
8004ea2: 461a mov r2, r3
|
|
8004ea4: 693b ldr r3, [r7, #16]
|
|
8004ea6: 4293 cmp r3, r2
|
|
8004ea8: d3b5 bcc.n 8004e16 <USB_DevInit+0x182>
|
|
}
|
|
|
|
USBx_DEVICE->DIEPMSK &= ~(USB_OTG_DIEPMSK_TXFURM);
|
|
8004eaa: 68fb ldr r3, [r7, #12]
|
|
8004eac: f503 6300 add.w r3, r3, #2048 @ 0x800
|
|
8004eb0: 691b ldr r3, [r3, #16]
|
|
8004eb2: 68fa ldr r2, [r7, #12]
|
|
8004eb4: f502 6200 add.w r2, r2, #2048 @ 0x800
|
|
8004eb8: f423 7380 bic.w r3, r3, #256 @ 0x100
|
|
8004ebc: 6113 str r3, [r2, #16]
|
|
|
|
/* Disable all interrupts. */
|
|
USBx->GINTMSK = 0U;
|
|
8004ebe: 687b ldr r3, [r7, #4]
|
|
8004ec0: 2200 movs r2, #0
|
|
8004ec2: 619a str r2, [r3, #24]
|
|
|
|
/* Clear any pending interrupts */
|
|
USBx->GINTSTS = 0xBFFFFFFFU;
|
|
8004ec4: 687b ldr r3, [r7, #4]
|
|
8004ec6: f06f 4280 mvn.w r2, #1073741824 @ 0x40000000
|
|
8004eca: 615a str r2, [r3, #20]
|
|
|
|
/* Enable the common interrupts */
|
|
USBx->GINTMSK |= USB_OTG_GINTMSK_RXFLVLM;
|
|
8004ecc: 687b ldr r3, [r7, #4]
|
|
8004ece: 699b ldr r3, [r3, #24]
|
|
8004ed0: f043 0210 orr.w r2, r3, #16
|
|
8004ed4: 687b ldr r3, [r7, #4]
|
|
8004ed6: 619a str r2, [r3, #24]
|
|
|
|
/* Enable interrupts matching to the Device mode ONLY */
|
|
USBx->GINTMSK |= USB_OTG_GINTMSK_USBSUSPM | USB_OTG_GINTMSK_USBRST |
|
|
8004ed8: 687b ldr r3, [r7, #4]
|
|
8004eda: 699a ldr r2, [r3, #24]
|
|
8004edc: 4b10 ldr r3, [pc, #64] @ (8004f20 <USB_DevInit+0x28c>)
|
|
8004ede: 4313 orrs r3, r2
|
|
8004ee0: 687a ldr r2, [r7, #4]
|
|
8004ee2: 6193 str r3, [r2, #24]
|
|
USB_OTG_GINTMSK_ENUMDNEM | USB_OTG_GINTMSK_IEPINT |
|
|
USB_OTG_GINTMSK_OEPINT | USB_OTG_GINTMSK_IISOIXFRM |
|
|
USB_OTG_GINTMSK_PXFRM_IISOOXFRM | USB_OTG_GINTMSK_WUIM;
|
|
|
|
if (cfg.Sof_enable != 0U)
|
|
8004ee4: f897 302a ldrb.w r3, [r7, #42] @ 0x2a
|
|
8004ee8: 2b00 cmp r3, #0
|
|
8004eea: d005 beq.n 8004ef8 <USB_DevInit+0x264>
|
|
{
|
|
USBx->GINTMSK |= USB_OTG_GINTMSK_SOFM;
|
|
8004eec: 687b ldr r3, [r7, #4]
|
|
8004eee: 699b ldr r3, [r3, #24]
|
|
8004ef0: f043 0208 orr.w r2, r3, #8
|
|
8004ef4: 687b ldr r3, [r7, #4]
|
|
8004ef6: 619a str r2, [r3, #24]
|
|
}
|
|
|
|
if (cfg.vbus_sensing_enable == 1U)
|
|
8004ef8: f897 302e ldrb.w r3, [r7, #46] @ 0x2e
|
|
8004efc: 2b01 cmp r3, #1
|
|
8004efe: d107 bne.n 8004f10 <USB_DevInit+0x27c>
|
|
{
|
|
USBx->GINTMSK |= (USB_OTG_GINTMSK_SRQIM | USB_OTG_GINTMSK_OTGINT);
|
|
8004f00: 687b ldr r3, [r7, #4]
|
|
8004f02: 699b ldr r3, [r3, #24]
|
|
8004f04: f043 4380 orr.w r3, r3, #1073741824 @ 0x40000000
|
|
8004f08: f043 0304 orr.w r3, r3, #4
|
|
8004f0c: 687a ldr r2, [r7, #4]
|
|
8004f0e: 6193 str r3, [r2, #24]
|
|
}
|
|
|
|
return ret;
|
|
8004f10: 7dfb ldrb r3, [r7, #23]
|
|
}
|
|
8004f12: 4618 mov r0, r3
|
|
8004f14: 3718 adds r7, #24
|
|
8004f16: 46bd mov sp, r7
|
|
8004f18: e8bd 4080 ldmia.w sp!, {r7, lr}
|
|
8004f1c: b004 add sp, #16
|
|
8004f1e: 4770 bx lr
|
|
8004f20: 803c3800 .word 0x803c3800
|
|
|
|
08004f24 <USB_FlushTxFifo>:
|
|
* This parameter can be a value from 1 to 15
|
|
15 means Flush all Tx FIFOs
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef USB_FlushTxFifo(USB_OTG_GlobalTypeDef *USBx, uint32_t num)
|
|
{
|
|
8004f24: b480 push {r7}
|
|
8004f26: b085 sub sp, #20
|
|
8004f28: af00 add r7, sp, #0
|
|
8004f2a: 6078 str r0, [r7, #4]
|
|
8004f2c: 6039 str r1, [r7, #0]
|
|
__IO uint32_t count = 0U;
|
|
8004f2e: 2300 movs r3, #0
|
|
8004f30: 60fb str r3, [r7, #12]
|
|
|
|
/* Wait for AHB master IDLE state. */
|
|
do
|
|
{
|
|
count++;
|
|
8004f32: 68fb ldr r3, [r7, #12]
|
|
8004f34: 3301 adds r3, #1
|
|
8004f36: 60fb str r3, [r7, #12]
|
|
|
|
if (count > HAL_USB_TIMEOUT)
|
|
8004f38: 68fb ldr r3, [r7, #12]
|
|
8004f3a: f1b3 6f70 cmp.w r3, #251658240 @ 0xf000000
|
|
8004f3e: d901 bls.n 8004f44 <USB_FlushTxFifo+0x20>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8004f40: 2303 movs r3, #3
|
|
8004f42: e01b b.n 8004f7c <USB_FlushTxFifo+0x58>
|
|
}
|
|
} while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_AHBIDL) == 0U);
|
|
8004f44: 687b ldr r3, [r7, #4]
|
|
8004f46: 691b ldr r3, [r3, #16]
|
|
8004f48: 2b00 cmp r3, #0
|
|
8004f4a: daf2 bge.n 8004f32 <USB_FlushTxFifo+0xe>
|
|
|
|
/* Flush TX Fifo */
|
|
count = 0U;
|
|
8004f4c: 2300 movs r3, #0
|
|
8004f4e: 60fb str r3, [r7, #12]
|
|
USBx->GRSTCTL = (USB_OTG_GRSTCTL_TXFFLSH | (num << 6));
|
|
8004f50: 683b ldr r3, [r7, #0]
|
|
8004f52: 019b lsls r3, r3, #6
|
|
8004f54: f043 0220 orr.w r2, r3, #32
|
|
8004f58: 687b ldr r3, [r7, #4]
|
|
8004f5a: 611a str r2, [r3, #16]
|
|
|
|
do
|
|
{
|
|
count++;
|
|
8004f5c: 68fb ldr r3, [r7, #12]
|
|
8004f5e: 3301 adds r3, #1
|
|
8004f60: 60fb str r3, [r7, #12]
|
|
|
|
if (count > HAL_USB_TIMEOUT)
|
|
8004f62: 68fb ldr r3, [r7, #12]
|
|
8004f64: f1b3 6f70 cmp.w r3, #251658240 @ 0xf000000
|
|
8004f68: d901 bls.n 8004f6e <USB_FlushTxFifo+0x4a>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8004f6a: 2303 movs r3, #3
|
|
8004f6c: e006 b.n 8004f7c <USB_FlushTxFifo+0x58>
|
|
}
|
|
} while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_TXFFLSH) == USB_OTG_GRSTCTL_TXFFLSH);
|
|
8004f6e: 687b ldr r3, [r7, #4]
|
|
8004f70: 691b ldr r3, [r3, #16]
|
|
8004f72: f003 0320 and.w r3, r3, #32
|
|
8004f76: 2b20 cmp r3, #32
|
|
8004f78: d0f0 beq.n 8004f5c <USB_FlushTxFifo+0x38>
|
|
|
|
return HAL_OK;
|
|
8004f7a: 2300 movs r3, #0
|
|
}
|
|
8004f7c: 4618 mov r0, r3
|
|
8004f7e: 3714 adds r7, #20
|
|
8004f80: 46bd mov sp, r7
|
|
8004f82: f85d 7b04 ldr.w r7, [sp], #4
|
|
8004f86: 4770 bx lr
|
|
|
|
08004f88 <USB_FlushRxFifo>:
|
|
* @brief USB_FlushRxFifo Flush Rx FIFO
|
|
* @param USBx Selected device
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef USB_FlushRxFifo(USB_OTG_GlobalTypeDef *USBx)
|
|
{
|
|
8004f88: b480 push {r7}
|
|
8004f8a: b085 sub sp, #20
|
|
8004f8c: af00 add r7, sp, #0
|
|
8004f8e: 6078 str r0, [r7, #4]
|
|
__IO uint32_t count = 0U;
|
|
8004f90: 2300 movs r3, #0
|
|
8004f92: 60fb str r3, [r7, #12]
|
|
|
|
/* Wait for AHB master IDLE state. */
|
|
do
|
|
{
|
|
count++;
|
|
8004f94: 68fb ldr r3, [r7, #12]
|
|
8004f96: 3301 adds r3, #1
|
|
8004f98: 60fb str r3, [r7, #12]
|
|
|
|
if (count > HAL_USB_TIMEOUT)
|
|
8004f9a: 68fb ldr r3, [r7, #12]
|
|
8004f9c: f1b3 6f70 cmp.w r3, #251658240 @ 0xf000000
|
|
8004fa0: d901 bls.n 8004fa6 <USB_FlushRxFifo+0x1e>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8004fa2: 2303 movs r3, #3
|
|
8004fa4: e018 b.n 8004fd8 <USB_FlushRxFifo+0x50>
|
|
}
|
|
} while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_AHBIDL) == 0U);
|
|
8004fa6: 687b ldr r3, [r7, #4]
|
|
8004fa8: 691b ldr r3, [r3, #16]
|
|
8004faa: 2b00 cmp r3, #0
|
|
8004fac: daf2 bge.n 8004f94 <USB_FlushRxFifo+0xc>
|
|
|
|
/* Flush RX Fifo */
|
|
count = 0U;
|
|
8004fae: 2300 movs r3, #0
|
|
8004fb0: 60fb str r3, [r7, #12]
|
|
USBx->GRSTCTL = USB_OTG_GRSTCTL_RXFFLSH;
|
|
8004fb2: 687b ldr r3, [r7, #4]
|
|
8004fb4: 2210 movs r2, #16
|
|
8004fb6: 611a str r2, [r3, #16]
|
|
|
|
do
|
|
{
|
|
count++;
|
|
8004fb8: 68fb ldr r3, [r7, #12]
|
|
8004fba: 3301 adds r3, #1
|
|
8004fbc: 60fb str r3, [r7, #12]
|
|
|
|
if (count > HAL_USB_TIMEOUT)
|
|
8004fbe: 68fb ldr r3, [r7, #12]
|
|
8004fc0: f1b3 6f70 cmp.w r3, #251658240 @ 0xf000000
|
|
8004fc4: d901 bls.n 8004fca <USB_FlushRxFifo+0x42>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
8004fc6: 2303 movs r3, #3
|
|
8004fc8: e006 b.n 8004fd8 <USB_FlushRxFifo+0x50>
|
|
}
|
|
} while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_RXFFLSH) == USB_OTG_GRSTCTL_RXFFLSH);
|
|
8004fca: 687b ldr r3, [r7, #4]
|
|
8004fcc: 691b ldr r3, [r3, #16]
|
|
8004fce: f003 0310 and.w r3, r3, #16
|
|
8004fd2: 2b10 cmp r3, #16
|
|
8004fd4: d0f0 beq.n 8004fb8 <USB_FlushRxFifo+0x30>
|
|
|
|
return HAL_OK;
|
|
8004fd6: 2300 movs r3, #0
|
|
}
|
|
8004fd8: 4618 mov r0, r3
|
|
8004fda: 3714 adds r7, #20
|
|
8004fdc: 46bd mov sp, r7
|
|
8004fde: f85d 7b04 ldr.w r7, [sp], #4
|
|
8004fe2: 4770 bx lr
|
|
|
|
08004fe4 <USB_SetDevSpeed>:
|
|
* This parameter can be one of these values:
|
|
* @arg USB_OTG_SPEED_FULL: Full speed mode
|
|
* @retval Hal status
|
|
*/
|
|
HAL_StatusTypeDef USB_SetDevSpeed(const USB_OTG_GlobalTypeDef *USBx, uint8_t speed)
|
|
{
|
|
8004fe4: b480 push {r7}
|
|
8004fe6: b085 sub sp, #20
|
|
8004fe8: af00 add r7, sp, #0
|
|
8004fea: 6078 str r0, [r7, #4]
|
|
8004fec: 460b mov r3, r1
|
|
8004fee: 70fb strb r3, [r7, #3]
|
|
uint32_t USBx_BASE = (uint32_t)USBx;
|
|
8004ff0: 687b ldr r3, [r7, #4]
|
|
8004ff2: 60fb str r3, [r7, #12]
|
|
|
|
USBx_DEVICE->DCFG |= speed;
|
|
8004ff4: 68fb ldr r3, [r7, #12]
|
|
8004ff6: f503 6300 add.w r3, r3, #2048 @ 0x800
|
|
8004ffa: 681a ldr r2, [r3, #0]
|
|
8004ffc: 78fb ldrb r3, [r7, #3]
|
|
8004ffe: 68f9 ldr r1, [r7, #12]
|
|
8005000: f501 6100 add.w r1, r1, #2048 @ 0x800
|
|
8005004: 4313 orrs r3, r2
|
|
8005006: 600b str r3, [r1, #0]
|
|
return HAL_OK;
|
|
8005008: 2300 movs r3, #0
|
|
}
|
|
800500a: 4618 mov r0, r3
|
|
800500c: 3714 adds r7, #20
|
|
800500e: 46bd mov sp, r7
|
|
8005010: f85d 7b04 ldr.w r7, [sp], #4
|
|
8005014: 4770 bx lr
|
|
|
|
08005016 <USB_DevDisconnect>:
|
|
* @brief USB_DevDisconnect : Disconnect the USB device by disabling Rpu
|
|
* @param USBx Selected device
|
|
* @retval HAL status
|
|
*/
|
|
HAL_StatusTypeDef USB_DevDisconnect(const USB_OTG_GlobalTypeDef *USBx)
|
|
{
|
|
8005016: b480 push {r7}
|
|
8005018: b085 sub sp, #20
|
|
800501a: af00 add r7, sp, #0
|
|
800501c: 6078 str r0, [r7, #4]
|
|
uint32_t USBx_BASE = (uint32_t)USBx;
|
|
800501e: 687b ldr r3, [r7, #4]
|
|
8005020: 60fb str r3, [r7, #12]
|
|
|
|
/* In case phy is stopped, ensure to ungate and restore the phy CLK */
|
|
USBx_PCGCCTL &= ~(USB_OTG_PCGCCTL_STOPCLK | USB_OTG_PCGCCTL_GATECLK);
|
|
8005022: 68fb ldr r3, [r7, #12]
|
|
8005024: f503 6360 add.w r3, r3, #3584 @ 0xe00
|
|
8005028: 681b ldr r3, [r3, #0]
|
|
800502a: 68fa ldr r2, [r7, #12]
|
|
800502c: f502 6260 add.w r2, r2, #3584 @ 0xe00
|
|
8005030: f023 0303 bic.w r3, r3, #3
|
|
8005034: 6013 str r3, [r2, #0]
|
|
|
|
USBx_DEVICE->DCTL |= USB_OTG_DCTL_SDIS;
|
|
8005036: 68fb ldr r3, [r7, #12]
|
|
8005038: f503 6300 add.w r3, r3, #2048 @ 0x800
|
|
800503c: 685b ldr r3, [r3, #4]
|
|
800503e: 68fa ldr r2, [r7, #12]
|
|
8005040: f502 6200 add.w r2, r2, #2048 @ 0x800
|
|
8005044: f043 0302 orr.w r3, r3, #2
|
|
8005048: 6053 str r3, [r2, #4]
|
|
|
|
return HAL_OK;
|
|
800504a: 2300 movs r3, #0
|
|
}
|
|
800504c: 4618 mov r0, r3
|
|
800504e: 3714 adds r7, #20
|
|
8005050: 46bd mov sp, r7
|
|
8005052: f85d 7b04 ldr.w r7, [sp], #4
|
|
8005056: 4770 bx lr
|
|
|
|
08005058 <USB_GetMode>:
|
|
* This parameter can be one of these values:
|
|
* 0 : Host
|
|
* 1 : Device
|
|
*/
|
|
uint32_t USB_GetMode(const USB_OTG_GlobalTypeDef *USBx)
|
|
{
|
|
8005058: b480 push {r7}
|
|
800505a: b083 sub sp, #12
|
|
800505c: af00 add r7, sp, #0
|
|
800505e: 6078 str r0, [r7, #4]
|
|
return ((USBx->GINTSTS) & 0x1U);
|
|
8005060: 687b ldr r3, [r7, #4]
|
|
8005062: 695b ldr r3, [r3, #20]
|
|
8005064: f003 0301 and.w r3, r3, #1
|
|
}
|
|
8005068: 4618 mov r0, r3
|
|
800506a: 370c adds r7, #12
|
|
800506c: 46bd mov sp, r7
|
|
800506e: f85d 7b04 ldr.w r7, [sp], #4
|
|
8005072: 4770 bx lr
|
|
|
|
08005074 <USB_CoreReset>:
|
|
* @brief Reset the USB Core (needed after USB clock settings change)
|
|
* @param USBx Selected device
|
|
* @retval HAL status
|
|
*/
|
|
static HAL_StatusTypeDef USB_CoreReset(USB_OTG_GlobalTypeDef *USBx)
|
|
{
|
|
8005074: b480 push {r7}
|
|
8005076: b085 sub sp, #20
|
|
8005078: af00 add r7, sp, #0
|
|
800507a: 6078 str r0, [r7, #4]
|
|
__IO uint32_t count = 0U;
|
|
800507c: 2300 movs r3, #0
|
|
800507e: 60fb str r3, [r7, #12]
|
|
|
|
/* Wait for AHB master IDLE state. */
|
|
do
|
|
{
|
|
count++;
|
|
8005080: 68fb ldr r3, [r7, #12]
|
|
8005082: 3301 adds r3, #1
|
|
8005084: 60fb str r3, [r7, #12]
|
|
|
|
if (count > HAL_USB_TIMEOUT)
|
|
8005086: 68fb ldr r3, [r7, #12]
|
|
8005088: f1b3 6f70 cmp.w r3, #251658240 @ 0xf000000
|
|
800508c: d901 bls.n 8005092 <USB_CoreReset+0x1e>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
800508e: 2303 movs r3, #3
|
|
8005090: e01b b.n 80050ca <USB_CoreReset+0x56>
|
|
}
|
|
} while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_AHBIDL) == 0U);
|
|
8005092: 687b ldr r3, [r7, #4]
|
|
8005094: 691b ldr r3, [r3, #16]
|
|
8005096: 2b00 cmp r3, #0
|
|
8005098: daf2 bge.n 8005080 <USB_CoreReset+0xc>
|
|
|
|
/* Core Soft Reset */
|
|
count = 0U;
|
|
800509a: 2300 movs r3, #0
|
|
800509c: 60fb str r3, [r7, #12]
|
|
USBx->GRSTCTL |= USB_OTG_GRSTCTL_CSRST;
|
|
800509e: 687b ldr r3, [r7, #4]
|
|
80050a0: 691b ldr r3, [r3, #16]
|
|
80050a2: f043 0201 orr.w r2, r3, #1
|
|
80050a6: 687b ldr r3, [r7, #4]
|
|
80050a8: 611a str r2, [r3, #16]
|
|
|
|
do
|
|
{
|
|
count++;
|
|
80050aa: 68fb ldr r3, [r7, #12]
|
|
80050ac: 3301 adds r3, #1
|
|
80050ae: 60fb str r3, [r7, #12]
|
|
|
|
if (count > HAL_USB_TIMEOUT)
|
|
80050b0: 68fb ldr r3, [r7, #12]
|
|
80050b2: f1b3 6f70 cmp.w r3, #251658240 @ 0xf000000
|
|
80050b6: d901 bls.n 80050bc <USB_CoreReset+0x48>
|
|
{
|
|
return HAL_TIMEOUT;
|
|
80050b8: 2303 movs r3, #3
|
|
80050ba: e006 b.n 80050ca <USB_CoreReset+0x56>
|
|
}
|
|
} while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_CSRST) == USB_OTG_GRSTCTL_CSRST);
|
|
80050bc: 687b ldr r3, [r7, #4]
|
|
80050be: 691b ldr r3, [r3, #16]
|
|
80050c0: f003 0301 and.w r3, r3, #1
|
|
80050c4: 2b01 cmp r3, #1
|
|
80050c6: d0f0 beq.n 80050aa <USB_CoreReset+0x36>
|
|
|
|
return HAL_OK;
|
|
80050c8: 2300 movs r3, #0
|
|
}
|
|
80050ca: 4618 mov r0, r3
|
|
80050cc: 3714 adds r7, #20
|
|
80050ce: 46bd mov sp, r7
|
|
80050d0: f85d 7b04 ldr.w r7, [sp], #4
|
|
80050d4: 4770 bx lr
|
|
...
|
|
|
|
080050d8 <__NVIC_SetPriority>:
|
|
{
|
|
80050d8: b480 push {r7}
|
|
80050da: b083 sub sp, #12
|
|
80050dc: af00 add r7, sp, #0
|
|
80050de: 4603 mov r3, r0
|
|
80050e0: 6039 str r1, [r7, #0]
|
|
80050e2: 71fb strb r3, [r7, #7]
|
|
if ((int32_t)(IRQn) >= 0)
|
|
80050e4: f997 3007 ldrsb.w r3, [r7, #7]
|
|
80050e8: 2b00 cmp r3, #0
|
|
80050ea: db0a blt.n 8005102 <__NVIC_SetPriority+0x2a>
|
|
NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
|
|
80050ec: 683b ldr r3, [r7, #0]
|
|
80050ee: b2da uxtb r2, r3
|
|
80050f0: 490c ldr r1, [pc, #48] @ (8005124 <__NVIC_SetPriority+0x4c>)
|
|
80050f2: f997 3007 ldrsb.w r3, [r7, #7]
|
|
80050f6: 0112 lsls r2, r2, #4
|
|
80050f8: b2d2 uxtb r2, r2
|
|
80050fa: 440b add r3, r1
|
|
80050fc: f883 2300 strb.w r2, [r3, #768] @ 0x300
|
|
}
|
|
8005100: e00a b.n 8005118 <__NVIC_SetPriority+0x40>
|
|
SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
|
|
8005102: 683b ldr r3, [r7, #0]
|
|
8005104: b2da uxtb r2, r3
|
|
8005106: 4908 ldr r1, [pc, #32] @ (8005128 <__NVIC_SetPriority+0x50>)
|
|
8005108: 79fb ldrb r3, [r7, #7]
|
|
800510a: f003 030f and.w r3, r3, #15
|
|
800510e: 3b04 subs r3, #4
|
|
8005110: 0112 lsls r2, r2, #4
|
|
8005112: b2d2 uxtb r2, r2
|
|
8005114: 440b add r3, r1
|
|
8005116: 761a strb r2, [r3, #24]
|
|
}
|
|
8005118: bf00 nop
|
|
800511a: 370c adds r7, #12
|
|
800511c: 46bd mov sp, r7
|
|
800511e: f85d 7b04 ldr.w r7, [sp], #4
|
|
8005122: 4770 bx lr
|
|
8005124: e000e100 .word 0xe000e100
|
|
8005128: e000ed00 .word 0xe000ed00
|
|
|
|
0800512c <SVC_Setup>:
|
|
#endif /* SysTick */
|
|
|
|
/*
|
|
Setup SVC to reset value.
|
|
*/
|
|
__STATIC_INLINE void SVC_Setup (void) {
|
|
800512c: b580 push {r7, lr}
|
|
800512e: af00 add r7, sp, #0
|
|
#if (__ARM_ARCH_7A__ == 0U)
|
|
/* Service Call interrupt might be configured before kernel start */
|
|
/* and when its priority is lower or equal to BASEPRI, svc intruction */
|
|
/* causes a Hard Fault. */
|
|
NVIC_SetPriority (SVCall_IRQ_NBR, 0U);
|
|
8005130: 2100 movs r1, #0
|
|
8005132: f06f 0004 mvn.w r0, #4
|
|
8005136: f7ff ffcf bl 80050d8 <__NVIC_SetPriority>
|
|
#endif
|
|
}
|
|
800513a: bf00 nop
|
|
800513c: bd80 pop {r7, pc}
|
|
...
|
|
|
|
08005140 <osKernelInitialize>:
|
|
static uint32_t OS_Tick_GetOverflow (void);
|
|
/* Get OS Tick interval */
|
|
static uint32_t OS_Tick_GetInterval (void);
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
osStatus_t osKernelInitialize (void) {
|
|
8005140: b480 push {r7}
|
|
8005142: b083 sub sp, #12
|
|
8005144: af00 add r7, sp, #0
|
|
__ASM volatile ("MRS %0, ipsr" : "=r" (result) );
|
|
8005146: f3ef 8305 mrs r3, IPSR
|
|
800514a: 603b str r3, [r7, #0]
|
|
return(result);
|
|
800514c: 683b ldr r3, [r7, #0]
|
|
osStatus_t stat;
|
|
|
|
if (IS_IRQ()) {
|
|
800514e: 2b00 cmp r3, #0
|
|
8005150: d003 beq.n 800515a <osKernelInitialize+0x1a>
|
|
stat = osErrorISR;
|
|
8005152: f06f 0305 mvn.w r3, #5
|
|
8005156: 607b str r3, [r7, #4]
|
|
8005158: e00c b.n 8005174 <osKernelInitialize+0x34>
|
|
}
|
|
else {
|
|
if (KernelState == osKernelInactive) {
|
|
800515a: 4b0a ldr r3, [pc, #40] @ (8005184 <osKernelInitialize+0x44>)
|
|
800515c: 681b ldr r3, [r3, #0]
|
|
800515e: 2b00 cmp r3, #0
|
|
8005160: d105 bne.n 800516e <osKernelInitialize+0x2e>
|
|
EvrFreeRTOSSetup(0U);
|
|
#endif
|
|
#if defined(USE_FreeRTOS_HEAP_5) && (HEAP_5_REGION_SETUP == 1)
|
|
vPortDefineHeapRegions (configHEAP_5_REGIONS);
|
|
#endif
|
|
KernelState = osKernelReady;
|
|
8005162: 4b08 ldr r3, [pc, #32] @ (8005184 <osKernelInitialize+0x44>)
|
|
8005164: 2201 movs r2, #1
|
|
8005166: 601a str r2, [r3, #0]
|
|
stat = osOK;
|
|
8005168: 2300 movs r3, #0
|
|
800516a: 607b str r3, [r7, #4]
|
|
800516c: e002 b.n 8005174 <osKernelInitialize+0x34>
|
|
} else {
|
|
stat = osError;
|
|
800516e: f04f 33ff mov.w r3, #4294967295
|
|
8005172: 607b str r3, [r7, #4]
|
|
}
|
|
}
|
|
|
|
return (stat);
|
|
8005174: 687b ldr r3, [r7, #4]
|
|
}
|
|
8005176: 4618 mov r0, r3
|
|
8005178: 370c adds r7, #12
|
|
800517a: 46bd mov sp, r7
|
|
800517c: f85d 7b04 ldr.w r7, [sp], #4
|
|
8005180: 4770 bx lr
|
|
8005182: bf00 nop
|
|
8005184: 200007a8 .word 0x200007a8
|
|
|
|
08005188 <osKernelStart>:
|
|
}
|
|
|
|
return (state);
|
|
}
|
|
|
|
osStatus_t osKernelStart (void) {
|
|
8005188: b580 push {r7, lr}
|
|
800518a: b082 sub sp, #8
|
|
800518c: af00 add r7, sp, #0
|
|
__ASM volatile ("MRS %0, ipsr" : "=r" (result) );
|
|
800518e: f3ef 8305 mrs r3, IPSR
|
|
8005192: 603b str r3, [r7, #0]
|
|
return(result);
|
|
8005194: 683b ldr r3, [r7, #0]
|
|
osStatus_t stat;
|
|
|
|
if (IS_IRQ()) {
|
|
8005196: 2b00 cmp r3, #0
|
|
8005198: d003 beq.n 80051a2 <osKernelStart+0x1a>
|
|
stat = osErrorISR;
|
|
800519a: f06f 0305 mvn.w r3, #5
|
|
800519e: 607b str r3, [r7, #4]
|
|
80051a0: e010 b.n 80051c4 <osKernelStart+0x3c>
|
|
}
|
|
else {
|
|
if (KernelState == osKernelReady) {
|
|
80051a2: 4b0b ldr r3, [pc, #44] @ (80051d0 <osKernelStart+0x48>)
|
|
80051a4: 681b ldr r3, [r3, #0]
|
|
80051a6: 2b01 cmp r3, #1
|
|
80051a8: d109 bne.n 80051be <osKernelStart+0x36>
|
|
/* Ensure SVC priority is at the reset value */
|
|
SVC_Setup();
|
|
80051aa: f7ff ffbf bl 800512c <SVC_Setup>
|
|
/* Change state to enable IRQ masking check */
|
|
KernelState = osKernelRunning;
|
|
80051ae: 4b08 ldr r3, [pc, #32] @ (80051d0 <osKernelStart+0x48>)
|
|
80051b0: 2202 movs r2, #2
|
|
80051b2: 601a str r2, [r3, #0]
|
|
/* Start the kernel scheduler */
|
|
vTaskStartScheduler();
|
|
80051b4: f001 fd46 bl 8006c44 <vTaskStartScheduler>
|
|
stat = osOK;
|
|
80051b8: 2300 movs r3, #0
|
|
80051ba: 607b str r3, [r7, #4]
|
|
80051bc: e002 b.n 80051c4 <osKernelStart+0x3c>
|
|
} else {
|
|
stat = osError;
|
|
80051be: f04f 33ff mov.w r3, #4294967295
|
|
80051c2: 607b str r3, [r7, #4]
|
|
}
|
|
}
|
|
|
|
return (stat);
|
|
80051c4: 687b ldr r3, [r7, #4]
|
|
}
|
|
80051c6: 4618 mov r0, r3
|
|
80051c8: 3708 adds r7, #8
|
|
80051ca: 46bd mov sp, r7
|
|
80051cc: bd80 pop {r7, pc}
|
|
80051ce: bf00 nop
|
|
80051d0: 200007a8 .word 0x200007a8
|
|
|
|
080051d4 <osThreadNew>:
|
|
return (configCPU_CLOCK_HZ);
|
|
}
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
osThreadId_t osThreadNew (osThreadFunc_t func, void *argument, const osThreadAttr_t *attr) {
|
|
80051d4: b580 push {r7, lr}
|
|
80051d6: b08e sub sp, #56 @ 0x38
|
|
80051d8: af04 add r7, sp, #16
|
|
80051da: 60f8 str r0, [r7, #12]
|
|
80051dc: 60b9 str r1, [r7, #8]
|
|
80051de: 607a str r2, [r7, #4]
|
|
uint32_t stack;
|
|
TaskHandle_t hTask;
|
|
UBaseType_t prio;
|
|
int32_t mem;
|
|
|
|
hTask = NULL;
|
|
80051e0: 2300 movs r3, #0
|
|
80051e2: 613b str r3, [r7, #16]
|
|
__ASM volatile ("MRS %0, ipsr" : "=r" (result) );
|
|
80051e4: f3ef 8305 mrs r3, IPSR
|
|
80051e8: 617b str r3, [r7, #20]
|
|
return(result);
|
|
80051ea: 697b ldr r3, [r7, #20]
|
|
|
|
if (!IS_IRQ() && (func != NULL)) {
|
|
80051ec: 2b00 cmp r3, #0
|
|
80051ee: d17e bne.n 80052ee <osThreadNew+0x11a>
|
|
80051f0: 68fb ldr r3, [r7, #12]
|
|
80051f2: 2b00 cmp r3, #0
|
|
80051f4: d07b beq.n 80052ee <osThreadNew+0x11a>
|
|
stack = configMINIMAL_STACK_SIZE;
|
|
80051f6: 2380 movs r3, #128 @ 0x80
|
|
80051f8: 623b str r3, [r7, #32]
|
|
prio = (UBaseType_t)osPriorityNormal;
|
|
80051fa: 2318 movs r3, #24
|
|
80051fc: 61fb str r3, [r7, #28]
|
|
|
|
name = NULL;
|
|
80051fe: 2300 movs r3, #0
|
|
8005200: 627b str r3, [r7, #36] @ 0x24
|
|
mem = -1;
|
|
8005202: f04f 33ff mov.w r3, #4294967295
|
|
8005206: 61bb str r3, [r7, #24]
|
|
|
|
if (attr != NULL) {
|
|
8005208: 687b ldr r3, [r7, #4]
|
|
800520a: 2b00 cmp r3, #0
|
|
800520c: d045 beq.n 800529a <osThreadNew+0xc6>
|
|
if (attr->name != NULL) {
|
|
800520e: 687b ldr r3, [r7, #4]
|
|
8005210: 681b ldr r3, [r3, #0]
|
|
8005212: 2b00 cmp r3, #0
|
|
8005214: d002 beq.n 800521c <osThreadNew+0x48>
|
|
name = attr->name;
|
|
8005216: 687b ldr r3, [r7, #4]
|
|
8005218: 681b ldr r3, [r3, #0]
|
|
800521a: 627b str r3, [r7, #36] @ 0x24
|
|
}
|
|
if (attr->priority != osPriorityNone) {
|
|
800521c: 687b ldr r3, [r7, #4]
|
|
800521e: 699b ldr r3, [r3, #24]
|
|
8005220: 2b00 cmp r3, #0
|
|
8005222: d002 beq.n 800522a <osThreadNew+0x56>
|
|
prio = (UBaseType_t)attr->priority;
|
|
8005224: 687b ldr r3, [r7, #4]
|
|
8005226: 699b ldr r3, [r3, #24]
|
|
8005228: 61fb str r3, [r7, #28]
|
|
}
|
|
|
|
if ((prio < osPriorityIdle) || (prio > osPriorityISR) || ((attr->attr_bits & osThreadJoinable) == osThreadJoinable)) {
|
|
800522a: 69fb ldr r3, [r7, #28]
|
|
800522c: 2b00 cmp r3, #0
|
|
800522e: d008 beq.n 8005242 <osThreadNew+0x6e>
|
|
8005230: 69fb ldr r3, [r7, #28]
|
|
8005232: 2b38 cmp r3, #56 @ 0x38
|
|
8005234: d805 bhi.n 8005242 <osThreadNew+0x6e>
|
|
8005236: 687b ldr r3, [r7, #4]
|
|
8005238: 685b ldr r3, [r3, #4]
|
|
800523a: f003 0301 and.w r3, r3, #1
|
|
800523e: 2b00 cmp r3, #0
|
|
8005240: d001 beq.n 8005246 <osThreadNew+0x72>
|
|
return (NULL);
|
|
8005242: 2300 movs r3, #0
|
|
8005244: e054 b.n 80052f0 <osThreadNew+0x11c>
|
|
}
|
|
|
|
if (attr->stack_size > 0U) {
|
|
8005246: 687b ldr r3, [r7, #4]
|
|
8005248: 695b ldr r3, [r3, #20]
|
|
800524a: 2b00 cmp r3, #0
|
|
800524c: d003 beq.n 8005256 <osThreadNew+0x82>
|
|
/* In FreeRTOS stack is not in bytes, but in sizeof(StackType_t) which is 4 on ARM ports. */
|
|
/* Stack size should be therefore 4 byte aligned in order to avoid division caused side effects */
|
|
stack = attr->stack_size / sizeof(StackType_t);
|
|
800524e: 687b ldr r3, [r7, #4]
|
|
8005250: 695b ldr r3, [r3, #20]
|
|
8005252: 089b lsrs r3, r3, #2
|
|
8005254: 623b str r3, [r7, #32]
|
|
}
|
|
|
|
if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticTask_t)) &&
|
|
8005256: 687b ldr r3, [r7, #4]
|
|
8005258: 689b ldr r3, [r3, #8]
|
|
800525a: 2b00 cmp r3, #0
|
|
800525c: d00e beq.n 800527c <osThreadNew+0xa8>
|
|
800525e: 687b ldr r3, [r7, #4]
|
|
8005260: 68db ldr r3, [r3, #12]
|
|
8005262: 2b5b cmp r3, #91 @ 0x5b
|
|
8005264: d90a bls.n 800527c <osThreadNew+0xa8>
|
|
(attr->stack_mem != NULL) && (attr->stack_size > 0U)) {
|
|
8005266: 687b ldr r3, [r7, #4]
|
|
8005268: 691b ldr r3, [r3, #16]
|
|
if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticTask_t)) &&
|
|
800526a: 2b00 cmp r3, #0
|
|
800526c: d006 beq.n 800527c <osThreadNew+0xa8>
|
|
(attr->stack_mem != NULL) && (attr->stack_size > 0U)) {
|
|
800526e: 687b ldr r3, [r7, #4]
|
|
8005270: 695b ldr r3, [r3, #20]
|
|
8005272: 2b00 cmp r3, #0
|
|
8005274: d002 beq.n 800527c <osThreadNew+0xa8>
|
|
mem = 1;
|
|
8005276: 2301 movs r3, #1
|
|
8005278: 61bb str r3, [r7, #24]
|
|
800527a: e010 b.n 800529e <osThreadNew+0xca>
|
|
}
|
|
else {
|
|
if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && (attr->stack_mem == NULL)) {
|
|
800527c: 687b ldr r3, [r7, #4]
|
|
800527e: 689b ldr r3, [r3, #8]
|
|
8005280: 2b00 cmp r3, #0
|
|
8005282: d10c bne.n 800529e <osThreadNew+0xca>
|
|
8005284: 687b ldr r3, [r7, #4]
|
|
8005286: 68db ldr r3, [r3, #12]
|
|
8005288: 2b00 cmp r3, #0
|
|
800528a: d108 bne.n 800529e <osThreadNew+0xca>
|
|
800528c: 687b ldr r3, [r7, #4]
|
|
800528e: 691b ldr r3, [r3, #16]
|
|
8005290: 2b00 cmp r3, #0
|
|
8005292: d104 bne.n 800529e <osThreadNew+0xca>
|
|
mem = 0;
|
|
8005294: 2300 movs r3, #0
|
|
8005296: 61bb str r3, [r7, #24]
|
|
8005298: e001 b.n 800529e <osThreadNew+0xca>
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
mem = 0;
|
|
800529a: 2300 movs r3, #0
|
|
800529c: 61bb str r3, [r7, #24]
|
|
}
|
|
|
|
if (mem == 1) {
|
|
800529e: 69bb ldr r3, [r7, #24]
|
|
80052a0: 2b01 cmp r3, #1
|
|
80052a2: d110 bne.n 80052c6 <osThreadNew+0xf2>
|
|
#if (configSUPPORT_STATIC_ALLOCATION == 1)
|
|
hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem,
|
|
80052a4: 687b ldr r3, [r7, #4]
|
|
80052a6: 691b ldr r3, [r3, #16]
|
|
(StaticTask_t *)attr->cb_mem);
|
|
80052a8: 687a ldr r2, [r7, #4]
|
|
80052aa: 6892 ldr r2, [r2, #8]
|
|
hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem,
|
|
80052ac: 9202 str r2, [sp, #8]
|
|
80052ae: 9301 str r3, [sp, #4]
|
|
80052b0: 69fb ldr r3, [r7, #28]
|
|
80052b2: 9300 str r3, [sp, #0]
|
|
80052b4: 68bb ldr r3, [r7, #8]
|
|
80052b6: 6a3a ldr r2, [r7, #32]
|
|
80052b8: 6a79 ldr r1, [r7, #36] @ 0x24
|
|
80052ba: 68f8 ldr r0, [r7, #12]
|
|
80052bc: f001 fa72 bl 80067a4 <xTaskCreateStatic>
|
|
80052c0: 4603 mov r3, r0
|
|
80052c2: 613b str r3, [r7, #16]
|
|
80052c4: e013 b.n 80052ee <osThreadNew+0x11a>
|
|
#endif
|
|
}
|
|
else {
|
|
if (mem == 0) {
|
|
80052c6: 69bb ldr r3, [r7, #24]
|
|
80052c8: 2b00 cmp r3, #0
|
|
80052ca: d110 bne.n 80052ee <osThreadNew+0x11a>
|
|
#if (configSUPPORT_DYNAMIC_ALLOCATION == 1)
|
|
if (xTaskCreate ((TaskFunction_t)func, name, (uint16_t)stack, argument, prio, &hTask) != pdPASS) {
|
|
80052cc: 6a3b ldr r3, [r7, #32]
|
|
80052ce: b29a uxth r2, r3
|
|
80052d0: f107 0310 add.w r3, r7, #16
|
|
80052d4: 9301 str r3, [sp, #4]
|
|
80052d6: 69fb ldr r3, [r7, #28]
|
|
80052d8: 9300 str r3, [sp, #0]
|
|
80052da: 68bb ldr r3, [r7, #8]
|
|
80052dc: 6a79 ldr r1, [r7, #36] @ 0x24
|
|
80052de: 68f8 ldr r0, [r7, #12]
|
|
80052e0: f001 fac0 bl 8006864 <xTaskCreate>
|
|
80052e4: 4603 mov r3, r0
|
|
80052e6: 2b01 cmp r3, #1
|
|
80052e8: d001 beq.n 80052ee <osThreadNew+0x11a>
|
|
hTask = NULL;
|
|
80052ea: 2300 movs r3, #0
|
|
80052ec: 613b str r3, [r7, #16]
|
|
#endif
|
|
}
|
|
}
|
|
}
|
|
|
|
return ((osThreadId_t)hTask);
|
|
80052ee: 693b ldr r3, [r7, #16]
|
|
}
|
|
80052f0: 4618 mov r0, r3
|
|
80052f2: 3728 adds r7, #40 @ 0x28
|
|
80052f4: 46bd mov sp, r7
|
|
80052f6: bd80 pop {r7, pc}
|
|
|
|
080052f8 <osThreadExit>:
|
|
|
|
return (stat);
|
|
}
|
|
#endif /* (configUSE_OS2_THREAD_SUSPEND_RESUME == 1) */
|
|
|
|
__NO_RETURN void osThreadExit (void) {
|
|
80052f8: b580 push {r7, lr}
|
|
80052fa: af00 add r7, sp, #0
|
|
#ifndef USE_FreeRTOS_HEAP_1
|
|
vTaskDelete (NULL);
|
|
80052fc: 2000 movs r0, #0
|
|
80052fe: f001 fbf7 bl 8006af0 <vTaskDelete>
|
|
#endif
|
|
for (;;);
|
|
8005302: bf00 nop
|
|
8005304: e7fd b.n 8005302 <osThreadExit+0xa>
|
|
|
|
08005306 <osDelay>:
|
|
/* Return flags before clearing */
|
|
return (rflags);
|
|
}
|
|
#endif /* (configUSE_OS2_THREAD_FLAGS == 1) */
|
|
|
|
osStatus_t osDelay (uint32_t ticks) {
|
|
8005306: b580 push {r7, lr}
|
|
8005308: b084 sub sp, #16
|
|
800530a: af00 add r7, sp, #0
|
|
800530c: 6078 str r0, [r7, #4]
|
|
__ASM volatile ("MRS %0, ipsr" : "=r" (result) );
|
|
800530e: f3ef 8305 mrs r3, IPSR
|
|
8005312: 60bb str r3, [r7, #8]
|
|
return(result);
|
|
8005314: 68bb ldr r3, [r7, #8]
|
|
osStatus_t stat;
|
|
|
|
if (IS_IRQ()) {
|
|
8005316: 2b00 cmp r3, #0
|
|
8005318: d003 beq.n 8005322 <osDelay+0x1c>
|
|
stat = osErrorISR;
|
|
800531a: f06f 0305 mvn.w r3, #5
|
|
800531e: 60fb str r3, [r7, #12]
|
|
8005320: e007 b.n 8005332 <osDelay+0x2c>
|
|
}
|
|
else {
|
|
stat = osOK;
|
|
8005322: 2300 movs r3, #0
|
|
8005324: 60fb str r3, [r7, #12]
|
|
|
|
if (ticks != 0U) {
|
|
8005326: 687b ldr r3, [r7, #4]
|
|
8005328: 2b00 cmp r3, #0
|
|
800532a: d002 beq.n 8005332 <osDelay+0x2c>
|
|
vTaskDelay(ticks);
|
|
800532c: 6878 ldr r0, [r7, #4]
|
|
800532e: f001 fc53 bl 8006bd8 <vTaskDelay>
|
|
}
|
|
}
|
|
|
|
return (stat);
|
|
8005332: 68fb ldr r3, [r7, #12]
|
|
}
|
|
8005334: 4618 mov r0, r3
|
|
8005336: 3710 adds r7, #16
|
|
8005338: 46bd mov sp, r7
|
|
800533a: bd80 pop {r7, pc}
|
|
|
|
0800533c <osSemaphoreNew>:
|
|
}
|
|
#endif /* (configUSE_OS2_MUTEX == 1) */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
osSemaphoreId_t osSemaphoreNew (uint32_t max_count, uint32_t initial_count, const osSemaphoreAttr_t *attr) {
|
|
800533c: b580 push {r7, lr}
|
|
800533e: b08a sub sp, #40 @ 0x28
|
|
8005340: af02 add r7, sp, #8
|
|
8005342: 60f8 str r0, [r7, #12]
|
|
8005344: 60b9 str r1, [r7, #8]
|
|
8005346: 607a str r2, [r7, #4]
|
|
int32_t mem;
|
|
#if (configQUEUE_REGISTRY_SIZE > 0)
|
|
const char *name;
|
|
#endif
|
|
|
|
hSemaphore = NULL;
|
|
8005348: 2300 movs r3, #0
|
|
800534a: 61fb str r3, [r7, #28]
|
|
__ASM volatile ("MRS %0, ipsr" : "=r" (result) );
|
|
800534c: f3ef 8305 mrs r3, IPSR
|
|
8005350: 613b str r3, [r7, #16]
|
|
return(result);
|
|
8005352: 693b ldr r3, [r7, #16]
|
|
|
|
if (!IS_IRQ() && (max_count > 0U) && (initial_count <= max_count)) {
|
|
8005354: 2b00 cmp r3, #0
|
|
8005356: d175 bne.n 8005444 <osSemaphoreNew+0x108>
|
|
8005358: 68fb ldr r3, [r7, #12]
|
|
800535a: 2b00 cmp r3, #0
|
|
800535c: d072 beq.n 8005444 <osSemaphoreNew+0x108>
|
|
800535e: 68ba ldr r2, [r7, #8]
|
|
8005360: 68fb ldr r3, [r7, #12]
|
|
8005362: 429a cmp r2, r3
|
|
8005364: d86e bhi.n 8005444 <osSemaphoreNew+0x108>
|
|
mem = -1;
|
|
8005366: f04f 33ff mov.w r3, #4294967295
|
|
800536a: 61bb str r3, [r7, #24]
|
|
|
|
if (attr != NULL) {
|
|
800536c: 687b ldr r3, [r7, #4]
|
|
800536e: 2b00 cmp r3, #0
|
|
8005370: d015 beq.n 800539e <osSemaphoreNew+0x62>
|
|
if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticSemaphore_t))) {
|
|
8005372: 687b ldr r3, [r7, #4]
|
|
8005374: 689b ldr r3, [r3, #8]
|
|
8005376: 2b00 cmp r3, #0
|
|
8005378: d006 beq.n 8005388 <osSemaphoreNew+0x4c>
|
|
800537a: 687b ldr r3, [r7, #4]
|
|
800537c: 68db ldr r3, [r3, #12]
|
|
800537e: 2b4f cmp r3, #79 @ 0x4f
|
|
8005380: d902 bls.n 8005388 <osSemaphoreNew+0x4c>
|
|
mem = 1;
|
|
8005382: 2301 movs r3, #1
|
|
8005384: 61bb str r3, [r7, #24]
|
|
8005386: e00c b.n 80053a2 <osSemaphoreNew+0x66>
|
|
}
|
|
else {
|
|
if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) {
|
|
8005388: 687b ldr r3, [r7, #4]
|
|
800538a: 689b ldr r3, [r3, #8]
|
|
800538c: 2b00 cmp r3, #0
|
|
800538e: d108 bne.n 80053a2 <osSemaphoreNew+0x66>
|
|
8005390: 687b ldr r3, [r7, #4]
|
|
8005392: 68db ldr r3, [r3, #12]
|
|
8005394: 2b00 cmp r3, #0
|
|
8005396: d104 bne.n 80053a2 <osSemaphoreNew+0x66>
|
|
mem = 0;
|
|
8005398: 2300 movs r3, #0
|
|
800539a: 61bb str r3, [r7, #24]
|
|
800539c: e001 b.n 80053a2 <osSemaphoreNew+0x66>
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
mem = 0;
|
|
800539e: 2300 movs r3, #0
|
|
80053a0: 61bb str r3, [r7, #24]
|
|
}
|
|
|
|
if (mem != -1) {
|
|
80053a2: 69bb ldr r3, [r7, #24]
|
|
80053a4: f1b3 3fff cmp.w r3, #4294967295
|
|
80053a8: d04c beq.n 8005444 <osSemaphoreNew+0x108>
|
|
if (max_count == 1U) {
|
|
80053aa: 68fb ldr r3, [r7, #12]
|
|
80053ac: 2b01 cmp r3, #1
|
|
80053ae: d128 bne.n 8005402 <osSemaphoreNew+0xc6>
|
|
if (mem == 1) {
|
|
80053b0: 69bb ldr r3, [r7, #24]
|
|
80053b2: 2b01 cmp r3, #1
|
|
80053b4: d10a bne.n 80053cc <osSemaphoreNew+0x90>
|
|
#if (configSUPPORT_STATIC_ALLOCATION == 1)
|
|
hSemaphore = xSemaphoreCreateBinaryStatic ((StaticSemaphore_t *)attr->cb_mem);
|
|
80053b6: 687b ldr r3, [r7, #4]
|
|
80053b8: 689b ldr r3, [r3, #8]
|
|
80053ba: 2203 movs r2, #3
|
|
80053bc: 9200 str r2, [sp, #0]
|
|
80053be: 2200 movs r2, #0
|
|
80053c0: 2100 movs r1, #0
|
|
80053c2: 2001 movs r0, #1
|
|
80053c4: f000 fa2c bl 8005820 <xQueueGenericCreateStatic>
|
|
80053c8: 61f8 str r0, [r7, #28]
|
|
80053ca: e005 b.n 80053d8 <osSemaphoreNew+0x9c>
|
|
#endif
|
|
}
|
|
else {
|
|
#if (configSUPPORT_DYNAMIC_ALLOCATION == 1)
|
|
hSemaphore = xSemaphoreCreateBinary();
|
|
80053cc: 2203 movs r2, #3
|
|
80053ce: 2100 movs r1, #0
|
|
80053d0: 2001 movs r0, #1
|
|
80053d2: f000 faa2 bl 800591a <xQueueGenericCreate>
|
|
80053d6: 61f8 str r0, [r7, #28]
|
|
#endif
|
|
}
|
|
|
|
if ((hSemaphore != NULL) && (initial_count != 0U)) {
|
|
80053d8: 69fb ldr r3, [r7, #28]
|
|
80053da: 2b00 cmp r3, #0
|
|
80053dc: d022 beq.n 8005424 <osSemaphoreNew+0xe8>
|
|
80053de: 68bb ldr r3, [r7, #8]
|
|
80053e0: 2b00 cmp r3, #0
|
|
80053e2: d01f beq.n 8005424 <osSemaphoreNew+0xe8>
|
|
if (xSemaphoreGive (hSemaphore) != pdPASS) {
|
|
80053e4: 2300 movs r3, #0
|
|
80053e6: 2200 movs r2, #0
|
|
80053e8: 2100 movs r1, #0
|
|
80053ea: 69f8 ldr r0, [r7, #28]
|
|
80053ec: f000 fb62 bl 8005ab4 <xQueueGenericSend>
|
|
80053f0: 4603 mov r3, r0
|
|
80053f2: 2b01 cmp r3, #1
|
|
80053f4: d016 beq.n 8005424 <osSemaphoreNew+0xe8>
|
|
vSemaphoreDelete (hSemaphore);
|
|
80053f6: 69f8 ldr r0, [r7, #28]
|
|
80053f8: f001 f800 bl 80063fc <vQueueDelete>
|
|
hSemaphore = NULL;
|
|
80053fc: 2300 movs r3, #0
|
|
80053fe: 61fb str r3, [r7, #28]
|
|
8005400: e010 b.n 8005424 <osSemaphoreNew+0xe8>
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
if (mem == 1) {
|
|
8005402: 69bb ldr r3, [r7, #24]
|
|
8005404: 2b01 cmp r3, #1
|
|
8005406: d108 bne.n 800541a <osSemaphoreNew+0xde>
|
|
#if (configSUPPORT_STATIC_ALLOCATION == 1)
|
|
hSemaphore = xSemaphoreCreateCountingStatic (max_count, initial_count, (StaticSemaphore_t *)attr->cb_mem);
|
|
8005408: 687b ldr r3, [r7, #4]
|
|
800540a: 689b ldr r3, [r3, #8]
|
|
800540c: 461a mov r2, r3
|
|
800540e: 68b9 ldr r1, [r7, #8]
|
|
8005410: 68f8 ldr r0, [r7, #12]
|
|
8005412: f000 fae0 bl 80059d6 <xQueueCreateCountingSemaphoreStatic>
|
|
8005416: 61f8 str r0, [r7, #28]
|
|
8005418: e004 b.n 8005424 <osSemaphoreNew+0xe8>
|
|
#endif
|
|
}
|
|
else {
|
|
#if (configSUPPORT_DYNAMIC_ALLOCATION == 1)
|
|
hSemaphore = xSemaphoreCreateCounting (max_count, initial_count);
|
|
800541a: 68b9 ldr r1, [r7, #8]
|
|
800541c: 68f8 ldr r0, [r7, #12]
|
|
800541e: f000 fb13 bl 8005a48 <xQueueCreateCountingSemaphore>
|
|
8005422: 61f8 str r0, [r7, #28]
|
|
#endif
|
|
}
|
|
}
|
|
|
|
#if (configQUEUE_REGISTRY_SIZE > 0)
|
|
if (hSemaphore != NULL) {
|
|
8005424: 69fb ldr r3, [r7, #28]
|
|
8005426: 2b00 cmp r3, #0
|
|
8005428: d00c beq.n 8005444 <osSemaphoreNew+0x108>
|
|
if (attr != NULL) {
|
|
800542a: 687b ldr r3, [r7, #4]
|
|
800542c: 2b00 cmp r3, #0
|
|
800542e: d003 beq.n 8005438 <osSemaphoreNew+0xfc>
|
|
name = attr->name;
|
|
8005430: 687b ldr r3, [r7, #4]
|
|
8005432: 681b ldr r3, [r3, #0]
|
|
8005434: 617b str r3, [r7, #20]
|
|
8005436: e001 b.n 800543c <osSemaphoreNew+0x100>
|
|
} else {
|
|
name = NULL;
|
|
8005438: 2300 movs r3, #0
|
|
800543a: 617b str r3, [r7, #20]
|
|
}
|
|
vQueueAddToRegistry (hSemaphore, name);
|
|
800543c: 6979 ldr r1, [r7, #20]
|
|
800543e: 69f8 ldr r0, [r7, #28]
|
|
8005440: f001 f928 bl 8006694 <vQueueAddToRegistry>
|
|
}
|
|
#endif
|
|
}
|
|
}
|
|
|
|
return ((osSemaphoreId_t)hSemaphore);
|
|
8005444: 69fb ldr r3, [r7, #28]
|
|
}
|
|
8005446: 4618 mov r0, r3
|
|
8005448: 3720 adds r7, #32
|
|
800544a: 46bd mov sp, r7
|
|
800544c: bd80 pop {r7, pc}
|
|
...
|
|
|
|
08005450 <osSemaphoreAcquire>:
|
|
|
|
osStatus_t osSemaphoreAcquire (osSemaphoreId_t semaphore_id, uint32_t timeout) {
|
|
8005450: b580 push {r7, lr}
|
|
8005452: b086 sub sp, #24
|
|
8005454: af00 add r7, sp, #0
|
|
8005456: 6078 str r0, [r7, #4]
|
|
8005458: 6039 str r1, [r7, #0]
|
|
SemaphoreHandle_t hSemaphore = (SemaphoreHandle_t)semaphore_id;
|
|
800545a: 687b ldr r3, [r7, #4]
|
|
800545c: 613b str r3, [r7, #16]
|
|
osStatus_t stat;
|
|
BaseType_t yield;
|
|
|
|
stat = osOK;
|
|
800545e: 2300 movs r3, #0
|
|
8005460: 617b str r3, [r7, #20]
|
|
|
|
if (hSemaphore == NULL) {
|
|
8005462: 693b ldr r3, [r7, #16]
|
|
8005464: 2b00 cmp r3, #0
|
|
8005466: d103 bne.n 8005470 <osSemaphoreAcquire+0x20>
|
|
stat = osErrorParameter;
|
|
8005468: f06f 0303 mvn.w r3, #3
|
|
800546c: 617b str r3, [r7, #20]
|
|
800546e: e039 b.n 80054e4 <osSemaphoreAcquire+0x94>
|
|
__ASM volatile ("MRS %0, ipsr" : "=r" (result) );
|
|
8005470: f3ef 8305 mrs r3, IPSR
|
|
8005474: 60fb str r3, [r7, #12]
|
|
return(result);
|
|
8005476: 68fb ldr r3, [r7, #12]
|
|
}
|
|
else if (IS_IRQ()) {
|
|
8005478: 2b00 cmp r3, #0
|
|
800547a: d022 beq.n 80054c2 <osSemaphoreAcquire+0x72>
|
|
if (timeout != 0U) {
|
|
800547c: 683b ldr r3, [r7, #0]
|
|
800547e: 2b00 cmp r3, #0
|
|
8005480: d003 beq.n 800548a <osSemaphoreAcquire+0x3a>
|
|
stat = osErrorParameter;
|
|
8005482: f06f 0303 mvn.w r3, #3
|
|
8005486: 617b str r3, [r7, #20]
|
|
8005488: e02c b.n 80054e4 <osSemaphoreAcquire+0x94>
|
|
}
|
|
else {
|
|
yield = pdFALSE;
|
|
800548a: 2300 movs r3, #0
|
|
800548c: 60bb str r3, [r7, #8]
|
|
|
|
if (xSemaphoreTakeFromISR (hSemaphore, &yield) != pdPASS) {
|
|
800548e: f107 0308 add.w r3, r7, #8
|
|
8005492: 461a mov r2, r3
|
|
8005494: 2100 movs r1, #0
|
|
8005496: 6938 ldr r0, [r7, #16]
|
|
8005498: f000 ff2e bl 80062f8 <xQueueReceiveFromISR>
|
|
800549c: 4603 mov r3, r0
|
|
800549e: 2b01 cmp r3, #1
|
|
80054a0: d003 beq.n 80054aa <osSemaphoreAcquire+0x5a>
|
|
stat = osErrorResource;
|
|
80054a2: f06f 0302 mvn.w r3, #2
|
|
80054a6: 617b str r3, [r7, #20]
|
|
80054a8: e01c b.n 80054e4 <osSemaphoreAcquire+0x94>
|
|
} else {
|
|
portYIELD_FROM_ISR (yield);
|
|
80054aa: 68bb ldr r3, [r7, #8]
|
|
80054ac: 2b00 cmp r3, #0
|
|
80054ae: d019 beq.n 80054e4 <osSemaphoreAcquire+0x94>
|
|
80054b0: 4b0f ldr r3, [pc, #60] @ (80054f0 <osSemaphoreAcquire+0xa0>)
|
|
80054b2: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
80054b6: 601a str r2, [r3, #0]
|
|
80054b8: f3bf 8f4f dsb sy
|
|
80054bc: f3bf 8f6f isb sy
|
|
80054c0: e010 b.n 80054e4 <osSemaphoreAcquire+0x94>
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
if (xSemaphoreTake (hSemaphore, (TickType_t)timeout) != pdPASS) {
|
|
80054c2: 6839 ldr r1, [r7, #0]
|
|
80054c4: 6938 ldr r0, [r7, #16]
|
|
80054c6: f000 fe07 bl 80060d8 <xQueueSemaphoreTake>
|
|
80054ca: 4603 mov r3, r0
|
|
80054cc: 2b01 cmp r3, #1
|
|
80054ce: d009 beq.n 80054e4 <osSemaphoreAcquire+0x94>
|
|
if (timeout != 0U) {
|
|
80054d0: 683b ldr r3, [r7, #0]
|
|
80054d2: 2b00 cmp r3, #0
|
|
80054d4: d003 beq.n 80054de <osSemaphoreAcquire+0x8e>
|
|
stat = osErrorTimeout;
|
|
80054d6: f06f 0301 mvn.w r3, #1
|
|
80054da: 617b str r3, [r7, #20]
|
|
80054dc: e002 b.n 80054e4 <osSemaphoreAcquire+0x94>
|
|
} else {
|
|
stat = osErrorResource;
|
|
80054de: f06f 0302 mvn.w r3, #2
|
|
80054e2: 617b str r3, [r7, #20]
|
|
}
|
|
}
|
|
}
|
|
|
|
return (stat);
|
|
80054e4: 697b ldr r3, [r7, #20]
|
|
}
|
|
80054e6: 4618 mov r0, r3
|
|
80054e8: 3718 adds r7, #24
|
|
80054ea: 46bd mov sp, r7
|
|
80054ec: bd80 pop {r7, pc}
|
|
80054ee: bf00 nop
|
|
80054f0: e000ed04 .word 0xe000ed04
|
|
|
|
080054f4 <osSemaphoreRelease>:
|
|
|
|
osStatus_t osSemaphoreRelease (osSemaphoreId_t semaphore_id) {
|
|
80054f4: b580 push {r7, lr}
|
|
80054f6: b086 sub sp, #24
|
|
80054f8: af00 add r7, sp, #0
|
|
80054fa: 6078 str r0, [r7, #4]
|
|
SemaphoreHandle_t hSemaphore = (SemaphoreHandle_t)semaphore_id;
|
|
80054fc: 687b ldr r3, [r7, #4]
|
|
80054fe: 613b str r3, [r7, #16]
|
|
osStatus_t stat;
|
|
BaseType_t yield;
|
|
|
|
stat = osOK;
|
|
8005500: 2300 movs r3, #0
|
|
8005502: 617b str r3, [r7, #20]
|
|
|
|
if (hSemaphore == NULL) {
|
|
8005504: 693b ldr r3, [r7, #16]
|
|
8005506: 2b00 cmp r3, #0
|
|
8005508: d103 bne.n 8005512 <osSemaphoreRelease+0x1e>
|
|
stat = osErrorParameter;
|
|
800550a: f06f 0303 mvn.w r3, #3
|
|
800550e: 617b str r3, [r7, #20]
|
|
8005510: e02c b.n 800556c <osSemaphoreRelease+0x78>
|
|
__ASM volatile ("MRS %0, ipsr" : "=r" (result) );
|
|
8005512: f3ef 8305 mrs r3, IPSR
|
|
8005516: 60fb str r3, [r7, #12]
|
|
return(result);
|
|
8005518: 68fb ldr r3, [r7, #12]
|
|
}
|
|
else if (IS_IRQ()) {
|
|
800551a: 2b00 cmp r3, #0
|
|
800551c: d01a beq.n 8005554 <osSemaphoreRelease+0x60>
|
|
yield = pdFALSE;
|
|
800551e: 2300 movs r3, #0
|
|
8005520: 60bb str r3, [r7, #8]
|
|
|
|
if (xSemaphoreGiveFromISR (hSemaphore, &yield) != pdTRUE) {
|
|
8005522: f107 0308 add.w r3, r7, #8
|
|
8005526: 4619 mov r1, r3
|
|
8005528: 6938 ldr r0, [r7, #16]
|
|
800552a: f000 fc63 bl 8005df4 <xQueueGiveFromISR>
|
|
800552e: 4603 mov r3, r0
|
|
8005530: 2b01 cmp r3, #1
|
|
8005532: d003 beq.n 800553c <osSemaphoreRelease+0x48>
|
|
stat = osErrorResource;
|
|
8005534: f06f 0302 mvn.w r3, #2
|
|
8005538: 617b str r3, [r7, #20]
|
|
800553a: e017 b.n 800556c <osSemaphoreRelease+0x78>
|
|
} else {
|
|
portYIELD_FROM_ISR (yield);
|
|
800553c: 68bb ldr r3, [r7, #8]
|
|
800553e: 2b00 cmp r3, #0
|
|
8005540: d014 beq.n 800556c <osSemaphoreRelease+0x78>
|
|
8005542: 4b0d ldr r3, [pc, #52] @ (8005578 <osSemaphoreRelease+0x84>)
|
|
8005544: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
8005548: 601a str r2, [r3, #0]
|
|
800554a: f3bf 8f4f dsb sy
|
|
800554e: f3bf 8f6f isb sy
|
|
8005552: e00b b.n 800556c <osSemaphoreRelease+0x78>
|
|
}
|
|
}
|
|
else {
|
|
if (xSemaphoreGive (hSemaphore) != pdPASS) {
|
|
8005554: 2300 movs r3, #0
|
|
8005556: 2200 movs r2, #0
|
|
8005558: 2100 movs r1, #0
|
|
800555a: 6938 ldr r0, [r7, #16]
|
|
800555c: f000 faaa bl 8005ab4 <xQueueGenericSend>
|
|
8005560: 4603 mov r3, r0
|
|
8005562: 2b01 cmp r3, #1
|
|
8005564: d002 beq.n 800556c <osSemaphoreRelease+0x78>
|
|
stat = osErrorResource;
|
|
8005566: f06f 0302 mvn.w r3, #2
|
|
800556a: 617b str r3, [r7, #20]
|
|
}
|
|
}
|
|
|
|
return (stat);
|
|
800556c: 697b ldr r3, [r7, #20]
|
|
}
|
|
800556e: 4618 mov r0, r3
|
|
8005570: 3718 adds r7, #24
|
|
8005572: 46bd mov sp, r7
|
|
8005574: bd80 pop {r7, pc}
|
|
8005576: bf00 nop
|
|
8005578: e000ed04 .word 0xe000ed04
|
|
|
|
0800557c <vApplicationGetIdleTaskMemory>:
|
|
|
|
/*
|
|
vApplicationGetIdleTaskMemory gets called when configSUPPORT_STATIC_ALLOCATION
|
|
equals to 1 and is required for static memory allocation support.
|
|
*/
|
|
__WEAK void vApplicationGetIdleTaskMemory (StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize) {
|
|
800557c: b480 push {r7}
|
|
800557e: b085 sub sp, #20
|
|
8005580: af00 add r7, sp, #0
|
|
8005582: 60f8 str r0, [r7, #12]
|
|
8005584: 60b9 str r1, [r7, #8]
|
|
8005586: 607a str r2, [r7, #4]
|
|
/* Idle task control block and stack */
|
|
static StaticTask_t Idle_TCB;
|
|
static StackType_t Idle_Stack[configMINIMAL_STACK_SIZE];
|
|
|
|
*ppxIdleTaskTCBBuffer = &Idle_TCB;
|
|
8005588: 68fb ldr r3, [r7, #12]
|
|
800558a: 4a07 ldr r2, [pc, #28] @ (80055a8 <vApplicationGetIdleTaskMemory+0x2c>)
|
|
800558c: 601a str r2, [r3, #0]
|
|
*ppxIdleTaskStackBuffer = &Idle_Stack[0];
|
|
800558e: 68bb ldr r3, [r7, #8]
|
|
8005590: 4a06 ldr r2, [pc, #24] @ (80055ac <vApplicationGetIdleTaskMemory+0x30>)
|
|
8005592: 601a str r2, [r3, #0]
|
|
*pulIdleTaskStackSize = (uint32_t)configMINIMAL_STACK_SIZE;
|
|
8005594: 687b ldr r3, [r7, #4]
|
|
8005596: 2280 movs r2, #128 @ 0x80
|
|
8005598: 601a str r2, [r3, #0]
|
|
}
|
|
800559a: bf00 nop
|
|
800559c: 3714 adds r7, #20
|
|
800559e: 46bd mov sp, r7
|
|
80055a0: f85d 7b04 ldr.w r7, [sp], #4
|
|
80055a4: 4770 bx lr
|
|
80055a6: bf00 nop
|
|
80055a8: 200007ac .word 0x200007ac
|
|
80055ac: 20000808 .word 0x20000808
|
|
|
|
080055b0 <vApplicationGetTimerTaskMemory>:
|
|
|
|
/*
|
|
vApplicationGetTimerTaskMemory gets called when configSUPPORT_STATIC_ALLOCATION
|
|
equals to 1 and is required for static memory allocation support.
|
|
*/
|
|
__WEAK void vApplicationGetTimerTaskMemory (StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize) {
|
|
80055b0: b480 push {r7}
|
|
80055b2: b085 sub sp, #20
|
|
80055b4: af00 add r7, sp, #0
|
|
80055b6: 60f8 str r0, [r7, #12]
|
|
80055b8: 60b9 str r1, [r7, #8]
|
|
80055ba: 607a str r2, [r7, #4]
|
|
/* Timer task control block and stack */
|
|
static StaticTask_t Timer_TCB;
|
|
static StackType_t Timer_Stack[configTIMER_TASK_STACK_DEPTH];
|
|
|
|
*ppxTimerTaskTCBBuffer = &Timer_TCB;
|
|
80055bc: 68fb ldr r3, [r7, #12]
|
|
80055be: 4a07 ldr r2, [pc, #28] @ (80055dc <vApplicationGetTimerTaskMemory+0x2c>)
|
|
80055c0: 601a str r2, [r3, #0]
|
|
*ppxTimerTaskStackBuffer = &Timer_Stack[0];
|
|
80055c2: 68bb ldr r3, [r7, #8]
|
|
80055c4: 4a06 ldr r2, [pc, #24] @ (80055e0 <vApplicationGetTimerTaskMemory+0x30>)
|
|
80055c6: 601a str r2, [r3, #0]
|
|
*pulTimerTaskStackSize = (uint32_t)configTIMER_TASK_STACK_DEPTH;
|
|
80055c8: 687b ldr r3, [r7, #4]
|
|
80055ca: f44f 7280 mov.w r2, #256 @ 0x100
|
|
80055ce: 601a str r2, [r3, #0]
|
|
}
|
|
80055d0: bf00 nop
|
|
80055d2: 3714 adds r7, #20
|
|
80055d4: 46bd mov sp, r7
|
|
80055d6: f85d 7b04 ldr.w r7, [sp], #4
|
|
80055da: 4770 bx lr
|
|
80055dc: 20000a08 .word 0x20000a08
|
|
80055e0: 20000a64 .word 0x20000a64
|
|
|
|
080055e4 <vListInitialise>:
|
|
/*-----------------------------------------------------------
|
|
* PUBLIC LIST API documented in list.h
|
|
*----------------------------------------------------------*/
|
|
|
|
void vListInitialise( List_t * const pxList )
|
|
{
|
|
80055e4: b480 push {r7}
|
|
80055e6: b083 sub sp, #12
|
|
80055e8: af00 add r7, sp, #0
|
|
80055ea: 6078 str r0, [r7, #4]
|
|
/* The list structure contains a list item which is used to mark the
|
|
end of the list. To initialise the list the list end is inserted
|
|
as the only list entry. */
|
|
pxList->pxIndex = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */
|
|
80055ec: 687b ldr r3, [r7, #4]
|
|
80055ee: f103 0208 add.w r2, r3, #8
|
|
80055f2: 687b ldr r3, [r7, #4]
|
|
80055f4: 605a str r2, [r3, #4]
|
|
|
|
/* The list end value is the highest possible value in the list to
|
|
ensure it remains at the end of the list. */
|
|
pxList->xListEnd.xItemValue = portMAX_DELAY;
|
|
80055f6: 687b ldr r3, [r7, #4]
|
|
80055f8: f04f 32ff mov.w r2, #4294967295
|
|
80055fc: 609a str r2, [r3, #8]
|
|
|
|
/* The list end next and previous pointers point to itself so we know
|
|
when the list is empty. */
|
|
pxList->xListEnd.pxNext = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */
|
|
80055fe: 687b ldr r3, [r7, #4]
|
|
8005600: f103 0208 add.w r2, r3, #8
|
|
8005604: 687b ldr r3, [r7, #4]
|
|
8005606: 60da str r2, [r3, #12]
|
|
pxList->xListEnd.pxPrevious = ( ListItem_t * ) &( pxList->xListEnd );/*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */
|
|
8005608: 687b ldr r3, [r7, #4]
|
|
800560a: f103 0208 add.w r2, r3, #8
|
|
800560e: 687b ldr r3, [r7, #4]
|
|
8005610: 611a str r2, [r3, #16]
|
|
|
|
pxList->uxNumberOfItems = ( UBaseType_t ) 0U;
|
|
8005612: 687b ldr r3, [r7, #4]
|
|
8005614: 2200 movs r2, #0
|
|
8005616: 601a str r2, [r3, #0]
|
|
|
|
/* Write known values into the list if
|
|
configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
|
|
listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList );
|
|
listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList );
|
|
}
|
|
8005618: bf00 nop
|
|
800561a: 370c adds r7, #12
|
|
800561c: 46bd mov sp, r7
|
|
800561e: f85d 7b04 ldr.w r7, [sp], #4
|
|
8005622: 4770 bx lr
|
|
|
|
08005624 <vListInitialiseItem>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
void vListInitialiseItem( ListItem_t * const pxItem )
|
|
{
|
|
8005624: b480 push {r7}
|
|
8005626: b083 sub sp, #12
|
|
8005628: af00 add r7, sp, #0
|
|
800562a: 6078 str r0, [r7, #4]
|
|
/* Make sure the list item is not recorded as being on a list. */
|
|
pxItem->pxContainer = NULL;
|
|
800562c: 687b ldr r3, [r7, #4]
|
|
800562e: 2200 movs r2, #0
|
|
8005630: 611a str r2, [r3, #16]
|
|
|
|
/* Write known values into the list item if
|
|
configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
|
|
listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem );
|
|
listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem );
|
|
}
|
|
8005632: bf00 nop
|
|
8005634: 370c adds r7, #12
|
|
8005636: 46bd mov sp, r7
|
|
8005638: f85d 7b04 ldr.w r7, [sp], #4
|
|
800563c: 4770 bx lr
|
|
|
|
0800563e <vListInsertEnd>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem )
|
|
{
|
|
800563e: b480 push {r7}
|
|
8005640: b085 sub sp, #20
|
|
8005642: af00 add r7, sp, #0
|
|
8005644: 6078 str r0, [r7, #4]
|
|
8005646: 6039 str r1, [r7, #0]
|
|
ListItem_t * const pxIndex = pxList->pxIndex;
|
|
8005648: 687b ldr r3, [r7, #4]
|
|
800564a: 685b ldr r3, [r3, #4]
|
|
800564c: 60fb str r3, [r7, #12]
|
|
listTEST_LIST_ITEM_INTEGRITY( pxNewListItem );
|
|
|
|
/* Insert a new list item into pxList, but rather than sort the list,
|
|
makes the new list item the last item to be removed by a call to
|
|
listGET_OWNER_OF_NEXT_ENTRY(). */
|
|
pxNewListItem->pxNext = pxIndex;
|
|
800564e: 683b ldr r3, [r7, #0]
|
|
8005650: 68fa ldr r2, [r7, #12]
|
|
8005652: 605a str r2, [r3, #4]
|
|
pxNewListItem->pxPrevious = pxIndex->pxPrevious;
|
|
8005654: 68fb ldr r3, [r7, #12]
|
|
8005656: 689a ldr r2, [r3, #8]
|
|
8005658: 683b ldr r3, [r7, #0]
|
|
800565a: 609a str r2, [r3, #8]
|
|
|
|
/* Only used during decision coverage testing. */
|
|
mtCOVERAGE_TEST_DELAY();
|
|
|
|
pxIndex->pxPrevious->pxNext = pxNewListItem;
|
|
800565c: 68fb ldr r3, [r7, #12]
|
|
800565e: 689b ldr r3, [r3, #8]
|
|
8005660: 683a ldr r2, [r7, #0]
|
|
8005662: 605a str r2, [r3, #4]
|
|
pxIndex->pxPrevious = pxNewListItem;
|
|
8005664: 68fb ldr r3, [r7, #12]
|
|
8005666: 683a ldr r2, [r7, #0]
|
|
8005668: 609a str r2, [r3, #8]
|
|
|
|
/* Remember which list the item is in. */
|
|
pxNewListItem->pxContainer = pxList;
|
|
800566a: 683b ldr r3, [r7, #0]
|
|
800566c: 687a ldr r2, [r7, #4]
|
|
800566e: 611a str r2, [r3, #16]
|
|
|
|
( pxList->uxNumberOfItems )++;
|
|
8005670: 687b ldr r3, [r7, #4]
|
|
8005672: 681b ldr r3, [r3, #0]
|
|
8005674: 1c5a adds r2, r3, #1
|
|
8005676: 687b ldr r3, [r7, #4]
|
|
8005678: 601a str r2, [r3, #0]
|
|
}
|
|
800567a: bf00 nop
|
|
800567c: 3714 adds r7, #20
|
|
800567e: 46bd mov sp, r7
|
|
8005680: f85d 7b04 ldr.w r7, [sp], #4
|
|
8005684: 4770 bx lr
|
|
|
|
08005686 <vListInsert>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem )
|
|
{
|
|
8005686: b480 push {r7}
|
|
8005688: b085 sub sp, #20
|
|
800568a: af00 add r7, sp, #0
|
|
800568c: 6078 str r0, [r7, #4]
|
|
800568e: 6039 str r1, [r7, #0]
|
|
ListItem_t *pxIterator;
|
|
const TickType_t xValueOfInsertion = pxNewListItem->xItemValue;
|
|
8005690: 683b ldr r3, [r7, #0]
|
|
8005692: 681b ldr r3, [r3, #0]
|
|
8005694: 60bb str r3, [r7, #8]
|
|
new list item should be placed after it. This ensures that TCBs which are
|
|
stored in ready lists (all of which have the same xItemValue value) get a
|
|
share of the CPU. However, if the xItemValue is the same as the back marker
|
|
the iteration loop below will not end. Therefore the value is checked
|
|
first, and the algorithm slightly modified if necessary. */
|
|
if( xValueOfInsertion == portMAX_DELAY )
|
|
8005696: 68bb ldr r3, [r7, #8]
|
|
8005698: f1b3 3fff cmp.w r3, #4294967295
|
|
800569c: d103 bne.n 80056a6 <vListInsert+0x20>
|
|
{
|
|
pxIterator = pxList->xListEnd.pxPrevious;
|
|
800569e: 687b ldr r3, [r7, #4]
|
|
80056a0: 691b ldr r3, [r3, #16]
|
|
80056a2: 60fb str r3, [r7, #12]
|
|
80056a4: e00c b.n 80056c0 <vListInsert+0x3a>
|
|
4) Using a queue or semaphore before it has been initialised or
|
|
before the scheduler has been started (are interrupts firing
|
|
before vTaskStartScheduler() has been called?).
|
|
**********************************************************************/
|
|
|
|
for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. *//*lint !e440 The iterator moves to a different value, not xValueOfInsertion. */
|
|
80056a6: 687b ldr r3, [r7, #4]
|
|
80056a8: 3308 adds r3, #8
|
|
80056aa: 60fb str r3, [r7, #12]
|
|
80056ac: e002 b.n 80056b4 <vListInsert+0x2e>
|
|
80056ae: 68fb ldr r3, [r7, #12]
|
|
80056b0: 685b ldr r3, [r3, #4]
|
|
80056b2: 60fb str r3, [r7, #12]
|
|
80056b4: 68fb ldr r3, [r7, #12]
|
|
80056b6: 685b ldr r3, [r3, #4]
|
|
80056b8: 681b ldr r3, [r3, #0]
|
|
80056ba: 68ba ldr r2, [r7, #8]
|
|
80056bc: 429a cmp r2, r3
|
|
80056be: d2f6 bcs.n 80056ae <vListInsert+0x28>
|
|
/* There is nothing to do here, just iterating to the wanted
|
|
insertion position. */
|
|
}
|
|
}
|
|
|
|
pxNewListItem->pxNext = pxIterator->pxNext;
|
|
80056c0: 68fb ldr r3, [r7, #12]
|
|
80056c2: 685a ldr r2, [r3, #4]
|
|
80056c4: 683b ldr r3, [r7, #0]
|
|
80056c6: 605a str r2, [r3, #4]
|
|
pxNewListItem->pxNext->pxPrevious = pxNewListItem;
|
|
80056c8: 683b ldr r3, [r7, #0]
|
|
80056ca: 685b ldr r3, [r3, #4]
|
|
80056cc: 683a ldr r2, [r7, #0]
|
|
80056ce: 609a str r2, [r3, #8]
|
|
pxNewListItem->pxPrevious = pxIterator;
|
|
80056d0: 683b ldr r3, [r7, #0]
|
|
80056d2: 68fa ldr r2, [r7, #12]
|
|
80056d4: 609a str r2, [r3, #8]
|
|
pxIterator->pxNext = pxNewListItem;
|
|
80056d6: 68fb ldr r3, [r7, #12]
|
|
80056d8: 683a ldr r2, [r7, #0]
|
|
80056da: 605a str r2, [r3, #4]
|
|
|
|
/* Remember which list the item is in. This allows fast removal of the
|
|
item later. */
|
|
pxNewListItem->pxContainer = pxList;
|
|
80056dc: 683b ldr r3, [r7, #0]
|
|
80056de: 687a ldr r2, [r7, #4]
|
|
80056e0: 611a str r2, [r3, #16]
|
|
|
|
( pxList->uxNumberOfItems )++;
|
|
80056e2: 687b ldr r3, [r7, #4]
|
|
80056e4: 681b ldr r3, [r3, #0]
|
|
80056e6: 1c5a adds r2, r3, #1
|
|
80056e8: 687b ldr r3, [r7, #4]
|
|
80056ea: 601a str r2, [r3, #0]
|
|
}
|
|
80056ec: bf00 nop
|
|
80056ee: 3714 adds r7, #20
|
|
80056f0: 46bd mov sp, r7
|
|
80056f2: f85d 7b04 ldr.w r7, [sp], #4
|
|
80056f6: 4770 bx lr
|
|
|
|
080056f8 <uxListRemove>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
|
|
{
|
|
80056f8: b480 push {r7}
|
|
80056fa: b085 sub sp, #20
|
|
80056fc: af00 add r7, sp, #0
|
|
80056fe: 6078 str r0, [r7, #4]
|
|
/* The list item knows which list it is in. Obtain the list from the list
|
|
item. */
|
|
List_t * const pxList = pxItemToRemove->pxContainer;
|
|
8005700: 687b ldr r3, [r7, #4]
|
|
8005702: 691b ldr r3, [r3, #16]
|
|
8005704: 60fb str r3, [r7, #12]
|
|
|
|
pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious;
|
|
8005706: 687b ldr r3, [r7, #4]
|
|
8005708: 685b ldr r3, [r3, #4]
|
|
800570a: 687a ldr r2, [r7, #4]
|
|
800570c: 6892 ldr r2, [r2, #8]
|
|
800570e: 609a str r2, [r3, #8]
|
|
pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext;
|
|
8005710: 687b ldr r3, [r7, #4]
|
|
8005712: 689b ldr r3, [r3, #8]
|
|
8005714: 687a ldr r2, [r7, #4]
|
|
8005716: 6852 ldr r2, [r2, #4]
|
|
8005718: 605a str r2, [r3, #4]
|
|
|
|
/* Only used during decision coverage testing. */
|
|
mtCOVERAGE_TEST_DELAY();
|
|
|
|
/* Make sure the index is left pointing to a valid item. */
|
|
if( pxList->pxIndex == pxItemToRemove )
|
|
800571a: 68fb ldr r3, [r7, #12]
|
|
800571c: 685b ldr r3, [r3, #4]
|
|
800571e: 687a ldr r2, [r7, #4]
|
|
8005720: 429a cmp r2, r3
|
|
8005722: d103 bne.n 800572c <uxListRemove+0x34>
|
|
{
|
|
pxList->pxIndex = pxItemToRemove->pxPrevious;
|
|
8005724: 687b ldr r3, [r7, #4]
|
|
8005726: 689a ldr r2, [r3, #8]
|
|
8005728: 68fb ldr r3, [r7, #12]
|
|
800572a: 605a str r2, [r3, #4]
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
pxItemToRemove->pxContainer = NULL;
|
|
800572c: 687b ldr r3, [r7, #4]
|
|
800572e: 2200 movs r2, #0
|
|
8005730: 611a str r2, [r3, #16]
|
|
( pxList->uxNumberOfItems )--;
|
|
8005732: 68fb ldr r3, [r7, #12]
|
|
8005734: 681b ldr r3, [r3, #0]
|
|
8005736: 1e5a subs r2, r3, #1
|
|
8005738: 68fb ldr r3, [r7, #12]
|
|
800573a: 601a str r2, [r3, #0]
|
|
|
|
return pxList->uxNumberOfItems;
|
|
800573c: 68fb ldr r3, [r7, #12]
|
|
800573e: 681b ldr r3, [r3, #0]
|
|
}
|
|
8005740: 4618 mov r0, r3
|
|
8005742: 3714 adds r7, #20
|
|
8005744: 46bd mov sp, r7
|
|
8005746: f85d 7b04 ldr.w r7, [sp], #4
|
|
800574a: 4770 bx lr
|
|
|
|
0800574c <xQueueGenericReset>:
|
|
} \
|
|
taskEXIT_CRITICAL()
|
|
/*-----------------------------------------------------------*/
|
|
|
|
BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue )
|
|
{
|
|
800574c: b580 push {r7, lr}
|
|
800574e: b084 sub sp, #16
|
|
8005750: af00 add r7, sp, #0
|
|
8005752: 6078 str r0, [r7, #4]
|
|
8005754: 6039 str r1, [r7, #0]
|
|
Queue_t * const pxQueue = xQueue;
|
|
8005756: 687b ldr r3, [r7, #4]
|
|
8005758: 60fb str r3, [r7, #12]
|
|
|
|
configASSERT( pxQueue );
|
|
800575a: 68fb ldr r3, [r7, #12]
|
|
800575c: 2b00 cmp r3, #0
|
|
800575e: d10b bne.n 8005778 <xQueueGenericReset+0x2c>
|
|
|
|
portFORCE_INLINE static void vPortRaiseBASEPRI( void )
|
|
{
|
|
uint32_t ulNewBASEPRI;
|
|
|
|
__asm volatile
|
|
8005760: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005764: f383 8811 msr BASEPRI, r3
|
|
8005768: f3bf 8f6f isb sy
|
|
800576c: f3bf 8f4f dsb sy
|
|
8005770: 60bb str r3, [r7, #8]
|
|
" msr basepri, %0 \n" \
|
|
" isb \n" \
|
|
" dsb \n" \
|
|
:"=r" (ulNewBASEPRI) : "i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY ) : "memory"
|
|
);
|
|
}
|
|
8005772: bf00 nop
|
|
8005774: bf00 nop
|
|
8005776: e7fd b.n 8005774 <xQueueGenericReset+0x28>
|
|
|
|
taskENTER_CRITICAL();
|
|
8005778: f002 fd1e bl 80081b8 <vPortEnterCritical>
|
|
{
|
|
pxQueue->u.xQueue.pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */
|
|
800577c: 68fb ldr r3, [r7, #12]
|
|
800577e: 681a ldr r2, [r3, #0]
|
|
8005780: 68fb ldr r3, [r7, #12]
|
|
8005782: 6bdb ldr r3, [r3, #60] @ 0x3c
|
|
8005784: 68f9 ldr r1, [r7, #12]
|
|
8005786: 6c09 ldr r1, [r1, #64] @ 0x40
|
|
8005788: fb01 f303 mul.w r3, r1, r3
|
|
800578c: 441a add r2, r3
|
|
800578e: 68fb ldr r3, [r7, #12]
|
|
8005790: 609a str r2, [r3, #8]
|
|
pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U;
|
|
8005792: 68fb ldr r3, [r7, #12]
|
|
8005794: 2200 movs r2, #0
|
|
8005796: 639a str r2, [r3, #56] @ 0x38
|
|
pxQueue->pcWriteTo = pxQueue->pcHead;
|
|
8005798: 68fb ldr r3, [r7, #12]
|
|
800579a: 681a ldr r2, [r3, #0]
|
|
800579c: 68fb ldr r3, [r7, #12]
|
|
800579e: 605a str r2, [r3, #4]
|
|
pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - 1U ) * pxQueue->uxItemSize ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */
|
|
80057a0: 68fb ldr r3, [r7, #12]
|
|
80057a2: 681a ldr r2, [r3, #0]
|
|
80057a4: 68fb ldr r3, [r7, #12]
|
|
80057a6: 6bdb ldr r3, [r3, #60] @ 0x3c
|
|
80057a8: 3b01 subs r3, #1
|
|
80057aa: 68f9 ldr r1, [r7, #12]
|
|
80057ac: 6c09 ldr r1, [r1, #64] @ 0x40
|
|
80057ae: fb01 f303 mul.w r3, r1, r3
|
|
80057b2: 441a add r2, r3
|
|
80057b4: 68fb ldr r3, [r7, #12]
|
|
80057b6: 60da str r2, [r3, #12]
|
|
pxQueue->cRxLock = queueUNLOCKED;
|
|
80057b8: 68fb ldr r3, [r7, #12]
|
|
80057ba: 22ff movs r2, #255 @ 0xff
|
|
80057bc: f883 2044 strb.w r2, [r3, #68] @ 0x44
|
|
pxQueue->cTxLock = queueUNLOCKED;
|
|
80057c0: 68fb ldr r3, [r7, #12]
|
|
80057c2: 22ff movs r2, #255 @ 0xff
|
|
80057c4: f883 2045 strb.w r2, [r3, #69] @ 0x45
|
|
|
|
if( xNewQueue == pdFALSE )
|
|
80057c8: 683b ldr r3, [r7, #0]
|
|
80057ca: 2b00 cmp r3, #0
|
|
80057cc: d114 bne.n 80057f8 <xQueueGenericReset+0xac>
|
|
/* If there are tasks blocked waiting to read from the queue, then
|
|
the tasks will remain blocked as after this function exits the queue
|
|
will still be empty. If there are tasks blocked waiting to write to
|
|
the queue, then one should be unblocked as after this function exits
|
|
it will be possible to write to it. */
|
|
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
|
|
80057ce: 68fb ldr r3, [r7, #12]
|
|
80057d0: 691b ldr r3, [r3, #16]
|
|
80057d2: 2b00 cmp r3, #0
|
|
80057d4: d01a beq.n 800580c <xQueueGenericReset+0xc0>
|
|
{
|
|
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
|
|
80057d6: 68fb ldr r3, [r7, #12]
|
|
80057d8: 3310 adds r3, #16
|
|
80057da: 4618 mov r0, r3
|
|
80057dc: f001 fcc0 bl 8007160 <xTaskRemoveFromEventList>
|
|
80057e0: 4603 mov r3, r0
|
|
80057e2: 2b00 cmp r3, #0
|
|
80057e4: d012 beq.n 800580c <xQueueGenericReset+0xc0>
|
|
{
|
|
queueYIELD_IF_USING_PREEMPTION();
|
|
80057e6: 4b0d ldr r3, [pc, #52] @ (800581c <xQueueGenericReset+0xd0>)
|
|
80057e8: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
80057ec: 601a str r2, [r3, #0]
|
|
80057ee: f3bf 8f4f dsb sy
|
|
80057f2: f3bf 8f6f isb sy
|
|
80057f6: e009 b.n 800580c <xQueueGenericReset+0xc0>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Ensure the event queues start in the correct state. */
|
|
vListInitialise( &( pxQueue->xTasksWaitingToSend ) );
|
|
80057f8: 68fb ldr r3, [r7, #12]
|
|
80057fa: 3310 adds r3, #16
|
|
80057fc: 4618 mov r0, r3
|
|
80057fe: f7ff fef1 bl 80055e4 <vListInitialise>
|
|
vListInitialise( &( pxQueue->xTasksWaitingToReceive ) );
|
|
8005802: 68fb ldr r3, [r7, #12]
|
|
8005804: 3324 adds r3, #36 @ 0x24
|
|
8005806: 4618 mov r0, r3
|
|
8005808: f7ff feec bl 80055e4 <vListInitialise>
|
|
}
|
|
}
|
|
taskEXIT_CRITICAL();
|
|
800580c: f002 fd06 bl 800821c <vPortExitCritical>
|
|
|
|
/* A value is returned for calling semantic consistency with previous
|
|
versions. */
|
|
return pdPASS;
|
|
8005810: 2301 movs r3, #1
|
|
}
|
|
8005812: 4618 mov r0, r3
|
|
8005814: 3710 adds r7, #16
|
|
8005816: 46bd mov sp, r7
|
|
8005818: bd80 pop {r7, pc}
|
|
800581a: bf00 nop
|
|
800581c: e000ed04 .word 0xe000ed04
|
|
|
|
08005820 <xQueueGenericCreateStatic>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
|
|
|
|
QueueHandle_t xQueueGenericCreateStatic( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, uint8_t *pucQueueStorage, StaticQueue_t *pxStaticQueue, const uint8_t ucQueueType )
|
|
{
|
|
8005820: b580 push {r7, lr}
|
|
8005822: b08e sub sp, #56 @ 0x38
|
|
8005824: af02 add r7, sp, #8
|
|
8005826: 60f8 str r0, [r7, #12]
|
|
8005828: 60b9 str r1, [r7, #8]
|
|
800582a: 607a str r2, [r7, #4]
|
|
800582c: 603b str r3, [r7, #0]
|
|
Queue_t *pxNewQueue;
|
|
|
|
configASSERT( uxQueueLength > ( UBaseType_t ) 0 );
|
|
800582e: 68fb ldr r3, [r7, #12]
|
|
8005830: 2b00 cmp r3, #0
|
|
8005832: d10b bne.n 800584c <xQueueGenericCreateStatic+0x2c>
|
|
__asm volatile
|
|
8005834: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005838: f383 8811 msr BASEPRI, r3
|
|
800583c: f3bf 8f6f isb sy
|
|
8005840: f3bf 8f4f dsb sy
|
|
8005844: 62bb str r3, [r7, #40] @ 0x28
|
|
}
|
|
8005846: bf00 nop
|
|
8005848: bf00 nop
|
|
800584a: e7fd b.n 8005848 <xQueueGenericCreateStatic+0x28>
|
|
|
|
/* The StaticQueue_t structure and the queue storage area must be
|
|
supplied. */
|
|
configASSERT( pxStaticQueue != NULL );
|
|
800584c: 683b ldr r3, [r7, #0]
|
|
800584e: 2b00 cmp r3, #0
|
|
8005850: d10b bne.n 800586a <xQueueGenericCreateStatic+0x4a>
|
|
__asm volatile
|
|
8005852: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005856: f383 8811 msr BASEPRI, r3
|
|
800585a: f3bf 8f6f isb sy
|
|
800585e: f3bf 8f4f dsb sy
|
|
8005862: 627b str r3, [r7, #36] @ 0x24
|
|
}
|
|
8005864: bf00 nop
|
|
8005866: bf00 nop
|
|
8005868: e7fd b.n 8005866 <xQueueGenericCreateStatic+0x46>
|
|
|
|
/* A queue storage area should be provided if the item size is not 0, and
|
|
should not be provided if the item size is 0. */
|
|
configASSERT( !( ( pucQueueStorage != NULL ) && ( uxItemSize == 0 ) ) );
|
|
800586a: 687b ldr r3, [r7, #4]
|
|
800586c: 2b00 cmp r3, #0
|
|
800586e: d002 beq.n 8005876 <xQueueGenericCreateStatic+0x56>
|
|
8005870: 68bb ldr r3, [r7, #8]
|
|
8005872: 2b00 cmp r3, #0
|
|
8005874: d001 beq.n 800587a <xQueueGenericCreateStatic+0x5a>
|
|
8005876: 2301 movs r3, #1
|
|
8005878: e000 b.n 800587c <xQueueGenericCreateStatic+0x5c>
|
|
800587a: 2300 movs r3, #0
|
|
800587c: 2b00 cmp r3, #0
|
|
800587e: d10b bne.n 8005898 <xQueueGenericCreateStatic+0x78>
|
|
__asm volatile
|
|
8005880: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005884: f383 8811 msr BASEPRI, r3
|
|
8005888: f3bf 8f6f isb sy
|
|
800588c: f3bf 8f4f dsb sy
|
|
8005890: 623b str r3, [r7, #32]
|
|
}
|
|
8005892: bf00 nop
|
|
8005894: bf00 nop
|
|
8005896: e7fd b.n 8005894 <xQueueGenericCreateStatic+0x74>
|
|
configASSERT( !( ( pucQueueStorage == NULL ) && ( uxItemSize != 0 ) ) );
|
|
8005898: 687b ldr r3, [r7, #4]
|
|
800589a: 2b00 cmp r3, #0
|
|
800589c: d102 bne.n 80058a4 <xQueueGenericCreateStatic+0x84>
|
|
800589e: 68bb ldr r3, [r7, #8]
|
|
80058a0: 2b00 cmp r3, #0
|
|
80058a2: d101 bne.n 80058a8 <xQueueGenericCreateStatic+0x88>
|
|
80058a4: 2301 movs r3, #1
|
|
80058a6: e000 b.n 80058aa <xQueueGenericCreateStatic+0x8a>
|
|
80058a8: 2300 movs r3, #0
|
|
80058aa: 2b00 cmp r3, #0
|
|
80058ac: d10b bne.n 80058c6 <xQueueGenericCreateStatic+0xa6>
|
|
__asm volatile
|
|
80058ae: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80058b2: f383 8811 msr BASEPRI, r3
|
|
80058b6: f3bf 8f6f isb sy
|
|
80058ba: f3bf 8f4f dsb sy
|
|
80058be: 61fb str r3, [r7, #28]
|
|
}
|
|
80058c0: bf00 nop
|
|
80058c2: bf00 nop
|
|
80058c4: e7fd b.n 80058c2 <xQueueGenericCreateStatic+0xa2>
|
|
#if( configASSERT_DEFINED == 1 )
|
|
{
|
|
/* Sanity check that the size of the structure used to declare a
|
|
variable of type StaticQueue_t or StaticSemaphore_t equals the size of
|
|
the real queue and semaphore structures. */
|
|
volatile size_t xSize = sizeof( StaticQueue_t );
|
|
80058c6: 2350 movs r3, #80 @ 0x50
|
|
80058c8: 617b str r3, [r7, #20]
|
|
configASSERT( xSize == sizeof( Queue_t ) );
|
|
80058ca: 697b ldr r3, [r7, #20]
|
|
80058cc: 2b50 cmp r3, #80 @ 0x50
|
|
80058ce: d00b beq.n 80058e8 <xQueueGenericCreateStatic+0xc8>
|
|
__asm volatile
|
|
80058d0: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80058d4: f383 8811 msr BASEPRI, r3
|
|
80058d8: f3bf 8f6f isb sy
|
|
80058dc: f3bf 8f4f dsb sy
|
|
80058e0: 61bb str r3, [r7, #24]
|
|
}
|
|
80058e2: bf00 nop
|
|
80058e4: bf00 nop
|
|
80058e6: e7fd b.n 80058e4 <xQueueGenericCreateStatic+0xc4>
|
|
( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */
|
|
80058e8: 697b ldr r3, [r7, #20]
|
|
#endif /* configASSERT_DEFINED */
|
|
|
|
/* The address of a statically allocated queue was passed in, use it.
|
|
The address of a statically allocated storage area was also passed in
|
|
but is already set. */
|
|
pxNewQueue = ( Queue_t * ) pxStaticQueue; /*lint !e740 !e9087 Unusual cast is ok as the structures are designed to have the same alignment, and the size is checked by an assert. */
|
|
80058ea: 683b ldr r3, [r7, #0]
|
|
80058ec: 62fb str r3, [r7, #44] @ 0x2c
|
|
|
|
if( pxNewQueue != NULL )
|
|
80058ee: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
80058f0: 2b00 cmp r3, #0
|
|
80058f2: d00d beq.n 8005910 <xQueueGenericCreateStatic+0xf0>
|
|
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
|
{
|
|
/* Queues can be allocated wither statically or dynamically, so
|
|
note this queue was allocated statically in case the queue is
|
|
later deleted. */
|
|
pxNewQueue->ucStaticallyAllocated = pdTRUE;
|
|
80058f4: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
80058f6: 2201 movs r2, #1
|
|
80058f8: f883 2046 strb.w r2, [r3, #70] @ 0x46
|
|
}
|
|
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
|
|
|
|
prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue );
|
|
80058fc: f897 2038 ldrb.w r2, [r7, #56] @ 0x38
|
|
8005900: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8005902: 9300 str r3, [sp, #0]
|
|
8005904: 4613 mov r3, r2
|
|
8005906: 687a ldr r2, [r7, #4]
|
|
8005908: 68b9 ldr r1, [r7, #8]
|
|
800590a: 68f8 ldr r0, [r7, #12]
|
|
800590c: f000 f840 bl 8005990 <prvInitialiseNewQueue>
|
|
{
|
|
traceQUEUE_CREATE_FAILED( ucQueueType );
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
return pxNewQueue;
|
|
8005910: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
}
|
|
8005912: 4618 mov r0, r3
|
|
8005914: 3730 adds r7, #48 @ 0x30
|
|
8005916: 46bd mov sp, r7
|
|
8005918: bd80 pop {r7, pc}
|
|
|
|
0800591a <xQueueGenericCreate>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
|
|
|
QueueHandle_t xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType )
|
|
{
|
|
800591a: b580 push {r7, lr}
|
|
800591c: b08a sub sp, #40 @ 0x28
|
|
800591e: af02 add r7, sp, #8
|
|
8005920: 60f8 str r0, [r7, #12]
|
|
8005922: 60b9 str r1, [r7, #8]
|
|
8005924: 4613 mov r3, r2
|
|
8005926: 71fb strb r3, [r7, #7]
|
|
Queue_t *pxNewQueue;
|
|
size_t xQueueSizeInBytes;
|
|
uint8_t *pucQueueStorage;
|
|
|
|
configASSERT( uxQueueLength > ( UBaseType_t ) 0 );
|
|
8005928: 68fb ldr r3, [r7, #12]
|
|
800592a: 2b00 cmp r3, #0
|
|
800592c: d10b bne.n 8005946 <xQueueGenericCreate+0x2c>
|
|
__asm volatile
|
|
800592e: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005932: f383 8811 msr BASEPRI, r3
|
|
8005936: f3bf 8f6f isb sy
|
|
800593a: f3bf 8f4f dsb sy
|
|
800593e: 613b str r3, [r7, #16]
|
|
}
|
|
8005940: bf00 nop
|
|
8005942: bf00 nop
|
|
8005944: e7fd b.n 8005942 <xQueueGenericCreate+0x28>
|
|
|
|
/* Allocate enough space to hold the maximum number of items that
|
|
can be in the queue at any time. It is valid for uxItemSize to be
|
|
zero in the case the queue is used as a semaphore. */
|
|
xQueueSizeInBytes = ( size_t ) ( uxQueueLength * uxItemSize ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
|
|
8005946: 68fb ldr r3, [r7, #12]
|
|
8005948: 68ba ldr r2, [r7, #8]
|
|
800594a: fb02 f303 mul.w r3, r2, r3
|
|
800594e: 61fb str r3, [r7, #28]
|
|
alignment requirements of the Queue_t structure - which in this case
|
|
is an int8_t *. Therefore, whenever the stack alignment requirements
|
|
are greater than or equal to the pointer to char requirements the cast
|
|
is safe. In other cases alignment requirements are not strict (one or
|
|
two bytes). */
|
|
pxNewQueue = ( Queue_t * ) pvPortMalloc( sizeof( Queue_t ) + xQueueSizeInBytes ); /*lint !e9087 !e9079 see comment above. */
|
|
8005950: 69fb ldr r3, [r7, #28]
|
|
8005952: 3350 adds r3, #80 @ 0x50
|
|
8005954: 4618 mov r0, r3
|
|
8005956: f002 fd51 bl 80083fc <pvPortMalloc>
|
|
800595a: 61b8 str r0, [r7, #24]
|
|
|
|
if( pxNewQueue != NULL )
|
|
800595c: 69bb ldr r3, [r7, #24]
|
|
800595e: 2b00 cmp r3, #0
|
|
8005960: d011 beq.n 8005986 <xQueueGenericCreate+0x6c>
|
|
{
|
|
/* Jump past the queue structure to find the location of the queue
|
|
storage area. */
|
|
pucQueueStorage = ( uint8_t * ) pxNewQueue;
|
|
8005962: 69bb ldr r3, [r7, #24]
|
|
8005964: 617b str r3, [r7, #20]
|
|
pucQueueStorage += sizeof( Queue_t ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */
|
|
8005966: 697b ldr r3, [r7, #20]
|
|
8005968: 3350 adds r3, #80 @ 0x50
|
|
800596a: 617b str r3, [r7, #20]
|
|
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
|
|
{
|
|
/* Queues can be created either statically or dynamically, so
|
|
note this task was created dynamically in case it is later
|
|
deleted. */
|
|
pxNewQueue->ucStaticallyAllocated = pdFALSE;
|
|
800596c: 69bb ldr r3, [r7, #24]
|
|
800596e: 2200 movs r2, #0
|
|
8005970: f883 2046 strb.w r2, [r3, #70] @ 0x46
|
|
}
|
|
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
|
|
|
prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue );
|
|
8005974: 79fa ldrb r2, [r7, #7]
|
|
8005976: 69bb ldr r3, [r7, #24]
|
|
8005978: 9300 str r3, [sp, #0]
|
|
800597a: 4613 mov r3, r2
|
|
800597c: 697a ldr r2, [r7, #20]
|
|
800597e: 68b9 ldr r1, [r7, #8]
|
|
8005980: 68f8 ldr r0, [r7, #12]
|
|
8005982: f000 f805 bl 8005990 <prvInitialiseNewQueue>
|
|
{
|
|
traceQUEUE_CREATE_FAILED( ucQueueType );
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
return pxNewQueue;
|
|
8005986: 69bb ldr r3, [r7, #24]
|
|
}
|
|
8005988: 4618 mov r0, r3
|
|
800598a: 3720 adds r7, #32
|
|
800598c: 46bd mov sp, r7
|
|
800598e: bd80 pop {r7, pc}
|
|
|
|
08005990 <prvInitialiseNewQueue>:
|
|
|
|
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, uint8_t *pucQueueStorage, const uint8_t ucQueueType, Queue_t *pxNewQueue )
|
|
{
|
|
8005990: b580 push {r7, lr}
|
|
8005992: b084 sub sp, #16
|
|
8005994: af00 add r7, sp, #0
|
|
8005996: 60f8 str r0, [r7, #12]
|
|
8005998: 60b9 str r1, [r7, #8]
|
|
800599a: 607a str r2, [r7, #4]
|
|
800599c: 70fb strb r3, [r7, #3]
|
|
/* Remove compiler warnings about unused parameters should
|
|
configUSE_TRACE_FACILITY not be set to 1. */
|
|
( void ) ucQueueType;
|
|
|
|
if( uxItemSize == ( UBaseType_t ) 0 )
|
|
800599e: 68bb ldr r3, [r7, #8]
|
|
80059a0: 2b00 cmp r3, #0
|
|
80059a2: d103 bne.n 80059ac <prvInitialiseNewQueue+0x1c>
|
|
{
|
|
/* No RAM was allocated for the queue storage area, but PC head cannot
|
|
be set to NULL because NULL is used as a key to say the queue is used as
|
|
a mutex. Therefore just set pcHead to point to the queue as a benign
|
|
value that is known to be within the memory map. */
|
|
pxNewQueue->pcHead = ( int8_t * ) pxNewQueue;
|
|
80059a4: 69bb ldr r3, [r7, #24]
|
|
80059a6: 69ba ldr r2, [r7, #24]
|
|
80059a8: 601a str r2, [r3, #0]
|
|
80059aa: e002 b.n 80059b2 <prvInitialiseNewQueue+0x22>
|
|
}
|
|
else
|
|
{
|
|
/* Set the head to the start of the queue storage area. */
|
|
pxNewQueue->pcHead = ( int8_t * ) pucQueueStorage;
|
|
80059ac: 69bb ldr r3, [r7, #24]
|
|
80059ae: 687a ldr r2, [r7, #4]
|
|
80059b0: 601a str r2, [r3, #0]
|
|
}
|
|
|
|
/* Initialise the queue members as described where the queue type is
|
|
defined. */
|
|
pxNewQueue->uxLength = uxQueueLength;
|
|
80059b2: 69bb ldr r3, [r7, #24]
|
|
80059b4: 68fa ldr r2, [r7, #12]
|
|
80059b6: 63da str r2, [r3, #60] @ 0x3c
|
|
pxNewQueue->uxItemSize = uxItemSize;
|
|
80059b8: 69bb ldr r3, [r7, #24]
|
|
80059ba: 68ba ldr r2, [r7, #8]
|
|
80059bc: 641a str r2, [r3, #64] @ 0x40
|
|
( void ) xQueueGenericReset( pxNewQueue, pdTRUE );
|
|
80059be: 2101 movs r1, #1
|
|
80059c0: 69b8 ldr r0, [r7, #24]
|
|
80059c2: f7ff fec3 bl 800574c <xQueueGenericReset>
|
|
|
|
#if ( configUSE_TRACE_FACILITY == 1 )
|
|
{
|
|
pxNewQueue->ucQueueType = ucQueueType;
|
|
80059c6: 69bb ldr r3, [r7, #24]
|
|
80059c8: 78fa ldrb r2, [r7, #3]
|
|
80059ca: f883 204c strb.w r2, [r3, #76] @ 0x4c
|
|
pxNewQueue->pxQueueSetContainer = NULL;
|
|
}
|
|
#endif /* configUSE_QUEUE_SETS */
|
|
|
|
traceQUEUE_CREATE( pxNewQueue );
|
|
}
|
|
80059ce: bf00 nop
|
|
80059d0: 3710 adds r7, #16
|
|
80059d2: 46bd mov sp, r7
|
|
80059d4: bd80 pop {r7, pc}
|
|
|
|
080059d6 <xQueueCreateCountingSemaphoreStatic>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
|
|
|
|
QueueHandle_t xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue )
|
|
{
|
|
80059d6: b580 push {r7, lr}
|
|
80059d8: b08a sub sp, #40 @ 0x28
|
|
80059da: af02 add r7, sp, #8
|
|
80059dc: 60f8 str r0, [r7, #12]
|
|
80059de: 60b9 str r1, [r7, #8]
|
|
80059e0: 607a str r2, [r7, #4]
|
|
QueueHandle_t xHandle;
|
|
|
|
configASSERT( uxMaxCount != 0 );
|
|
80059e2: 68fb ldr r3, [r7, #12]
|
|
80059e4: 2b00 cmp r3, #0
|
|
80059e6: d10b bne.n 8005a00 <xQueueCreateCountingSemaphoreStatic+0x2a>
|
|
__asm volatile
|
|
80059e8: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80059ec: f383 8811 msr BASEPRI, r3
|
|
80059f0: f3bf 8f6f isb sy
|
|
80059f4: f3bf 8f4f dsb sy
|
|
80059f8: 61bb str r3, [r7, #24]
|
|
}
|
|
80059fa: bf00 nop
|
|
80059fc: bf00 nop
|
|
80059fe: e7fd b.n 80059fc <xQueueCreateCountingSemaphoreStatic+0x26>
|
|
configASSERT( uxInitialCount <= uxMaxCount );
|
|
8005a00: 68ba ldr r2, [r7, #8]
|
|
8005a02: 68fb ldr r3, [r7, #12]
|
|
8005a04: 429a cmp r2, r3
|
|
8005a06: d90b bls.n 8005a20 <xQueueCreateCountingSemaphoreStatic+0x4a>
|
|
__asm volatile
|
|
8005a08: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005a0c: f383 8811 msr BASEPRI, r3
|
|
8005a10: f3bf 8f6f isb sy
|
|
8005a14: f3bf 8f4f dsb sy
|
|
8005a18: 617b str r3, [r7, #20]
|
|
}
|
|
8005a1a: bf00 nop
|
|
8005a1c: bf00 nop
|
|
8005a1e: e7fd b.n 8005a1c <xQueueCreateCountingSemaphoreStatic+0x46>
|
|
|
|
xHandle = xQueueGenericCreateStatic( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, NULL, pxStaticQueue, queueQUEUE_TYPE_COUNTING_SEMAPHORE );
|
|
8005a20: 2302 movs r3, #2
|
|
8005a22: 9300 str r3, [sp, #0]
|
|
8005a24: 687b ldr r3, [r7, #4]
|
|
8005a26: 2200 movs r2, #0
|
|
8005a28: 2100 movs r1, #0
|
|
8005a2a: 68f8 ldr r0, [r7, #12]
|
|
8005a2c: f7ff fef8 bl 8005820 <xQueueGenericCreateStatic>
|
|
8005a30: 61f8 str r0, [r7, #28]
|
|
|
|
if( xHandle != NULL )
|
|
8005a32: 69fb ldr r3, [r7, #28]
|
|
8005a34: 2b00 cmp r3, #0
|
|
8005a36: d002 beq.n 8005a3e <xQueueCreateCountingSemaphoreStatic+0x68>
|
|
{
|
|
( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount;
|
|
8005a38: 69fb ldr r3, [r7, #28]
|
|
8005a3a: 68ba ldr r2, [r7, #8]
|
|
8005a3c: 639a str r2, [r3, #56] @ 0x38
|
|
else
|
|
{
|
|
traceCREATE_COUNTING_SEMAPHORE_FAILED();
|
|
}
|
|
|
|
return xHandle;
|
|
8005a3e: 69fb ldr r3, [r7, #28]
|
|
}
|
|
8005a40: 4618 mov r0, r3
|
|
8005a42: 3720 adds r7, #32
|
|
8005a44: 46bd mov sp, r7
|
|
8005a46: bd80 pop {r7, pc}
|
|
|
|
08005a48 <xQueueCreateCountingSemaphore>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
|
|
|
|
QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount )
|
|
{
|
|
8005a48: b580 push {r7, lr}
|
|
8005a4a: b086 sub sp, #24
|
|
8005a4c: af00 add r7, sp, #0
|
|
8005a4e: 6078 str r0, [r7, #4]
|
|
8005a50: 6039 str r1, [r7, #0]
|
|
QueueHandle_t xHandle;
|
|
|
|
configASSERT( uxMaxCount != 0 );
|
|
8005a52: 687b ldr r3, [r7, #4]
|
|
8005a54: 2b00 cmp r3, #0
|
|
8005a56: d10b bne.n 8005a70 <xQueueCreateCountingSemaphore+0x28>
|
|
__asm volatile
|
|
8005a58: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005a5c: f383 8811 msr BASEPRI, r3
|
|
8005a60: f3bf 8f6f isb sy
|
|
8005a64: f3bf 8f4f dsb sy
|
|
8005a68: 613b str r3, [r7, #16]
|
|
}
|
|
8005a6a: bf00 nop
|
|
8005a6c: bf00 nop
|
|
8005a6e: e7fd b.n 8005a6c <xQueueCreateCountingSemaphore+0x24>
|
|
configASSERT( uxInitialCount <= uxMaxCount );
|
|
8005a70: 683a ldr r2, [r7, #0]
|
|
8005a72: 687b ldr r3, [r7, #4]
|
|
8005a74: 429a cmp r2, r3
|
|
8005a76: d90b bls.n 8005a90 <xQueueCreateCountingSemaphore+0x48>
|
|
__asm volatile
|
|
8005a78: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005a7c: f383 8811 msr BASEPRI, r3
|
|
8005a80: f3bf 8f6f isb sy
|
|
8005a84: f3bf 8f4f dsb sy
|
|
8005a88: 60fb str r3, [r7, #12]
|
|
}
|
|
8005a8a: bf00 nop
|
|
8005a8c: bf00 nop
|
|
8005a8e: e7fd b.n 8005a8c <xQueueCreateCountingSemaphore+0x44>
|
|
|
|
xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE );
|
|
8005a90: 2202 movs r2, #2
|
|
8005a92: 2100 movs r1, #0
|
|
8005a94: 6878 ldr r0, [r7, #4]
|
|
8005a96: f7ff ff40 bl 800591a <xQueueGenericCreate>
|
|
8005a9a: 6178 str r0, [r7, #20]
|
|
|
|
if( xHandle != NULL )
|
|
8005a9c: 697b ldr r3, [r7, #20]
|
|
8005a9e: 2b00 cmp r3, #0
|
|
8005aa0: d002 beq.n 8005aa8 <xQueueCreateCountingSemaphore+0x60>
|
|
{
|
|
( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount;
|
|
8005aa2: 697b ldr r3, [r7, #20]
|
|
8005aa4: 683a ldr r2, [r7, #0]
|
|
8005aa6: 639a str r2, [r3, #56] @ 0x38
|
|
else
|
|
{
|
|
traceCREATE_COUNTING_SEMAPHORE_FAILED();
|
|
}
|
|
|
|
return xHandle;
|
|
8005aa8: 697b ldr r3, [r7, #20]
|
|
}
|
|
8005aaa: 4618 mov r0, r3
|
|
8005aac: 3718 adds r7, #24
|
|
8005aae: 46bd mov sp, r7
|
|
8005ab0: bd80 pop {r7, pc}
|
|
...
|
|
|
|
08005ab4 <xQueueGenericSend>:
|
|
|
|
#endif /* ( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) */
|
|
/*-----------------------------------------------------------*/
|
|
|
|
BaseType_t xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition )
|
|
{
|
|
8005ab4: b580 push {r7, lr}
|
|
8005ab6: b08e sub sp, #56 @ 0x38
|
|
8005ab8: af00 add r7, sp, #0
|
|
8005aba: 60f8 str r0, [r7, #12]
|
|
8005abc: 60b9 str r1, [r7, #8]
|
|
8005abe: 607a str r2, [r7, #4]
|
|
8005ac0: 603b str r3, [r7, #0]
|
|
BaseType_t xEntryTimeSet = pdFALSE, xYieldRequired;
|
|
8005ac2: 2300 movs r3, #0
|
|
8005ac4: 637b str r3, [r7, #52] @ 0x34
|
|
TimeOut_t xTimeOut;
|
|
Queue_t * const pxQueue = xQueue;
|
|
8005ac6: 68fb ldr r3, [r7, #12]
|
|
8005ac8: 633b str r3, [r7, #48] @ 0x30
|
|
|
|
configASSERT( pxQueue );
|
|
8005aca: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005acc: 2b00 cmp r3, #0
|
|
8005ace: d10b bne.n 8005ae8 <xQueueGenericSend+0x34>
|
|
__asm volatile
|
|
8005ad0: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005ad4: f383 8811 msr BASEPRI, r3
|
|
8005ad8: f3bf 8f6f isb sy
|
|
8005adc: f3bf 8f4f dsb sy
|
|
8005ae0: 62bb str r3, [r7, #40] @ 0x28
|
|
}
|
|
8005ae2: bf00 nop
|
|
8005ae4: bf00 nop
|
|
8005ae6: e7fd b.n 8005ae4 <xQueueGenericSend+0x30>
|
|
configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
|
|
8005ae8: 68bb ldr r3, [r7, #8]
|
|
8005aea: 2b00 cmp r3, #0
|
|
8005aec: d103 bne.n 8005af6 <xQueueGenericSend+0x42>
|
|
8005aee: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005af0: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
8005af2: 2b00 cmp r3, #0
|
|
8005af4: d101 bne.n 8005afa <xQueueGenericSend+0x46>
|
|
8005af6: 2301 movs r3, #1
|
|
8005af8: e000 b.n 8005afc <xQueueGenericSend+0x48>
|
|
8005afa: 2300 movs r3, #0
|
|
8005afc: 2b00 cmp r3, #0
|
|
8005afe: d10b bne.n 8005b18 <xQueueGenericSend+0x64>
|
|
__asm volatile
|
|
8005b00: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005b04: f383 8811 msr BASEPRI, r3
|
|
8005b08: f3bf 8f6f isb sy
|
|
8005b0c: f3bf 8f4f dsb sy
|
|
8005b10: 627b str r3, [r7, #36] @ 0x24
|
|
}
|
|
8005b12: bf00 nop
|
|
8005b14: bf00 nop
|
|
8005b16: e7fd b.n 8005b14 <xQueueGenericSend+0x60>
|
|
configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
|
|
8005b18: 683b ldr r3, [r7, #0]
|
|
8005b1a: 2b02 cmp r3, #2
|
|
8005b1c: d103 bne.n 8005b26 <xQueueGenericSend+0x72>
|
|
8005b1e: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005b20: 6bdb ldr r3, [r3, #60] @ 0x3c
|
|
8005b22: 2b01 cmp r3, #1
|
|
8005b24: d101 bne.n 8005b2a <xQueueGenericSend+0x76>
|
|
8005b26: 2301 movs r3, #1
|
|
8005b28: e000 b.n 8005b2c <xQueueGenericSend+0x78>
|
|
8005b2a: 2300 movs r3, #0
|
|
8005b2c: 2b00 cmp r3, #0
|
|
8005b2e: d10b bne.n 8005b48 <xQueueGenericSend+0x94>
|
|
__asm volatile
|
|
8005b30: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005b34: f383 8811 msr BASEPRI, r3
|
|
8005b38: f3bf 8f6f isb sy
|
|
8005b3c: f3bf 8f4f dsb sy
|
|
8005b40: 623b str r3, [r7, #32]
|
|
}
|
|
8005b42: bf00 nop
|
|
8005b44: bf00 nop
|
|
8005b46: e7fd b.n 8005b44 <xQueueGenericSend+0x90>
|
|
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
|
|
{
|
|
configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
|
|
8005b48: f001 fcca bl 80074e0 <xTaskGetSchedulerState>
|
|
8005b4c: 4603 mov r3, r0
|
|
8005b4e: 2b00 cmp r3, #0
|
|
8005b50: d102 bne.n 8005b58 <xQueueGenericSend+0xa4>
|
|
8005b52: 687b ldr r3, [r7, #4]
|
|
8005b54: 2b00 cmp r3, #0
|
|
8005b56: d101 bne.n 8005b5c <xQueueGenericSend+0xa8>
|
|
8005b58: 2301 movs r3, #1
|
|
8005b5a: e000 b.n 8005b5e <xQueueGenericSend+0xaa>
|
|
8005b5c: 2300 movs r3, #0
|
|
8005b5e: 2b00 cmp r3, #0
|
|
8005b60: d10b bne.n 8005b7a <xQueueGenericSend+0xc6>
|
|
__asm volatile
|
|
8005b62: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005b66: f383 8811 msr BASEPRI, r3
|
|
8005b6a: f3bf 8f6f isb sy
|
|
8005b6e: f3bf 8f4f dsb sy
|
|
8005b72: 61fb str r3, [r7, #28]
|
|
}
|
|
8005b74: bf00 nop
|
|
8005b76: bf00 nop
|
|
8005b78: e7fd b.n 8005b76 <xQueueGenericSend+0xc2>
|
|
/*lint -save -e904 This function relaxes the coding standard somewhat to
|
|
allow return statements within the function itself. This is done in the
|
|
interest of execution time efficiency. */
|
|
for( ;; )
|
|
{
|
|
taskENTER_CRITICAL();
|
|
8005b7a: f002 fb1d bl 80081b8 <vPortEnterCritical>
|
|
{
|
|
/* Is there room on the queue now? The running task must be the
|
|
highest priority task wanting to access the queue. If the head item
|
|
in the queue is to be overwritten then it does not matter if the
|
|
queue is full. */
|
|
if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
|
|
8005b7e: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005b80: 6b9a ldr r2, [r3, #56] @ 0x38
|
|
8005b82: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005b84: 6bdb ldr r3, [r3, #60] @ 0x3c
|
|
8005b86: 429a cmp r2, r3
|
|
8005b88: d302 bcc.n 8005b90 <xQueueGenericSend+0xdc>
|
|
8005b8a: 683b ldr r3, [r7, #0]
|
|
8005b8c: 2b02 cmp r3, #2
|
|
8005b8e: d129 bne.n 8005be4 <xQueueGenericSend+0x130>
|
|
}
|
|
}
|
|
}
|
|
#else /* configUSE_QUEUE_SETS */
|
|
{
|
|
xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition );
|
|
8005b90: 683a ldr r2, [r7, #0]
|
|
8005b92: 68b9 ldr r1, [r7, #8]
|
|
8005b94: 6b38 ldr r0, [r7, #48] @ 0x30
|
|
8005b96: f000 fc6d bl 8006474 <prvCopyDataToQueue>
|
|
8005b9a: 62f8 str r0, [r7, #44] @ 0x2c
|
|
|
|
/* If there was a task waiting for data to arrive on the
|
|
queue then unblock it now. */
|
|
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
|
|
8005b9c: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005b9e: 6a5b ldr r3, [r3, #36] @ 0x24
|
|
8005ba0: 2b00 cmp r3, #0
|
|
8005ba2: d010 beq.n 8005bc6 <xQueueGenericSend+0x112>
|
|
{
|
|
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
|
|
8005ba4: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005ba6: 3324 adds r3, #36 @ 0x24
|
|
8005ba8: 4618 mov r0, r3
|
|
8005baa: f001 fad9 bl 8007160 <xTaskRemoveFromEventList>
|
|
8005bae: 4603 mov r3, r0
|
|
8005bb0: 2b00 cmp r3, #0
|
|
8005bb2: d013 beq.n 8005bdc <xQueueGenericSend+0x128>
|
|
{
|
|
/* The unblocked task has a priority higher than
|
|
our own so yield immediately. Yes it is ok to do
|
|
this from within the critical section - the kernel
|
|
takes care of that. */
|
|
queueYIELD_IF_USING_PREEMPTION();
|
|
8005bb4: 4b3f ldr r3, [pc, #252] @ (8005cb4 <xQueueGenericSend+0x200>)
|
|
8005bb6: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
8005bba: 601a str r2, [r3, #0]
|
|
8005bbc: f3bf 8f4f dsb sy
|
|
8005bc0: f3bf 8f6f isb sy
|
|
8005bc4: e00a b.n 8005bdc <xQueueGenericSend+0x128>
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
else if( xYieldRequired != pdFALSE )
|
|
8005bc6: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8005bc8: 2b00 cmp r3, #0
|
|
8005bca: d007 beq.n 8005bdc <xQueueGenericSend+0x128>
|
|
{
|
|
/* This path is a special case that will only get
|
|
executed if the task was holding multiple mutexes and
|
|
the mutexes were given back in an order that is
|
|
different to that in which they were taken. */
|
|
queueYIELD_IF_USING_PREEMPTION();
|
|
8005bcc: 4b39 ldr r3, [pc, #228] @ (8005cb4 <xQueueGenericSend+0x200>)
|
|
8005bce: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
8005bd2: 601a str r2, [r3, #0]
|
|
8005bd4: f3bf 8f4f dsb sy
|
|
8005bd8: f3bf 8f6f isb sy
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
#endif /* configUSE_QUEUE_SETS */
|
|
|
|
taskEXIT_CRITICAL();
|
|
8005bdc: f002 fb1e bl 800821c <vPortExitCritical>
|
|
return pdPASS;
|
|
8005be0: 2301 movs r3, #1
|
|
8005be2: e063 b.n 8005cac <xQueueGenericSend+0x1f8>
|
|
}
|
|
else
|
|
{
|
|
if( xTicksToWait == ( TickType_t ) 0 )
|
|
8005be4: 687b ldr r3, [r7, #4]
|
|
8005be6: 2b00 cmp r3, #0
|
|
8005be8: d103 bne.n 8005bf2 <xQueueGenericSend+0x13e>
|
|
{
|
|
/* The queue was full and no block time is specified (or
|
|
the block time has expired) so leave now. */
|
|
taskEXIT_CRITICAL();
|
|
8005bea: f002 fb17 bl 800821c <vPortExitCritical>
|
|
|
|
/* Return to the original privilege level before exiting
|
|
the function. */
|
|
traceQUEUE_SEND_FAILED( pxQueue );
|
|
return errQUEUE_FULL;
|
|
8005bee: 2300 movs r3, #0
|
|
8005bf0: e05c b.n 8005cac <xQueueGenericSend+0x1f8>
|
|
}
|
|
else if( xEntryTimeSet == pdFALSE )
|
|
8005bf2: 6b7b ldr r3, [r7, #52] @ 0x34
|
|
8005bf4: 2b00 cmp r3, #0
|
|
8005bf6: d106 bne.n 8005c06 <xQueueGenericSend+0x152>
|
|
{
|
|
/* The queue was full and a block time was specified so
|
|
configure the timeout structure. */
|
|
vTaskInternalSetTimeOutState( &xTimeOut );
|
|
8005bf8: f107 0314 add.w r3, r7, #20
|
|
8005bfc: 4618 mov r0, r3
|
|
8005bfe: f001 fb13 bl 8007228 <vTaskInternalSetTimeOutState>
|
|
xEntryTimeSet = pdTRUE;
|
|
8005c02: 2301 movs r3, #1
|
|
8005c04: 637b str r3, [r7, #52] @ 0x34
|
|
/* Entry time was already set. */
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
}
|
|
taskEXIT_CRITICAL();
|
|
8005c06: f002 fb09 bl 800821c <vPortExitCritical>
|
|
|
|
/* Interrupts and other tasks can send to and receive from the queue
|
|
now the critical section has been exited. */
|
|
|
|
vTaskSuspendAll();
|
|
8005c0a: f001 f883 bl 8006d14 <vTaskSuspendAll>
|
|
prvLockQueue( pxQueue );
|
|
8005c0e: f002 fad3 bl 80081b8 <vPortEnterCritical>
|
|
8005c12: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005c14: f893 3044 ldrb.w r3, [r3, #68] @ 0x44
|
|
8005c18: b25b sxtb r3, r3
|
|
8005c1a: f1b3 3fff cmp.w r3, #4294967295
|
|
8005c1e: d103 bne.n 8005c28 <xQueueGenericSend+0x174>
|
|
8005c20: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005c22: 2200 movs r2, #0
|
|
8005c24: f883 2044 strb.w r2, [r3, #68] @ 0x44
|
|
8005c28: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005c2a: f893 3045 ldrb.w r3, [r3, #69] @ 0x45
|
|
8005c2e: b25b sxtb r3, r3
|
|
8005c30: f1b3 3fff cmp.w r3, #4294967295
|
|
8005c34: d103 bne.n 8005c3e <xQueueGenericSend+0x18a>
|
|
8005c36: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005c38: 2200 movs r2, #0
|
|
8005c3a: f883 2045 strb.w r2, [r3, #69] @ 0x45
|
|
8005c3e: f002 faed bl 800821c <vPortExitCritical>
|
|
|
|
/* Update the timeout state to see if it has expired yet. */
|
|
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )
|
|
8005c42: 1d3a adds r2, r7, #4
|
|
8005c44: f107 0314 add.w r3, r7, #20
|
|
8005c48: 4611 mov r1, r2
|
|
8005c4a: 4618 mov r0, r3
|
|
8005c4c: f001 fb02 bl 8007254 <xTaskCheckForTimeOut>
|
|
8005c50: 4603 mov r3, r0
|
|
8005c52: 2b00 cmp r3, #0
|
|
8005c54: d124 bne.n 8005ca0 <xQueueGenericSend+0x1ec>
|
|
{
|
|
if( prvIsQueueFull( pxQueue ) != pdFALSE )
|
|
8005c56: 6b38 ldr r0, [r7, #48] @ 0x30
|
|
8005c58: f000 fd04 bl 8006664 <prvIsQueueFull>
|
|
8005c5c: 4603 mov r3, r0
|
|
8005c5e: 2b00 cmp r3, #0
|
|
8005c60: d018 beq.n 8005c94 <xQueueGenericSend+0x1e0>
|
|
{
|
|
traceBLOCKING_ON_QUEUE_SEND( pxQueue );
|
|
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait );
|
|
8005c62: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005c64: 3310 adds r3, #16
|
|
8005c66: 687a ldr r2, [r7, #4]
|
|
8005c68: 4611 mov r1, r2
|
|
8005c6a: 4618 mov r0, r3
|
|
8005c6c: f001 fa26 bl 80070bc <vTaskPlaceOnEventList>
|
|
/* Unlocking the queue means queue events can effect the
|
|
event list. It is possible that interrupts occurring now
|
|
remove this task from the event list again - but as the
|
|
scheduler is suspended the task will go onto the pending
|
|
ready last instead of the actual ready list. */
|
|
prvUnlockQueue( pxQueue );
|
|
8005c70: 6b38 ldr r0, [r7, #48] @ 0x30
|
|
8005c72: f000 fc8f bl 8006594 <prvUnlockQueue>
|
|
/* Resuming the scheduler will move tasks from the pending
|
|
ready list into the ready list - so it is feasible that this
|
|
task is already in a ready list before it yields - in which
|
|
case the yield will not cause a context switch unless there
|
|
is also a higher priority task in the pending ready list. */
|
|
if( xTaskResumeAll() == pdFALSE )
|
|
8005c76: f001 f85b bl 8006d30 <xTaskResumeAll>
|
|
8005c7a: 4603 mov r3, r0
|
|
8005c7c: 2b00 cmp r3, #0
|
|
8005c7e: f47f af7c bne.w 8005b7a <xQueueGenericSend+0xc6>
|
|
{
|
|
portYIELD_WITHIN_API();
|
|
8005c82: 4b0c ldr r3, [pc, #48] @ (8005cb4 <xQueueGenericSend+0x200>)
|
|
8005c84: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
8005c88: 601a str r2, [r3, #0]
|
|
8005c8a: f3bf 8f4f dsb sy
|
|
8005c8e: f3bf 8f6f isb sy
|
|
8005c92: e772 b.n 8005b7a <xQueueGenericSend+0xc6>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Try again. */
|
|
prvUnlockQueue( pxQueue );
|
|
8005c94: 6b38 ldr r0, [r7, #48] @ 0x30
|
|
8005c96: f000 fc7d bl 8006594 <prvUnlockQueue>
|
|
( void ) xTaskResumeAll();
|
|
8005c9a: f001 f849 bl 8006d30 <xTaskResumeAll>
|
|
8005c9e: e76c b.n 8005b7a <xQueueGenericSend+0xc6>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* The timeout has expired. */
|
|
prvUnlockQueue( pxQueue );
|
|
8005ca0: 6b38 ldr r0, [r7, #48] @ 0x30
|
|
8005ca2: f000 fc77 bl 8006594 <prvUnlockQueue>
|
|
( void ) xTaskResumeAll();
|
|
8005ca6: f001 f843 bl 8006d30 <xTaskResumeAll>
|
|
|
|
traceQUEUE_SEND_FAILED( pxQueue );
|
|
return errQUEUE_FULL;
|
|
8005caa: 2300 movs r3, #0
|
|
}
|
|
} /*lint -restore */
|
|
}
|
|
8005cac: 4618 mov r0, r3
|
|
8005cae: 3738 adds r7, #56 @ 0x38
|
|
8005cb0: 46bd mov sp, r7
|
|
8005cb2: bd80 pop {r7, pc}
|
|
8005cb4: e000ed04 .word 0xe000ed04
|
|
|
|
08005cb8 <xQueueGenericSendFromISR>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition )
|
|
{
|
|
8005cb8: b580 push {r7, lr}
|
|
8005cba: b090 sub sp, #64 @ 0x40
|
|
8005cbc: af00 add r7, sp, #0
|
|
8005cbe: 60f8 str r0, [r7, #12]
|
|
8005cc0: 60b9 str r1, [r7, #8]
|
|
8005cc2: 607a str r2, [r7, #4]
|
|
8005cc4: 603b str r3, [r7, #0]
|
|
BaseType_t xReturn;
|
|
UBaseType_t uxSavedInterruptStatus;
|
|
Queue_t * const pxQueue = xQueue;
|
|
8005cc6: 68fb ldr r3, [r7, #12]
|
|
8005cc8: 63bb str r3, [r7, #56] @ 0x38
|
|
|
|
configASSERT( pxQueue );
|
|
8005cca: 6bbb ldr r3, [r7, #56] @ 0x38
|
|
8005ccc: 2b00 cmp r3, #0
|
|
8005cce: d10b bne.n 8005ce8 <xQueueGenericSendFromISR+0x30>
|
|
__asm volatile
|
|
8005cd0: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005cd4: f383 8811 msr BASEPRI, r3
|
|
8005cd8: f3bf 8f6f isb sy
|
|
8005cdc: f3bf 8f4f dsb sy
|
|
8005ce0: 62bb str r3, [r7, #40] @ 0x28
|
|
}
|
|
8005ce2: bf00 nop
|
|
8005ce4: bf00 nop
|
|
8005ce6: e7fd b.n 8005ce4 <xQueueGenericSendFromISR+0x2c>
|
|
configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
|
|
8005ce8: 68bb ldr r3, [r7, #8]
|
|
8005cea: 2b00 cmp r3, #0
|
|
8005cec: d103 bne.n 8005cf6 <xQueueGenericSendFromISR+0x3e>
|
|
8005cee: 6bbb ldr r3, [r7, #56] @ 0x38
|
|
8005cf0: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
8005cf2: 2b00 cmp r3, #0
|
|
8005cf4: d101 bne.n 8005cfa <xQueueGenericSendFromISR+0x42>
|
|
8005cf6: 2301 movs r3, #1
|
|
8005cf8: e000 b.n 8005cfc <xQueueGenericSendFromISR+0x44>
|
|
8005cfa: 2300 movs r3, #0
|
|
8005cfc: 2b00 cmp r3, #0
|
|
8005cfe: d10b bne.n 8005d18 <xQueueGenericSendFromISR+0x60>
|
|
__asm volatile
|
|
8005d00: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005d04: f383 8811 msr BASEPRI, r3
|
|
8005d08: f3bf 8f6f isb sy
|
|
8005d0c: f3bf 8f4f dsb sy
|
|
8005d10: 627b str r3, [r7, #36] @ 0x24
|
|
}
|
|
8005d12: bf00 nop
|
|
8005d14: bf00 nop
|
|
8005d16: e7fd b.n 8005d14 <xQueueGenericSendFromISR+0x5c>
|
|
configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
|
|
8005d18: 683b ldr r3, [r7, #0]
|
|
8005d1a: 2b02 cmp r3, #2
|
|
8005d1c: d103 bne.n 8005d26 <xQueueGenericSendFromISR+0x6e>
|
|
8005d1e: 6bbb ldr r3, [r7, #56] @ 0x38
|
|
8005d20: 6bdb ldr r3, [r3, #60] @ 0x3c
|
|
8005d22: 2b01 cmp r3, #1
|
|
8005d24: d101 bne.n 8005d2a <xQueueGenericSendFromISR+0x72>
|
|
8005d26: 2301 movs r3, #1
|
|
8005d28: e000 b.n 8005d2c <xQueueGenericSendFromISR+0x74>
|
|
8005d2a: 2300 movs r3, #0
|
|
8005d2c: 2b00 cmp r3, #0
|
|
8005d2e: d10b bne.n 8005d48 <xQueueGenericSendFromISR+0x90>
|
|
__asm volatile
|
|
8005d30: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005d34: f383 8811 msr BASEPRI, r3
|
|
8005d38: f3bf 8f6f isb sy
|
|
8005d3c: f3bf 8f4f dsb sy
|
|
8005d40: 623b str r3, [r7, #32]
|
|
}
|
|
8005d42: bf00 nop
|
|
8005d44: bf00 nop
|
|
8005d46: e7fd b.n 8005d44 <xQueueGenericSendFromISR+0x8c>
|
|
that have been assigned a priority at or (logically) below the maximum
|
|
system call interrupt priority. FreeRTOS maintains a separate interrupt
|
|
safe API to ensure interrupt entry is as fast and as simple as possible.
|
|
More information (albeit Cortex-M specific) is provided on the following
|
|
link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */
|
|
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
|
8005d48: f002 fb16 bl 8008378 <vPortValidateInterruptPriority>
|
|
|
|
portFORCE_INLINE static uint32_t ulPortRaiseBASEPRI( void )
|
|
{
|
|
uint32_t ulOriginalBASEPRI, ulNewBASEPRI;
|
|
|
|
__asm volatile
|
|
8005d4c: f3ef 8211 mrs r2, BASEPRI
|
|
8005d50: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005d54: f383 8811 msr BASEPRI, r3
|
|
8005d58: f3bf 8f6f isb sy
|
|
8005d5c: f3bf 8f4f dsb sy
|
|
8005d60: 61fa str r2, [r7, #28]
|
|
8005d62: 61bb str r3, [r7, #24]
|
|
:"=r" (ulOriginalBASEPRI), "=r" (ulNewBASEPRI) : "i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY ) : "memory"
|
|
);
|
|
|
|
/* This return will not be reached but is necessary to prevent compiler
|
|
warnings. */
|
|
return ulOriginalBASEPRI;
|
|
8005d64: 69fb ldr r3, [r7, #28]
|
|
/* Similar to xQueueGenericSend, except without blocking if there is no room
|
|
in the queue. Also don't directly wake a task that was blocked on a queue
|
|
read, instead return a flag to say whether a context switch is required or
|
|
not (i.e. has a task with a higher priority than us been woken by this
|
|
post). */
|
|
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
|
8005d66: 637b str r3, [r7, #52] @ 0x34
|
|
{
|
|
if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
|
|
8005d68: 6bbb ldr r3, [r7, #56] @ 0x38
|
|
8005d6a: 6b9a ldr r2, [r3, #56] @ 0x38
|
|
8005d6c: 6bbb ldr r3, [r7, #56] @ 0x38
|
|
8005d6e: 6bdb ldr r3, [r3, #60] @ 0x3c
|
|
8005d70: 429a cmp r2, r3
|
|
8005d72: d302 bcc.n 8005d7a <xQueueGenericSendFromISR+0xc2>
|
|
8005d74: 683b ldr r3, [r7, #0]
|
|
8005d76: 2b02 cmp r3, #2
|
|
8005d78: d12f bne.n 8005dda <xQueueGenericSendFromISR+0x122>
|
|
{
|
|
const int8_t cTxLock = pxQueue->cTxLock;
|
|
8005d7a: 6bbb ldr r3, [r7, #56] @ 0x38
|
|
8005d7c: f893 3045 ldrb.w r3, [r3, #69] @ 0x45
|
|
8005d80: f887 3033 strb.w r3, [r7, #51] @ 0x33
|
|
const UBaseType_t uxPreviousMessagesWaiting = pxQueue->uxMessagesWaiting;
|
|
8005d84: 6bbb ldr r3, [r7, #56] @ 0x38
|
|
8005d86: 6b9b ldr r3, [r3, #56] @ 0x38
|
|
8005d88: 62fb str r3, [r7, #44] @ 0x2c
|
|
/* Semaphores use xQueueGiveFromISR(), so pxQueue will not be a
|
|
semaphore or mutex. That means prvCopyDataToQueue() cannot result
|
|
in a task disinheriting a priority and prvCopyDataToQueue() can be
|
|
called here even though the disinherit function does not check if
|
|
the scheduler is suspended before accessing the ready lists. */
|
|
( void ) prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition );
|
|
8005d8a: 683a ldr r2, [r7, #0]
|
|
8005d8c: 68b9 ldr r1, [r7, #8]
|
|
8005d8e: 6bb8 ldr r0, [r7, #56] @ 0x38
|
|
8005d90: f000 fb70 bl 8006474 <prvCopyDataToQueue>
|
|
|
|
/* The event list is not altered if the queue is locked. This will
|
|
be done when the queue is unlocked later. */
|
|
if( cTxLock == queueUNLOCKED )
|
|
8005d94: f997 3033 ldrsb.w r3, [r7, #51] @ 0x33
|
|
8005d98: f1b3 3fff cmp.w r3, #4294967295
|
|
8005d9c: d112 bne.n 8005dc4 <xQueueGenericSendFromISR+0x10c>
|
|
}
|
|
}
|
|
}
|
|
#else /* configUSE_QUEUE_SETS */
|
|
{
|
|
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
|
|
8005d9e: 6bbb ldr r3, [r7, #56] @ 0x38
|
|
8005da0: 6a5b ldr r3, [r3, #36] @ 0x24
|
|
8005da2: 2b00 cmp r3, #0
|
|
8005da4: d016 beq.n 8005dd4 <xQueueGenericSendFromISR+0x11c>
|
|
{
|
|
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
|
|
8005da6: 6bbb ldr r3, [r7, #56] @ 0x38
|
|
8005da8: 3324 adds r3, #36 @ 0x24
|
|
8005daa: 4618 mov r0, r3
|
|
8005dac: f001 f9d8 bl 8007160 <xTaskRemoveFromEventList>
|
|
8005db0: 4603 mov r3, r0
|
|
8005db2: 2b00 cmp r3, #0
|
|
8005db4: d00e beq.n 8005dd4 <xQueueGenericSendFromISR+0x11c>
|
|
{
|
|
/* The task waiting has a higher priority so record that a
|
|
context switch is required. */
|
|
if( pxHigherPriorityTaskWoken != NULL )
|
|
8005db6: 687b ldr r3, [r7, #4]
|
|
8005db8: 2b00 cmp r3, #0
|
|
8005dba: d00b beq.n 8005dd4 <xQueueGenericSendFromISR+0x11c>
|
|
{
|
|
*pxHigherPriorityTaskWoken = pdTRUE;
|
|
8005dbc: 687b ldr r3, [r7, #4]
|
|
8005dbe: 2201 movs r2, #1
|
|
8005dc0: 601a str r2, [r3, #0]
|
|
8005dc2: e007 b.n 8005dd4 <xQueueGenericSendFromISR+0x11c>
|
|
}
|
|
else
|
|
{
|
|
/* Increment the lock count so the task that unlocks the queue
|
|
knows that data was posted while it was locked. */
|
|
pxQueue->cTxLock = ( int8_t ) ( cTxLock + 1 );
|
|
8005dc4: f897 3033 ldrb.w r3, [r7, #51] @ 0x33
|
|
8005dc8: 3301 adds r3, #1
|
|
8005dca: b2db uxtb r3, r3
|
|
8005dcc: b25a sxtb r2, r3
|
|
8005dce: 6bbb ldr r3, [r7, #56] @ 0x38
|
|
8005dd0: f883 2045 strb.w r2, [r3, #69] @ 0x45
|
|
}
|
|
|
|
xReturn = pdPASS;
|
|
8005dd4: 2301 movs r3, #1
|
|
8005dd6: 63fb str r3, [r7, #60] @ 0x3c
|
|
{
|
|
8005dd8: e001 b.n 8005dde <xQueueGenericSendFromISR+0x126>
|
|
}
|
|
else
|
|
{
|
|
traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue );
|
|
xReturn = errQUEUE_FULL;
|
|
8005dda: 2300 movs r3, #0
|
|
8005ddc: 63fb str r3, [r7, #60] @ 0x3c
|
|
8005dde: 6b7b ldr r3, [r7, #52] @ 0x34
|
|
8005de0: 617b str r3, [r7, #20]
|
|
}
|
|
/*-----------------------------------------------------------*/
|
|
|
|
portFORCE_INLINE static void vPortSetBASEPRI( uint32_t ulNewMaskValue )
|
|
{
|
|
__asm volatile
|
|
8005de2: 697b ldr r3, [r7, #20]
|
|
8005de4: f383 8811 msr BASEPRI, r3
|
|
(
|
|
" msr basepri, %0 " :: "r" ( ulNewMaskValue ) : "memory"
|
|
);
|
|
}
|
|
8005de8: bf00 nop
|
|
}
|
|
}
|
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
|
|
|
return xReturn;
|
|
8005dea: 6bfb ldr r3, [r7, #60] @ 0x3c
|
|
}
|
|
8005dec: 4618 mov r0, r3
|
|
8005dee: 3740 adds r7, #64 @ 0x40
|
|
8005df0: 46bd mov sp, r7
|
|
8005df2: bd80 pop {r7, pc}
|
|
|
|
08005df4 <xQueueGiveFromISR>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue, BaseType_t * const pxHigherPriorityTaskWoken )
|
|
{
|
|
8005df4: b580 push {r7, lr}
|
|
8005df6: b08e sub sp, #56 @ 0x38
|
|
8005df8: af00 add r7, sp, #0
|
|
8005dfa: 6078 str r0, [r7, #4]
|
|
8005dfc: 6039 str r1, [r7, #0]
|
|
BaseType_t xReturn;
|
|
UBaseType_t uxSavedInterruptStatus;
|
|
Queue_t * const pxQueue = xQueue;
|
|
8005dfe: 687b ldr r3, [r7, #4]
|
|
8005e00: 633b str r3, [r7, #48] @ 0x30
|
|
item size is 0. Don't directly wake a task that was blocked on a queue
|
|
read, instead return a flag to say whether a context switch is required or
|
|
not (i.e. has a task with a higher priority than us been woken by this
|
|
post). */
|
|
|
|
configASSERT( pxQueue );
|
|
8005e02: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005e04: 2b00 cmp r3, #0
|
|
8005e06: d10b bne.n 8005e20 <xQueueGiveFromISR+0x2c>
|
|
__asm volatile
|
|
8005e08: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005e0c: f383 8811 msr BASEPRI, r3
|
|
8005e10: f3bf 8f6f isb sy
|
|
8005e14: f3bf 8f4f dsb sy
|
|
8005e18: 623b str r3, [r7, #32]
|
|
}
|
|
8005e1a: bf00 nop
|
|
8005e1c: bf00 nop
|
|
8005e1e: e7fd b.n 8005e1c <xQueueGiveFromISR+0x28>
|
|
|
|
/* xQueueGenericSendFromISR() should be used instead of xQueueGiveFromISR()
|
|
if the item size is not 0. */
|
|
configASSERT( pxQueue->uxItemSize == 0 );
|
|
8005e20: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005e22: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
8005e24: 2b00 cmp r3, #0
|
|
8005e26: d00b beq.n 8005e40 <xQueueGiveFromISR+0x4c>
|
|
__asm volatile
|
|
8005e28: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005e2c: f383 8811 msr BASEPRI, r3
|
|
8005e30: f3bf 8f6f isb sy
|
|
8005e34: f3bf 8f4f dsb sy
|
|
8005e38: 61fb str r3, [r7, #28]
|
|
}
|
|
8005e3a: bf00 nop
|
|
8005e3c: bf00 nop
|
|
8005e3e: e7fd b.n 8005e3c <xQueueGiveFromISR+0x48>
|
|
|
|
/* Normally a mutex would not be given from an interrupt, especially if
|
|
there is a mutex holder, as priority inheritance makes no sense for an
|
|
interrupts, only tasks. */
|
|
configASSERT( !( ( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) && ( pxQueue->u.xSemaphore.xMutexHolder != NULL ) ) );
|
|
8005e40: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005e42: 681b ldr r3, [r3, #0]
|
|
8005e44: 2b00 cmp r3, #0
|
|
8005e46: d103 bne.n 8005e50 <xQueueGiveFromISR+0x5c>
|
|
8005e48: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005e4a: 689b ldr r3, [r3, #8]
|
|
8005e4c: 2b00 cmp r3, #0
|
|
8005e4e: d101 bne.n 8005e54 <xQueueGiveFromISR+0x60>
|
|
8005e50: 2301 movs r3, #1
|
|
8005e52: e000 b.n 8005e56 <xQueueGiveFromISR+0x62>
|
|
8005e54: 2300 movs r3, #0
|
|
8005e56: 2b00 cmp r3, #0
|
|
8005e58: d10b bne.n 8005e72 <xQueueGiveFromISR+0x7e>
|
|
__asm volatile
|
|
8005e5a: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005e5e: f383 8811 msr BASEPRI, r3
|
|
8005e62: f3bf 8f6f isb sy
|
|
8005e66: f3bf 8f4f dsb sy
|
|
8005e6a: 61bb str r3, [r7, #24]
|
|
}
|
|
8005e6c: bf00 nop
|
|
8005e6e: bf00 nop
|
|
8005e70: e7fd b.n 8005e6e <xQueueGiveFromISR+0x7a>
|
|
that have been assigned a priority at or (logically) below the maximum
|
|
system call interrupt priority. FreeRTOS maintains a separate interrupt
|
|
safe API to ensure interrupt entry is as fast and as simple as possible.
|
|
More information (albeit Cortex-M specific) is provided on the following
|
|
link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */
|
|
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
|
8005e72: f002 fa81 bl 8008378 <vPortValidateInterruptPriority>
|
|
__asm volatile
|
|
8005e76: f3ef 8211 mrs r2, BASEPRI
|
|
8005e7a: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005e7e: f383 8811 msr BASEPRI, r3
|
|
8005e82: f3bf 8f6f isb sy
|
|
8005e86: f3bf 8f4f dsb sy
|
|
8005e8a: 617a str r2, [r7, #20]
|
|
8005e8c: 613b str r3, [r7, #16]
|
|
return ulOriginalBASEPRI;
|
|
8005e8e: 697b ldr r3, [r7, #20]
|
|
|
|
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
|
8005e90: 62fb str r3, [r7, #44] @ 0x2c
|
|
{
|
|
const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
|
|
8005e92: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005e94: 6b9b ldr r3, [r3, #56] @ 0x38
|
|
8005e96: 62bb str r3, [r7, #40] @ 0x28
|
|
|
|
/* When the queue is used to implement a semaphore no data is ever
|
|
moved through the queue but it is still valid to see if the queue 'has
|
|
space'. */
|
|
if( uxMessagesWaiting < pxQueue->uxLength )
|
|
8005e98: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005e9a: 6bdb ldr r3, [r3, #60] @ 0x3c
|
|
8005e9c: 6aba ldr r2, [r7, #40] @ 0x28
|
|
8005e9e: 429a cmp r2, r3
|
|
8005ea0: d22b bcs.n 8005efa <xQueueGiveFromISR+0x106>
|
|
{
|
|
const int8_t cTxLock = pxQueue->cTxLock;
|
|
8005ea2: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005ea4: f893 3045 ldrb.w r3, [r3, #69] @ 0x45
|
|
8005ea8: f887 3027 strb.w r3, [r7, #39] @ 0x27
|
|
holder - and if there is a mutex holder then the mutex cannot be
|
|
given from an ISR. As this is the ISR version of the function it
|
|
can be assumed there is no mutex holder and no need to determine if
|
|
priority disinheritance is needed. Simply increase the count of
|
|
messages (semaphores) available. */
|
|
pxQueue->uxMessagesWaiting = uxMessagesWaiting + ( UBaseType_t ) 1;
|
|
8005eac: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8005eae: 1c5a adds r2, r3, #1
|
|
8005eb0: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005eb2: 639a str r2, [r3, #56] @ 0x38
|
|
|
|
/* The event list is not altered if the queue is locked. This will
|
|
be done when the queue is unlocked later. */
|
|
if( cTxLock == queueUNLOCKED )
|
|
8005eb4: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27
|
|
8005eb8: f1b3 3fff cmp.w r3, #4294967295
|
|
8005ebc: d112 bne.n 8005ee4 <xQueueGiveFromISR+0xf0>
|
|
}
|
|
}
|
|
}
|
|
#else /* configUSE_QUEUE_SETS */
|
|
{
|
|
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
|
|
8005ebe: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005ec0: 6a5b ldr r3, [r3, #36] @ 0x24
|
|
8005ec2: 2b00 cmp r3, #0
|
|
8005ec4: d016 beq.n 8005ef4 <xQueueGiveFromISR+0x100>
|
|
{
|
|
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
|
|
8005ec6: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005ec8: 3324 adds r3, #36 @ 0x24
|
|
8005eca: 4618 mov r0, r3
|
|
8005ecc: f001 f948 bl 8007160 <xTaskRemoveFromEventList>
|
|
8005ed0: 4603 mov r3, r0
|
|
8005ed2: 2b00 cmp r3, #0
|
|
8005ed4: d00e beq.n 8005ef4 <xQueueGiveFromISR+0x100>
|
|
{
|
|
/* The task waiting has a higher priority so record that a
|
|
context switch is required. */
|
|
if( pxHigherPriorityTaskWoken != NULL )
|
|
8005ed6: 683b ldr r3, [r7, #0]
|
|
8005ed8: 2b00 cmp r3, #0
|
|
8005eda: d00b beq.n 8005ef4 <xQueueGiveFromISR+0x100>
|
|
{
|
|
*pxHigherPriorityTaskWoken = pdTRUE;
|
|
8005edc: 683b ldr r3, [r7, #0]
|
|
8005ede: 2201 movs r2, #1
|
|
8005ee0: 601a str r2, [r3, #0]
|
|
8005ee2: e007 b.n 8005ef4 <xQueueGiveFromISR+0x100>
|
|
}
|
|
else
|
|
{
|
|
/* Increment the lock count so the task that unlocks the queue
|
|
knows that data was posted while it was locked. */
|
|
pxQueue->cTxLock = ( int8_t ) ( cTxLock + 1 );
|
|
8005ee4: f897 3027 ldrb.w r3, [r7, #39] @ 0x27
|
|
8005ee8: 3301 adds r3, #1
|
|
8005eea: b2db uxtb r3, r3
|
|
8005eec: b25a sxtb r2, r3
|
|
8005eee: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8005ef0: f883 2045 strb.w r2, [r3, #69] @ 0x45
|
|
}
|
|
|
|
xReturn = pdPASS;
|
|
8005ef4: 2301 movs r3, #1
|
|
8005ef6: 637b str r3, [r7, #52] @ 0x34
|
|
8005ef8: e001 b.n 8005efe <xQueueGiveFromISR+0x10a>
|
|
}
|
|
else
|
|
{
|
|
traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue );
|
|
xReturn = errQUEUE_FULL;
|
|
8005efa: 2300 movs r3, #0
|
|
8005efc: 637b str r3, [r7, #52] @ 0x34
|
|
8005efe: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8005f00: 60fb str r3, [r7, #12]
|
|
__asm volatile
|
|
8005f02: 68fb ldr r3, [r7, #12]
|
|
8005f04: f383 8811 msr BASEPRI, r3
|
|
}
|
|
8005f08: bf00 nop
|
|
}
|
|
}
|
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
|
|
|
return xReturn;
|
|
8005f0a: 6b7b ldr r3, [r7, #52] @ 0x34
|
|
}
|
|
8005f0c: 4618 mov r0, r3
|
|
8005f0e: 3738 adds r7, #56 @ 0x38
|
|
8005f10: 46bd mov sp, r7
|
|
8005f12: bd80 pop {r7, pc}
|
|
|
|
08005f14 <xQueueReceive>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
BaseType_t xQueueReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait )
|
|
{
|
|
8005f14: b580 push {r7, lr}
|
|
8005f16: b08c sub sp, #48 @ 0x30
|
|
8005f18: af00 add r7, sp, #0
|
|
8005f1a: 60f8 str r0, [r7, #12]
|
|
8005f1c: 60b9 str r1, [r7, #8]
|
|
8005f1e: 607a str r2, [r7, #4]
|
|
BaseType_t xEntryTimeSet = pdFALSE;
|
|
8005f20: 2300 movs r3, #0
|
|
8005f22: 62fb str r3, [r7, #44] @ 0x2c
|
|
TimeOut_t xTimeOut;
|
|
Queue_t * const pxQueue = xQueue;
|
|
8005f24: 68fb ldr r3, [r7, #12]
|
|
8005f26: 62bb str r3, [r7, #40] @ 0x28
|
|
|
|
/* Check the pointer is not NULL. */
|
|
configASSERT( ( pxQueue ) );
|
|
8005f28: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8005f2a: 2b00 cmp r3, #0
|
|
8005f2c: d10b bne.n 8005f46 <xQueueReceive+0x32>
|
|
__asm volatile
|
|
8005f2e: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005f32: f383 8811 msr BASEPRI, r3
|
|
8005f36: f3bf 8f6f isb sy
|
|
8005f3a: f3bf 8f4f dsb sy
|
|
8005f3e: 623b str r3, [r7, #32]
|
|
}
|
|
8005f40: bf00 nop
|
|
8005f42: bf00 nop
|
|
8005f44: e7fd b.n 8005f42 <xQueueReceive+0x2e>
|
|
|
|
/* The buffer into which data is received can only be NULL if the data size
|
|
is zero (so no data is copied into the buffer. */
|
|
configASSERT( !( ( ( pvBuffer ) == NULL ) && ( ( pxQueue )->uxItemSize != ( UBaseType_t ) 0U ) ) );
|
|
8005f46: 68bb ldr r3, [r7, #8]
|
|
8005f48: 2b00 cmp r3, #0
|
|
8005f4a: d103 bne.n 8005f54 <xQueueReceive+0x40>
|
|
8005f4c: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8005f4e: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
8005f50: 2b00 cmp r3, #0
|
|
8005f52: d101 bne.n 8005f58 <xQueueReceive+0x44>
|
|
8005f54: 2301 movs r3, #1
|
|
8005f56: e000 b.n 8005f5a <xQueueReceive+0x46>
|
|
8005f58: 2300 movs r3, #0
|
|
8005f5a: 2b00 cmp r3, #0
|
|
8005f5c: d10b bne.n 8005f76 <xQueueReceive+0x62>
|
|
__asm volatile
|
|
8005f5e: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005f62: f383 8811 msr BASEPRI, r3
|
|
8005f66: f3bf 8f6f isb sy
|
|
8005f6a: f3bf 8f4f dsb sy
|
|
8005f6e: 61fb str r3, [r7, #28]
|
|
}
|
|
8005f70: bf00 nop
|
|
8005f72: bf00 nop
|
|
8005f74: e7fd b.n 8005f72 <xQueueReceive+0x5e>
|
|
|
|
/* Cannot block if the scheduler is suspended. */
|
|
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
|
|
{
|
|
configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
|
|
8005f76: f001 fab3 bl 80074e0 <xTaskGetSchedulerState>
|
|
8005f7a: 4603 mov r3, r0
|
|
8005f7c: 2b00 cmp r3, #0
|
|
8005f7e: d102 bne.n 8005f86 <xQueueReceive+0x72>
|
|
8005f80: 687b ldr r3, [r7, #4]
|
|
8005f82: 2b00 cmp r3, #0
|
|
8005f84: d101 bne.n 8005f8a <xQueueReceive+0x76>
|
|
8005f86: 2301 movs r3, #1
|
|
8005f88: e000 b.n 8005f8c <xQueueReceive+0x78>
|
|
8005f8a: 2300 movs r3, #0
|
|
8005f8c: 2b00 cmp r3, #0
|
|
8005f8e: d10b bne.n 8005fa8 <xQueueReceive+0x94>
|
|
__asm volatile
|
|
8005f90: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8005f94: f383 8811 msr BASEPRI, r3
|
|
8005f98: f3bf 8f6f isb sy
|
|
8005f9c: f3bf 8f4f dsb sy
|
|
8005fa0: 61bb str r3, [r7, #24]
|
|
}
|
|
8005fa2: bf00 nop
|
|
8005fa4: bf00 nop
|
|
8005fa6: e7fd b.n 8005fa4 <xQueueReceive+0x90>
|
|
/*lint -save -e904 This function relaxes the coding standard somewhat to
|
|
allow return statements within the function itself. This is done in the
|
|
interest of execution time efficiency. */
|
|
for( ;; )
|
|
{
|
|
taskENTER_CRITICAL();
|
|
8005fa8: f002 f906 bl 80081b8 <vPortEnterCritical>
|
|
{
|
|
const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
|
|
8005fac: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8005fae: 6b9b ldr r3, [r3, #56] @ 0x38
|
|
8005fb0: 627b str r3, [r7, #36] @ 0x24
|
|
|
|
/* Is there data in the queue now? To be running the calling task
|
|
must be the highest priority task wanting to access the queue. */
|
|
if( uxMessagesWaiting > ( UBaseType_t ) 0 )
|
|
8005fb2: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
8005fb4: 2b00 cmp r3, #0
|
|
8005fb6: d01f beq.n 8005ff8 <xQueueReceive+0xe4>
|
|
{
|
|
/* Data available, remove one item. */
|
|
prvCopyDataFromQueue( pxQueue, pvBuffer );
|
|
8005fb8: 68b9 ldr r1, [r7, #8]
|
|
8005fba: 6ab8 ldr r0, [r7, #40] @ 0x28
|
|
8005fbc: f000 fac4 bl 8006548 <prvCopyDataFromQueue>
|
|
traceQUEUE_RECEIVE( pxQueue );
|
|
pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1;
|
|
8005fc0: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
8005fc2: 1e5a subs r2, r3, #1
|
|
8005fc4: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8005fc6: 639a str r2, [r3, #56] @ 0x38
|
|
|
|
/* There is now space in the queue, were any tasks waiting to
|
|
post to the queue? If so, unblock the highest priority waiting
|
|
task. */
|
|
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
|
|
8005fc8: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8005fca: 691b ldr r3, [r3, #16]
|
|
8005fcc: 2b00 cmp r3, #0
|
|
8005fce: d00f beq.n 8005ff0 <xQueueReceive+0xdc>
|
|
{
|
|
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
|
|
8005fd0: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8005fd2: 3310 adds r3, #16
|
|
8005fd4: 4618 mov r0, r3
|
|
8005fd6: f001 f8c3 bl 8007160 <xTaskRemoveFromEventList>
|
|
8005fda: 4603 mov r3, r0
|
|
8005fdc: 2b00 cmp r3, #0
|
|
8005fde: d007 beq.n 8005ff0 <xQueueReceive+0xdc>
|
|
{
|
|
queueYIELD_IF_USING_PREEMPTION();
|
|
8005fe0: 4b3c ldr r3, [pc, #240] @ (80060d4 <xQueueReceive+0x1c0>)
|
|
8005fe2: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
8005fe6: 601a str r2, [r3, #0]
|
|
8005fe8: f3bf 8f4f dsb sy
|
|
8005fec: f3bf 8f6f isb sy
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
taskEXIT_CRITICAL();
|
|
8005ff0: f002 f914 bl 800821c <vPortExitCritical>
|
|
return pdPASS;
|
|
8005ff4: 2301 movs r3, #1
|
|
8005ff6: e069 b.n 80060cc <xQueueReceive+0x1b8>
|
|
}
|
|
else
|
|
{
|
|
if( xTicksToWait == ( TickType_t ) 0 )
|
|
8005ff8: 687b ldr r3, [r7, #4]
|
|
8005ffa: 2b00 cmp r3, #0
|
|
8005ffc: d103 bne.n 8006006 <xQueueReceive+0xf2>
|
|
{
|
|
/* The queue was empty and no block time is specified (or
|
|
the block time has expired) so leave now. */
|
|
taskEXIT_CRITICAL();
|
|
8005ffe: f002 f90d bl 800821c <vPortExitCritical>
|
|
traceQUEUE_RECEIVE_FAILED( pxQueue );
|
|
return errQUEUE_EMPTY;
|
|
8006002: 2300 movs r3, #0
|
|
8006004: e062 b.n 80060cc <xQueueReceive+0x1b8>
|
|
}
|
|
else if( xEntryTimeSet == pdFALSE )
|
|
8006006: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8006008: 2b00 cmp r3, #0
|
|
800600a: d106 bne.n 800601a <xQueueReceive+0x106>
|
|
{
|
|
/* The queue was empty and a block time was specified so
|
|
configure the timeout structure. */
|
|
vTaskInternalSetTimeOutState( &xTimeOut );
|
|
800600c: f107 0310 add.w r3, r7, #16
|
|
8006010: 4618 mov r0, r3
|
|
8006012: f001 f909 bl 8007228 <vTaskInternalSetTimeOutState>
|
|
xEntryTimeSet = pdTRUE;
|
|
8006016: 2301 movs r3, #1
|
|
8006018: 62fb str r3, [r7, #44] @ 0x2c
|
|
/* Entry time was already set. */
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
}
|
|
taskEXIT_CRITICAL();
|
|
800601a: f002 f8ff bl 800821c <vPortExitCritical>
|
|
|
|
/* Interrupts and other tasks can send to and receive from the queue
|
|
now the critical section has been exited. */
|
|
|
|
vTaskSuspendAll();
|
|
800601e: f000 fe79 bl 8006d14 <vTaskSuspendAll>
|
|
prvLockQueue( pxQueue );
|
|
8006022: f002 f8c9 bl 80081b8 <vPortEnterCritical>
|
|
8006026: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8006028: f893 3044 ldrb.w r3, [r3, #68] @ 0x44
|
|
800602c: b25b sxtb r3, r3
|
|
800602e: f1b3 3fff cmp.w r3, #4294967295
|
|
8006032: d103 bne.n 800603c <xQueueReceive+0x128>
|
|
8006034: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8006036: 2200 movs r2, #0
|
|
8006038: f883 2044 strb.w r2, [r3, #68] @ 0x44
|
|
800603c: 6abb ldr r3, [r7, #40] @ 0x28
|
|
800603e: f893 3045 ldrb.w r3, [r3, #69] @ 0x45
|
|
8006042: b25b sxtb r3, r3
|
|
8006044: f1b3 3fff cmp.w r3, #4294967295
|
|
8006048: d103 bne.n 8006052 <xQueueReceive+0x13e>
|
|
800604a: 6abb ldr r3, [r7, #40] @ 0x28
|
|
800604c: 2200 movs r2, #0
|
|
800604e: f883 2045 strb.w r2, [r3, #69] @ 0x45
|
|
8006052: f002 f8e3 bl 800821c <vPortExitCritical>
|
|
|
|
/* Update the timeout state to see if it has expired yet. */
|
|
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )
|
|
8006056: 1d3a adds r2, r7, #4
|
|
8006058: f107 0310 add.w r3, r7, #16
|
|
800605c: 4611 mov r1, r2
|
|
800605e: 4618 mov r0, r3
|
|
8006060: f001 f8f8 bl 8007254 <xTaskCheckForTimeOut>
|
|
8006064: 4603 mov r3, r0
|
|
8006066: 2b00 cmp r3, #0
|
|
8006068: d123 bne.n 80060b2 <xQueueReceive+0x19e>
|
|
{
|
|
/* The timeout has not expired. If the queue is still empty place
|
|
the task on the list of tasks waiting to receive from the queue. */
|
|
if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
|
|
800606a: 6ab8 ldr r0, [r7, #40] @ 0x28
|
|
800606c: f000 fae4 bl 8006638 <prvIsQueueEmpty>
|
|
8006070: 4603 mov r3, r0
|
|
8006072: 2b00 cmp r3, #0
|
|
8006074: d017 beq.n 80060a6 <xQueueReceive+0x192>
|
|
{
|
|
traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue );
|
|
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
|
|
8006076: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8006078: 3324 adds r3, #36 @ 0x24
|
|
800607a: 687a ldr r2, [r7, #4]
|
|
800607c: 4611 mov r1, r2
|
|
800607e: 4618 mov r0, r3
|
|
8006080: f001 f81c bl 80070bc <vTaskPlaceOnEventList>
|
|
prvUnlockQueue( pxQueue );
|
|
8006084: 6ab8 ldr r0, [r7, #40] @ 0x28
|
|
8006086: f000 fa85 bl 8006594 <prvUnlockQueue>
|
|
if( xTaskResumeAll() == pdFALSE )
|
|
800608a: f000 fe51 bl 8006d30 <xTaskResumeAll>
|
|
800608e: 4603 mov r3, r0
|
|
8006090: 2b00 cmp r3, #0
|
|
8006092: d189 bne.n 8005fa8 <xQueueReceive+0x94>
|
|
{
|
|
portYIELD_WITHIN_API();
|
|
8006094: 4b0f ldr r3, [pc, #60] @ (80060d4 <xQueueReceive+0x1c0>)
|
|
8006096: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
800609a: 601a str r2, [r3, #0]
|
|
800609c: f3bf 8f4f dsb sy
|
|
80060a0: f3bf 8f6f isb sy
|
|
80060a4: e780 b.n 8005fa8 <xQueueReceive+0x94>
|
|
}
|
|
else
|
|
{
|
|
/* The queue contains data again. Loop back to try and read the
|
|
data. */
|
|
prvUnlockQueue( pxQueue );
|
|
80060a6: 6ab8 ldr r0, [r7, #40] @ 0x28
|
|
80060a8: f000 fa74 bl 8006594 <prvUnlockQueue>
|
|
( void ) xTaskResumeAll();
|
|
80060ac: f000 fe40 bl 8006d30 <xTaskResumeAll>
|
|
80060b0: e77a b.n 8005fa8 <xQueueReceive+0x94>
|
|
}
|
|
else
|
|
{
|
|
/* Timed out. If there is no data in the queue exit, otherwise loop
|
|
back and attempt to read the data. */
|
|
prvUnlockQueue( pxQueue );
|
|
80060b2: 6ab8 ldr r0, [r7, #40] @ 0x28
|
|
80060b4: f000 fa6e bl 8006594 <prvUnlockQueue>
|
|
( void ) xTaskResumeAll();
|
|
80060b8: f000 fe3a bl 8006d30 <xTaskResumeAll>
|
|
|
|
if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
|
|
80060bc: 6ab8 ldr r0, [r7, #40] @ 0x28
|
|
80060be: f000 fabb bl 8006638 <prvIsQueueEmpty>
|
|
80060c2: 4603 mov r3, r0
|
|
80060c4: 2b00 cmp r3, #0
|
|
80060c6: f43f af6f beq.w 8005fa8 <xQueueReceive+0x94>
|
|
{
|
|
traceQUEUE_RECEIVE_FAILED( pxQueue );
|
|
return errQUEUE_EMPTY;
|
|
80060ca: 2300 movs r3, #0
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
} /*lint -restore */
|
|
}
|
|
80060cc: 4618 mov r0, r3
|
|
80060ce: 3730 adds r7, #48 @ 0x30
|
|
80060d0: 46bd mov sp, r7
|
|
80060d2: bd80 pop {r7, pc}
|
|
80060d4: e000ed04 .word 0xe000ed04
|
|
|
|
080060d8 <xQueueSemaphoreTake>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue, TickType_t xTicksToWait )
|
|
{
|
|
80060d8: b580 push {r7, lr}
|
|
80060da: b08e sub sp, #56 @ 0x38
|
|
80060dc: af00 add r7, sp, #0
|
|
80060de: 6078 str r0, [r7, #4]
|
|
80060e0: 6039 str r1, [r7, #0]
|
|
BaseType_t xEntryTimeSet = pdFALSE;
|
|
80060e2: 2300 movs r3, #0
|
|
80060e4: 637b str r3, [r7, #52] @ 0x34
|
|
TimeOut_t xTimeOut;
|
|
Queue_t * const pxQueue = xQueue;
|
|
80060e6: 687b ldr r3, [r7, #4]
|
|
80060e8: 62fb str r3, [r7, #44] @ 0x2c
|
|
|
|
#if( configUSE_MUTEXES == 1 )
|
|
BaseType_t xInheritanceOccurred = pdFALSE;
|
|
80060ea: 2300 movs r3, #0
|
|
80060ec: 633b str r3, [r7, #48] @ 0x30
|
|
#endif
|
|
|
|
/* Check the queue pointer is not NULL. */
|
|
configASSERT( ( pxQueue ) );
|
|
80060ee: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
80060f0: 2b00 cmp r3, #0
|
|
80060f2: d10b bne.n 800610c <xQueueSemaphoreTake+0x34>
|
|
__asm volatile
|
|
80060f4: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80060f8: f383 8811 msr BASEPRI, r3
|
|
80060fc: f3bf 8f6f isb sy
|
|
8006100: f3bf 8f4f dsb sy
|
|
8006104: 623b str r3, [r7, #32]
|
|
}
|
|
8006106: bf00 nop
|
|
8006108: bf00 nop
|
|
800610a: e7fd b.n 8006108 <xQueueSemaphoreTake+0x30>
|
|
|
|
/* Check this really is a semaphore, in which case the item size will be
|
|
0. */
|
|
configASSERT( pxQueue->uxItemSize == 0 );
|
|
800610c: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
800610e: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
8006110: 2b00 cmp r3, #0
|
|
8006112: d00b beq.n 800612c <xQueueSemaphoreTake+0x54>
|
|
__asm volatile
|
|
8006114: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8006118: f383 8811 msr BASEPRI, r3
|
|
800611c: f3bf 8f6f isb sy
|
|
8006120: f3bf 8f4f dsb sy
|
|
8006124: 61fb str r3, [r7, #28]
|
|
}
|
|
8006126: bf00 nop
|
|
8006128: bf00 nop
|
|
800612a: e7fd b.n 8006128 <xQueueSemaphoreTake+0x50>
|
|
|
|
/* Cannot block if the scheduler is suspended. */
|
|
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
|
|
{
|
|
configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
|
|
800612c: f001 f9d8 bl 80074e0 <xTaskGetSchedulerState>
|
|
8006130: 4603 mov r3, r0
|
|
8006132: 2b00 cmp r3, #0
|
|
8006134: d102 bne.n 800613c <xQueueSemaphoreTake+0x64>
|
|
8006136: 683b ldr r3, [r7, #0]
|
|
8006138: 2b00 cmp r3, #0
|
|
800613a: d101 bne.n 8006140 <xQueueSemaphoreTake+0x68>
|
|
800613c: 2301 movs r3, #1
|
|
800613e: e000 b.n 8006142 <xQueueSemaphoreTake+0x6a>
|
|
8006140: 2300 movs r3, #0
|
|
8006142: 2b00 cmp r3, #0
|
|
8006144: d10b bne.n 800615e <xQueueSemaphoreTake+0x86>
|
|
__asm volatile
|
|
8006146: f04f 0350 mov.w r3, #80 @ 0x50
|
|
800614a: f383 8811 msr BASEPRI, r3
|
|
800614e: f3bf 8f6f isb sy
|
|
8006152: f3bf 8f4f dsb sy
|
|
8006156: 61bb str r3, [r7, #24]
|
|
}
|
|
8006158: bf00 nop
|
|
800615a: bf00 nop
|
|
800615c: e7fd b.n 800615a <xQueueSemaphoreTake+0x82>
|
|
/*lint -save -e904 This function relaxes the coding standard somewhat to allow return
|
|
statements within the function itself. This is done in the interest
|
|
of execution time efficiency. */
|
|
for( ;; )
|
|
{
|
|
taskENTER_CRITICAL();
|
|
800615e: f002 f82b bl 80081b8 <vPortEnterCritical>
|
|
{
|
|
/* Semaphores are queues with an item size of 0, and where the
|
|
number of messages in the queue is the semaphore's count value. */
|
|
const UBaseType_t uxSemaphoreCount = pxQueue->uxMessagesWaiting;
|
|
8006162: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8006164: 6b9b ldr r3, [r3, #56] @ 0x38
|
|
8006166: 62bb str r3, [r7, #40] @ 0x28
|
|
|
|
/* Is there data in the queue now? To be running the calling task
|
|
must be the highest priority task wanting to access the queue. */
|
|
if( uxSemaphoreCount > ( UBaseType_t ) 0 )
|
|
8006168: 6abb ldr r3, [r7, #40] @ 0x28
|
|
800616a: 2b00 cmp r3, #0
|
|
800616c: d024 beq.n 80061b8 <xQueueSemaphoreTake+0xe0>
|
|
{
|
|
traceQUEUE_RECEIVE( pxQueue );
|
|
|
|
/* Semaphores are queues with a data size of zero and where the
|
|
messages waiting is the semaphore's count. Reduce the count. */
|
|
pxQueue->uxMessagesWaiting = uxSemaphoreCount - ( UBaseType_t ) 1;
|
|
800616e: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8006170: 1e5a subs r2, r3, #1
|
|
8006172: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8006174: 639a str r2, [r3, #56] @ 0x38
|
|
|
|
#if ( configUSE_MUTEXES == 1 )
|
|
{
|
|
if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
|
|
8006176: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8006178: 681b ldr r3, [r3, #0]
|
|
800617a: 2b00 cmp r3, #0
|
|
800617c: d104 bne.n 8006188 <xQueueSemaphoreTake+0xb0>
|
|
{
|
|
/* Record the information required to implement
|
|
priority inheritance should it become necessary. */
|
|
pxQueue->u.xSemaphore.xMutexHolder = pvTaskIncrementMutexHeldCount();
|
|
800617e: f001 fb29 bl 80077d4 <pvTaskIncrementMutexHeldCount>
|
|
8006182: 4602 mov r2, r0
|
|
8006184: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8006186: 609a str r2, [r3, #8]
|
|
}
|
|
#endif /* configUSE_MUTEXES */
|
|
|
|
/* Check to see if other tasks are blocked waiting to give the
|
|
semaphore, and if so, unblock the highest priority such task. */
|
|
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
|
|
8006188: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
800618a: 691b ldr r3, [r3, #16]
|
|
800618c: 2b00 cmp r3, #0
|
|
800618e: d00f beq.n 80061b0 <xQueueSemaphoreTake+0xd8>
|
|
{
|
|
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
|
|
8006190: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8006192: 3310 adds r3, #16
|
|
8006194: 4618 mov r0, r3
|
|
8006196: f000 ffe3 bl 8007160 <xTaskRemoveFromEventList>
|
|
800619a: 4603 mov r3, r0
|
|
800619c: 2b00 cmp r3, #0
|
|
800619e: d007 beq.n 80061b0 <xQueueSemaphoreTake+0xd8>
|
|
{
|
|
queueYIELD_IF_USING_PREEMPTION();
|
|
80061a0: 4b54 ldr r3, [pc, #336] @ (80062f4 <xQueueSemaphoreTake+0x21c>)
|
|
80061a2: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
80061a6: 601a str r2, [r3, #0]
|
|
80061a8: f3bf 8f4f dsb sy
|
|
80061ac: f3bf 8f6f isb sy
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
taskEXIT_CRITICAL();
|
|
80061b0: f002 f834 bl 800821c <vPortExitCritical>
|
|
return pdPASS;
|
|
80061b4: 2301 movs r3, #1
|
|
80061b6: e098 b.n 80062ea <xQueueSemaphoreTake+0x212>
|
|
}
|
|
else
|
|
{
|
|
if( xTicksToWait == ( TickType_t ) 0 )
|
|
80061b8: 683b ldr r3, [r7, #0]
|
|
80061ba: 2b00 cmp r3, #0
|
|
80061bc: d112 bne.n 80061e4 <xQueueSemaphoreTake+0x10c>
|
|
/* For inheritance to have occurred there must have been an
|
|
initial timeout, and an adjusted timeout cannot become 0, as
|
|
if it were 0 the function would have exited. */
|
|
#if( configUSE_MUTEXES == 1 )
|
|
{
|
|
configASSERT( xInheritanceOccurred == pdFALSE );
|
|
80061be: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80061c0: 2b00 cmp r3, #0
|
|
80061c2: d00b beq.n 80061dc <xQueueSemaphoreTake+0x104>
|
|
__asm volatile
|
|
80061c4: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80061c8: f383 8811 msr BASEPRI, r3
|
|
80061cc: f3bf 8f6f isb sy
|
|
80061d0: f3bf 8f4f dsb sy
|
|
80061d4: 617b str r3, [r7, #20]
|
|
}
|
|
80061d6: bf00 nop
|
|
80061d8: bf00 nop
|
|
80061da: e7fd b.n 80061d8 <xQueueSemaphoreTake+0x100>
|
|
}
|
|
#endif /* configUSE_MUTEXES */
|
|
|
|
/* The semaphore count was 0 and no block time is specified
|
|
(or the block time has expired) so exit now. */
|
|
taskEXIT_CRITICAL();
|
|
80061dc: f002 f81e bl 800821c <vPortExitCritical>
|
|
traceQUEUE_RECEIVE_FAILED( pxQueue );
|
|
return errQUEUE_EMPTY;
|
|
80061e0: 2300 movs r3, #0
|
|
80061e2: e082 b.n 80062ea <xQueueSemaphoreTake+0x212>
|
|
}
|
|
else if( xEntryTimeSet == pdFALSE )
|
|
80061e4: 6b7b ldr r3, [r7, #52] @ 0x34
|
|
80061e6: 2b00 cmp r3, #0
|
|
80061e8: d106 bne.n 80061f8 <xQueueSemaphoreTake+0x120>
|
|
{
|
|
/* The semaphore count was 0 and a block time was specified
|
|
so configure the timeout structure ready to block. */
|
|
vTaskInternalSetTimeOutState( &xTimeOut );
|
|
80061ea: f107 030c add.w r3, r7, #12
|
|
80061ee: 4618 mov r0, r3
|
|
80061f0: f001 f81a bl 8007228 <vTaskInternalSetTimeOutState>
|
|
xEntryTimeSet = pdTRUE;
|
|
80061f4: 2301 movs r3, #1
|
|
80061f6: 637b str r3, [r7, #52] @ 0x34
|
|
/* Entry time was already set. */
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
}
|
|
taskEXIT_CRITICAL();
|
|
80061f8: f002 f810 bl 800821c <vPortExitCritical>
|
|
|
|
/* Interrupts and other tasks can give to and take from the semaphore
|
|
now the critical section has been exited. */
|
|
|
|
vTaskSuspendAll();
|
|
80061fc: f000 fd8a bl 8006d14 <vTaskSuspendAll>
|
|
prvLockQueue( pxQueue );
|
|
8006200: f001 ffda bl 80081b8 <vPortEnterCritical>
|
|
8006204: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8006206: f893 3044 ldrb.w r3, [r3, #68] @ 0x44
|
|
800620a: b25b sxtb r3, r3
|
|
800620c: f1b3 3fff cmp.w r3, #4294967295
|
|
8006210: d103 bne.n 800621a <xQueueSemaphoreTake+0x142>
|
|
8006212: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8006214: 2200 movs r2, #0
|
|
8006216: f883 2044 strb.w r2, [r3, #68] @ 0x44
|
|
800621a: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
800621c: f893 3045 ldrb.w r3, [r3, #69] @ 0x45
|
|
8006220: b25b sxtb r3, r3
|
|
8006222: f1b3 3fff cmp.w r3, #4294967295
|
|
8006226: d103 bne.n 8006230 <xQueueSemaphoreTake+0x158>
|
|
8006228: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
800622a: 2200 movs r2, #0
|
|
800622c: f883 2045 strb.w r2, [r3, #69] @ 0x45
|
|
8006230: f001 fff4 bl 800821c <vPortExitCritical>
|
|
|
|
/* Update the timeout state to see if it has expired yet. */
|
|
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )
|
|
8006234: 463a mov r2, r7
|
|
8006236: f107 030c add.w r3, r7, #12
|
|
800623a: 4611 mov r1, r2
|
|
800623c: 4618 mov r0, r3
|
|
800623e: f001 f809 bl 8007254 <xTaskCheckForTimeOut>
|
|
8006242: 4603 mov r3, r0
|
|
8006244: 2b00 cmp r3, #0
|
|
8006246: d132 bne.n 80062ae <xQueueSemaphoreTake+0x1d6>
|
|
{
|
|
/* A block time is specified and not expired. If the semaphore
|
|
count is 0 then enter the Blocked state to wait for a semaphore to
|
|
become available. As semaphores are implemented with queues the
|
|
queue being empty is equivalent to the semaphore count being 0. */
|
|
if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
|
|
8006248: 6af8 ldr r0, [r7, #44] @ 0x2c
|
|
800624a: f000 f9f5 bl 8006638 <prvIsQueueEmpty>
|
|
800624e: 4603 mov r3, r0
|
|
8006250: 2b00 cmp r3, #0
|
|
8006252: d026 beq.n 80062a2 <xQueueSemaphoreTake+0x1ca>
|
|
{
|
|
traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue );
|
|
|
|
#if ( configUSE_MUTEXES == 1 )
|
|
{
|
|
if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
|
|
8006254: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8006256: 681b ldr r3, [r3, #0]
|
|
8006258: 2b00 cmp r3, #0
|
|
800625a: d109 bne.n 8006270 <xQueueSemaphoreTake+0x198>
|
|
{
|
|
taskENTER_CRITICAL();
|
|
800625c: f001 ffac bl 80081b8 <vPortEnterCritical>
|
|
{
|
|
xInheritanceOccurred = xTaskPriorityInherit( pxQueue->u.xSemaphore.xMutexHolder );
|
|
8006260: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8006262: 689b ldr r3, [r3, #8]
|
|
8006264: 4618 mov r0, r3
|
|
8006266: f001 f959 bl 800751c <xTaskPriorityInherit>
|
|
800626a: 6338 str r0, [r7, #48] @ 0x30
|
|
}
|
|
taskEXIT_CRITICAL();
|
|
800626c: f001 ffd6 bl 800821c <vPortExitCritical>
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
#endif
|
|
|
|
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
|
|
8006270: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8006272: 3324 adds r3, #36 @ 0x24
|
|
8006274: 683a ldr r2, [r7, #0]
|
|
8006276: 4611 mov r1, r2
|
|
8006278: 4618 mov r0, r3
|
|
800627a: f000 ff1f bl 80070bc <vTaskPlaceOnEventList>
|
|
prvUnlockQueue( pxQueue );
|
|
800627e: 6af8 ldr r0, [r7, #44] @ 0x2c
|
|
8006280: f000 f988 bl 8006594 <prvUnlockQueue>
|
|
if( xTaskResumeAll() == pdFALSE )
|
|
8006284: f000 fd54 bl 8006d30 <xTaskResumeAll>
|
|
8006288: 4603 mov r3, r0
|
|
800628a: 2b00 cmp r3, #0
|
|
800628c: f47f af67 bne.w 800615e <xQueueSemaphoreTake+0x86>
|
|
{
|
|
portYIELD_WITHIN_API();
|
|
8006290: 4b18 ldr r3, [pc, #96] @ (80062f4 <xQueueSemaphoreTake+0x21c>)
|
|
8006292: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
8006296: 601a str r2, [r3, #0]
|
|
8006298: f3bf 8f4f dsb sy
|
|
800629c: f3bf 8f6f isb sy
|
|
80062a0: e75d b.n 800615e <xQueueSemaphoreTake+0x86>
|
|
}
|
|
else
|
|
{
|
|
/* There was no timeout and the semaphore count was not 0, so
|
|
attempt to take the semaphore again. */
|
|
prvUnlockQueue( pxQueue );
|
|
80062a2: 6af8 ldr r0, [r7, #44] @ 0x2c
|
|
80062a4: f000 f976 bl 8006594 <prvUnlockQueue>
|
|
( void ) xTaskResumeAll();
|
|
80062a8: f000 fd42 bl 8006d30 <xTaskResumeAll>
|
|
80062ac: e757 b.n 800615e <xQueueSemaphoreTake+0x86>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
/* Timed out. */
|
|
prvUnlockQueue( pxQueue );
|
|
80062ae: 6af8 ldr r0, [r7, #44] @ 0x2c
|
|
80062b0: f000 f970 bl 8006594 <prvUnlockQueue>
|
|
( void ) xTaskResumeAll();
|
|
80062b4: f000 fd3c bl 8006d30 <xTaskResumeAll>
|
|
|
|
/* If the semaphore count is 0 exit now as the timeout has
|
|
expired. Otherwise return to attempt to take the semaphore that is
|
|
known to be available. As semaphores are implemented by queues the
|
|
queue being empty is equivalent to the semaphore count being 0. */
|
|
if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
|
|
80062b8: 6af8 ldr r0, [r7, #44] @ 0x2c
|
|
80062ba: f000 f9bd bl 8006638 <prvIsQueueEmpty>
|
|
80062be: 4603 mov r3, r0
|
|
80062c0: 2b00 cmp r3, #0
|
|
80062c2: f43f af4c beq.w 800615e <xQueueSemaphoreTake+0x86>
|
|
#if ( configUSE_MUTEXES == 1 )
|
|
{
|
|
/* xInheritanceOccurred could only have be set if
|
|
pxQueue->uxQueueType == queueQUEUE_IS_MUTEX so no need to
|
|
test the mutex type again to check it is actually a mutex. */
|
|
if( xInheritanceOccurred != pdFALSE )
|
|
80062c6: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80062c8: 2b00 cmp r3, #0
|
|
80062ca: d00d beq.n 80062e8 <xQueueSemaphoreTake+0x210>
|
|
{
|
|
taskENTER_CRITICAL();
|
|
80062cc: f001 ff74 bl 80081b8 <vPortEnterCritical>
|
|
/* This task blocking on the mutex caused another
|
|
task to inherit this task's priority. Now this task
|
|
has timed out the priority should be disinherited
|
|
again, but only as low as the next highest priority
|
|
task that is waiting for the same mutex. */
|
|
uxHighestWaitingPriority = prvGetDisinheritPriorityAfterTimeout( pxQueue );
|
|
80062d0: 6af8 ldr r0, [r7, #44] @ 0x2c
|
|
80062d2: f000 f8b7 bl 8006444 <prvGetDisinheritPriorityAfterTimeout>
|
|
80062d6: 6278 str r0, [r7, #36] @ 0x24
|
|
vTaskPriorityDisinheritAfterTimeout( pxQueue->u.xSemaphore.xMutexHolder, uxHighestWaitingPriority );
|
|
80062d8: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
80062da: 689b ldr r3, [r3, #8]
|
|
80062dc: 6a79 ldr r1, [r7, #36] @ 0x24
|
|
80062de: 4618 mov r0, r3
|
|
80062e0: f001 f9f4 bl 80076cc <vTaskPriorityDisinheritAfterTimeout>
|
|
}
|
|
taskEXIT_CRITICAL();
|
|
80062e4: f001 ff9a bl 800821c <vPortExitCritical>
|
|
}
|
|
}
|
|
#endif /* configUSE_MUTEXES */
|
|
|
|
traceQUEUE_RECEIVE_FAILED( pxQueue );
|
|
return errQUEUE_EMPTY;
|
|
80062e8: 2300 movs r3, #0
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
} /*lint -restore */
|
|
}
|
|
80062ea: 4618 mov r0, r3
|
|
80062ec: 3738 adds r7, #56 @ 0x38
|
|
80062ee: 46bd mov sp, r7
|
|
80062f0: bd80 pop {r7, pc}
|
|
80062f2: bf00 nop
|
|
80062f4: e000ed04 .word 0xe000ed04
|
|
|
|
080062f8 <xQueueReceiveFromISR>:
|
|
} /*lint -restore */
|
|
}
|
|
/*-----------------------------------------------------------*/
|
|
|
|
BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue, void * const pvBuffer, BaseType_t * const pxHigherPriorityTaskWoken )
|
|
{
|
|
80062f8: b580 push {r7, lr}
|
|
80062fa: b08e sub sp, #56 @ 0x38
|
|
80062fc: af00 add r7, sp, #0
|
|
80062fe: 60f8 str r0, [r7, #12]
|
|
8006300: 60b9 str r1, [r7, #8]
|
|
8006302: 607a str r2, [r7, #4]
|
|
BaseType_t xReturn;
|
|
UBaseType_t uxSavedInterruptStatus;
|
|
Queue_t * const pxQueue = xQueue;
|
|
8006304: 68fb ldr r3, [r7, #12]
|
|
8006306: 633b str r3, [r7, #48] @ 0x30
|
|
|
|
configASSERT( pxQueue );
|
|
8006308: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
800630a: 2b00 cmp r3, #0
|
|
800630c: d10b bne.n 8006326 <xQueueReceiveFromISR+0x2e>
|
|
__asm volatile
|
|
800630e: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8006312: f383 8811 msr BASEPRI, r3
|
|
8006316: f3bf 8f6f isb sy
|
|
800631a: f3bf 8f4f dsb sy
|
|
800631e: 623b str r3, [r7, #32]
|
|
}
|
|
8006320: bf00 nop
|
|
8006322: bf00 nop
|
|
8006324: e7fd b.n 8006322 <xQueueReceiveFromISR+0x2a>
|
|
configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
|
|
8006326: 68bb ldr r3, [r7, #8]
|
|
8006328: 2b00 cmp r3, #0
|
|
800632a: d103 bne.n 8006334 <xQueueReceiveFromISR+0x3c>
|
|
800632c: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
800632e: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
8006330: 2b00 cmp r3, #0
|
|
8006332: d101 bne.n 8006338 <xQueueReceiveFromISR+0x40>
|
|
8006334: 2301 movs r3, #1
|
|
8006336: e000 b.n 800633a <xQueueReceiveFromISR+0x42>
|
|
8006338: 2300 movs r3, #0
|
|
800633a: 2b00 cmp r3, #0
|
|
800633c: d10b bne.n 8006356 <xQueueReceiveFromISR+0x5e>
|
|
__asm volatile
|
|
800633e: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8006342: f383 8811 msr BASEPRI, r3
|
|
8006346: f3bf 8f6f isb sy
|
|
800634a: f3bf 8f4f dsb sy
|
|
800634e: 61fb str r3, [r7, #28]
|
|
}
|
|
8006350: bf00 nop
|
|
8006352: bf00 nop
|
|
8006354: e7fd b.n 8006352 <xQueueReceiveFromISR+0x5a>
|
|
that have been assigned a priority at or (logically) below the maximum
|
|
system call interrupt priority. FreeRTOS maintains a separate interrupt
|
|
safe API to ensure interrupt entry is as fast and as simple as possible.
|
|
More information (albeit Cortex-M specific) is provided on the following
|
|
link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */
|
|
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
|
8006356: f002 f80f bl 8008378 <vPortValidateInterruptPriority>
|
|
__asm volatile
|
|
800635a: f3ef 8211 mrs r2, BASEPRI
|
|
800635e: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8006362: f383 8811 msr BASEPRI, r3
|
|
8006366: f3bf 8f6f isb sy
|
|
800636a: f3bf 8f4f dsb sy
|
|
800636e: 61ba str r2, [r7, #24]
|
|
8006370: 617b str r3, [r7, #20]
|
|
return ulOriginalBASEPRI;
|
|
8006372: 69bb ldr r3, [r7, #24]
|
|
|
|
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
|
8006374: 62fb str r3, [r7, #44] @ 0x2c
|
|
{
|
|
const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
|
|
8006376: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8006378: 6b9b ldr r3, [r3, #56] @ 0x38
|
|
800637a: 62bb str r3, [r7, #40] @ 0x28
|
|
|
|
/* Cannot block in an ISR, so check there is data available. */
|
|
if( uxMessagesWaiting > ( UBaseType_t ) 0 )
|
|
800637c: 6abb ldr r3, [r7, #40] @ 0x28
|
|
800637e: 2b00 cmp r3, #0
|
|
8006380: d02f beq.n 80063e2 <xQueueReceiveFromISR+0xea>
|
|
{
|
|
const int8_t cRxLock = pxQueue->cRxLock;
|
|
8006382: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8006384: f893 3044 ldrb.w r3, [r3, #68] @ 0x44
|
|
8006388: f887 3027 strb.w r3, [r7, #39] @ 0x27
|
|
|
|
traceQUEUE_RECEIVE_FROM_ISR( pxQueue );
|
|
|
|
prvCopyDataFromQueue( pxQueue, pvBuffer );
|
|
800638c: 68b9 ldr r1, [r7, #8]
|
|
800638e: 6b38 ldr r0, [r7, #48] @ 0x30
|
|
8006390: f000 f8da bl 8006548 <prvCopyDataFromQueue>
|
|
pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1;
|
|
8006394: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8006396: 1e5a subs r2, r3, #1
|
|
8006398: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
800639a: 639a str r2, [r3, #56] @ 0x38
|
|
|
|
/* If the queue is locked the event list will not be modified.
|
|
Instead update the lock count so the task that unlocks the queue
|
|
will know that an ISR has removed data while the queue was
|
|
locked. */
|
|
if( cRxLock == queueUNLOCKED )
|
|
800639c: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27
|
|
80063a0: f1b3 3fff cmp.w r3, #4294967295
|
|
80063a4: d112 bne.n 80063cc <xQueueReceiveFromISR+0xd4>
|
|
{
|
|
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
|
|
80063a6: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80063a8: 691b ldr r3, [r3, #16]
|
|
80063aa: 2b00 cmp r3, #0
|
|
80063ac: d016 beq.n 80063dc <xQueueReceiveFromISR+0xe4>
|
|
{
|
|
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
|
|
80063ae: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80063b0: 3310 adds r3, #16
|
|
80063b2: 4618 mov r0, r3
|
|
80063b4: f000 fed4 bl 8007160 <xTaskRemoveFromEventList>
|
|
80063b8: 4603 mov r3, r0
|
|
80063ba: 2b00 cmp r3, #0
|
|
80063bc: d00e beq.n 80063dc <xQueueReceiveFromISR+0xe4>
|
|
{
|
|
/* The task waiting has a higher priority than us so
|
|
force a context switch. */
|
|
if( pxHigherPriorityTaskWoken != NULL )
|
|
80063be: 687b ldr r3, [r7, #4]
|
|
80063c0: 2b00 cmp r3, #0
|
|
80063c2: d00b beq.n 80063dc <xQueueReceiveFromISR+0xe4>
|
|
{
|
|
*pxHigherPriorityTaskWoken = pdTRUE;
|
|
80063c4: 687b ldr r3, [r7, #4]
|
|
80063c6: 2201 movs r2, #1
|
|
80063c8: 601a str r2, [r3, #0]
|
|
80063ca: e007 b.n 80063dc <xQueueReceiveFromISR+0xe4>
|
|
}
|
|
else
|
|
{
|
|
/* Increment the lock count so the task that unlocks the queue
|
|
knows that data was removed while it was locked. */
|
|
pxQueue->cRxLock = ( int8_t ) ( cRxLock + 1 );
|
|
80063cc: f897 3027 ldrb.w r3, [r7, #39] @ 0x27
|
|
80063d0: 3301 adds r3, #1
|
|
80063d2: b2db uxtb r3, r3
|
|
80063d4: b25a sxtb r2, r3
|
|
80063d6: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80063d8: f883 2044 strb.w r2, [r3, #68] @ 0x44
|
|
}
|
|
|
|
xReturn = pdPASS;
|
|
80063dc: 2301 movs r3, #1
|
|
80063de: 637b str r3, [r7, #52] @ 0x34
|
|
80063e0: e001 b.n 80063e6 <xQueueReceiveFromISR+0xee>
|
|
}
|
|
else
|
|
{
|
|
xReturn = pdFAIL;
|
|
80063e2: 2300 movs r3, #0
|
|
80063e4: 637b str r3, [r7, #52] @ 0x34
|
|
80063e6: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
80063e8: 613b str r3, [r7, #16]
|
|
__asm volatile
|
|
80063ea: 693b ldr r3, [r7, #16]
|
|
80063ec: f383 8811 msr BASEPRI, r3
|
|
}
|
|
80063f0: bf00 nop
|
|
traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue );
|
|
}
|
|
}
|
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
|
|
|
return xReturn;
|
|
80063f2: 6b7b ldr r3, [r7, #52] @ 0x34
|
|
}
|
|
80063f4: 4618 mov r0, r3
|
|
80063f6: 3738 adds r7, #56 @ 0x38
|
|
80063f8: 46bd mov sp, r7
|
|
80063fa: bd80 pop {r7, pc}
|
|
|
|
080063fc <vQueueDelete>:
|
|
return uxReturn;
|
|
} /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */
|
|
/*-----------------------------------------------------------*/
|
|
|
|
void vQueueDelete( QueueHandle_t xQueue )
|
|
{
|
|
80063fc: b580 push {r7, lr}
|
|
80063fe: b084 sub sp, #16
|
|
8006400: af00 add r7, sp, #0
|
|
8006402: 6078 str r0, [r7, #4]
|
|
Queue_t * const pxQueue = xQueue;
|
|
8006404: 687b ldr r3, [r7, #4]
|
|
8006406: 60fb str r3, [r7, #12]
|
|
|
|
configASSERT( pxQueue );
|
|
8006408: 68fb ldr r3, [r7, #12]
|
|
800640a: 2b00 cmp r3, #0
|
|
800640c: d10b bne.n 8006426 <vQueueDelete+0x2a>
|
|
__asm volatile
|
|
800640e: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8006412: f383 8811 msr BASEPRI, r3
|
|
8006416: f3bf 8f6f isb sy
|
|
800641a: f3bf 8f4f dsb sy
|
|
800641e: 60bb str r3, [r7, #8]
|
|
}
|
|
8006420: bf00 nop
|
|
8006422: bf00 nop
|
|
8006424: e7fd b.n 8006422 <vQueueDelete+0x26>
|
|
traceQUEUE_DELETE( pxQueue );
|
|
|
|
#if ( configQUEUE_REGISTRY_SIZE > 0 )
|
|
{
|
|
vQueueUnregisterQueue( pxQueue );
|
|
8006426: 68f8 ldr r0, [r7, #12]
|
|
8006428: f000 f95e bl 80066e8 <vQueueUnregisterQueue>
|
|
}
|
|
#elif( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
|
|
{
|
|
/* The queue could have been allocated statically or dynamically, so
|
|
check before attempting to free the memory. */
|
|
if( pxQueue->ucStaticallyAllocated == ( uint8_t ) pdFALSE )
|
|
800642c: 68fb ldr r3, [r7, #12]
|
|
800642e: f893 3046 ldrb.w r3, [r3, #70] @ 0x46
|
|
8006432: 2b00 cmp r3, #0
|
|
8006434: d102 bne.n 800643c <vQueueDelete+0x40>
|
|
{
|
|
vPortFree( pxQueue );
|
|
8006436: 68f8 ldr r0, [r7, #12]
|
|
8006438: f002 f8ae bl 8008598 <vPortFree>
|
|
/* The queue must have been statically allocated, so is not going to be
|
|
deleted. Avoid compiler warnings about the unused parameter. */
|
|
( void ) pxQueue;
|
|
}
|
|
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
|
|
}
|
|
800643c: bf00 nop
|
|
800643e: 3710 adds r7, #16
|
|
8006440: 46bd mov sp, r7
|
|
8006442: bd80 pop {r7, pc}
|
|
|
|
08006444 <prvGetDisinheritPriorityAfterTimeout>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if( configUSE_MUTEXES == 1 )
|
|
|
|
static UBaseType_t prvGetDisinheritPriorityAfterTimeout( const Queue_t * const pxQueue )
|
|
{
|
|
8006444: b480 push {r7}
|
|
8006446: b085 sub sp, #20
|
|
8006448: af00 add r7, sp, #0
|
|
800644a: 6078 str r0, [r7, #4]
|
|
priority, but the waiting task times out, then the holder should
|
|
disinherit the priority - but only down to the highest priority of any
|
|
other tasks that are waiting for the same mutex. For this purpose,
|
|
return the priority of the highest priority task that is waiting for the
|
|
mutex. */
|
|
if( listCURRENT_LIST_LENGTH( &( pxQueue->xTasksWaitingToReceive ) ) > 0U )
|
|
800644c: 687b ldr r3, [r7, #4]
|
|
800644e: 6a5b ldr r3, [r3, #36] @ 0x24
|
|
8006450: 2b00 cmp r3, #0
|
|
8006452: d006 beq.n 8006462 <prvGetDisinheritPriorityAfterTimeout+0x1e>
|
|
{
|
|
uxHighestPriorityOfWaitingTasks = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) listGET_ITEM_VALUE_OF_HEAD_ENTRY( &( pxQueue->xTasksWaitingToReceive ) );
|
|
8006454: 687b ldr r3, [r7, #4]
|
|
8006456: 6b1b ldr r3, [r3, #48] @ 0x30
|
|
8006458: 681b ldr r3, [r3, #0]
|
|
800645a: f1c3 0338 rsb r3, r3, #56 @ 0x38
|
|
800645e: 60fb str r3, [r7, #12]
|
|
8006460: e001 b.n 8006466 <prvGetDisinheritPriorityAfterTimeout+0x22>
|
|
}
|
|
else
|
|
{
|
|
uxHighestPriorityOfWaitingTasks = tskIDLE_PRIORITY;
|
|
8006462: 2300 movs r3, #0
|
|
8006464: 60fb str r3, [r7, #12]
|
|
}
|
|
|
|
return uxHighestPriorityOfWaitingTasks;
|
|
8006466: 68fb ldr r3, [r7, #12]
|
|
}
|
|
8006468: 4618 mov r0, r3
|
|
800646a: 3714 adds r7, #20
|
|
800646c: 46bd mov sp, r7
|
|
800646e: f85d 7b04 ldr.w r7, [sp], #4
|
|
8006472: 4770 bx lr
|
|
|
|
08006474 <prvCopyDataToQueue>:
|
|
|
|
#endif /* configUSE_MUTEXES */
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition )
|
|
{
|
|
8006474: b580 push {r7, lr}
|
|
8006476: b086 sub sp, #24
|
|
8006478: af00 add r7, sp, #0
|
|
800647a: 60f8 str r0, [r7, #12]
|
|
800647c: 60b9 str r1, [r7, #8]
|
|
800647e: 607a str r2, [r7, #4]
|
|
BaseType_t xReturn = pdFALSE;
|
|
8006480: 2300 movs r3, #0
|
|
8006482: 617b str r3, [r7, #20]
|
|
UBaseType_t uxMessagesWaiting;
|
|
|
|
/* This function is called from a critical section. */
|
|
|
|
uxMessagesWaiting = pxQueue->uxMessagesWaiting;
|
|
8006484: 68fb ldr r3, [r7, #12]
|
|
8006486: 6b9b ldr r3, [r3, #56] @ 0x38
|
|
8006488: 613b str r3, [r7, #16]
|
|
|
|
if( pxQueue->uxItemSize == ( UBaseType_t ) 0 )
|
|
800648a: 68fb ldr r3, [r7, #12]
|
|
800648c: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
800648e: 2b00 cmp r3, #0
|
|
8006490: d10d bne.n 80064ae <prvCopyDataToQueue+0x3a>
|
|
{
|
|
#if ( configUSE_MUTEXES == 1 )
|
|
{
|
|
if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
|
|
8006492: 68fb ldr r3, [r7, #12]
|
|
8006494: 681b ldr r3, [r3, #0]
|
|
8006496: 2b00 cmp r3, #0
|
|
8006498: d14d bne.n 8006536 <prvCopyDataToQueue+0xc2>
|
|
{
|
|
/* The mutex is no longer being held. */
|
|
xReturn = xTaskPriorityDisinherit( pxQueue->u.xSemaphore.xMutexHolder );
|
|
800649a: 68fb ldr r3, [r7, #12]
|
|
800649c: 689b ldr r3, [r3, #8]
|
|
800649e: 4618 mov r0, r3
|
|
80064a0: f001 f8a4 bl 80075ec <xTaskPriorityDisinherit>
|
|
80064a4: 6178 str r0, [r7, #20]
|
|
pxQueue->u.xSemaphore.xMutexHolder = NULL;
|
|
80064a6: 68fb ldr r3, [r7, #12]
|
|
80064a8: 2200 movs r2, #0
|
|
80064aa: 609a str r2, [r3, #8]
|
|
80064ac: e043 b.n 8006536 <prvCopyDataToQueue+0xc2>
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
#endif /* configUSE_MUTEXES */
|
|
}
|
|
else if( xPosition == queueSEND_TO_BACK )
|
|
80064ae: 687b ldr r3, [r7, #4]
|
|
80064b0: 2b00 cmp r3, #0
|
|
80064b2: d119 bne.n 80064e8 <prvCopyDataToQueue+0x74>
|
|
{
|
|
( void ) memcpy( ( void * ) pxQueue->pcWriteTo, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 !e9087 MISRA exception as the casts are only redundant for some ports, plus previous logic ensures a null pointer can only be passed to memcpy() if the copy size is 0. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. */
|
|
80064b4: 68fb ldr r3, [r7, #12]
|
|
80064b6: 6858 ldr r0, [r3, #4]
|
|
80064b8: 68fb ldr r3, [r7, #12]
|
|
80064ba: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
80064bc: 461a mov r2, r3
|
|
80064be: 68b9 ldr r1, [r7, #8]
|
|
80064c0: f002 f9b6 bl 8008830 <memcpy>
|
|
pxQueue->pcWriteTo += pxQueue->uxItemSize; /*lint !e9016 Pointer arithmetic on char types ok, especially in this use case where it is the clearest way of conveying intent. */
|
|
80064c4: 68fb ldr r3, [r7, #12]
|
|
80064c6: 685a ldr r2, [r3, #4]
|
|
80064c8: 68fb ldr r3, [r7, #12]
|
|
80064ca: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
80064cc: 441a add r2, r3
|
|
80064ce: 68fb ldr r3, [r7, #12]
|
|
80064d0: 605a str r2, [r3, #4]
|
|
if( pxQueue->pcWriteTo >= pxQueue->u.xQueue.pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */
|
|
80064d2: 68fb ldr r3, [r7, #12]
|
|
80064d4: 685a ldr r2, [r3, #4]
|
|
80064d6: 68fb ldr r3, [r7, #12]
|
|
80064d8: 689b ldr r3, [r3, #8]
|
|
80064da: 429a cmp r2, r3
|
|
80064dc: d32b bcc.n 8006536 <prvCopyDataToQueue+0xc2>
|
|
{
|
|
pxQueue->pcWriteTo = pxQueue->pcHead;
|
|
80064de: 68fb ldr r3, [r7, #12]
|
|
80064e0: 681a ldr r2, [r3, #0]
|
|
80064e2: 68fb ldr r3, [r7, #12]
|
|
80064e4: 605a str r2, [r3, #4]
|
|
80064e6: e026 b.n 8006536 <prvCopyDataToQueue+0xc2>
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
( void ) memcpy( ( void * ) pxQueue->u.xQueue.pcReadFrom, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e9087 !e418 MISRA exception as the casts are only redundant for some ports. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. Assert checks null pointer only used when length is 0. */
|
|
80064e8: 68fb ldr r3, [r7, #12]
|
|
80064ea: 68d8 ldr r0, [r3, #12]
|
|
80064ec: 68fb ldr r3, [r7, #12]
|
|
80064ee: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
80064f0: 461a mov r2, r3
|
|
80064f2: 68b9 ldr r1, [r7, #8]
|
|
80064f4: f002 f99c bl 8008830 <memcpy>
|
|
pxQueue->u.xQueue.pcReadFrom -= pxQueue->uxItemSize;
|
|
80064f8: 68fb ldr r3, [r7, #12]
|
|
80064fa: 68da ldr r2, [r3, #12]
|
|
80064fc: 68fb ldr r3, [r7, #12]
|
|
80064fe: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
8006500: 425b negs r3, r3
|
|
8006502: 441a add r2, r3
|
|
8006504: 68fb ldr r3, [r7, #12]
|
|
8006506: 60da str r2, [r3, #12]
|
|
if( pxQueue->u.xQueue.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */
|
|
8006508: 68fb ldr r3, [r7, #12]
|
|
800650a: 68da ldr r2, [r3, #12]
|
|
800650c: 68fb ldr r3, [r7, #12]
|
|
800650e: 681b ldr r3, [r3, #0]
|
|
8006510: 429a cmp r2, r3
|
|
8006512: d207 bcs.n 8006524 <prvCopyDataToQueue+0xb0>
|
|
{
|
|
pxQueue->u.xQueue.pcReadFrom = ( pxQueue->u.xQueue.pcTail - pxQueue->uxItemSize );
|
|
8006514: 68fb ldr r3, [r7, #12]
|
|
8006516: 689a ldr r2, [r3, #8]
|
|
8006518: 68fb ldr r3, [r7, #12]
|
|
800651a: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
800651c: 425b negs r3, r3
|
|
800651e: 441a add r2, r3
|
|
8006520: 68fb ldr r3, [r7, #12]
|
|
8006522: 60da str r2, [r3, #12]
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
if( xPosition == queueOVERWRITE )
|
|
8006524: 687b ldr r3, [r7, #4]
|
|
8006526: 2b02 cmp r3, #2
|
|
8006528: d105 bne.n 8006536 <prvCopyDataToQueue+0xc2>
|
|
{
|
|
if( uxMessagesWaiting > ( UBaseType_t ) 0 )
|
|
800652a: 693b ldr r3, [r7, #16]
|
|
800652c: 2b00 cmp r3, #0
|
|
800652e: d002 beq.n 8006536 <prvCopyDataToQueue+0xc2>
|
|
{
|
|
/* An item is not being added but overwritten, so subtract
|
|
one from the recorded number of items in the queue so when
|
|
one is added again below the number of recorded items remains
|
|
correct. */
|
|
--uxMessagesWaiting;
|
|
8006530: 693b ldr r3, [r7, #16]
|
|
8006532: 3b01 subs r3, #1
|
|
8006534: 613b str r3, [r7, #16]
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
|
|
pxQueue->uxMessagesWaiting = uxMessagesWaiting + ( UBaseType_t ) 1;
|
|
8006536: 693b ldr r3, [r7, #16]
|
|
8006538: 1c5a adds r2, r3, #1
|
|
800653a: 68fb ldr r3, [r7, #12]
|
|
800653c: 639a str r2, [r3, #56] @ 0x38
|
|
|
|
return xReturn;
|
|
800653e: 697b ldr r3, [r7, #20]
|
|
}
|
|
8006540: 4618 mov r0, r3
|
|
8006542: 3718 adds r7, #24
|
|
8006544: 46bd mov sp, r7
|
|
8006546: bd80 pop {r7, pc}
|
|
|
|
08006548 <prvCopyDataFromQueue>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer )
|
|
{
|
|
8006548: b580 push {r7, lr}
|
|
800654a: b082 sub sp, #8
|
|
800654c: af00 add r7, sp, #0
|
|
800654e: 6078 str r0, [r7, #4]
|
|
8006550: 6039 str r1, [r7, #0]
|
|
if( pxQueue->uxItemSize != ( UBaseType_t ) 0 )
|
|
8006552: 687b ldr r3, [r7, #4]
|
|
8006554: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
8006556: 2b00 cmp r3, #0
|
|
8006558: d018 beq.n 800658c <prvCopyDataFromQueue+0x44>
|
|
{
|
|
pxQueue->u.xQueue.pcReadFrom += pxQueue->uxItemSize; /*lint !e9016 Pointer arithmetic on char types ok, especially in this use case where it is the clearest way of conveying intent. */
|
|
800655a: 687b ldr r3, [r7, #4]
|
|
800655c: 68da ldr r2, [r3, #12]
|
|
800655e: 687b ldr r3, [r7, #4]
|
|
8006560: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
8006562: 441a add r2, r3
|
|
8006564: 687b ldr r3, [r7, #4]
|
|
8006566: 60da str r2, [r3, #12]
|
|
if( pxQueue->u.xQueue.pcReadFrom >= pxQueue->u.xQueue.pcTail ) /*lint !e946 MISRA exception justified as use of the relational operator is the cleanest solutions. */
|
|
8006568: 687b ldr r3, [r7, #4]
|
|
800656a: 68da ldr r2, [r3, #12]
|
|
800656c: 687b ldr r3, [r7, #4]
|
|
800656e: 689b ldr r3, [r3, #8]
|
|
8006570: 429a cmp r2, r3
|
|
8006572: d303 bcc.n 800657c <prvCopyDataFromQueue+0x34>
|
|
{
|
|
pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead;
|
|
8006574: 687b ldr r3, [r7, #4]
|
|
8006576: 681a ldr r2, [r3, #0]
|
|
8006578: 687b ldr r3, [r7, #4]
|
|
800657a: 60da str r2, [r3, #12]
|
|
}
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.xQueue.pcReadFrom, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 !e9087 MISRA exception as the casts are only redundant for some ports. Also previous logic ensures a null pointer can only be passed to memcpy() when the count is 0. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. */
|
|
800657c: 687b ldr r3, [r7, #4]
|
|
800657e: 68d9 ldr r1, [r3, #12]
|
|
8006580: 687b ldr r3, [r7, #4]
|
|
8006582: 6c1b ldr r3, [r3, #64] @ 0x40
|
|
8006584: 461a mov r2, r3
|
|
8006586: 6838 ldr r0, [r7, #0]
|
|
8006588: f002 f952 bl 8008830 <memcpy>
|
|
}
|
|
}
|
|
800658c: bf00 nop
|
|
800658e: 3708 adds r7, #8
|
|
8006590: 46bd mov sp, r7
|
|
8006592: bd80 pop {r7, pc}
|
|
|
|
08006594 <prvUnlockQueue>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static void prvUnlockQueue( Queue_t * const pxQueue )
|
|
{
|
|
8006594: b580 push {r7, lr}
|
|
8006596: b084 sub sp, #16
|
|
8006598: af00 add r7, sp, #0
|
|
800659a: 6078 str r0, [r7, #4]
|
|
|
|
/* The lock counts contains the number of extra data items placed or
|
|
removed from the queue while the queue was locked. When a queue is
|
|
locked items can be added or removed, but the event lists cannot be
|
|
updated. */
|
|
taskENTER_CRITICAL();
|
|
800659c: f001 fe0c bl 80081b8 <vPortEnterCritical>
|
|
{
|
|
int8_t cTxLock = pxQueue->cTxLock;
|
|
80065a0: 687b ldr r3, [r7, #4]
|
|
80065a2: f893 3045 ldrb.w r3, [r3, #69] @ 0x45
|
|
80065a6: 73fb strb r3, [r7, #15]
|
|
|
|
/* See if data was added to the queue while it was locked. */
|
|
while( cTxLock > queueLOCKED_UNMODIFIED )
|
|
80065a8: e011 b.n 80065ce <prvUnlockQueue+0x3a>
|
|
}
|
|
#else /* configUSE_QUEUE_SETS */
|
|
{
|
|
/* Tasks that are removed from the event list will get added to
|
|
the pending ready list as the scheduler is still suspended. */
|
|
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
|
|
80065aa: 687b ldr r3, [r7, #4]
|
|
80065ac: 6a5b ldr r3, [r3, #36] @ 0x24
|
|
80065ae: 2b00 cmp r3, #0
|
|
80065b0: d012 beq.n 80065d8 <prvUnlockQueue+0x44>
|
|
{
|
|
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
|
|
80065b2: 687b ldr r3, [r7, #4]
|
|
80065b4: 3324 adds r3, #36 @ 0x24
|
|
80065b6: 4618 mov r0, r3
|
|
80065b8: f000 fdd2 bl 8007160 <xTaskRemoveFromEventList>
|
|
80065bc: 4603 mov r3, r0
|
|
80065be: 2b00 cmp r3, #0
|
|
80065c0: d001 beq.n 80065c6 <prvUnlockQueue+0x32>
|
|
{
|
|
/* The task waiting has a higher priority so record that
|
|
a context switch is required. */
|
|
vTaskMissedYield();
|
|
80065c2: f000 feab bl 800731c <vTaskMissedYield>
|
|
break;
|
|
}
|
|
}
|
|
#endif /* configUSE_QUEUE_SETS */
|
|
|
|
--cTxLock;
|
|
80065c6: 7bfb ldrb r3, [r7, #15]
|
|
80065c8: 3b01 subs r3, #1
|
|
80065ca: b2db uxtb r3, r3
|
|
80065cc: 73fb strb r3, [r7, #15]
|
|
while( cTxLock > queueLOCKED_UNMODIFIED )
|
|
80065ce: f997 300f ldrsb.w r3, [r7, #15]
|
|
80065d2: 2b00 cmp r3, #0
|
|
80065d4: dce9 bgt.n 80065aa <prvUnlockQueue+0x16>
|
|
80065d6: e000 b.n 80065da <prvUnlockQueue+0x46>
|
|
break;
|
|
80065d8: bf00 nop
|
|
}
|
|
|
|
pxQueue->cTxLock = queueUNLOCKED;
|
|
80065da: 687b ldr r3, [r7, #4]
|
|
80065dc: 22ff movs r2, #255 @ 0xff
|
|
80065de: f883 2045 strb.w r2, [r3, #69] @ 0x45
|
|
}
|
|
taskEXIT_CRITICAL();
|
|
80065e2: f001 fe1b bl 800821c <vPortExitCritical>
|
|
|
|
/* Do the same for the Rx lock. */
|
|
taskENTER_CRITICAL();
|
|
80065e6: f001 fde7 bl 80081b8 <vPortEnterCritical>
|
|
{
|
|
int8_t cRxLock = pxQueue->cRxLock;
|
|
80065ea: 687b ldr r3, [r7, #4]
|
|
80065ec: f893 3044 ldrb.w r3, [r3, #68] @ 0x44
|
|
80065f0: 73bb strb r3, [r7, #14]
|
|
|
|
while( cRxLock > queueLOCKED_UNMODIFIED )
|
|
80065f2: e011 b.n 8006618 <prvUnlockQueue+0x84>
|
|
{
|
|
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
|
|
80065f4: 687b ldr r3, [r7, #4]
|
|
80065f6: 691b ldr r3, [r3, #16]
|
|
80065f8: 2b00 cmp r3, #0
|
|
80065fa: d012 beq.n 8006622 <prvUnlockQueue+0x8e>
|
|
{
|
|
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
|
|
80065fc: 687b ldr r3, [r7, #4]
|
|
80065fe: 3310 adds r3, #16
|
|
8006600: 4618 mov r0, r3
|
|
8006602: f000 fdad bl 8007160 <xTaskRemoveFromEventList>
|
|
8006606: 4603 mov r3, r0
|
|
8006608: 2b00 cmp r3, #0
|
|
800660a: d001 beq.n 8006610 <prvUnlockQueue+0x7c>
|
|
{
|
|
vTaskMissedYield();
|
|
800660c: f000 fe86 bl 800731c <vTaskMissedYield>
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
--cRxLock;
|
|
8006610: 7bbb ldrb r3, [r7, #14]
|
|
8006612: 3b01 subs r3, #1
|
|
8006614: b2db uxtb r3, r3
|
|
8006616: 73bb strb r3, [r7, #14]
|
|
while( cRxLock > queueLOCKED_UNMODIFIED )
|
|
8006618: f997 300e ldrsb.w r3, [r7, #14]
|
|
800661c: 2b00 cmp r3, #0
|
|
800661e: dce9 bgt.n 80065f4 <prvUnlockQueue+0x60>
|
|
8006620: e000 b.n 8006624 <prvUnlockQueue+0x90>
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
8006622: bf00 nop
|
|
}
|
|
}
|
|
|
|
pxQueue->cRxLock = queueUNLOCKED;
|
|
8006624: 687b ldr r3, [r7, #4]
|
|
8006626: 22ff movs r2, #255 @ 0xff
|
|
8006628: f883 2044 strb.w r2, [r3, #68] @ 0x44
|
|
}
|
|
taskEXIT_CRITICAL();
|
|
800662c: f001 fdf6 bl 800821c <vPortExitCritical>
|
|
}
|
|
8006630: bf00 nop
|
|
8006632: 3710 adds r7, #16
|
|
8006634: 46bd mov sp, r7
|
|
8006636: bd80 pop {r7, pc}
|
|
|
|
08006638 <prvIsQueueEmpty>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static BaseType_t prvIsQueueEmpty( const Queue_t *pxQueue )
|
|
{
|
|
8006638: b580 push {r7, lr}
|
|
800663a: b084 sub sp, #16
|
|
800663c: af00 add r7, sp, #0
|
|
800663e: 6078 str r0, [r7, #4]
|
|
BaseType_t xReturn;
|
|
|
|
taskENTER_CRITICAL();
|
|
8006640: f001 fdba bl 80081b8 <vPortEnterCritical>
|
|
{
|
|
if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 )
|
|
8006644: 687b ldr r3, [r7, #4]
|
|
8006646: 6b9b ldr r3, [r3, #56] @ 0x38
|
|
8006648: 2b00 cmp r3, #0
|
|
800664a: d102 bne.n 8006652 <prvIsQueueEmpty+0x1a>
|
|
{
|
|
xReturn = pdTRUE;
|
|
800664c: 2301 movs r3, #1
|
|
800664e: 60fb str r3, [r7, #12]
|
|
8006650: e001 b.n 8006656 <prvIsQueueEmpty+0x1e>
|
|
}
|
|
else
|
|
{
|
|
xReturn = pdFALSE;
|
|
8006652: 2300 movs r3, #0
|
|
8006654: 60fb str r3, [r7, #12]
|
|
}
|
|
}
|
|
taskEXIT_CRITICAL();
|
|
8006656: f001 fde1 bl 800821c <vPortExitCritical>
|
|
|
|
return xReturn;
|
|
800665a: 68fb ldr r3, [r7, #12]
|
|
}
|
|
800665c: 4618 mov r0, r3
|
|
800665e: 3710 adds r7, #16
|
|
8006660: 46bd mov sp, r7
|
|
8006662: bd80 pop {r7, pc}
|
|
|
|
08006664 <prvIsQueueFull>:
|
|
return xReturn;
|
|
} /*lint !e818 xQueue could not be pointer to const because it is a typedef. */
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static BaseType_t prvIsQueueFull( const Queue_t *pxQueue )
|
|
{
|
|
8006664: b580 push {r7, lr}
|
|
8006666: b084 sub sp, #16
|
|
8006668: af00 add r7, sp, #0
|
|
800666a: 6078 str r0, [r7, #4]
|
|
BaseType_t xReturn;
|
|
|
|
taskENTER_CRITICAL();
|
|
800666c: f001 fda4 bl 80081b8 <vPortEnterCritical>
|
|
{
|
|
if( pxQueue->uxMessagesWaiting == pxQueue->uxLength )
|
|
8006670: 687b ldr r3, [r7, #4]
|
|
8006672: 6b9a ldr r2, [r3, #56] @ 0x38
|
|
8006674: 687b ldr r3, [r7, #4]
|
|
8006676: 6bdb ldr r3, [r3, #60] @ 0x3c
|
|
8006678: 429a cmp r2, r3
|
|
800667a: d102 bne.n 8006682 <prvIsQueueFull+0x1e>
|
|
{
|
|
xReturn = pdTRUE;
|
|
800667c: 2301 movs r3, #1
|
|
800667e: 60fb str r3, [r7, #12]
|
|
8006680: e001 b.n 8006686 <prvIsQueueFull+0x22>
|
|
}
|
|
else
|
|
{
|
|
xReturn = pdFALSE;
|
|
8006682: 2300 movs r3, #0
|
|
8006684: 60fb str r3, [r7, #12]
|
|
}
|
|
}
|
|
taskEXIT_CRITICAL();
|
|
8006686: f001 fdc9 bl 800821c <vPortExitCritical>
|
|
|
|
return xReturn;
|
|
800668a: 68fb ldr r3, [r7, #12]
|
|
}
|
|
800668c: 4618 mov r0, r3
|
|
800668e: 3710 adds r7, #16
|
|
8006690: 46bd mov sp, r7
|
|
8006692: bd80 pop {r7, pc}
|
|
|
|
08006694 <vQueueAddToRegistry>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if ( configQUEUE_REGISTRY_SIZE > 0 )
|
|
|
|
void vQueueAddToRegistry( QueueHandle_t xQueue, const char *pcQueueName ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
|
{
|
|
8006694: b480 push {r7}
|
|
8006696: b085 sub sp, #20
|
|
8006698: af00 add r7, sp, #0
|
|
800669a: 6078 str r0, [r7, #4]
|
|
800669c: 6039 str r1, [r7, #0]
|
|
UBaseType_t ux;
|
|
|
|
/* See if there is an empty space in the registry. A NULL name denotes
|
|
a free slot. */
|
|
for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
|
|
800669e: 2300 movs r3, #0
|
|
80066a0: 60fb str r3, [r7, #12]
|
|
80066a2: e014 b.n 80066ce <vQueueAddToRegistry+0x3a>
|
|
{
|
|
if( xQueueRegistry[ ux ].pcQueueName == NULL )
|
|
80066a4: 4a0f ldr r2, [pc, #60] @ (80066e4 <vQueueAddToRegistry+0x50>)
|
|
80066a6: 68fb ldr r3, [r7, #12]
|
|
80066a8: f852 3033 ldr.w r3, [r2, r3, lsl #3]
|
|
80066ac: 2b00 cmp r3, #0
|
|
80066ae: d10b bne.n 80066c8 <vQueueAddToRegistry+0x34>
|
|
{
|
|
/* Store the information on this queue. */
|
|
xQueueRegistry[ ux ].pcQueueName = pcQueueName;
|
|
80066b0: 490c ldr r1, [pc, #48] @ (80066e4 <vQueueAddToRegistry+0x50>)
|
|
80066b2: 68fb ldr r3, [r7, #12]
|
|
80066b4: 683a ldr r2, [r7, #0]
|
|
80066b6: f841 2033 str.w r2, [r1, r3, lsl #3]
|
|
xQueueRegistry[ ux ].xHandle = xQueue;
|
|
80066ba: 4a0a ldr r2, [pc, #40] @ (80066e4 <vQueueAddToRegistry+0x50>)
|
|
80066bc: 68fb ldr r3, [r7, #12]
|
|
80066be: 00db lsls r3, r3, #3
|
|
80066c0: 4413 add r3, r2
|
|
80066c2: 687a ldr r2, [r7, #4]
|
|
80066c4: 605a str r2, [r3, #4]
|
|
|
|
traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName );
|
|
break;
|
|
80066c6: e006 b.n 80066d6 <vQueueAddToRegistry+0x42>
|
|
for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
|
|
80066c8: 68fb ldr r3, [r7, #12]
|
|
80066ca: 3301 adds r3, #1
|
|
80066cc: 60fb str r3, [r7, #12]
|
|
80066ce: 68fb ldr r3, [r7, #12]
|
|
80066d0: 2b07 cmp r3, #7
|
|
80066d2: d9e7 bls.n 80066a4 <vQueueAddToRegistry+0x10>
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
}
|
|
80066d4: bf00 nop
|
|
80066d6: bf00 nop
|
|
80066d8: 3714 adds r7, #20
|
|
80066da: 46bd mov sp, r7
|
|
80066dc: f85d 7b04 ldr.w r7, [sp], #4
|
|
80066e0: 4770 bx lr
|
|
80066e2: bf00 nop
|
|
80066e4: 20000e64 .word 0x20000e64
|
|
|
|
080066e8 <vQueueUnregisterQueue>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if ( configQUEUE_REGISTRY_SIZE > 0 )
|
|
|
|
void vQueueUnregisterQueue( QueueHandle_t xQueue )
|
|
{
|
|
80066e8: b480 push {r7}
|
|
80066ea: b085 sub sp, #20
|
|
80066ec: af00 add r7, sp, #0
|
|
80066ee: 6078 str r0, [r7, #4]
|
|
UBaseType_t ux;
|
|
|
|
/* See if the handle of the queue being unregistered in actually in the
|
|
registry. */
|
|
for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
|
|
80066f0: 2300 movs r3, #0
|
|
80066f2: 60fb str r3, [r7, #12]
|
|
80066f4: e016 b.n 8006724 <vQueueUnregisterQueue+0x3c>
|
|
{
|
|
if( xQueueRegistry[ ux ].xHandle == xQueue )
|
|
80066f6: 4a10 ldr r2, [pc, #64] @ (8006738 <vQueueUnregisterQueue+0x50>)
|
|
80066f8: 68fb ldr r3, [r7, #12]
|
|
80066fa: 00db lsls r3, r3, #3
|
|
80066fc: 4413 add r3, r2
|
|
80066fe: 685b ldr r3, [r3, #4]
|
|
8006700: 687a ldr r2, [r7, #4]
|
|
8006702: 429a cmp r2, r3
|
|
8006704: d10b bne.n 800671e <vQueueUnregisterQueue+0x36>
|
|
{
|
|
/* Set the name to NULL to show that this slot if free again. */
|
|
xQueueRegistry[ ux ].pcQueueName = NULL;
|
|
8006706: 4a0c ldr r2, [pc, #48] @ (8006738 <vQueueUnregisterQueue+0x50>)
|
|
8006708: 68fb ldr r3, [r7, #12]
|
|
800670a: 2100 movs r1, #0
|
|
800670c: f842 1033 str.w r1, [r2, r3, lsl #3]
|
|
|
|
/* Set the handle to NULL to ensure the same queue handle cannot
|
|
appear in the registry twice if it is added, removed, then
|
|
added again. */
|
|
xQueueRegistry[ ux ].xHandle = ( QueueHandle_t ) 0;
|
|
8006710: 4a09 ldr r2, [pc, #36] @ (8006738 <vQueueUnregisterQueue+0x50>)
|
|
8006712: 68fb ldr r3, [r7, #12]
|
|
8006714: 00db lsls r3, r3, #3
|
|
8006716: 4413 add r3, r2
|
|
8006718: 2200 movs r2, #0
|
|
800671a: 605a str r2, [r3, #4]
|
|
break;
|
|
800671c: e006 b.n 800672c <vQueueUnregisterQueue+0x44>
|
|
for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
|
|
800671e: 68fb ldr r3, [r7, #12]
|
|
8006720: 3301 adds r3, #1
|
|
8006722: 60fb str r3, [r7, #12]
|
|
8006724: 68fb ldr r3, [r7, #12]
|
|
8006726: 2b07 cmp r3, #7
|
|
8006728: d9e5 bls.n 80066f6 <vQueueUnregisterQueue+0xe>
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
|
|
} /*lint !e818 xQueue could not be pointer to const because it is a typedef. */
|
|
800672a: bf00 nop
|
|
800672c: bf00 nop
|
|
800672e: 3714 adds r7, #20
|
|
8006730: 46bd mov sp, r7
|
|
8006732: f85d 7b04 ldr.w r7, [sp], #4
|
|
8006736: 4770 bx lr
|
|
8006738: 20000e64 .word 0x20000e64
|
|
|
|
0800673c <vQueueWaitForMessageRestricted>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if ( configUSE_TIMERS == 1 )
|
|
|
|
void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely )
|
|
{
|
|
800673c: b580 push {r7, lr}
|
|
800673e: b086 sub sp, #24
|
|
8006740: af00 add r7, sp, #0
|
|
8006742: 60f8 str r0, [r7, #12]
|
|
8006744: 60b9 str r1, [r7, #8]
|
|
8006746: 607a str r2, [r7, #4]
|
|
Queue_t * const pxQueue = xQueue;
|
|
8006748: 68fb ldr r3, [r7, #12]
|
|
800674a: 617b str r3, [r7, #20]
|
|
will not actually cause the task to block, just place it on a blocked
|
|
list. It will not block until the scheduler is unlocked - at which
|
|
time a yield will be performed. If an item is added to the queue while
|
|
the queue is locked, and the calling task blocks on the queue, then the
|
|
calling task will be immediately unblocked when the queue is unlocked. */
|
|
prvLockQueue( pxQueue );
|
|
800674c: f001 fd34 bl 80081b8 <vPortEnterCritical>
|
|
8006750: 697b ldr r3, [r7, #20]
|
|
8006752: f893 3044 ldrb.w r3, [r3, #68] @ 0x44
|
|
8006756: b25b sxtb r3, r3
|
|
8006758: f1b3 3fff cmp.w r3, #4294967295
|
|
800675c: d103 bne.n 8006766 <vQueueWaitForMessageRestricted+0x2a>
|
|
800675e: 697b ldr r3, [r7, #20]
|
|
8006760: 2200 movs r2, #0
|
|
8006762: f883 2044 strb.w r2, [r3, #68] @ 0x44
|
|
8006766: 697b ldr r3, [r7, #20]
|
|
8006768: f893 3045 ldrb.w r3, [r3, #69] @ 0x45
|
|
800676c: b25b sxtb r3, r3
|
|
800676e: f1b3 3fff cmp.w r3, #4294967295
|
|
8006772: d103 bne.n 800677c <vQueueWaitForMessageRestricted+0x40>
|
|
8006774: 697b ldr r3, [r7, #20]
|
|
8006776: 2200 movs r2, #0
|
|
8006778: f883 2045 strb.w r2, [r3, #69] @ 0x45
|
|
800677c: f001 fd4e bl 800821c <vPortExitCritical>
|
|
if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0U )
|
|
8006780: 697b ldr r3, [r7, #20]
|
|
8006782: 6b9b ldr r3, [r3, #56] @ 0x38
|
|
8006784: 2b00 cmp r3, #0
|
|
8006786: d106 bne.n 8006796 <vQueueWaitForMessageRestricted+0x5a>
|
|
{
|
|
/* There is nothing in the queue, block for the specified period. */
|
|
vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait, xWaitIndefinitely );
|
|
8006788: 697b ldr r3, [r7, #20]
|
|
800678a: 3324 adds r3, #36 @ 0x24
|
|
800678c: 687a ldr r2, [r7, #4]
|
|
800678e: 68b9 ldr r1, [r7, #8]
|
|
8006790: 4618 mov r0, r3
|
|
8006792: f000 fcb9 bl 8007108 <vTaskPlaceOnEventListRestricted>
|
|
}
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
prvUnlockQueue( pxQueue );
|
|
8006796: 6978 ldr r0, [r7, #20]
|
|
8006798: f7ff fefc bl 8006594 <prvUnlockQueue>
|
|
}
|
|
800679c: bf00 nop
|
|
800679e: 3718 adds r7, #24
|
|
80067a0: 46bd mov sp, r7
|
|
80067a2: bd80 pop {r7, pc}
|
|
|
|
080067a4 <xTaskCreateStatic>:
|
|
const uint32_t ulStackDepth,
|
|
void * const pvParameters,
|
|
UBaseType_t uxPriority,
|
|
StackType_t * const puxStackBuffer,
|
|
StaticTask_t * const pxTaskBuffer )
|
|
{
|
|
80067a4: b580 push {r7, lr}
|
|
80067a6: b08e sub sp, #56 @ 0x38
|
|
80067a8: af04 add r7, sp, #16
|
|
80067aa: 60f8 str r0, [r7, #12]
|
|
80067ac: 60b9 str r1, [r7, #8]
|
|
80067ae: 607a str r2, [r7, #4]
|
|
80067b0: 603b str r3, [r7, #0]
|
|
TCB_t *pxNewTCB;
|
|
TaskHandle_t xReturn;
|
|
|
|
configASSERT( puxStackBuffer != NULL );
|
|
80067b2: 6b7b ldr r3, [r7, #52] @ 0x34
|
|
80067b4: 2b00 cmp r3, #0
|
|
80067b6: d10b bne.n 80067d0 <xTaskCreateStatic+0x2c>
|
|
__asm volatile
|
|
80067b8: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80067bc: f383 8811 msr BASEPRI, r3
|
|
80067c0: f3bf 8f6f isb sy
|
|
80067c4: f3bf 8f4f dsb sy
|
|
80067c8: 623b str r3, [r7, #32]
|
|
}
|
|
80067ca: bf00 nop
|
|
80067cc: bf00 nop
|
|
80067ce: e7fd b.n 80067cc <xTaskCreateStatic+0x28>
|
|
configASSERT( pxTaskBuffer != NULL );
|
|
80067d0: 6bbb ldr r3, [r7, #56] @ 0x38
|
|
80067d2: 2b00 cmp r3, #0
|
|
80067d4: d10b bne.n 80067ee <xTaskCreateStatic+0x4a>
|
|
__asm volatile
|
|
80067d6: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80067da: f383 8811 msr BASEPRI, r3
|
|
80067de: f3bf 8f6f isb sy
|
|
80067e2: f3bf 8f4f dsb sy
|
|
80067e6: 61fb str r3, [r7, #28]
|
|
}
|
|
80067e8: bf00 nop
|
|
80067ea: bf00 nop
|
|
80067ec: e7fd b.n 80067ea <xTaskCreateStatic+0x46>
|
|
#if( configASSERT_DEFINED == 1 )
|
|
{
|
|
/* Sanity check that the size of the structure used to declare a
|
|
variable of type StaticTask_t equals the size of the real task
|
|
structure. */
|
|
volatile size_t xSize = sizeof( StaticTask_t );
|
|
80067ee: 235c movs r3, #92 @ 0x5c
|
|
80067f0: 613b str r3, [r7, #16]
|
|
configASSERT( xSize == sizeof( TCB_t ) );
|
|
80067f2: 693b ldr r3, [r7, #16]
|
|
80067f4: 2b5c cmp r3, #92 @ 0x5c
|
|
80067f6: d00b beq.n 8006810 <xTaskCreateStatic+0x6c>
|
|
__asm volatile
|
|
80067f8: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80067fc: f383 8811 msr BASEPRI, r3
|
|
8006800: f3bf 8f6f isb sy
|
|
8006804: f3bf 8f4f dsb sy
|
|
8006808: 61bb str r3, [r7, #24]
|
|
}
|
|
800680a: bf00 nop
|
|
800680c: bf00 nop
|
|
800680e: e7fd b.n 800680c <xTaskCreateStatic+0x68>
|
|
( void ) xSize; /* Prevent lint warning when configASSERT() is not used. */
|
|
8006810: 693b ldr r3, [r7, #16]
|
|
}
|
|
#endif /* configASSERT_DEFINED */
|
|
|
|
|
|
if( ( pxTaskBuffer != NULL ) && ( puxStackBuffer != NULL ) )
|
|
8006812: 6bbb ldr r3, [r7, #56] @ 0x38
|
|
8006814: 2b00 cmp r3, #0
|
|
8006816: d01e beq.n 8006856 <xTaskCreateStatic+0xb2>
|
|
8006818: 6b7b ldr r3, [r7, #52] @ 0x34
|
|
800681a: 2b00 cmp r3, #0
|
|
800681c: d01b beq.n 8006856 <xTaskCreateStatic+0xb2>
|
|
{
|
|
/* The memory used for the task's TCB and stack are passed into this
|
|
function - use them. */
|
|
pxNewTCB = ( TCB_t * ) pxTaskBuffer; /*lint !e740 !e9087 Unusual cast is ok as the structures are designed to have the same alignment, and the size is checked by an assert. */
|
|
800681e: 6bbb ldr r3, [r7, #56] @ 0x38
|
|
8006820: 627b str r3, [r7, #36] @ 0x24
|
|
pxNewTCB->pxStack = ( StackType_t * ) puxStackBuffer;
|
|
8006822: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
8006824: 6b7a ldr r2, [r7, #52] @ 0x34
|
|
8006826: 631a str r2, [r3, #48] @ 0x30
|
|
|
|
#if( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 ) /*lint !e731 !e9029 Macro has been consolidated for readability reasons. */
|
|
{
|
|
/* Tasks can be created statically or dynamically, so note this
|
|
task was created statically in case the task is later deleted. */
|
|
pxNewTCB->ucStaticallyAllocated = tskSTATICALLY_ALLOCATED_STACK_AND_TCB;
|
|
8006828: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
800682a: 2202 movs r2, #2
|
|
800682c: f883 2059 strb.w r2, [r3, #89] @ 0x59
|
|
}
|
|
#endif /* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE */
|
|
|
|
prvInitialiseNewTask( pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, &xReturn, pxNewTCB, NULL );
|
|
8006830: 2300 movs r3, #0
|
|
8006832: 9303 str r3, [sp, #12]
|
|
8006834: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
8006836: 9302 str r3, [sp, #8]
|
|
8006838: f107 0314 add.w r3, r7, #20
|
|
800683c: 9301 str r3, [sp, #4]
|
|
800683e: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8006840: 9300 str r3, [sp, #0]
|
|
8006842: 683b ldr r3, [r7, #0]
|
|
8006844: 687a ldr r2, [r7, #4]
|
|
8006846: 68b9 ldr r1, [r7, #8]
|
|
8006848: 68f8 ldr r0, [r7, #12]
|
|
800684a: f000 f850 bl 80068ee <prvInitialiseNewTask>
|
|
prvAddNewTaskToReadyList( pxNewTCB );
|
|
800684e: 6a78 ldr r0, [r7, #36] @ 0x24
|
|
8006850: f000 f8de bl 8006a10 <prvAddNewTaskToReadyList>
|
|
8006854: e001 b.n 800685a <xTaskCreateStatic+0xb6>
|
|
}
|
|
else
|
|
{
|
|
xReturn = NULL;
|
|
8006856: 2300 movs r3, #0
|
|
8006858: 617b str r3, [r7, #20]
|
|
}
|
|
|
|
return xReturn;
|
|
800685a: 697b ldr r3, [r7, #20]
|
|
}
|
|
800685c: 4618 mov r0, r3
|
|
800685e: 3728 adds r7, #40 @ 0x28
|
|
8006860: 46bd mov sp, r7
|
|
8006862: bd80 pop {r7, pc}
|
|
|
|
08006864 <xTaskCreate>:
|
|
const char * const pcName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
|
const configSTACK_DEPTH_TYPE usStackDepth,
|
|
void * const pvParameters,
|
|
UBaseType_t uxPriority,
|
|
TaskHandle_t * const pxCreatedTask )
|
|
{
|
|
8006864: b580 push {r7, lr}
|
|
8006866: b08c sub sp, #48 @ 0x30
|
|
8006868: af04 add r7, sp, #16
|
|
800686a: 60f8 str r0, [r7, #12]
|
|
800686c: 60b9 str r1, [r7, #8]
|
|
800686e: 603b str r3, [r7, #0]
|
|
8006870: 4613 mov r3, r2
|
|
8006872: 80fb strh r3, [r7, #6]
|
|
#else /* portSTACK_GROWTH */
|
|
{
|
|
StackType_t *pxStack;
|
|
|
|
/* Allocate space for the stack used by the task being created. */
|
|
pxStack = pvPortMalloc( ( ( ( size_t ) usStackDepth ) * sizeof( StackType_t ) ) ); /*lint !e9079 All values returned by pvPortMalloc() have at least the alignment required by the MCU's stack and this allocation is the stack. */
|
|
8006874: 88fb ldrh r3, [r7, #6]
|
|
8006876: 009b lsls r3, r3, #2
|
|
8006878: 4618 mov r0, r3
|
|
800687a: f001 fdbf bl 80083fc <pvPortMalloc>
|
|
800687e: 6178 str r0, [r7, #20]
|
|
|
|
if( pxStack != NULL )
|
|
8006880: 697b ldr r3, [r7, #20]
|
|
8006882: 2b00 cmp r3, #0
|
|
8006884: d00e beq.n 80068a4 <xTaskCreate+0x40>
|
|
{
|
|
/* Allocate space for the TCB. */
|
|
pxNewTCB = ( TCB_t * ) pvPortMalloc( sizeof( TCB_t ) ); /*lint !e9087 !e9079 All values returned by pvPortMalloc() have at least the alignment required by the MCU's stack, and the first member of TCB_t is always a pointer to the task's stack. */
|
|
8006886: 205c movs r0, #92 @ 0x5c
|
|
8006888: f001 fdb8 bl 80083fc <pvPortMalloc>
|
|
800688c: 61f8 str r0, [r7, #28]
|
|
|
|
if( pxNewTCB != NULL )
|
|
800688e: 69fb ldr r3, [r7, #28]
|
|
8006890: 2b00 cmp r3, #0
|
|
8006892: d003 beq.n 800689c <xTaskCreate+0x38>
|
|
{
|
|
/* Store the stack location in the TCB. */
|
|
pxNewTCB->pxStack = pxStack;
|
|
8006894: 69fb ldr r3, [r7, #28]
|
|
8006896: 697a ldr r2, [r7, #20]
|
|
8006898: 631a str r2, [r3, #48] @ 0x30
|
|
800689a: e005 b.n 80068a8 <xTaskCreate+0x44>
|
|
}
|
|
else
|
|
{
|
|
/* The stack cannot be used as the TCB was not created. Free
|
|
it again. */
|
|
vPortFree( pxStack );
|
|
800689c: 6978 ldr r0, [r7, #20]
|
|
800689e: f001 fe7b bl 8008598 <vPortFree>
|
|
80068a2: e001 b.n 80068a8 <xTaskCreate+0x44>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
pxNewTCB = NULL;
|
|
80068a4: 2300 movs r3, #0
|
|
80068a6: 61fb str r3, [r7, #28]
|
|
}
|
|
}
|
|
#endif /* portSTACK_GROWTH */
|
|
|
|
if( pxNewTCB != NULL )
|
|
80068a8: 69fb ldr r3, [r7, #28]
|
|
80068aa: 2b00 cmp r3, #0
|
|
80068ac: d017 beq.n 80068de <xTaskCreate+0x7a>
|
|
{
|
|
#if( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 ) /*lint !e9029 !e731 Macro has been consolidated for readability reasons. */
|
|
{
|
|
/* Tasks can be created statically or dynamically, so note this
|
|
task was created dynamically in case it is later deleted. */
|
|
pxNewTCB->ucStaticallyAllocated = tskDYNAMICALLY_ALLOCATED_STACK_AND_TCB;
|
|
80068ae: 69fb ldr r3, [r7, #28]
|
|
80068b0: 2200 movs r2, #0
|
|
80068b2: f883 2059 strb.w r2, [r3, #89] @ 0x59
|
|
}
|
|
#endif /* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE */
|
|
|
|
prvInitialiseNewTask( pxTaskCode, pcName, ( uint32_t ) usStackDepth, pvParameters, uxPriority, pxCreatedTask, pxNewTCB, NULL );
|
|
80068b6: 88fa ldrh r2, [r7, #6]
|
|
80068b8: 2300 movs r3, #0
|
|
80068ba: 9303 str r3, [sp, #12]
|
|
80068bc: 69fb ldr r3, [r7, #28]
|
|
80068be: 9302 str r3, [sp, #8]
|
|
80068c0: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
80068c2: 9301 str r3, [sp, #4]
|
|
80068c4: 6abb ldr r3, [r7, #40] @ 0x28
|
|
80068c6: 9300 str r3, [sp, #0]
|
|
80068c8: 683b ldr r3, [r7, #0]
|
|
80068ca: 68b9 ldr r1, [r7, #8]
|
|
80068cc: 68f8 ldr r0, [r7, #12]
|
|
80068ce: f000 f80e bl 80068ee <prvInitialiseNewTask>
|
|
prvAddNewTaskToReadyList( pxNewTCB );
|
|
80068d2: 69f8 ldr r0, [r7, #28]
|
|
80068d4: f000 f89c bl 8006a10 <prvAddNewTaskToReadyList>
|
|
xReturn = pdPASS;
|
|
80068d8: 2301 movs r3, #1
|
|
80068da: 61bb str r3, [r7, #24]
|
|
80068dc: e002 b.n 80068e4 <xTaskCreate+0x80>
|
|
}
|
|
else
|
|
{
|
|
xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY;
|
|
80068de: f04f 33ff mov.w r3, #4294967295
|
|
80068e2: 61bb str r3, [r7, #24]
|
|
}
|
|
|
|
return xReturn;
|
|
80068e4: 69bb ldr r3, [r7, #24]
|
|
}
|
|
80068e6: 4618 mov r0, r3
|
|
80068e8: 3720 adds r7, #32
|
|
80068ea: 46bd mov sp, r7
|
|
80068ec: bd80 pop {r7, pc}
|
|
|
|
080068ee <prvInitialiseNewTask>:
|
|
void * const pvParameters,
|
|
UBaseType_t uxPriority,
|
|
TaskHandle_t * const pxCreatedTask,
|
|
TCB_t *pxNewTCB,
|
|
const MemoryRegion_t * const xRegions )
|
|
{
|
|
80068ee: b580 push {r7, lr}
|
|
80068f0: b088 sub sp, #32
|
|
80068f2: af00 add r7, sp, #0
|
|
80068f4: 60f8 str r0, [r7, #12]
|
|
80068f6: 60b9 str r1, [r7, #8]
|
|
80068f8: 607a str r2, [r7, #4]
|
|
80068fa: 603b str r3, [r7, #0]
|
|
|
|
/* Avoid dependency on memset() if it is not required. */
|
|
#if( tskSET_NEW_STACKS_TO_KNOWN_VALUE == 1 )
|
|
{
|
|
/* Fill the stack with a known value to assist debugging. */
|
|
( void ) memset( pxNewTCB->pxStack, ( int ) tskSTACK_FILL_BYTE, ( size_t ) ulStackDepth * sizeof( StackType_t ) );
|
|
80068fc: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80068fe: 6b18 ldr r0, [r3, #48] @ 0x30
|
|
8006900: 687b ldr r3, [r7, #4]
|
|
8006902: 009b lsls r3, r3, #2
|
|
8006904: 461a mov r2, r3
|
|
8006906: 21a5 movs r1, #165 @ 0xa5
|
|
8006908: f001 ff66 bl 80087d8 <memset>
|
|
grows from high memory to low (as per the 80x86) or vice versa.
|
|
portSTACK_GROWTH is used to make the result positive or negative as required
|
|
by the port. */
|
|
#if( portSTACK_GROWTH < 0 )
|
|
{
|
|
pxTopOfStack = &( pxNewTCB->pxStack[ ulStackDepth - ( uint32_t ) 1 ] );
|
|
800690c: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
800690e: 6b1a ldr r2, [r3, #48] @ 0x30
|
|
8006910: 687b ldr r3, [r7, #4]
|
|
8006912: f103 4380 add.w r3, r3, #1073741824 @ 0x40000000
|
|
8006916: 3b01 subs r3, #1
|
|
8006918: 009b lsls r3, r3, #2
|
|
800691a: 4413 add r3, r2
|
|
800691c: 61bb str r3, [r7, #24]
|
|
pxTopOfStack = ( StackType_t * ) ( ( ( portPOINTER_SIZE_TYPE ) pxTopOfStack ) & ( ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) ) ); /*lint !e923 !e9033 !e9078 MISRA exception. Avoiding casts between pointers and integers is not practical. Size differences accounted for using portPOINTER_SIZE_TYPE type. Checked by assert(). */
|
|
800691e: 69bb ldr r3, [r7, #24]
|
|
8006920: f023 0307 bic.w r3, r3, #7
|
|
8006924: 61bb str r3, [r7, #24]
|
|
|
|
/* Check the alignment of the calculated top of stack is correct. */
|
|
configASSERT( ( ( ( portPOINTER_SIZE_TYPE ) pxTopOfStack & ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) == 0UL ) );
|
|
8006926: 69bb ldr r3, [r7, #24]
|
|
8006928: f003 0307 and.w r3, r3, #7
|
|
800692c: 2b00 cmp r3, #0
|
|
800692e: d00b beq.n 8006948 <prvInitialiseNewTask+0x5a>
|
|
__asm volatile
|
|
8006930: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8006934: f383 8811 msr BASEPRI, r3
|
|
8006938: f3bf 8f6f isb sy
|
|
800693c: f3bf 8f4f dsb sy
|
|
8006940: 617b str r3, [r7, #20]
|
|
}
|
|
8006942: bf00 nop
|
|
8006944: bf00 nop
|
|
8006946: e7fd b.n 8006944 <prvInitialiseNewTask+0x56>
|
|
pxNewTCB->pxEndOfStack = pxNewTCB->pxStack + ( ulStackDepth - ( uint32_t ) 1 );
|
|
}
|
|
#endif /* portSTACK_GROWTH */
|
|
|
|
/* Store the task name in the TCB. */
|
|
if( pcName != NULL )
|
|
8006948: 68bb ldr r3, [r7, #8]
|
|
800694a: 2b00 cmp r3, #0
|
|
800694c: d01f beq.n 800698e <prvInitialiseNewTask+0xa0>
|
|
{
|
|
for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ )
|
|
800694e: 2300 movs r3, #0
|
|
8006950: 61fb str r3, [r7, #28]
|
|
8006952: e012 b.n 800697a <prvInitialiseNewTask+0x8c>
|
|
{
|
|
pxNewTCB->pcTaskName[ x ] = pcName[ x ];
|
|
8006954: 68ba ldr r2, [r7, #8]
|
|
8006956: 69fb ldr r3, [r7, #28]
|
|
8006958: 4413 add r3, r2
|
|
800695a: 7819 ldrb r1, [r3, #0]
|
|
800695c: 6b3a ldr r2, [r7, #48] @ 0x30
|
|
800695e: 69fb ldr r3, [r7, #28]
|
|
8006960: 4413 add r3, r2
|
|
8006962: 3334 adds r3, #52 @ 0x34
|
|
8006964: 460a mov r2, r1
|
|
8006966: 701a strb r2, [r3, #0]
|
|
|
|
/* Don't copy all configMAX_TASK_NAME_LEN if the string is shorter than
|
|
configMAX_TASK_NAME_LEN characters just in case the memory after the
|
|
string is not accessible (extremely unlikely). */
|
|
if( pcName[ x ] == ( char ) 0x00 )
|
|
8006968: 68ba ldr r2, [r7, #8]
|
|
800696a: 69fb ldr r3, [r7, #28]
|
|
800696c: 4413 add r3, r2
|
|
800696e: 781b ldrb r3, [r3, #0]
|
|
8006970: 2b00 cmp r3, #0
|
|
8006972: d006 beq.n 8006982 <prvInitialiseNewTask+0x94>
|
|
for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ )
|
|
8006974: 69fb ldr r3, [r7, #28]
|
|
8006976: 3301 adds r3, #1
|
|
8006978: 61fb str r3, [r7, #28]
|
|
800697a: 69fb ldr r3, [r7, #28]
|
|
800697c: 2b0f cmp r3, #15
|
|
800697e: d9e9 bls.n 8006954 <prvInitialiseNewTask+0x66>
|
|
8006980: e000 b.n 8006984 <prvInitialiseNewTask+0x96>
|
|
{
|
|
break;
|
|
8006982: bf00 nop
|
|
}
|
|
}
|
|
|
|
/* Ensure the name string is terminated in the case that the string length
|
|
was greater or equal to configMAX_TASK_NAME_LEN. */
|
|
pxNewTCB->pcTaskName[ configMAX_TASK_NAME_LEN - 1 ] = '\0';
|
|
8006984: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8006986: 2200 movs r2, #0
|
|
8006988: f883 2043 strb.w r2, [r3, #67] @ 0x43
|
|
800698c: e003 b.n 8006996 <prvInitialiseNewTask+0xa8>
|
|
}
|
|
else
|
|
{
|
|
/* The task has not been given a name, so just ensure there is a NULL
|
|
terminator when it is read out. */
|
|
pxNewTCB->pcTaskName[ 0 ] = 0x00;
|
|
800698e: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
8006990: 2200 movs r2, #0
|
|
8006992: f883 2034 strb.w r2, [r3, #52] @ 0x34
|
|
}
|
|
|
|
/* This is used as an array index so must ensure it's not too large. First
|
|
remove the privilege bit if one is present. */
|
|
if( uxPriority >= ( UBaseType_t ) configMAX_PRIORITIES )
|
|
8006996: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8006998: 2b37 cmp r3, #55 @ 0x37
|
|
800699a: d901 bls.n 80069a0 <prvInitialiseNewTask+0xb2>
|
|
{
|
|
uxPriority = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) 1U;
|
|
800699c: 2337 movs r3, #55 @ 0x37
|
|
800699e: 62bb str r3, [r7, #40] @ 0x28
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
pxNewTCB->uxPriority = uxPriority;
|
|
80069a0: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80069a2: 6aba ldr r2, [r7, #40] @ 0x28
|
|
80069a4: 62da str r2, [r3, #44] @ 0x2c
|
|
#if ( configUSE_MUTEXES == 1 )
|
|
{
|
|
pxNewTCB->uxBasePriority = uxPriority;
|
|
80069a6: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80069a8: 6aba ldr r2, [r7, #40] @ 0x28
|
|
80069aa: 64da str r2, [r3, #76] @ 0x4c
|
|
pxNewTCB->uxMutexesHeld = 0;
|
|
80069ac: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80069ae: 2200 movs r2, #0
|
|
80069b0: 651a str r2, [r3, #80] @ 0x50
|
|
}
|
|
#endif /* configUSE_MUTEXES */
|
|
|
|
vListInitialiseItem( &( pxNewTCB->xStateListItem ) );
|
|
80069b2: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80069b4: 3304 adds r3, #4
|
|
80069b6: 4618 mov r0, r3
|
|
80069b8: f7fe fe34 bl 8005624 <vListInitialiseItem>
|
|
vListInitialiseItem( &( pxNewTCB->xEventListItem ) );
|
|
80069bc: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80069be: 3318 adds r3, #24
|
|
80069c0: 4618 mov r0, r3
|
|
80069c2: f7fe fe2f bl 8005624 <vListInitialiseItem>
|
|
|
|
/* Set the pxNewTCB as a link back from the ListItem_t. This is so we can get
|
|
back to the containing TCB from a generic item in a list. */
|
|
listSET_LIST_ITEM_OWNER( &( pxNewTCB->xStateListItem ), pxNewTCB );
|
|
80069c6: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80069c8: 6b3a ldr r2, [r7, #48] @ 0x30
|
|
80069ca: 611a str r2, [r3, #16]
|
|
|
|
/* Event lists are always in priority order. */
|
|
listSET_LIST_ITEM_VALUE( &( pxNewTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
|
|
80069cc: 6abb ldr r3, [r7, #40] @ 0x28
|
|
80069ce: f1c3 0238 rsb r2, r3, #56 @ 0x38
|
|
80069d2: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80069d4: 619a str r2, [r3, #24]
|
|
listSET_LIST_ITEM_OWNER( &( pxNewTCB->xEventListItem ), pxNewTCB );
|
|
80069d6: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80069d8: 6b3a ldr r2, [r7, #48] @ 0x30
|
|
80069da: 625a str r2, [r3, #36] @ 0x24
|
|
}
|
|
#endif
|
|
|
|
#if ( configUSE_TASK_NOTIFICATIONS == 1 )
|
|
{
|
|
pxNewTCB->ulNotifiedValue = 0;
|
|
80069dc: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80069de: 2200 movs r2, #0
|
|
80069e0: 655a str r2, [r3, #84] @ 0x54
|
|
pxNewTCB->ucNotifyState = taskNOT_WAITING_NOTIFICATION;
|
|
80069e2: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80069e4: 2200 movs r2, #0
|
|
80069e6: f883 2058 strb.w r2, [r3, #88] @ 0x58
|
|
}
|
|
#endif /* portSTACK_GROWTH */
|
|
}
|
|
#else /* portHAS_STACK_OVERFLOW_CHECKING */
|
|
{
|
|
pxNewTCB->pxTopOfStack = pxPortInitialiseStack( pxTopOfStack, pxTaskCode, pvParameters );
|
|
80069ea: 683a ldr r2, [r7, #0]
|
|
80069ec: 68f9 ldr r1, [r7, #12]
|
|
80069ee: 69b8 ldr r0, [r7, #24]
|
|
80069f0: f001 fab2 bl 8007f58 <pxPortInitialiseStack>
|
|
80069f4: 4602 mov r2, r0
|
|
80069f6: 6b3b ldr r3, [r7, #48] @ 0x30
|
|
80069f8: 601a str r2, [r3, #0]
|
|
}
|
|
#endif /* portHAS_STACK_OVERFLOW_CHECKING */
|
|
}
|
|
#endif /* portUSING_MPU_WRAPPERS */
|
|
|
|
if( pxCreatedTask != NULL )
|
|
80069fa: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
80069fc: 2b00 cmp r3, #0
|
|
80069fe: d002 beq.n 8006a06 <prvInitialiseNewTask+0x118>
|
|
{
|
|
/* Pass the handle out in an anonymous way. The handle can be used to
|
|
change the created task's priority, delete the created task, etc.*/
|
|
*pxCreatedTask = ( TaskHandle_t ) pxNewTCB;
|
|
8006a00: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8006a02: 6b3a ldr r2, [r7, #48] @ 0x30
|
|
8006a04: 601a str r2, [r3, #0]
|
|
}
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
8006a06: bf00 nop
|
|
8006a08: 3720 adds r7, #32
|
|
8006a0a: 46bd mov sp, r7
|
|
8006a0c: bd80 pop {r7, pc}
|
|
...
|
|
|
|
08006a10 <prvAddNewTaskToReadyList>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB )
|
|
{
|
|
8006a10: b580 push {r7, lr}
|
|
8006a12: b082 sub sp, #8
|
|
8006a14: af00 add r7, sp, #0
|
|
8006a16: 6078 str r0, [r7, #4]
|
|
/* Ensure interrupts don't access the task lists while the lists are being
|
|
updated. */
|
|
taskENTER_CRITICAL();
|
|
8006a18: f001 fbce bl 80081b8 <vPortEnterCritical>
|
|
{
|
|
uxCurrentNumberOfTasks++;
|
|
8006a1c: 4b2d ldr r3, [pc, #180] @ (8006ad4 <prvAddNewTaskToReadyList+0xc4>)
|
|
8006a1e: 681b ldr r3, [r3, #0]
|
|
8006a20: 3301 adds r3, #1
|
|
8006a22: 4a2c ldr r2, [pc, #176] @ (8006ad4 <prvAddNewTaskToReadyList+0xc4>)
|
|
8006a24: 6013 str r3, [r2, #0]
|
|
if( pxCurrentTCB == NULL )
|
|
8006a26: 4b2c ldr r3, [pc, #176] @ (8006ad8 <prvAddNewTaskToReadyList+0xc8>)
|
|
8006a28: 681b ldr r3, [r3, #0]
|
|
8006a2a: 2b00 cmp r3, #0
|
|
8006a2c: d109 bne.n 8006a42 <prvAddNewTaskToReadyList+0x32>
|
|
{
|
|
/* There are no other tasks, or all the other tasks are in
|
|
the suspended state - make this the current task. */
|
|
pxCurrentTCB = pxNewTCB;
|
|
8006a2e: 4a2a ldr r2, [pc, #168] @ (8006ad8 <prvAddNewTaskToReadyList+0xc8>)
|
|
8006a30: 687b ldr r3, [r7, #4]
|
|
8006a32: 6013 str r3, [r2, #0]
|
|
|
|
if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 )
|
|
8006a34: 4b27 ldr r3, [pc, #156] @ (8006ad4 <prvAddNewTaskToReadyList+0xc4>)
|
|
8006a36: 681b ldr r3, [r3, #0]
|
|
8006a38: 2b01 cmp r3, #1
|
|
8006a3a: d110 bne.n 8006a5e <prvAddNewTaskToReadyList+0x4e>
|
|
{
|
|
/* This is the first task to be created so do the preliminary
|
|
initialisation required. We will not recover if this call
|
|
fails, but we will report the failure. */
|
|
prvInitialiseTaskLists();
|
|
8006a3c: f000 fc92 bl 8007364 <prvInitialiseTaskLists>
|
|
8006a40: e00d b.n 8006a5e <prvAddNewTaskToReadyList+0x4e>
|
|
else
|
|
{
|
|
/* If the scheduler is not already running, make this task the
|
|
current task if it is the highest priority task to be created
|
|
so far. */
|
|
if( xSchedulerRunning == pdFALSE )
|
|
8006a42: 4b26 ldr r3, [pc, #152] @ (8006adc <prvAddNewTaskToReadyList+0xcc>)
|
|
8006a44: 681b ldr r3, [r3, #0]
|
|
8006a46: 2b00 cmp r3, #0
|
|
8006a48: d109 bne.n 8006a5e <prvAddNewTaskToReadyList+0x4e>
|
|
{
|
|
if( pxCurrentTCB->uxPriority <= pxNewTCB->uxPriority )
|
|
8006a4a: 4b23 ldr r3, [pc, #140] @ (8006ad8 <prvAddNewTaskToReadyList+0xc8>)
|
|
8006a4c: 681b ldr r3, [r3, #0]
|
|
8006a4e: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8006a50: 687b ldr r3, [r7, #4]
|
|
8006a52: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
8006a54: 429a cmp r2, r3
|
|
8006a56: d802 bhi.n 8006a5e <prvAddNewTaskToReadyList+0x4e>
|
|
{
|
|
pxCurrentTCB = pxNewTCB;
|
|
8006a58: 4a1f ldr r2, [pc, #124] @ (8006ad8 <prvAddNewTaskToReadyList+0xc8>)
|
|
8006a5a: 687b ldr r3, [r7, #4]
|
|
8006a5c: 6013 str r3, [r2, #0]
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
|
|
uxTaskNumber++;
|
|
8006a5e: 4b20 ldr r3, [pc, #128] @ (8006ae0 <prvAddNewTaskToReadyList+0xd0>)
|
|
8006a60: 681b ldr r3, [r3, #0]
|
|
8006a62: 3301 adds r3, #1
|
|
8006a64: 4a1e ldr r2, [pc, #120] @ (8006ae0 <prvAddNewTaskToReadyList+0xd0>)
|
|
8006a66: 6013 str r3, [r2, #0]
|
|
|
|
#if ( configUSE_TRACE_FACILITY == 1 )
|
|
{
|
|
/* Add a counter into the TCB for tracing only. */
|
|
pxNewTCB->uxTCBNumber = uxTaskNumber;
|
|
8006a68: 4b1d ldr r3, [pc, #116] @ (8006ae0 <prvAddNewTaskToReadyList+0xd0>)
|
|
8006a6a: 681a ldr r2, [r3, #0]
|
|
8006a6c: 687b ldr r3, [r7, #4]
|
|
8006a6e: 645a str r2, [r3, #68] @ 0x44
|
|
}
|
|
#endif /* configUSE_TRACE_FACILITY */
|
|
traceTASK_CREATE( pxNewTCB );
|
|
|
|
prvAddTaskToReadyList( pxNewTCB );
|
|
8006a70: 687b ldr r3, [r7, #4]
|
|
8006a72: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8006a74: 4b1b ldr r3, [pc, #108] @ (8006ae4 <prvAddNewTaskToReadyList+0xd4>)
|
|
8006a76: 681b ldr r3, [r3, #0]
|
|
8006a78: 429a cmp r2, r3
|
|
8006a7a: d903 bls.n 8006a84 <prvAddNewTaskToReadyList+0x74>
|
|
8006a7c: 687b ldr r3, [r7, #4]
|
|
8006a7e: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
8006a80: 4a18 ldr r2, [pc, #96] @ (8006ae4 <prvAddNewTaskToReadyList+0xd4>)
|
|
8006a82: 6013 str r3, [r2, #0]
|
|
8006a84: 687b ldr r3, [r7, #4]
|
|
8006a86: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8006a88: 4613 mov r3, r2
|
|
8006a8a: 009b lsls r3, r3, #2
|
|
8006a8c: 4413 add r3, r2
|
|
8006a8e: 009b lsls r3, r3, #2
|
|
8006a90: 4a15 ldr r2, [pc, #84] @ (8006ae8 <prvAddNewTaskToReadyList+0xd8>)
|
|
8006a92: 441a add r2, r3
|
|
8006a94: 687b ldr r3, [r7, #4]
|
|
8006a96: 3304 adds r3, #4
|
|
8006a98: 4619 mov r1, r3
|
|
8006a9a: 4610 mov r0, r2
|
|
8006a9c: f7fe fdcf bl 800563e <vListInsertEnd>
|
|
|
|
portSETUP_TCB( pxNewTCB );
|
|
}
|
|
taskEXIT_CRITICAL();
|
|
8006aa0: f001 fbbc bl 800821c <vPortExitCritical>
|
|
|
|
if( xSchedulerRunning != pdFALSE )
|
|
8006aa4: 4b0d ldr r3, [pc, #52] @ (8006adc <prvAddNewTaskToReadyList+0xcc>)
|
|
8006aa6: 681b ldr r3, [r3, #0]
|
|
8006aa8: 2b00 cmp r3, #0
|
|
8006aaa: d00e beq.n 8006aca <prvAddNewTaskToReadyList+0xba>
|
|
{
|
|
/* If the created task is of a higher priority than the current task
|
|
then it should run now. */
|
|
if( pxCurrentTCB->uxPriority < pxNewTCB->uxPriority )
|
|
8006aac: 4b0a ldr r3, [pc, #40] @ (8006ad8 <prvAddNewTaskToReadyList+0xc8>)
|
|
8006aae: 681b ldr r3, [r3, #0]
|
|
8006ab0: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8006ab2: 687b ldr r3, [r7, #4]
|
|
8006ab4: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
8006ab6: 429a cmp r2, r3
|
|
8006ab8: d207 bcs.n 8006aca <prvAddNewTaskToReadyList+0xba>
|
|
{
|
|
taskYIELD_IF_USING_PREEMPTION();
|
|
8006aba: 4b0c ldr r3, [pc, #48] @ (8006aec <prvAddNewTaskToReadyList+0xdc>)
|
|
8006abc: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
8006ac0: 601a str r2, [r3, #0]
|
|
8006ac2: f3bf 8f4f dsb sy
|
|
8006ac6: f3bf 8f6f isb sy
|
|
}
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
8006aca: bf00 nop
|
|
8006acc: 3708 adds r7, #8
|
|
8006ace: 46bd mov sp, r7
|
|
8006ad0: bd80 pop {r7, pc}
|
|
8006ad2: bf00 nop
|
|
8006ad4: 20001378 .word 0x20001378
|
|
8006ad8: 20000ea4 .word 0x20000ea4
|
|
8006adc: 20001384 .word 0x20001384
|
|
8006ae0: 20001394 .word 0x20001394
|
|
8006ae4: 20001380 .word 0x20001380
|
|
8006ae8: 20000ea8 .word 0x20000ea8
|
|
8006aec: e000ed04 .word 0xe000ed04
|
|
|
|
08006af0 <vTaskDelete>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if ( INCLUDE_vTaskDelete == 1 )
|
|
|
|
void vTaskDelete( TaskHandle_t xTaskToDelete )
|
|
{
|
|
8006af0: b580 push {r7, lr}
|
|
8006af2: b084 sub sp, #16
|
|
8006af4: af00 add r7, sp, #0
|
|
8006af6: 6078 str r0, [r7, #4]
|
|
TCB_t *pxTCB;
|
|
|
|
taskENTER_CRITICAL();
|
|
8006af8: f001 fb5e bl 80081b8 <vPortEnterCritical>
|
|
{
|
|
/* If null is passed in here then it is the calling task that is
|
|
being deleted. */
|
|
pxTCB = prvGetTCBFromHandle( xTaskToDelete );
|
|
8006afc: 687b ldr r3, [r7, #4]
|
|
8006afe: 2b00 cmp r3, #0
|
|
8006b00: d102 bne.n 8006b08 <vTaskDelete+0x18>
|
|
8006b02: 4b2d ldr r3, [pc, #180] @ (8006bb8 <vTaskDelete+0xc8>)
|
|
8006b04: 681b ldr r3, [r3, #0]
|
|
8006b06: e000 b.n 8006b0a <vTaskDelete+0x1a>
|
|
8006b08: 687b ldr r3, [r7, #4]
|
|
8006b0a: 60fb str r3, [r7, #12]
|
|
|
|
/* Remove task from the ready/delayed list. */
|
|
if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
|
|
8006b0c: 68fb ldr r3, [r7, #12]
|
|
8006b0e: 3304 adds r3, #4
|
|
8006b10: 4618 mov r0, r3
|
|
8006b12: f7fe fdf1 bl 80056f8 <uxListRemove>
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
/* Is the task waiting on an event also? */
|
|
if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL )
|
|
8006b16: 68fb ldr r3, [r7, #12]
|
|
8006b18: 6a9b ldr r3, [r3, #40] @ 0x28
|
|
8006b1a: 2b00 cmp r3, #0
|
|
8006b1c: d004 beq.n 8006b28 <vTaskDelete+0x38>
|
|
{
|
|
( void ) uxListRemove( &( pxTCB->xEventListItem ) );
|
|
8006b1e: 68fb ldr r3, [r7, #12]
|
|
8006b20: 3318 adds r3, #24
|
|
8006b22: 4618 mov r0, r3
|
|
8006b24: f7fe fde8 bl 80056f8 <uxListRemove>
|
|
|
|
/* Increment the uxTaskNumber also so kernel aware debuggers can
|
|
detect that the task lists need re-generating. This is done before
|
|
portPRE_TASK_DELETE_HOOK() as in the Windows port that macro will
|
|
not return. */
|
|
uxTaskNumber++;
|
|
8006b28: 4b24 ldr r3, [pc, #144] @ (8006bbc <vTaskDelete+0xcc>)
|
|
8006b2a: 681b ldr r3, [r3, #0]
|
|
8006b2c: 3301 adds r3, #1
|
|
8006b2e: 4a23 ldr r2, [pc, #140] @ (8006bbc <vTaskDelete+0xcc>)
|
|
8006b30: 6013 str r3, [r2, #0]
|
|
|
|
if( pxTCB == pxCurrentTCB )
|
|
8006b32: 4b21 ldr r3, [pc, #132] @ (8006bb8 <vTaskDelete+0xc8>)
|
|
8006b34: 681b ldr r3, [r3, #0]
|
|
8006b36: 68fa ldr r2, [r7, #12]
|
|
8006b38: 429a cmp r2, r3
|
|
8006b3a: d10b bne.n 8006b54 <vTaskDelete+0x64>
|
|
/* A task is deleting itself. This cannot complete within the
|
|
task itself, as a context switch to another task is required.
|
|
Place the task in the termination list. The idle task will
|
|
check the termination list and free up any memory allocated by
|
|
the scheduler for the TCB and stack of the deleted task. */
|
|
vListInsertEnd( &xTasksWaitingTermination, &( pxTCB->xStateListItem ) );
|
|
8006b3c: 68fb ldr r3, [r7, #12]
|
|
8006b3e: 3304 adds r3, #4
|
|
8006b40: 4619 mov r1, r3
|
|
8006b42: 481f ldr r0, [pc, #124] @ (8006bc0 <vTaskDelete+0xd0>)
|
|
8006b44: f7fe fd7b bl 800563e <vListInsertEnd>
|
|
|
|
/* Increment the ucTasksDeleted variable so the idle task knows
|
|
there is a task that has been deleted and that it should therefore
|
|
check the xTasksWaitingTermination list. */
|
|
++uxDeletedTasksWaitingCleanUp;
|
|
8006b48: 4b1e ldr r3, [pc, #120] @ (8006bc4 <vTaskDelete+0xd4>)
|
|
8006b4a: 681b ldr r3, [r3, #0]
|
|
8006b4c: 3301 adds r3, #1
|
|
8006b4e: 4a1d ldr r2, [pc, #116] @ (8006bc4 <vTaskDelete+0xd4>)
|
|
8006b50: 6013 str r3, [r2, #0]
|
|
8006b52: e009 b.n 8006b68 <vTaskDelete+0x78>
|
|
required. */
|
|
portPRE_TASK_DELETE_HOOK( pxTCB, &xYieldPending );
|
|
}
|
|
else
|
|
{
|
|
--uxCurrentNumberOfTasks;
|
|
8006b54: 4b1c ldr r3, [pc, #112] @ (8006bc8 <vTaskDelete+0xd8>)
|
|
8006b56: 681b ldr r3, [r3, #0]
|
|
8006b58: 3b01 subs r3, #1
|
|
8006b5a: 4a1b ldr r2, [pc, #108] @ (8006bc8 <vTaskDelete+0xd8>)
|
|
8006b5c: 6013 str r3, [r2, #0]
|
|
traceTASK_DELETE( pxTCB );
|
|
prvDeleteTCB( pxTCB );
|
|
8006b5e: 68f8 ldr r0, [r7, #12]
|
|
8006b60: f000 fc6e bl 8007440 <prvDeleteTCB>
|
|
|
|
/* Reset the next expected unblock time in case it referred to
|
|
the task that has just been deleted. */
|
|
prvResetNextTaskUnblockTime();
|
|
8006b64: f000 fc9c bl 80074a0 <prvResetNextTaskUnblockTime>
|
|
}
|
|
}
|
|
taskEXIT_CRITICAL();
|
|
8006b68: f001 fb58 bl 800821c <vPortExitCritical>
|
|
|
|
/* Force a reschedule if it is the currently running task that has just
|
|
been deleted. */
|
|
if( xSchedulerRunning != pdFALSE )
|
|
8006b6c: 4b17 ldr r3, [pc, #92] @ (8006bcc <vTaskDelete+0xdc>)
|
|
8006b6e: 681b ldr r3, [r3, #0]
|
|
8006b70: 2b00 cmp r3, #0
|
|
8006b72: d01c beq.n 8006bae <vTaskDelete+0xbe>
|
|
{
|
|
if( pxTCB == pxCurrentTCB )
|
|
8006b74: 4b10 ldr r3, [pc, #64] @ (8006bb8 <vTaskDelete+0xc8>)
|
|
8006b76: 681b ldr r3, [r3, #0]
|
|
8006b78: 68fa ldr r2, [r7, #12]
|
|
8006b7a: 429a cmp r2, r3
|
|
8006b7c: d117 bne.n 8006bae <vTaskDelete+0xbe>
|
|
{
|
|
configASSERT( uxSchedulerSuspended == 0 );
|
|
8006b7e: 4b14 ldr r3, [pc, #80] @ (8006bd0 <vTaskDelete+0xe0>)
|
|
8006b80: 681b ldr r3, [r3, #0]
|
|
8006b82: 2b00 cmp r3, #0
|
|
8006b84: d00b beq.n 8006b9e <vTaskDelete+0xae>
|
|
__asm volatile
|
|
8006b86: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8006b8a: f383 8811 msr BASEPRI, r3
|
|
8006b8e: f3bf 8f6f isb sy
|
|
8006b92: f3bf 8f4f dsb sy
|
|
8006b96: 60bb str r3, [r7, #8]
|
|
}
|
|
8006b98: bf00 nop
|
|
8006b9a: bf00 nop
|
|
8006b9c: e7fd b.n 8006b9a <vTaskDelete+0xaa>
|
|
portYIELD_WITHIN_API();
|
|
8006b9e: 4b0d ldr r3, [pc, #52] @ (8006bd4 <vTaskDelete+0xe4>)
|
|
8006ba0: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
8006ba4: 601a str r2, [r3, #0]
|
|
8006ba6: f3bf 8f4f dsb sy
|
|
8006baa: f3bf 8f6f isb sy
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
}
|
|
8006bae: bf00 nop
|
|
8006bb0: 3710 adds r7, #16
|
|
8006bb2: 46bd mov sp, r7
|
|
8006bb4: bd80 pop {r7, pc}
|
|
8006bb6: bf00 nop
|
|
8006bb8: 20000ea4 .word 0x20000ea4
|
|
8006bbc: 20001394 .word 0x20001394
|
|
8006bc0: 2000134c .word 0x2000134c
|
|
8006bc4: 20001360 .word 0x20001360
|
|
8006bc8: 20001378 .word 0x20001378
|
|
8006bcc: 20001384 .word 0x20001384
|
|
8006bd0: 200013a0 .word 0x200013a0
|
|
8006bd4: e000ed04 .word 0xe000ed04
|
|
|
|
08006bd8 <vTaskDelay>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if ( INCLUDE_vTaskDelay == 1 )
|
|
|
|
void vTaskDelay( const TickType_t xTicksToDelay )
|
|
{
|
|
8006bd8: b580 push {r7, lr}
|
|
8006bda: b084 sub sp, #16
|
|
8006bdc: af00 add r7, sp, #0
|
|
8006bde: 6078 str r0, [r7, #4]
|
|
BaseType_t xAlreadyYielded = pdFALSE;
|
|
8006be0: 2300 movs r3, #0
|
|
8006be2: 60fb str r3, [r7, #12]
|
|
|
|
/* A delay time of zero just forces a reschedule. */
|
|
if( xTicksToDelay > ( TickType_t ) 0U )
|
|
8006be4: 687b ldr r3, [r7, #4]
|
|
8006be6: 2b00 cmp r3, #0
|
|
8006be8: d018 beq.n 8006c1c <vTaskDelay+0x44>
|
|
{
|
|
configASSERT( uxSchedulerSuspended == 0 );
|
|
8006bea: 4b14 ldr r3, [pc, #80] @ (8006c3c <vTaskDelay+0x64>)
|
|
8006bec: 681b ldr r3, [r3, #0]
|
|
8006bee: 2b00 cmp r3, #0
|
|
8006bf0: d00b beq.n 8006c0a <vTaskDelay+0x32>
|
|
__asm volatile
|
|
8006bf2: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8006bf6: f383 8811 msr BASEPRI, r3
|
|
8006bfa: f3bf 8f6f isb sy
|
|
8006bfe: f3bf 8f4f dsb sy
|
|
8006c02: 60bb str r3, [r7, #8]
|
|
}
|
|
8006c04: bf00 nop
|
|
8006c06: bf00 nop
|
|
8006c08: e7fd b.n 8006c06 <vTaskDelay+0x2e>
|
|
vTaskSuspendAll();
|
|
8006c0a: f000 f883 bl 8006d14 <vTaskSuspendAll>
|
|
list or removed from the blocked list until the scheduler
|
|
is resumed.
|
|
|
|
This task cannot be in an event list as it is the currently
|
|
executing task. */
|
|
prvAddCurrentTaskToDelayedList( xTicksToDelay, pdFALSE );
|
|
8006c0e: 2100 movs r1, #0
|
|
8006c10: 6878 ldr r0, [r7, #4]
|
|
8006c12: f000 fdf3 bl 80077fc <prvAddCurrentTaskToDelayedList>
|
|
}
|
|
xAlreadyYielded = xTaskResumeAll();
|
|
8006c16: f000 f88b bl 8006d30 <xTaskResumeAll>
|
|
8006c1a: 60f8 str r0, [r7, #12]
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
/* Force a reschedule if xTaskResumeAll has not already done so, we may
|
|
have put ourselves to sleep. */
|
|
if( xAlreadyYielded == pdFALSE )
|
|
8006c1c: 68fb ldr r3, [r7, #12]
|
|
8006c1e: 2b00 cmp r3, #0
|
|
8006c20: d107 bne.n 8006c32 <vTaskDelay+0x5a>
|
|
{
|
|
portYIELD_WITHIN_API();
|
|
8006c22: 4b07 ldr r3, [pc, #28] @ (8006c40 <vTaskDelay+0x68>)
|
|
8006c24: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
8006c28: 601a str r2, [r3, #0]
|
|
8006c2a: f3bf 8f4f dsb sy
|
|
8006c2e: f3bf 8f6f isb sy
|
|
}
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
8006c32: bf00 nop
|
|
8006c34: 3710 adds r7, #16
|
|
8006c36: 46bd mov sp, r7
|
|
8006c38: bd80 pop {r7, pc}
|
|
8006c3a: bf00 nop
|
|
8006c3c: 200013a0 .word 0x200013a0
|
|
8006c40: e000ed04 .word 0xe000ed04
|
|
|
|
08006c44 <vTaskStartScheduler>:
|
|
|
|
#endif /* ( ( INCLUDE_xTaskResumeFromISR == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) ) */
|
|
/*-----------------------------------------------------------*/
|
|
|
|
void vTaskStartScheduler( void )
|
|
{
|
|
8006c44: b580 push {r7, lr}
|
|
8006c46: b08a sub sp, #40 @ 0x28
|
|
8006c48: af04 add r7, sp, #16
|
|
BaseType_t xReturn;
|
|
|
|
/* Add the idle task at the lowest priority. */
|
|
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
|
|
{
|
|
StaticTask_t *pxIdleTaskTCBBuffer = NULL;
|
|
8006c4a: 2300 movs r3, #0
|
|
8006c4c: 60bb str r3, [r7, #8]
|
|
StackType_t *pxIdleTaskStackBuffer = NULL;
|
|
8006c4e: 2300 movs r3, #0
|
|
8006c50: 607b str r3, [r7, #4]
|
|
uint32_t ulIdleTaskStackSize;
|
|
|
|
/* The Idle task is created using user provided RAM - obtain the
|
|
address of the RAM then create the idle task. */
|
|
vApplicationGetIdleTaskMemory( &pxIdleTaskTCBBuffer, &pxIdleTaskStackBuffer, &ulIdleTaskStackSize );
|
|
8006c52: 463a mov r2, r7
|
|
8006c54: 1d39 adds r1, r7, #4
|
|
8006c56: f107 0308 add.w r3, r7, #8
|
|
8006c5a: 4618 mov r0, r3
|
|
8006c5c: f7fe fc8e bl 800557c <vApplicationGetIdleTaskMemory>
|
|
xIdleTaskHandle = xTaskCreateStatic( prvIdleTask,
|
|
8006c60: 6839 ldr r1, [r7, #0]
|
|
8006c62: 687b ldr r3, [r7, #4]
|
|
8006c64: 68ba ldr r2, [r7, #8]
|
|
8006c66: 9202 str r2, [sp, #8]
|
|
8006c68: 9301 str r3, [sp, #4]
|
|
8006c6a: 2300 movs r3, #0
|
|
8006c6c: 9300 str r3, [sp, #0]
|
|
8006c6e: 2300 movs r3, #0
|
|
8006c70: 460a mov r2, r1
|
|
8006c72: 4922 ldr r1, [pc, #136] @ (8006cfc <vTaskStartScheduler+0xb8>)
|
|
8006c74: 4822 ldr r0, [pc, #136] @ (8006d00 <vTaskStartScheduler+0xbc>)
|
|
8006c76: f7ff fd95 bl 80067a4 <xTaskCreateStatic>
|
|
8006c7a: 4603 mov r3, r0
|
|
8006c7c: 4a21 ldr r2, [pc, #132] @ (8006d04 <vTaskStartScheduler+0xc0>)
|
|
8006c7e: 6013 str r3, [r2, #0]
|
|
( void * ) NULL, /*lint !e961. The cast is not redundant for all compilers. */
|
|
portPRIVILEGE_BIT, /* In effect ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), but tskIDLE_PRIORITY is zero. */
|
|
pxIdleTaskStackBuffer,
|
|
pxIdleTaskTCBBuffer ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */
|
|
|
|
if( xIdleTaskHandle != NULL )
|
|
8006c80: 4b20 ldr r3, [pc, #128] @ (8006d04 <vTaskStartScheduler+0xc0>)
|
|
8006c82: 681b ldr r3, [r3, #0]
|
|
8006c84: 2b00 cmp r3, #0
|
|
8006c86: d002 beq.n 8006c8e <vTaskStartScheduler+0x4a>
|
|
{
|
|
xReturn = pdPASS;
|
|
8006c88: 2301 movs r3, #1
|
|
8006c8a: 617b str r3, [r7, #20]
|
|
8006c8c: e001 b.n 8006c92 <vTaskStartScheduler+0x4e>
|
|
}
|
|
else
|
|
{
|
|
xReturn = pdFAIL;
|
|
8006c8e: 2300 movs r3, #0
|
|
8006c90: 617b str r3, [r7, #20]
|
|
}
|
|
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
|
|
|
#if ( configUSE_TIMERS == 1 )
|
|
{
|
|
if( xReturn == pdPASS )
|
|
8006c92: 697b ldr r3, [r7, #20]
|
|
8006c94: 2b01 cmp r3, #1
|
|
8006c96: d102 bne.n 8006c9e <vTaskStartScheduler+0x5a>
|
|
{
|
|
xReturn = xTimerCreateTimerTask();
|
|
8006c98: f000 fe04 bl 80078a4 <xTimerCreateTimerTask>
|
|
8006c9c: 6178 str r0, [r7, #20]
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
#endif /* configUSE_TIMERS */
|
|
|
|
if( xReturn == pdPASS )
|
|
8006c9e: 697b ldr r3, [r7, #20]
|
|
8006ca0: 2b01 cmp r3, #1
|
|
8006ca2: d116 bne.n 8006cd2 <vTaskStartScheduler+0x8e>
|
|
__asm volatile
|
|
8006ca4: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8006ca8: f383 8811 msr BASEPRI, r3
|
|
8006cac: f3bf 8f6f isb sy
|
|
8006cb0: f3bf 8f4f dsb sy
|
|
8006cb4: 613b str r3, [r7, #16]
|
|
}
|
|
8006cb6: bf00 nop
|
|
for additional information. */
|
|
_impure_ptr = &( pxCurrentTCB->xNewLib_reent );
|
|
}
|
|
#endif /* configUSE_NEWLIB_REENTRANT */
|
|
|
|
xNextTaskUnblockTime = portMAX_DELAY;
|
|
8006cb8: 4b13 ldr r3, [pc, #76] @ (8006d08 <vTaskStartScheduler+0xc4>)
|
|
8006cba: f04f 32ff mov.w r2, #4294967295
|
|
8006cbe: 601a str r2, [r3, #0]
|
|
xSchedulerRunning = pdTRUE;
|
|
8006cc0: 4b12 ldr r3, [pc, #72] @ (8006d0c <vTaskStartScheduler+0xc8>)
|
|
8006cc2: 2201 movs r2, #1
|
|
8006cc4: 601a str r2, [r3, #0]
|
|
xTickCount = ( TickType_t ) configINITIAL_TICK_COUNT;
|
|
8006cc6: 4b12 ldr r3, [pc, #72] @ (8006d10 <vTaskStartScheduler+0xcc>)
|
|
8006cc8: 2200 movs r2, #0
|
|
8006cca: 601a str r2, [r3, #0]
|
|
|
|
traceTASK_SWITCHED_IN();
|
|
|
|
/* Setting up the timer tick is hardware specific and thus in the
|
|
portable interface. */
|
|
if( xPortStartScheduler() != pdFALSE )
|
|
8006ccc: f001 f9d0 bl 8008070 <xPortStartScheduler>
|
|
}
|
|
|
|
/* Prevent compiler warnings if INCLUDE_xTaskGetIdleTaskHandle is set to 0,
|
|
meaning xIdleTaskHandle is not used anywhere else. */
|
|
( void ) xIdleTaskHandle;
|
|
}
|
|
8006cd0: e00f b.n 8006cf2 <vTaskStartScheduler+0xae>
|
|
configASSERT( xReturn != errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY );
|
|
8006cd2: 697b ldr r3, [r7, #20]
|
|
8006cd4: f1b3 3fff cmp.w r3, #4294967295
|
|
8006cd8: d10b bne.n 8006cf2 <vTaskStartScheduler+0xae>
|
|
__asm volatile
|
|
8006cda: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8006cde: f383 8811 msr BASEPRI, r3
|
|
8006ce2: f3bf 8f6f isb sy
|
|
8006ce6: f3bf 8f4f dsb sy
|
|
8006cea: 60fb str r3, [r7, #12]
|
|
}
|
|
8006cec: bf00 nop
|
|
8006cee: bf00 nop
|
|
8006cf0: e7fd b.n 8006cee <vTaskStartScheduler+0xaa>
|
|
}
|
|
8006cf2: bf00 nop
|
|
8006cf4: 3718 adds r7, #24
|
|
8006cf6: 46bd mov sp, r7
|
|
8006cf8: bd80 pop {r7, pc}
|
|
8006cfa: bf00 nop
|
|
8006cfc: 080088bc .word 0x080088bc
|
|
8006d00: 08007335 .word 0x08007335
|
|
8006d04: 2000139c .word 0x2000139c
|
|
8006d08: 20001398 .word 0x20001398
|
|
8006d0c: 20001384 .word 0x20001384
|
|
8006d10: 2000137c .word 0x2000137c
|
|
|
|
08006d14 <vTaskSuspendAll>:
|
|
vPortEndScheduler();
|
|
}
|
|
/*----------------------------------------------------------*/
|
|
|
|
void vTaskSuspendAll( void )
|
|
{
|
|
8006d14: b480 push {r7}
|
|
8006d16: af00 add r7, sp, #0
|
|
do not otherwise exhibit real time behaviour. */
|
|
portSOFTWARE_BARRIER();
|
|
|
|
/* The scheduler is suspended if uxSchedulerSuspended is non-zero. An increment
|
|
is used to allow calls to vTaskSuspendAll() to nest. */
|
|
++uxSchedulerSuspended;
|
|
8006d18: 4b04 ldr r3, [pc, #16] @ (8006d2c <vTaskSuspendAll+0x18>)
|
|
8006d1a: 681b ldr r3, [r3, #0]
|
|
8006d1c: 3301 adds r3, #1
|
|
8006d1e: 4a03 ldr r2, [pc, #12] @ (8006d2c <vTaskSuspendAll+0x18>)
|
|
8006d20: 6013 str r3, [r2, #0]
|
|
|
|
/* Enforces ordering for ports and optimised compilers that may otherwise place
|
|
the above increment elsewhere. */
|
|
portMEMORY_BARRIER();
|
|
}
|
|
8006d22: bf00 nop
|
|
8006d24: 46bd mov sp, r7
|
|
8006d26: f85d 7b04 ldr.w r7, [sp], #4
|
|
8006d2a: 4770 bx lr
|
|
8006d2c: 200013a0 .word 0x200013a0
|
|
|
|
08006d30 <xTaskResumeAll>:
|
|
|
|
#endif /* configUSE_TICKLESS_IDLE */
|
|
/*----------------------------------------------------------*/
|
|
|
|
BaseType_t xTaskResumeAll( void )
|
|
{
|
|
8006d30: b580 push {r7, lr}
|
|
8006d32: b084 sub sp, #16
|
|
8006d34: af00 add r7, sp, #0
|
|
TCB_t *pxTCB = NULL;
|
|
8006d36: 2300 movs r3, #0
|
|
8006d38: 60fb str r3, [r7, #12]
|
|
BaseType_t xAlreadyYielded = pdFALSE;
|
|
8006d3a: 2300 movs r3, #0
|
|
8006d3c: 60bb str r3, [r7, #8]
|
|
|
|
/* If uxSchedulerSuspended is zero then this function does not match a
|
|
previous call to vTaskSuspendAll(). */
|
|
configASSERT( uxSchedulerSuspended );
|
|
8006d3e: 4b42 ldr r3, [pc, #264] @ (8006e48 <xTaskResumeAll+0x118>)
|
|
8006d40: 681b ldr r3, [r3, #0]
|
|
8006d42: 2b00 cmp r3, #0
|
|
8006d44: d10b bne.n 8006d5e <xTaskResumeAll+0x2e>
|
|
__asm volatile
|
|
8006d46: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8006d4a: f383 8811 msr BASEPRI, r3
|
|
8006d4e: f3bf 8f6f isb sy
|
|
8006d52: f3bf 8f4f dsb sy
|
|
8006d56: 603b str r3, [r7, #0]
|
|
}
|
|
8006d58: bf00 nop
|
|
8006d5a: bf00 nop
|
|
8006d5c: e7fd b.n 8006d5a <xTaskResumeAll+0x2a>
|
|
/* It is possible that an ISR caused a task to be removed from an event
|
|
list while the scheduler was suspended. If this was the case then the
|
|
removed task will have been added to the xPendingReadyList. Once the
|
|
scheduler has been resumed it is safe to move all the pending ready
|
|
tasks from this list into their appropriate ready list. */
|
|
taskENTER_CRITICAL();
|
|
8006d5e: f001 fa2b bl 80081b8 <vPortEnterCritical>
|
|
{
|
|
--uxSchedulerSuspended;
|
|
8006d62: 4b39 ldr r3, [pc, #228] @ (8006e48 <xTaskResumeAll+0x118>)
|
|
8006d64: 681b ldr r3, [r3, #0]
|
|
8006d66: 3b01 subs r3, #1
|
|
8006d68: 4a37 ldr r2, [pc, #220] @ (8006e48 <xTaskResumeAll+0x118>)
|
|
8006d6a: 6013 str r3, [r2, #0]
|
|
|
|
if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
|
|
8006d6c: 4b36 ldr r3, [pc, #216] @ (8006e48 <xTaskResumeAll+0x118>)
|
|
8006d6e: 681b ldr r3, [r3, #0]
|
|
8006d70: 2b00 cmp r3, #0
|
|
8006d72: d162 bne.n 8006e3a <xTaskResumeAll+0x10a>
|
|
{
|
|
if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U )
|
|
8006d74: 4b35 ldr r3, [pc, #212] @ (8006e4c <xTaskResumeAll+0x11c>)
|
|
8006d76: 681b ldr r3, [r3, #0]
|
|
8006d78: 2b00 cmp r3, #0
|
|
8006d7a: d05e beq.n 8006e3a <xTaskResumeAll+0x10a>
|
|
{
|
|
/* Move any readied tasks from the pending list into the
|
|
appropriate ready list. */
|
|
while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE )
|
|
8006d7c: e02f b.n 8006dde <xTaskResumeAll+0xae>
|
|
{
|
|
pxTCB = listGET_OWNER_OF_HEAD_ENTRY( ( &xPendingReadyList ) ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
|
|
8006d7e: 4b34 ldr r3, [pc, #208] @ (8006e50 <xTaskResumeAll+0x120>)
|
|
8006d80: 68db ldr r3, [r3, #12]
|
|
8006d82: 68db ldr r3, [r3, #12]
|
|
8006d84: 60fb str r3, [r7, #12]
|
|
( void ) uxListRemove( &( pxTCB->xEventListItem ) );
|
|
8006d86: 68fb ldr r3, [r7, #12]
|
|
8006d88: 3318 adds r3, #24
|
|
8006d8a: 4618 mov r0, r3
|
|
8006d8c: f7fe fcb4 bl 80056f8 <uxListRemove>
|
|
( void ) uxListRemove( &( pxTCB->xStateListItem ) );
|
|
8006d90: 68fb ldr r3, [r7, #12]
|
|
8006d92: 3304 adds r3, #4
|
|
8006d94: 4618 mov r0, r3
|
|
8006d96: f7fe fcaf bl 80056f8 <uxListRemove>
|
|
prvAddTaskToReadyList( pxTCB );
|
|
8006d9a: 68fb ldr r3, [r7, #12]
|
|
8006d9c: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8006d9e: 4b2d ldr r3, [pc, #180] @ (8006e54 <xTaskResumeAll+0x124>)
|
|
8006da0: 681b ldr r3, [r3, #0]
|
|
8006da2: 429a cmp r2, r3
|
|
8006da4: d903 bls.n 8006dae <xTaskResumeAll+0x7e>
|
|
8006da6: 68fb ldr r3, [r7, #12]
|
|
8006da8: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
8006daa: 4a2a ldr r2, [pc, #168] @ (8006e54 <xTaskResumeAll+0x124>)
|
|
8006dac: 6013 str r3, [r2, #0]
|
|
8006dae: 68fb ldr r3, [r7, #12]
|
|
8006db0: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8006db2: 4613 mov r3, r2
|
|
8006db4: 009b lsls r3, r3, #2
|
|
8006db6: 4413 add r3, r2
|
|
8006db8: 009b lsls r3, r3, #2
|
|
8006dba: 4a27 ldr r2, [pc, #156] @ (8006e58 <xTaskResumeAll+0x128>)
|
|
8006dbc: 441a add r2, r3
|
|
8006dbe: 68fb ldr r3, [r7, #12]
|
|
8006dc0: 3304 adds r3, #4
|
|
8006dc2: 4619 mov r1, r3
|
|
8006dc4: 4610 mov r0, r2
|
|
8006dc6: f7fe fc3a bl 800563e <vListInsertEnd>
|
|
|
|
/* If the moved task has a priority higher than the current
|
|
task then a yield must be performed. */
|
|
if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority )
|
|
8006dca: 68fb ldr r3, [r7, #12]
|
|
8006dcc: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8006dce: 4b23 ldr r3, [pc, #140] @ (8006e5c <xTaskResumeAll+0x12c>)
|
|
8006dd0: 681b ldr r3, [r3, #0]
|
|
8006dd2: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
8006dd4: 429a cmp r2, r3
|
|
8006dd6: d302 bcc.n 8006dde <xTaskResumeAll+0xae>
|
|
{
|
|
xYieldPending = pdTRUE;
|
|
8006dd8: 4b21 ldr r3, [pc, #132] @ (8006e60 <xTaskResumeAll+0x130>)
|
|
8006dda: 2201 movs r2, #1
|
|
8006ddc: 601a str r2, [r3, #0]
|
|
while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE )
|
|
8006dde: 4b1c ldr r3, [pc, #112] @ (8006e50 <xTaskResumeAll+0x120>)
|
|
8006de0: 681b ldr r3, [r3, #0]
|
|
8006de2: 2b00 cmp r3, #0
|
|
8006de4: d1cb bne.n 8006d7e <xTaskResumeAll+0x4e>
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
|
|
if( pxTCB != NULL )
|
|
8006de6: 68fb ldr r3, [r7, #12]
|
|
8006de8: 2b00 cmp r3, #0
|
|
8006dea: d001 beq.n 8006df0 <xTaskResumeAll+0xc0>
|
|
which may have prevented the next unblock time from being
|
|
re-calculated, in which case re-calculate it now. Mainly
|
|
important for low power tickless implementations, where
|
|
this can prevent an unnecessary exit from low power
|
|
state. */
|
|
prvResetNextTaskUnblockTime();
|
|
8006dec: f000 fb58 bl 80074a0 <prvResetNextTaskUnblockTime>
|
|
/* If any ticks occurred while the scheduler was suspended then
|
|
they should be processed now. This ensures the tick count does
|
|
not slip, and that any delayed tasks are resumed at the correct
|
|
time. */
|
|
{
|
|
TickType_t xPendedCounts = xPendedTicks; /* Non-volatile copy. */
|
|
8006df0: 4b1c ldr r3, [pc, #112] @ (8006e64 <xTaskResumeAll+0x134>)
|
|
8006df2: 681b ldr r3, [r3, #0]
|
|
8006df4: 607b str r3, [r7, #4]
|
|
|
|
if( xPendedCounts > ( TickType_t ) 0U )
|
|
8006df6: 687b ldr r3, [r7, #4]
|
|
8006df8: 2b00 cmp r3, #0
|
|
8006dfa: d010 beq.n 8006e1e <xTaskResumeAll+0xee>
|
|
{
|
|
do
|
|
{
|
|
if( xTaskIncrementTick() != pdFALSE )
|
|
8006dfc: f000 f846 bl 8006e8c <xTaskIncrementTick>
|
|
8006e00: 4603 mov r3, r0
|
|
8006e02: 2b00 cmp r3, #0
|
|
8006e04: d002 beq.n 8006e0c <xTaskResumeAll+0xdc>
|
|
{
|
|
xYieldPending = pdTRUE;
|
|
8006e06: 4b16 ldr r3, [pc, #88] @ (8006e60 <xTaskResumeAll+0x130>)
|
|
8006e08: 2201 movs r2, #1
|
|
8006e0a: 601a str r2, [r3, #0]
|
|
}
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
--xPendedCounts;
|
|
8006e0c: 687b ldr r3, [r7, #4]
|
|
8006e0e: 3b01 subs r3, #1
|
|
8006e10: 607b str r3, [r7, #4]
|
|
} while( xPendedCounts > ( TickType_t ) 0U );
|
|
8006e12: 687b ldr r3, [r7, #4]
|
|
8006e14: 2b00 cmp r3, #0
|
|
8006e16: d1f1 bne.n 8006dfc <xTaskResumeAll+0xcc>
|
|
|
|
xPendedTicks = 0;
|
|
8006e18: 4b12 ldr r3, [pc, #72] @ (8006e64 <xTaskResumeAll+0x134>)
|
|
8006e1a: 2200 movs r2, #0
|
|
8006e1c: 601a str r2, [r3, #0]
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
|
|
if( xYieldPending != pdFALSE )
|
|
8006e1e: 4b10 ldr r3, [pc, #64] @ (8006e60 <xTaskResumeAll+0x130>)
|
|
8006e20: 681b ldr r3, [r3, #0]
|
|
8006e22: 2b00 cmp r3, #0
|
|
8006e24: d009 beq.n 8006e3a <xTaskResumeAll+0x10a>
|
|
{
|
|
#if( configUSE_PREEMPTION != 0 )
|
|
{
|
|
xAlreadyYielded = pdTRUE;
|
|
8006e26: 2301 movs r3, #1
|
|
8006e28: 60bb str r3, [r7, #8]
|
|
}
|
|
#endif
|
|
taskYIELD_IF_USING_PREEMPTION();
|
|
8006e2a: 4b0f ldr r3, [pc, #60] @ (8006e68 <xTaskResumeAll+0x138>)
|
|
8006e2c: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
8006e30: 601a str r2, [r3, #0]
|
|
8006e32: f3bf 8f4f dsb sy
|
|
8006e36: f3bf 8f6f isb sy
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
taskEXIT_CRITICAL();
|
|
8006e3a: f001 f9ef bl 800821c <vPortExitCritical>
|
|
|
|
return xAlreadyYielded;
|
|
8006e3e: 68bb ldr r3, [r7, #8]
|
|
}
|
|
8006e40: 4618 mov r0, r3
|
|
8006e42: 3710 adds r7, #16
|
|
8006e44: 46bd mov sp, r7
|
|
8006e46: bd80 pop {r7, pc}
|
|
8006e48: 200013a0 .word 0x200013a0
|
|
8006e4c: 20001378 .word 0x20001378
|
|
8006e50: 20001338 .word 0x20001338
|
|
8006e54: 20001380 .word 0x20001380
|
|
8006e58: 20000ea8 .word 0x20000ea8
|
|
8006e5c: 20000ea4 .word 0x20000ea4
|
|
8006e60: 2000138c .word 0x2000138c
|
|
8006e64: 20001388 .word 0x20001388
|
|
8006e68: e000ed04 .word 0xe000ed04
|
|
|
|
08006e6c <xTaskGetTickCount>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
TickType_t xTaskGetTickCount( void )
|
|
{
|
|
8006e6c: b480 push {r7}
|
|
8006e6e: b083 sub sp, #12
|
|
8006e70: af00 add r7, sp, #0
|
|
TickType_t xTicks;
|
|
|
|
/* Critical section required if running on a 16 bit processor. */
|
|
portTICK_TYPE_ENTER_CRITICAL();
|
|
{
|
|
xTicks = xTickCount;
|
|
8006e72: 4b05 ldr r3, [pc, #20] @ (8006e88 <xTaskGetTickCount+0x1c>)
|
|
8006e74: 681b ldr r3, [r3, #0]
|
|
8006e76: 607b str r3, [r7, #4]
|
|
}
|
|
portTICK_TYPE_EXIT_CRITICAL();
|
|
|
|
return xTicks;
|
|
8006e78: 687b ldr r3, [r7, #4]
|
|
}
|
|
8006e7a: 4618 mov r0, r3
|
|
8006e7c: 370c adds r7, #12
|
|
8006e7e: 46bd mov sp, r7
|
|
8006e80: f85d 7b04 ldr.w r7, [sp], #4
|
|
8006e84: 4770 bx lr
|
|
8006e86: bf00 nop
|
|
8006e88: 2000137c .word 0x2000137c
|
|
|
|
08006e8c <xTaskIncrementTick>:
|
|
|
|
#endif /* INCLUDE_xTaskAbortDelay */
|
|
/*----------------------------------------------------------*/
|
|
|
|
BaseType_t xTaskIncrementTick( void )
|
|
{
|
|
8006e8c: b580 push {r7, lr}
|
|
8006e8e: b086 sub sp, #24
|
|
8006e90: af00 add r7, sp, #0
|
|
TCB_t * pxTCB;
|
|
TickType_t xItemValue;
|
|
BaseType_t xSwitchRequired = pdFALSE;
|
|
8006e92: 2300 movs r3, #0
|
|
8006e94: 617b str r3, [r7, #20]
|
|
|
|
/* Called by the portable layer each time a tick interrupt occurs.
|
|
Increments the tick then checks to see if the new tick value will cause any
|
|
tasks to be unblocked. */
|
|
traceTASK_INCREMENT_TICK( xTickCount );
|
|
if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
|
|
8006e96: 4b4f ldr r3, [pc, #316] @ (8006fd4 <xTaskIncrementTick+0x148>)
|
|
8006e98: 681b ldr r3, [r3, #0]
|
|
8006e9a: 2b00 cmp r3, #0
|
|
8006e9c: f040 8090 bne.w 8006fc0 <xTaskIncrementTick+0x134>
|
|
{
|
|
/* Minor optimisation. The tick count cannot change in this
|
|
block. */
|
|
const TickType_t xConstTickCount = xTickCount + ( TickType_t ) 1;
|
|
8006ea0: 4b4d ldr r3, [pc, #308] @ (8006fd8 <xTaskIncrementTick+0x14c>)
|
|
8006ea2: 681b ldr r3, [r3, #0]
|
|
8006ea4: 3301 adds r3, #1
|
|
8006ea6: 613b str r3, [r7, #16]
|
|
|
|
/* Increment the RTOS tick, switching the delayed and overflowed
|
|
delayed lists if it wraps to 0. */
|
|
xTickCount = xConstTickCount;
|
|
8006ea8: 4a4b ldr r2, [pc, #300] @ (8006fd8 <xTaskIncrementTick+0x14c>)
|
|
8006eaa: 693b ldr r3, [r7, #16]
|
|
8006eac: 6013 str r3, [r2, #0]
|
|
|
|
if( xConstTickCount == ( TickType_t ) 0U ) /*lint !e774 'if' does not always evaluate to false as it is looking for an overflow. */
|
|
8006eae: 693b ldr r3, [r7, #16]
|
|
8006eb0: 2b00 cmp r3, #0
|
|
8006eb2: d121 bne.n 8006ef8 <xTaskIncrementTick+0x6c>
|
|
{
|
|
taskSWITCH_DELAYED_LISTS();
|
|
8006eb4: 4b49 ldr r3, [pc, #292] @ (8006fdc <xTaskIncrementTick+0x150>)
|
|
8006eb6: 681b ldr r3, [r3, #0]
|
|
8006eb8: 681b ldr r3, [r3, #0]
|
|
8006eba: 2b00 cmp r3, #0
|
|
8006ebc: d00b beq.n 8006ed6 <xTaskIncrementTick+0x4a>
|
|
__asm volatile
|
|
8006ebe: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8006ec2: f383 8811 msr BASEPRI, r3
|
|
8006ec6: f3bf 8f6f isb sy
|
|
8006eca: f3bf 8f4f dsb sy
|
|
8006ece: 603b str r3, [r7, #0]
|
|
}
|
|
8006ed0: bf00 nop
|
|
8006ed2: bf00 nop
|
|
8006ed4: e7fd b.n 8006ed2 <xTaskIncrementTick+0x46>
|
|
8006ed6: 4b41 ldr r3, [pc, #260] @ (8006fdc <xTaskIncrementTick+0x150>)
|
|
8006ed8: 681b ldr r3, [r3, #0]
|
|
8006eda: 60fb str r3, [r7, #12]
|
|
8006edc: 4b40 ldr r3, [pc, #256] @ (8006fe0 <xTaskIncrementTick+0x154>)
|
|
8006ede: 681b ldr r3, [r3, #0]
|
|
8006ee0: 4a3e ldr r2, [pc, #248] @ (8006fdc <xTaskIncrementTick+0x150>)
|
|
8006ee2: 6013 str r3, [r2, #0]
|
|
8006ee4: 4a3e ldr r2, [pc, #248] @ (8006fe0 <xTaskIncrementTick+0x154>)
|
|
8006ee6: 68fb ldr r3, [r7, #12]
|
|
8006ee8: 6013 str r3, [r2, #0]
|
|
8006eea: 4b3e ldr r3, [pc, #248] @ (8006fe4 <xTaskIncrementTick+0x158>)
|
|
8006eec: 681b ldr r3, [r3, #0]
|
|
8006eee: 3301 adds r3, #1
|
|
8006ef0: 4a3c ldr r2, [pc, #240] @ (8006fe4 <xTaskIncrementTick+0x158>)
|
|
8006ef2: 6013 str r3, [r2, #0]
|
|
8006ef4: f000 fad4 bl 80074a0 <prvResetNextTaskUnblockTime>
|
|
|
|
/* See if this tick has made a timeout expire. Tasks are stored in
|
|
the queue in the order of their wake time - meaning once one task
|
|
has been found whose block time has not expired there is no need to
|
|
look any further down the list. */
|
|
if( xConstTickCount >= xNextTaskUnblockTime )
|
|
8006ef8: 4b3b ldr r3, [pc, #236] @ (8006fe8 <xTaskIncrementTick+0x15c>)
|
|
8006efa: 681b ldr r3, [r3, #0]
|
|
8006efc: 693a ldr r2, [r7, #16]
|
|
8006efe: 429a cmp r2, r3
|
|
8006f00: d349 bcc.n 8006f96 <xTaskIncrementTick+0x10a>
|
|
{
|
|
for( ;; )
|
|
{
|
|
if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE )
|
|
8006f02: 4b36 ldr r3, [pc, #216] @ (8006fdc <xTaskIncrementTick+0x150>)
|
|
8006f04: 681b ldr r3, [r3, #0]
|
|
8006f06: 681b ldr r3, [r3, #0]
|
|
8006f08: 2b00 cmp r3, #0
|
|
8006f0a: d104 bne.n 8006f16 <xTaskIncrementTick+0x8a>
|
|
/* The delayed list is empty. Set xNextTaskUnblockTime
|
|
to the maximum possible value so it is extremely
|
|
unlikely that the
|
|
if( xTickCount >= xNextTaskUnblockTime ) test will pass
|
|
next time through. */
|
|
xNextTaskUnblockTime = portMAX_DELAY; /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
|
|
8006f0c: 4b36 ldr r3, [pc, #216] @ (8006fe8 <xTaskIncrementTick+0x15c>)
|
|
8006f0e: f04f 32ff mov.w r2, #4294967295
|
|
8006f12: 601a str r2, [r3, #0]
|
|
break;
|
|
8006f14: e03f b.n 8006f96 <xTaskIncrementTick+0x10a>
|
|
{
|
|
/* The delayed list is not empty, get the value of the
|
|
item at the head of the delayed list. This is the time
|
|
at which the task at the head of the delayed list must
|
|
be removed from the Blocked state. */
|
|
pxTCB = listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
|
|
8006f16: 4b31 ldr r3, [pc, #196] @ (8006fdc <xTaskIncrementTick+0x150>)
|
|
8006f18: 681b ldr r3, [r3, #0]
|
|
8006f1a: 68db ldr r3, [r3, #12]
|
|
8006f1c: 68db ldr r3, [r3, #12]
|
|
8006f1e: 60bb str r3, [r7, #8]
|
|
xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xStateListItem ) );
|
|
8006f20: 68bb ldr r3, [r7, #8]
|
|
8006f22: 685b ldr r3, [r3, #4]
|
|
8006f24: 607b str r3, [r7, #4]
|
|
|
|
if( xConstTickCount < xItemValue )
|
|
8006f26: 693a ldr r2, [r7, #16]
|
|
8006f28: 687b ldr r3, [r7, #4]
|
|
8006f2a: 429a cmp r2, r3
|
|
8006f2c: d203 bcs.n 8006f36 <xTaskIncrementTick+0xaa>
|
|
/* It is not time to unblock this item yet, but the
|
|
item value is the time at which the task at the head
|
|
of the blocked list must be removed from the Blocked
|
|
state - so record the item value in
|
|
xNextTaskUnblockTime. */
|
|
xNextTaskUnblockTime = xItemValue;
|
|
8006f2e: 4a2e ldr r2, [pc, #184] @ (8006fe8 <xTaskIncrementTick+0x15c>)
|
|
8006f30: 687b ldr r3, [r7, #4]
|
|
8006f32: 6013 str r3, [r2, #0]
|
|
break; /*lint !e9011 Code structure here is deedmed easier to understand with multiple breaks. */
|
|
8006f34: e02f b.n 8006f96 <xTaskIncrementTick+0x10a>
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
/* It is time to remove the item from the Blocked state. */
|
|
( void ) uxListRemove( &( pxTCB->xStateListItem ) );
|
|
8006f36: 68bb ldr r3, [r7, #8]
|
|
8006f38: 3304 adds r3, #4
|
|
8006f3a: 4618 mov r0, r3
|
|
8006f3c: f7fe fbdc bl 80056f8 <uxListRemove>
|
|
|
|
/* Is the task waiting on an event also? If so remove
|
|
it from the event list. */
|
|
if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL )
|
|
8006f40: 68bb ldr r3, [r7, #8]
|
|
8006f42: 6a9b ldr r3, [r3, #40] @ 0x28
|
|
8006f44: 2b00 cmp r3, #0
|
|
8006f46: d004 beq.n 8006f52 <xTaskIncrementTick+0xc6>
|
|
{
|
|
( void ) uxListRemove( &( pxTCB->xEventListItem ) );
|
|
8006f48: 68bb ldr r3, [r7, #8]
|
|
8006f4a: 3318 adds r3, #24
|
|
8006f4c: 4618 mov r0, r3
|
|
8006f4e: f7fe fbd3 bl 80056f8 <uxListRemove>
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
/* Place the unblocked task into the appropriate ready
|
|
list. */
|
|
prvAddTaskToReadyList( pxTCB );
|
|
8006f52: 68bb ldr r3, [r7, #8]
|
|
8006f54: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8006f56: 4b25 ldr r3, [pc, #148] @ (8006fec <xTaskIncrementTick+0x160>)
|
|
8006f58: 681b ldr r3, [r3, #0]
|
|
8006f5a: 429a cmp r2, r3
|
|
8006f5c: d903 bls.n 8006f66 <xTaskIncrementTick+0xda>
|
|
8006f5e: 68bb ldr r3, [r7, #8]
|
|
8006f60: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
8006f62: 4a22 ldr r2, [pc, #136] @ (8006fec <xTaskIncrementTick+0x160>)
|
|
8006f64: 6013 str r3, [r2, #0]
|
|
8006f66: 68bb ldr r3, [r7, #8]
|
|
8006f68: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8006f6a: 4613 mov r3, r2
|
|
8006f6c: 009b lsls r3, r3, #2
|
|
8006f6e: 4413 add r3, r2
|
|
8006f70: 009b lsls r3, r3, #2
|
|
8006f72: 4a1f ldr r2, [pc, #124] @ (8006ff0 <xTaskIncrementTick+0x164>)
|
|
8006f74: 441a add r2, r3
|
|
8006f76: 68bb ldr r3, [r7, #8]
|
|
8006f78: 3304 adds r3, #4
|
|
8006f7a: 4619 mov r1, r3
|
|
8006f7c: 4610 mov r0, r2
|
|
8006f7e: f7fe fb5e bl 800563e <vListInsertEnd>
|
|
{
|
|
/* Preemption is on, but a context switch should
|
|
only be performed if the unblocked task has a
|
|
priority that is equal to or higher than the
|
|
currently executing task. */
|
|
if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority )
|
|
8006f82: 68bb ldr r3, [r7, #8]
|
|
8006f84: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8006f86: 4b1b ldr r3, [pc, #108] @ (8006ff4 <xTaskIncrementTick+0x168>)
|
|
8006f88: 681b ldr r3, [r3, #0]
|
|
8006f8a: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
8006f8c: 429a cmp r2, r3
|
|
8006f8e: d3b8 bcc.n 8006f02 <xTaskIncrementTick+0x76>
|
|
{
|
|
xSwitchRequired = pdTRUE;
|
|
8006f90: 2301 movs r3, #1
|
|
8006f92: 617b str r3, [r7, #20]
|
|
if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE )
|
|
8006f94: e7b5 b.n 8006f02 <xTaskIncrementTick+0x76>
|
|
/* Tasks of equal priority to the currently running task will share
|
|
processing time (time slice) if preemption is on, and the application
|
|
writer has not explicitly turned time slicing off. */
|
|
#if ( ( configUSE_PREEMPTION == 1 ) && ( configUSE_TIME_SLICING == 1 ) )
|
|
{
|
|
if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ pxCurrentTCB->uxPriority ] ) ) > ( UBaseType_t ) 1 )
|
|
8006f96: 4b17 ldr r3, [pc, #92] @ (8006ff4 <xTaskIncrementTick+0x168>)
|
|
8006f98: 681b ldr r3, [r3, #0]
|
|
8006f9a: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8006f9c: 4914 ldr r1, [pc, #80] @ (8006ff0 <xTaskIncrementTick+0x164>)
|
|
8006f9e: 4613 mov r3, r2
|
|
8006fa0: 009b lsls r3, r3, #2
|
|
8006fa2: 4413 add r3, r2
|
|
8006fa4: 009b lsls r3, r3, #2
|
|
8006fa6: 440b add r3, r1
|
|
8006fa8: 681b ldr r3, [r3, #0]
|
|
8006faa: 2b01 cmp r3, #1
|
|
8006fac: d901 bls.n 8006fb2 <xTaskIncrementTick+0x126>
|
|
{
|
|
xSwitchRequired = pdTRUE;
|
|
8006fae: 2301 movs r3, #1
|
|
8006fb0: 617b str r3, [r7, #20]
|
|
}
|
|
#endif /* configUSE_TICK_HOOK */
|
|
|
|
#if ( configUSE_PREEMPTION == 1 )
|
|
{
|
|
if( xYieldPending != pdFALSE )
|
|
8006fb2: 4b11 ldr r3, [pc, #68] @ (8006ff8 <xTaskIncrementTick+0x16c>)
|
|
8006fb4: 681b ldr r3, [r3, #0]
|
|
8006fb6: 2b00 cmp r3, #0
|
|
8006fb8: d007 beq.n 8006fca <xTaskIncrementTick+0x13e>
|
|
{
|
|
xSwitchRequired = pdTRUE;
|
|
8006fba: 2301 movs r3, #1
|
|
8006fbc: 617b str r3, [r7, #20]
|
|
8006fbe: e004 b.n 8006fca <xTaskIncrementTick+0x13e>
|
|
}
|
|
#endif /* configUSE_PREEMPTION */
|
|
}
|
|
else
|
|
{
|
|
++xPendedTicks;
|
|
8006fc0: 4b0e ldr r3, [pc, #56] @ (8006ffc <xTaskIncrementTick+0x170>)
|
|
8006fc2: 681b ldr r3, [r3, #0]
|
|
8006fc4: 3301 adds r3, #1
|
|
8006fc6: 4a0d ldr r2, [pc, #52] @ (8006ffc <xTaskIncrementTick+0x170>)
|
|
8006fc8: 6013 str r3, [r2, #0]
|
|
vApplicationTickHook();
|
|
}
|
|
#endif
|
|
}
|
|
|
|
return xSwitchRequired;
|
|
8006fca: 697b ldr r3, [r7, #20]
|
|
}
|
|
8006fcc: 4618 mov r0, r3
|
|
8006fce: 3718 adds r7, #24
|
|
8006fd0: 46bd mov sp, r7
|
|
8006fd2: bd80 pop {r7, pc}
|
|
8006fd4: 200013a0 .word 0x200013a0
|
|
8006fd8: 2000137c .word 0x2000137c
|
|
8006fdc: 20001330 .word 0x20001330
|
|
8006fe0: 20001334 .word 0x20001334
|
|
8006fe4: 20001390 .word 0x20001390
|
|
8006fe8: 20001398 .word 0x20001398
|
|
8006fec: 20001380 .word 0x20001380
|
|
8006ff0: 20000ea8 .word 0x20000ea8
|
|
8006ff4: 20000ea4 .word 0x20000ea4
|
|
8006ff8: 2000138c .word 0x2000138c
|
|
8006ffc: 20001388 .word 0x20001388
|
|
|
|
08007000 <vTaskSwitchContext>:
|
|
|
|
#endif /* configUSE_APPLICATION_TASK_TAG */
|
|
/*-----------------------------------------------------------*/
|
|
|
|
void vTaskSwitchContext( void )
|
|
{
|
|
8007000: b480 push {r7}
|
|
8007002: b085 sub sp, #20
|
|
8007004: af00 add r7, sp, #0
|
|
if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE )
|
|
8007006: 4b28 ldr r3, [pc, #160] @ (80070a8 <vTaskSwitchContext+0xa8>)
|
|
8007008: 681b ldr r3, [r3, #0]
|
|
800700a: 2b00 cmp r3, #0
|
|
800700c: d003 beq.n 8007016 <vTaskSwitchContext+0x16>
|
|
{
|
|
/* The scheduler is currently suspended - do not allow a context
|
|
switch. */
|
|
xYieldPending = pdTRUE;
|
|
800700e: 4b27 ldr r3, [pc, #156] @ (80070ac <vTaskSwitchContext+0xac>)
|
|
8007010: 2201 movs r2, #1
|
|
8007012: 601a str r2, [r3, #0]
|
|
for additional information. */
|
|
_impure_ptr = &( pxCurrentTCB->xNewLib_reent );
|
|
}
|
|
#endif /* configUSE_NEWLIB_REENTRANT */
|
|
}
|
|
}
|
|
8007014: e042 b.n 800709c <vTaskSwitchContext+0x9c>
|
|
xYieldPending = pdFALSE;
|
|
8007016: 4b25 ldr r3, [pc, #148] @ (80070ac <vTaskSwitchContext+0xac>)
|
|
8007018: 2200 movs r2, #0
|
|
800701a: 601a str r2, [r3, #0]
|
|
taskSELECT_HIGHEST_PRIORITY_TASK(); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
|
|
800701c: 4b24 ldr r3, [pc, #144] @ (80070b0 <vTaskSwitchContext+0xb0>)
|
|
800701e: 681b ldr r3, [r3, #0]
|
|
8007020: 60fb str r3, [r7, #12]
|
|
8007022: e011 b.n 8007048 <vTaskSwitchContext+0x48>
|
|
8007024: 68fb ldr r3, [r7, #12]
|
|
8007026: 2b00 cmp r3, #0
|
|
8007028: d10b bne.n 8007042 <vTaskSwitchContext+0x42>
|
|
__asm volatile
|
|
800702a: f04f 0350 mov.w r3, #80 @ 0x50
|
|
800702e: f383 8811 msr BASEPRI, r3
|
|
8007032: f3bf 8f6f isb sy
|
|
8007036: f3bf 8f4f dsb sy
|
|
800703a: 607b str r3, [r7, #4]
|
|
}
|
|
800703c: bf00 nop
|
|
800703e: bf00 nop
|
|
8007040: e7fd b.n 800703e <vTaskSwitchContext+0x3e>
|
|
8007042: 68fb ldr r3, [r7, #12]
|
|
8007044: 3b01 subs r3, #1
|
|
8007046: 60fb str r3, [r7, #12]
|
|
8007048: 491a ldr r1, [pc, #104] @ (80070b4 <vTaskSwitchContext+0xb4>)
|
|
800704a: 68fa ldr r2, [r7, #12]
|
|
800704c: 4613 mov r3, r2
|
|
800704e: 009b lsls r3, r3, #2
|
|
8007050: 4413 add r3, r2
|
|
8007052: 009b lsls r3, r3, #2
|
|
8007054: 440b add r3, r1
|
|
8007056: 681b ldr r3, [r3, #0]
|
|
8007058: 2b00 cmp r3, #0
|
|
800705a: d0e3 beq.n 8007024 <vTaskSwitchContext+0x24>
|
|
800705c: 68fa ldr r2, [r7, #12]
|
|
800705e: 4613 mov r3, r2
|
|
8007060: 009b lsls r3, r3, #2
|
|
8007062: 4413 add r3, r2
|
|
8007064: 009b lsls r3, r3, #2
|
|
8007066: 4a13 ldr r2, [pc, #76] @ (80070b4 <vTaskSwitchContext+0xb4>)
|
|
8007068: 4413 add r3, r2
|
|
800706a: 60bb str r3, [r7, #8]
|
|
800706c: 68bb ldr r3, [r7, #8]
|
|
800706e: 685b ldr r3, [r3, #4]
|
|
8007070: 685a ldr r2, [r3, #4]
|
|
8007072: 68bb ldr r3, [r7, #8]
|
|
8007074: 605a str r2, [r3, #4]
|
|
8007076: 68bb ldr r3, [r7, #8]
|
|
8007078: 685a ldr r2, [r3, #4]
|
|
800707a: 68bb ldr r3, [r7, #8]
|
|
800707c: 3308 adds r3, #8
|
|
800707e: 429a cmp r2, r3
|
|
8007080: d104 bne.n 800708c <vTaskSwitchContext+0x8c>
|
|
8007082: 68bb ldr r3, [r7, #8]
|
|
8007084: 685b ldr r3, [r3, #4]
|
|
8007086: 685a ldr r2, [r3, #4]
|
|
8007088: 68bb ldr r3, [r7, #8]
|
|
800708a: 605a str r2, [r3, #4]
|
|
800708c: 68bb ldr r3, [r7, #8]
|
|
800708e: 685b ldr r3, [r3, #4]
|
|
8007090: 68db ldr r3, [r3, #12]
|
|
8007092: 4a09 ldr r2, [pc, #36] @ (80070b8 <vTaskSwitchContext+0xb8>)
|
|
8007094: 6013 str r3, [r2, #0]
|
|
8007096: 4a06 ldr r2, [pc, #24] @ (80070b0 <vTaskSwitchContext+0xb0>)
|
|
8007098: 68fb ldr r3, [r7, #12]
|
|
800709a: 6013 str r3, [r2, #0]
|
|
}
|
|
800709c: bf00 nop
|
|
800709e: 3714 adds r7, #20
|
|
80070a0: 46bd mov sp, r7
|
|
80070a2: f85d 7b04 ldr.w r7, [sp], #4
|
|
80070a6: 4770 bx lr
|
|
80070a8: 200013a0 .word 0x200013a0
|
|
80070ac: 2000138c .word 0x2000138c
|
|
80070b0: 20001380 .word 0x20001380
|
|
80070b4: 20000ea8 .word 0x20000ea8
|
|
80070b8: 20000ea4 .word 0x20000ea4
|
|
|
|
080070bc <vTaskPlaceOnEventList>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
void vTaskPlaceOnEventList( List_t * const pxEventList, const TickType_t xTicksToWait )
|
|
{
|
|
80070bc: b580 push {r7, lr}
|
|
80070be: b084 sub sp, #16
|
|
80070c0: af00 add r7, sp, #0
|
|
80070c2: 6078 str r0, [r7, #4]
|
|
80070c4: 6039 str r1, [r7, #0]
|
|
configASSERT( pxEventList );
|
|
80070c6: 687b ldr r3, [r7, #4]
|
|
80070c8: 2b00 cmp r3, #0
|
|
80070ca: d10b bne.n 80070e4 <vTaskPlaceOnEventList+0x28>
|
|
__asm volatile
|
|
80070cc: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80070d0: f383 8811 msr BASEPRI, r3
|
|
80070d4: f3bf 8f6f isb sy
|
|
80070d8: f3bf 8f4f dsb sy
|
|
80070dc: 60fb str r3, [r7, #12]
|
|
}
|
|
80070de: bf00 nop
|
|
80070e0: bf00 nop
|
|
80070e2: e7fd b.n 80070e0 <vTaskPlaceOnEventList+0x24>
|
|
|
|
/* Place the event list item of the TCB in the appropriate event list.
|
|
This is placed in the list in priority order so the highest priority task
|
|
is the first to be woken by the event. The queue that contains the event
|
|
list is locked, preventing simultaneous access from interrupts. */
|
|
vListInsert( pxEventList, &( pxCurrentTCB->xEventListItem ) );
|
|
80070e4: 4b07 ldr r3, [pc, #28] @ (8007104 <vTaskPlaceOnEventList+0x48>)
|
|
80070e6: 681b ldr r3, [r3, #0]
|
|
80070e8: 3318 adds r3, #24
|
|
80070ea: 4619 mov r1, r3
|
|
80070ec: 6878 ldr r0, [r7, #4]
|
|
80070ee: f7fe faca bl 8005686 <vListInsert>
|
|
|
|
prvAddCurrentTaskToDelayedList( xTicksToWait, pdTRUE );
|
|
80070f2: 2101 movs r1, #1
|
|
80070f4: 6838 ldr r0, [r7, #0]
|
|
80070f6: f000 fb81 bl 80077fc <prvAddCurrentTaskToDelayedList>
|
|
}
|
|
80070fa: bf00 nop
|
|
80070fc: 3710 adds r7, #16
|
|
80070fe: 46bd mov sp, r7
|
|
8007100: bd80 pop {r7, pc}
|
|
8007102: bf00 nop
|
|
8007104: 20000ea4 .word 0x20000ea4
|
|
|
|
08007108 <vTaskPlaceOnEventListRestricted>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if( configUSE_TIMERS == 1 )
|
|
|
|
void vTaskPlaceOnEventListRestricted( List_t * const pxEventList, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely )
|
|
{
|
|
8007108: b580 push {r7, lr}
|
|
800710a: b086 sub sp, #24
|
|
800710c: af00 add r7, sp, #0
|
|
800710e: 60f8 str r0, [r7, #12]
|
|
8007110: 60b9 str r1, [r7, #8]
|
|
8007112: 607a str r2, [r7, #4]
|
|
configASSERT( pxEventList );
|
|
8007114: 68fb ldr r3, [r7, #12]
|
|
8007116: 2b00 cmp r3, #0
|
|
8007118: d10b bne.n 8007132 <vTaskPlaceOnEventListRestricted+0x2a>
|
|
__asm volatile
|
|
800711a: f04f 0350 mov.w r3, #80 @ 0x50
|
|
800711e: f383 8811 msr BASEPRI, r3
|
|
8007122: f3bf 8f6f isb sy
|
|
8007126: f3bf 8f4f dsb sy
|
|
800712a: 617b str r3, [r7, #20]
|
|
}
|
|
800712c: bf00 nop
|
|
800712e: bf00 nop
|
|
8007130: e7fd b.n 800712e <vTaskPlaceOnEventListRestricted+0x26>
|
|
|
|
/* Place the event list item of the TCB in the appropriate event list.
|
|
In this case it is assume that this is the only task that is going to
|
|
be waiting on this event list, so the faster vListInsertEnd() function
|
|
can be used in place of vListInsert. */
|
|
vListInsertEnd( pxEventList, &( pxCurrentTCB->xEventListItem ) );
|
|
8007132: 4b0a ldr r3, [pc, #40] @ (800715c <vTaskPlaceOnEventListRestricted+0x54>)
|
|
8007134: 681b ldr r3, [r3, #0]
|
|
8007136: 3318 adds r3, #24
|
|
8007138: 4619 mov r1, r3
|
|
800713a: 68f8 ldr r0, [r7, #12]
|
|
800713c: f7fe fa7f bl 800563e <vListInsertEnd>
|
|
|
|
/* If the task should block indefinitely then set the block time to a
|
|
value that will be recognised as an indefinite delay inside the
|
|
prvAddCurrentTaskToDelayedList() function. */
|
|
if( xWaitIndefinitely != pdFALSE )
|
|
8007140: 687b ldr r3, [r7, #4]
|
|
8007142: 2b00 cmp r3, #0
|
|
8007144: d002 beq.n 800714c <vTaskPlaceOnEventListRestricted+0x44>
|
|
{
|
|
xTicksToWait = portMAX_DELAY;
|
|
8007146: f04f 33ff mov.w r3, #4294967295
|
|
800714a: 60bb str r3, [r7, #8]
|
|
}
|
|
|
|
traceTASK_DELAY_UNTIL( ( xTickCount + xTicksToWait ) );
|
|
prvAddCurrentTaskToDelayedList( xTicksToWait, xWaitIndefinitely );
|
|
800714c: 6879 ldr r1, [r7, #4]
|
|
800714e: 68b8 ldr r0, [r7, #8]
|
|
8007150: f000 fb54 bl 80077fc <prvAddCurrentTaskToDelayedList>
|
|
}
|
|
8007154: bf00 nop
|
|
8007156: 3718 adds r7, #24
|
|
8007158: 46bd mov sp, r7
|
|
800715a: bd80 pop {r7, pc}
|
|
800715c: 20000ea4 .word 0x20000ea4
|
|
|
|
08007160 <xTaskRemoveFromEventList>:
|
|
|
|
#endif /* configUSE_TIMERS */
|
|
/*-----------------------------------------------------------*/
|
|
|
|
BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList )
|
|
{
|
|
8007160: b580 push {r7, lr}
|
|
8007162: b086 sub sp, #24
|
|
8007164: af00 add r7, sp, #0
|
|
8007166: 6078 str r0, [r7, #4]
|
|
get called - the lock count on the queue will get modified instead. This
|
|
means exclusive access to the event list is guaranteed here.
|
|
|
|
This function assumes that a check has already been made to ensure that
|
|
pxEventList is not empty. */
|
|
pxUnblockedTCB = listGET_OWNER_OF_HEAD_ENTRY( pxEventList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
|
|
8007168: 687b ldr r3, [r7, #4]
|
|
800716a: 68db ldr r3, [r3, #12]
|
|
800716c: 68db ldr r3, [r3, #12]
|
|
800716e: 613b str r3, [r7, #16]
|
|
configASSERT( pxUnblockedTCB );
|
|
8007170: 693b ldr r3, [r7, #16]
|
|
8007172: 2b00 cmp r3, #0
|
|
8007174: d10b bne.n 800718e <xTaskRemoveFromEventList+0x2e>
|
|
__asm volatile
|
|
8007176: f04f 0350 mov.w r3, #80 @ 0x50
|
|
800717a: f383 8811 msr BASEPRI, r3
|
|
800717e: f3bf 8f6f isb sy
|
|
8007182: f3bf 8f4f dsb sy
|
|
8007186: 60fb str r3, [r7, #12]
|
|
}
|
|
8007188: bf00 nop
|
|
800718a: bf00 nop
|
|
800718c: e7fd b.n 800718a <xTaskRemoveFromEventList+0x2a>
|
|
( void ) uxListRemove( &( pxUnblockedTCB->xEventListItem ) );
|
|
800718e: 693b ldr r3, [r7, #16]
|
|
8007190: 3318 adds r3, #24
|
|
8007192: 4618 mov r0, r3
|
|
8007194: f7fe fab0 bl 80056f8 <uxListRemove>
|
|
|
|
if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
|
|
8007198: 4b1d ldr r3, [pc, #116] @ (8007210 <xTaskRemoveFromEventList+0xb0>)
|
|
800719a: 681b ldr r3, [r3, #0]
|
|
800719c: 2b00 cmp r3, #0
|
|
800719e: d11d bne.n 80071dc <xTaskRemoveFromEventList+0x7c>
|
|
{
|
|
( void ) uxListRemove( &( pxUnblockedTCB->xStateListItem ) );
|
|
80071a0: 693b ldr r3, [r7, #16]
|
|
80071a2: 3304 adds r3, #4
|
|
80071a4: 4618 mov r0, r3
|
|
80071a6: f7fe faa7 bl 80056f8 <uxListRemove>
|
|
prvAddTaskToReadyList( pxUnblockedTCB );
|
|
80071aa: 693b ldr r3, [r7, #16]
|
|
80071ac: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
80071ae: 4b19 ldr r3, [pc, #100] @ (8007214 <xTaskRemoveFromEventList+0xb4>)
|
|
80071b0: 681b ldr r3, [r3, #0]
|
|
80071b2: 429a cmp r2, r3
|
|
80071b4: d903 bls.n 80071be <xTaskRemoveFromEventList+0x5e>
|
|
80071b6: 693b ldr r3, [r7, #16]
|
|
80071b8: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
80071ba: 4a16 ldr r2, [pc, #88] @ (8007214 <xTaskRemoveFromEventList+0xb4>)
|
|
80071bc: 6013 str r3, [r2, #0]
|
|
80071be: 693b ldr r3, [r7, #16]
|
|
80071c0: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
80071c2: 4613 mov r3, r2
|
|
80071c4: 009b lsls r3, r3, #2
|
|
80071c6: 4413 add r3, r2
|
|
80071c8: 009b lsls r3, r3, #2
|
|
80071ca: 4a13 ldr r2, [pc, #76] @ (8007218 <xTaskRemoveFromEventList+0xb8>)
|
|
80071cc: 441a add r2, r3
|
|
80071ce: 693b ldr r3, [r7, #16]
|
|
80071d0: 3304 adds r3, #4
|
|
80071d2: 4619 mov r1, r3
|
|
80071d4: 4610 mov r0, r2
|
|
80071d6: f7fe fa32 bl 800563e <vListInsertEnd>
|
|
80071da: e005 b.n 80071e8 <xTaskRemoveFromEventList+0x88>
|
|
}
|
|
else
|
|
{
|
|
/* The delayed and ready lists cannot be accessed, so hold this task
|
|
pending until the scheduler is resumed. */
|
|
vListInsertEnd( &( xPendingReadyList ), &( pxUnblockedTCB->xEventListItem ) );
|
|
80071dc: 693b ldr r3, [r7, #16]
|
|
80071de: 3318 adds r3, #24
|
|
80071e0: 4619 mov r1, r3
|
|
80071e2: 480e ldr r0, [pc, #56] @ (800721c <xTaskRemoveFromEventList+0xbc>)
|
|
80071e4: f7fe fa2b bl 800563e <vListInsertEnd>
|
|
}
|
|
|
|
if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority )
|
|
80071e8: 693b ldr r3, [r7, #16]
|
|
80071ea: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
80071ec: 4b0c ldr r3, [pc, #48] @ (8007220 <xTaskRemoveFromEventList+0xc0>)
|
|
80071ee: 681b ldr r3, [r3, #0]
|
|
80071f0: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
80071f2: 429a cmp r2, r3
|
|
80071f4: d905 bls.n 8007202 <xTaskRemoveFromEventList+0xa2>
|
|
{
|
|
/* Return true if the task removed from the event list has a higher
|
|
priority than the calling task. This allows the calling task to know if
|
|
it should force a context switch now. */
|
|
xReturn = pdTRUE;
|
|
80071f6: 2301 movs r3, #1
|
|
80071f8: 617b str r3, [r7, #20]
|
|
|
|
/* Mark that a yield is pending in case the user is not using the
|
|
"xHigherPriorityTaskWoken" parameter to an ISR safe FreeRTOS function. */
|
|
xYieldPending = pdTRUE;
|
|
80071fa: 4b0a ldr r3, [pc, #40] @ (8007224 <xTaskRemoveFromEventList+0xc4>)
|
|
80071fc: 2201 movs r2, #1
|
|
80071fe: 601a str r2, [r3, #0]
|
|
8007200: e001 b.n 8007206 <xTaskRemoveFromEventList+0xa6>
|
|
}
|
|
else
|
|
{
|
|
xReturn = pdFALSE;
|
|
8007202: 2300 movs r3, #0
|
|
8007204: 617b str r3, [r7, #20]
|
|
}
|
|
|
|
return xReturn;
|
|
8007206: 697b ldr r3, [r7, #20]
|
|
}
|
|
8007208: 4618 mov r0, r3
|
|
800720a: 3718 adds r7, #24
|
|
800720c: 46bd mov sp, r7
|
|
800720e: bd80 pop {r7, pc}
|
|
8007210: 200013a0 .word 0x200013a0
|
|
8007214: 20001380 .word 0x20001380
|
|
8007218: 20000ea8 .word 0x20000ea8
|
|
800721c: 20001338 .word 0x20001338
|
|
8007220: 20000ea4 .word 0x20000ea4
|
|
8007224: 2000138c .word 0x2000138c
|
|
|
|
08007228 <vTaskInternalSetTimeOutState>:
|
|
taskEXIT_CRITICAL();
|
|
}
|
|
/*-----------------------------------------------------------*/
|
|
|
|
void vTaskInternalSetTimeOutState( TimeOut_t * const pxTimeOut )
|
|
{
|
|
8007228: b480 push {r7}
|
|
800722a: b083 sub sp, #12
|
|
800722c: af00 add r7, sp, #0
|
|
800722e: 6078 str r0, [r7, #4]
|
|
/* For internal use only as it does not use a critical section. */
|
|
pxTimeOut->xOverflowCount = xNumOfOverflows;
|
|
8007230: 4b06 ldr r3, [pc, #24] @ (800724c <vTaskInternalSetTimeOutState+0x24>)
|
|
8007232: 681a ldr r2, [r3, #0]
|
|
8007234: 687b ldr r3, [r7, #4]
|
|
8007236: 601a str r2, [r3, #0]
|
|
pxTimeOut->xTimeOnEntering = xTickCount;
|
|
8007238: 4b05 ldr r3, [pc, #20] @ (8007250 <vTaskInternalSetTimeOutState+0x28>)
|
|
800723a: 681a ldr r2, [r3, #0]
|
|
800723c: 687b ldr r3, [r7, #4]
|
|
800723e: 605a str r2, [r3, #4]
|
|
}
|
|
8007240: bf00 nop
|
|
8007242: 370c adds r7, #12
|
|
8007244: 46bd mov sp, r7
|
|
8007246: f85d 7b04 ldr.w r7, [sp], #4
|
|
800724a: 4770 bx lr
|
|
800724c: 20001390 .word 0x20001390
|
|
8007250: 2000137c .word 0x2000137c
|
|
|
|
08007254 <xTaskCheckForTimeOut>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait )
|
|
{
|
|
8007254: b580 push {r7, lr}
|
|
8007256: b088 sub sp, #32
|
|
8007258: af00 add r7, sp, #0
|
|
800725a: 6078 str r0, [r7, #4]
|
|
800725c: 6039 str r1, [r7, #0]
|
|
BaseType_t xReturn;
|
|
|
|
configASSERT( pxTimeOut );
|
|
800725e: 687b ldr r3, [r7, #4]
|
|
8007260: 2b00 cmp r3, #0
|
|
8007262: d10b bne.n 800727c <xTaskCheckForTimeOut+0x28>
|
|
__asm volatile
|
|
8007264: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8007268: f383 8811 msr BASEPRI, r3
|
|
800726c: f3bf 8f6f isb sy
|
|
8007270: f3bf 8f4f dsb sy
|
|
8007274: 613b str r3, [r7, #16]
|
|
}
|
|
8007276: bf00 nop
|
|
8007278: bf00 nop
|
|
800727a: e7fd b.n 8007278 <xTaskCheckForTimeOut+0x24>
|
|
configASSERT( pxTicksToWait );
|
|
800727c: 683b ldr r3, [r7, #0]
|
|
800727e: 2b00 cmp r3, #0
|
|
8007280: d10b bne.n 800729a <xTaskCheckForTimeOut+0x46>
|
|
__asm volatile
|
|
8007282: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8007286: f383 8811 msr BASEPRI, r3
|
|
800728a: f3bf 8f6f isb sy
|
|
800728e: f3bf 8f4f dsb sy
|
|
8007292: 60fb str r3, [r7, #12]
|
|
}
|
|
8007294: bf00 nop
|
|
8007296: bf00 nop
|
|
8007298: e7fd b.n 8007296 <xTaskCheckForTimeOut+0x42>
|
|
|
|
taskENTER_CRITICAL();
|
|
800729a: f000 ff8d bl 80081b8 <vPortEnterCritical>
|
|
{
|
|
/* Minor optimisation. The tick count cannot change in this block. */
|
|
const TickType_t xConstTickCount = xTickCount;
|
|
800729e: 4b1d ldr r3, [pc, #116] @ (8007314 <xTaskCheckForTimeOut+0xc0>)
|
|
80072a0: 681b ldr r3, [r3, #0]
|
|
80072a2: 61bb str r3, [r7, #24]
|
|
const TickType_t xElapsedTime = xConstTickCount - pxTimeOut->xTimeOnEntering;
|
|
80072a4: 687b ldr r3, [r7, #4]
|
|
80072a6: 685b ldr r3, [r3, #4]
|
|
80072a8: 69ba ldr r2, [r7, #24]
|
|
80072aa: 1ad3 subs r3, r2, r3
|
|
80072ac: 617b str r3, [r7, #20]
|
|
}
|
|
else
|
|
#endif
|
|
|
|
#if ( INCLUDE_vTaskSuspend == 1 )
|
|
if( *pxTicksToWait == portMAX_DELAY )
|
|
80072ae: 683b ldr r3, [r7, #0]
|
|
80072b0: 681b ldr r3, [r3, #0]
|
|
80072b2: f1b3 3fff cmp.w r3, #4294967295
|
|
80072b6: d102 bne.n 80072be <xTaskCheckForTimeOut+0x6a>
|
|
{
|
|
/* If INCLUDE_vTaskSuspend is set to 1 and the block time
|
|
specified is the maximum block time then the task should block
|
|
indefinitely, and therefore never time out. */
|
|
xReturn = pdFALSE;
|
|
80072b8: 2300 movs r3, #0
|
|
80072ba: 61fb str r3, [r7, #28]
|
|
80072bc: e023 b.n 8007306 <xTaskCheckForTimeOut+0xb2>
|
|
}
|
|
else
|
|
#endif
|
|
|
|
if( ( xNumOfOverflows != pxTimeOut->xOverflowCount ) && ( xConstTickCount >= pxTimeOut->xTimeOnEntering ) ) /*lint !e525 Indentation preferred as is to make code within pre-processor directives clearer. */
|
|
80072be: 687b ldr r3, [r7, #4]
|
|
80072c0: 681a ldr r2, [r3, #0]
|
|
80072c2: 4b15 ldr r3, [pc, #84] @ (8007318 <xTaskCheckForTimeOut+0xc4>)
|
|
80072c4: 681b ldr r3, [r3, #0]
|
|
80072c6: 429a cmp r2, r3
|
|
80072c8: d007 beq.n 80072da <xTaskCheckForTimeOut+0x86>
|
|
80072ca: 687b ldr r3, [r7, #4]
|
|
80072cc: 685b ldr r3, [r3, #4]
|
|
80072ce: 69ba ldr r2, [r7, #24]
|
|
80072d0: 429a cmp r2, r3
|
|
80072d2: d302 bcc.n 80072da <xTaskCheckForTimeOut+0x86>
|
|
/* The tick count is greater than the time at which
|
|
vTaskSetTimeout() was called, but has also overflowed since
|
|
vTaskSetTimeOut() was called. It must have wrapped all the way
|
|
around and gone past again. This passed since vTaskSetTimeout()
|
|
was called. */
|
|
xReturn = pdTRUE;
|
|
80072d4: 2301 movs r3, #1
|
|
80072d6: 61fb str r3, [r7, #28]
|
|
80072d8: e015 b.n 8007306 <xTaskCheckForTimeOut+0xb2>
|
|
}
|
|
else if( xElapsedTime < *pxTicksToWait ) /*lint !e961 Explicit casting is only redundant with some compilers, whereas others require it to prevent integer conversion errors. */
|
|
80072da: 683b ldr r3, [r7, #0]
|
|
80072dc: 681b ldr r3, [r3, #0]
|
|
80072de: 697a ldr r2, [r7, #20]
|
|
80072e0: 429a cmp r2, r3
|
|
80072e2: d20b bcs.n 80072fc <xTaskCheckForTimeOut+0xa8>
|
|
{
|
|
/* Not a genuine timeout. Adjust parameters for time remaining. */
|
|
*pxTicksToWait -= xElapsedTime;
|
|
80072e4: 683b ldr r3, [r7, #0]
|
|
80072e6: 681a ldr r2, [r3, #0]
|
|
80072e8: 697b ldr r3, [r7, #20]
|
|
80072ea: 1ad2 subs r2, r2, r3
|
|
80072ec: 683b ldr r3, [r7, #0]
|
|
80072ee: 601a str r2, [r3, #0]
|
|
vTaskInternalSetTimeOutState( pxTimeOut );
|
|
80072f0: 6878 ldr r0, [r7, #4]
|
|
80072f2: f7ff ff99 bl 8007228 <vTaskInternalSetTimeOutState>
|
|
xReturn = pdFALSE;
|
|
80072f6: 2300 movs r3, #0
|
|
80072f8: 61fb str r3, [r7, #28]
|
|
80072fa: e004 b.n 8007306 <xTaskCheckForTimeOut+0xb2>
|
|
}
|
|
else
|
|
{
|
|
*pxTicksToWait = 0;
|
|
80072fc: 683b ldr r3, [r7, #0]
|
|
80072fe: 2200 movs r2, #0
|
|
8007300: 601a str r2, [r3, #0]
|
|
xReturn = pdTRUE;
|
|
8007302: 2301 movs r3, #1
|
|
8007304: 61fb str r3, [r7, #28]
|
|
}
|
|
}
|
|
taskEXIT_CRITICAL();
|
|
8007306: f000 ff89 bl 800821c <vPortExitCritical>
|
|
|
|
return xReturn;
|
|
800730a: 69fb ldr r3, [r7, #28]
|
|
}
|
|
800730c: 4618 mov r0, r3
|
|
800730e: 3720 adds r7, #32
|
|
8007310: 46bd mov sp, r7
|
|
8007312: bd80 pop {r7, pc}
|
|
8007314: 2000137c .word 0x2000137c
|
|
8007318: 20001390 .word 0x20001390
|
|
|
|
0800731c <vTaskMissedYield>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
void vTaskMissedYield( void )
|
|
{
|
|
800731c: b480 push {r7}
|
|
800731e: af00 add r7, sp, #0
|
|
xYieldPending = pdTRUE;
|
|
8007320: 4b03 ldr r3, [pc, #12] @ (8007330 <vTaskMissedYield+0x14>)
|
|
8007322: 2201 movs r2, #1
|
|
8007324: 601a str r2, [r3, #0]
|
|
}
|
|
8007326: bf00 nop
|
|
8007328: 46bd mov sp, r7
|
|
800732a: f85d 7b04 ldr.w r7, [sp], #4
|
|
800732e: 4770 bx lr
|
|
8007330: 2000138c .word 0x2000138c
|
|
|
|
08007334 <prvIdleTask>:
|
|
*
|
|
* void prvIdleTask( void *pvParameters );
|
|
*
|
|
*/
|
|
static portTASK_FUNCTION( prvIdleTask, pvParameters )
|
|
{
|
|
8007334: b580 push {r7, lr}
|
|
8007336: b082 sub sp, #8
|
|
8007338: af00 add r7, sp, #0
|
|
800733a: 6078 str r0, [r7, #4]
|
|
|
|
for( ;; )
|
|
{
|
|
/* See if any tasks have deleted themselves - if so then the idle task
|
|
is responsible for freeing the deleted task's TCB and stack. */
|
|
prvCheckTasksWaitingTermination();
|
|
800733c: f000 f852 bl 80073e4 <prvCheckTasksWaitingTermination>
|
|
|
|
A critical region is not required here as we are just reading from
|
|
the list, and an occasional incorrect value will not matter. If
|
|
the ready list at the idle priority contains more than one task
|
|
then a task other than the idle task is ready to execute. */
|
|
if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > ( UBaseType_t ) 1 )
|
|
8007340: 4b06 ldr r3, [pc, #24] @ (800735c <prvIdleTask+0x28>)
|
|
8007342: 681b ldr r3, [r3, #0]
|
|
8007344: 2b01 cmp r3, #1
|
|
8007346: d9f9 bls.n 800733c <prvIdleTask+0x8>
|
|
{
|
|
taskYIELD();
|
|
8007348: 4b05 ldr r3, [pc, #20] @ (8007360 <prvIdleTask+0x2c>)
|
|
800734a: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
800734e: 601a str r2, [r3, #0]
|
|
8007350: f3bf 8f4f dsb sy
|
|
8007354: f3bf 8f6f isb sy
|
|
prvCheckTasksWaitingTermination();
|
|
8007358: e7f0 b.n 800733c <prvIdleTask+0x8>
|
|
800735a: bf00 nop
|
|
800735c: 20000ea8 .word 0x20000ea8
|
|
8007360: e000ed04 .word 0xe000ed04
|
|
|
|
08007364 <prvInitialiseTaskLists>:
|
|
|
|
#endif /* portUSING_MPU_WRAPPERS */
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static void prvInitialiseTaskLists( void )
|
|
{
|
|
8007364: b580 push {r7, lr}
|
|
8007366: b082 sub sp, #8
|
|
8007368: af00 add r7, sp, #0
|
|
UBaseType_t uxPriority;
|
|
|
|
for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ )
|
|
800736a: 2300 movs r3, #0
|
|
800736c: 607b str r3, [r7, #4]
|
|
800736e: e00c b.n 800738a <prvInitialiseTaskLists+0x26>
|
|
{
|
|
vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) );
|
|
8007370: 687a ldr r2, [r7, #4]
|
|
8007372: 4613 mov r3, r2
|
|
8007374: 009b lsls r3, r3, #2
|
|
8007376: 4413 add r3, r2
|
|
8007378: 009b lsls r3, r3, #2
|
|
800737a: 4a12 ldr r2, [pc, #72] @ (80073c4 <prvInitialiseTaskLists+0x60>)
|
|
800737c: 4413 add r3, r2
|
|
800737e: 4618 mov r0, r3
|
|
8007380: f7fe f930 bl 80055e4 <vListInitialise>
|
|
for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ )
|
|
8007384: 687b ldr r3, [r7, #4]
|
|
8007386: 3301 adds r3, #1
|
|
8007388: 607b str r3, [r7, #4]
|
|
800738a: 687b ldr r3, [r7, #4]
|
|
800738c: 2b37 cmp r3, #55 @ 0x37
|
|
800738e: d9ef bls.n 8007370 <prvInitialiseTaskLists+0xc>
|
|
}
|
|
|
|
vListInitialise( &xDelayedTaskList1 );
|
|
8007390: 480d ldr r0, [pc, #52] @ (80073c8 <prvInitialiseTaskLists+0x64>)
|
|
8007392: f7fe f927 bl 80055e4 <vListInitialise>
|
|
vListInitialise( &xDelayedTaskList2 );
|
|
8007396: 480d ldr r0, [pc, #52] @ (80073cc <prvInitialiseTaskLists+0x68>)
|
|
8007398: f7fe f924 bl 80055e4 <vListInitialise>
|
|
vListInitialise( &xPendingReadyList );
|
|
800739c: 480c ldr r0, [pc, #48] @ (80073d0 <prvInitialiseTaskLists+0x6c>)
|
|
800739e: f7fe f921 bl 80055e4 <vListInitialise>
|
|
|
|
#if ( INCLUDE_vTaskDelete == 1 )
|
|
{
|
|
vListInitialise( &xTasksWaitingTermination );
|
|
80073a2: 480c ldr r0, [pc, #48] @ (80073d4 <prvInitialiseTaskLists+0x70>)
|
|
80073a4: f7fe f91e bl 80055e4 <vListInitialise>
|
|
}
|
|
#endif /* INCLUDE_vTaskDelete */
|
|
|
|
#if ( INCLUDE_vTaskSuspend == 1 )
|
|
{
|
|
vListInitialise( &xSuspendedTaskList );
|
|
80073a8: 480b ldr r0, [pc, #44] @ (80073d8 <prvInitialiseTaskLists+0x74>)
|
|
80073aa: f7fe f91b bl 80055e4 <vListInitialise>
|
|
}
|
|
#endif /* INCLUDE_vTaskSuspend */
|
|
|
|
/* Start with pxDelayedTaskList using list1 and the pxOverflowDelayedTaskList
|
|
using list2. */
|
|
pxDelayedTaskList = &xDelayedTaskList1;
|
|
80073ae: 4b0b ldr r3, [pc, #44] @ (80073dc <prvInitialiseTaskLists+0x78>)
|
|
80073b0: 4a05 ldr r2, [pc, #20] @ (80073c8 <prvInitialiseTaskLists+0x64>)
|
|
80073b2: 601a str r2, [r3, #0]
|
|
pxOverflowDelayedTaskList = &xDelayedTaskList2;
|
|
80073b4: 4b0a ldr r3, [pc, #40] @ (80073e0 <prvInitialiseTaskLists+0x7c>)
|
|
80073b6: 4a05 ldr r2, [pc, #20] @ (80073cc <prvInitialiseTaskLists+0x68>)
|
|
80073b8: 601a str r2, [r3, #0]
|
|
}
|
|
80073ba: bf00 nop
|
|
80073bc: 3708 adds r7, #8
|
|
80073be: 46bd mov sp, r7
|
|
80073c0: bd80 pop {r7, pc}
|
|
80073c2: bf00 nop
|
|
80073c4: 20000ea8 .word 0x20000ea8
|
|
80073c8: 20001308 .word 0x20001308
|
|
80073cc: 2000131c .word 0x2000131c
|
|
80073d0: 20001338 .word 0x20001338
|
|
80073d4: 2000134c .word 0x2000134c
|
|
80073d8: 20001364 .word 0x20001364
|
|
80073dc: 20001330 .word 0x20001330
|
|
80073e0: 20001334 .word 0x20001334
|
|
|
|
080073e4 <prvCheckTasksWaitingTermination>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static void prvCheckTasksWaitingTermination( void )
|
|
{
|
|
80073e4: b580 push {r7, lr}
|
|
80073e6: b082 sub sp, #8
|
|
80073e8: af00 add r7, sp, #0
|
|
{
|
|
TCB_t *pxTCB;
|
|
|
|
/* uxDeletedTasksWaitingCleanUp is used to prevent taskENTER_CRITICAL()
|
|
being called too often in the idle task. */
|
|
while( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U )
|
|
80073ea: e019 b.n 8007420 <prvCheckTasksWaitingTermination+0x3c>
|
|
{
|
|
taskENTER_CRITICAL();
|
|
80073ec: f000 fee4 bl 80081b8 <vPortEnterCritical>
|
|
{
|
|
pxTCB = listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
|
|
80073f0: 4b10 ldr r3, [pc, #64] @ (8007434 <prvCheckTasksWaitingTermination+0x50>)
|
|
80073f2: 68db ldr r3, [r3, #12]
|
|
80073f4: 68db ldr r3, [r3, #12]
|
|
80073f6: 607b str r3, [r7, #4]
|
|
( void ) uxListRemove( &( pxTCB->xStateListItem ) );
|
|
80073f8: 687b ldr r3, [r7, #4]
|
|
80073fa: 3304 adds r3, #4
|
|
80073fc: 4618 mov r0, r3
|
|
80073fe: f7fe f97b bl 80056f8 <uxListRemove>
|
|
--uxCurrentNumberOfTasks;
|
|
8007402: 4b0d ldr r3, [pc, #52] @ (8007438 <prvCheckTasksWaitingTermination+0x54>)
|
|
8007404: 681b ldr r3, [r3, #0]
|
|
8007406: 3b01 subs r3, #1
|
|
8007408: 4a0b ldr r2, [pc, #44] @ (8007438 <prvCheckTasksWaitingTermination+0x54>)
|
|
800740a: 6013 str r3, [r2, #0]
|
|
--uxDeletedTasksWaitingCleanUp;
|
|
800740c: 4b0b ldr r3, [pc, #44] @ (800743c <prvCheckTasksWaitingTermination+0x58>)
|
|
800740e: 681b ldr r3, [r3, #0]
|
|
8007410: 3b01 subs r3, #1
|
|
8007412: 4a0a ldr r2, [pc, #40] @ (800743c <prvCheckTasksWaitingTermination+0x58>)
|
|
8007414: 6013 str r3, [r2, #0]
|
|
}
|
|
taskEXIT_CRITICAL();
|
|
8007416: f000 ff01 bl 800821c <vPortExitCritical>
|
|
|
|
prvDeleteTCB( pxTCB );
|
|
800741a: 6878 ldr r0, [r7, #4]
|
|
800741c: f000 f810 bl 8007440 <prvDeleteTCB>
|
|
while( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U )
|
|
8007420: 4b06 ldr r3, [pc, #24] @ (800743c <prvCheckTasksWaitingTermination+0x58>)
|
|
8007422: 681b ldr r3, [r3, #0]
|
|
8007424: 2b00 cmp r3, #0
|
|
8007426: d1e1 bne.n 80073ec <prvCheckTasksWaitingTermination+0x8>
|
|
}
|
|
}
|
|
#endif /* INCLUDE_vTaskDelete */
|
|
}
|
|
8007428: bf00 nop
|
|
800742a: bf00 nop
|
|
800742c: 3708 adds r7, #8
|
|
800742e: 46bd mov sp, r7
|
|
8007430: bd80 pop {r7, pc}
|
|
8007432: bf00 nop
|
|
8007434: 2000134c .word 0x2000134c
|
|
8007438: 20001378 .word 0x20001378
|
|
800743c: 20001360 .word 0x20001360
|
|
|
|
08007440 <prvDeleteTCB>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if ( INCLUDE_vTaskDelete == 1 )
|
|
|
|
static void prvDeleteTCB( TCB_t *pxTCB )
|
|
{
|
|
8007440: b580 push {r7, lr}
|
|
8007442: b084 sub sp, #16
|
|
8007444: af00 add r7, sp, #0
|
|
8007446: 6078 str r0, [r7, #4]
|
|
#elif( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 ) /*lint !e731 !e9029 Macro has been consolidated for readability reasons. */
|
|
{
|
|
/* The task could have been allocated statically or dynamically, so
|
|
check what was statically allocated before trying to free the
|
|
memory. */
|
|
if( pxTCB->ucStaticallyAllocated == tskDYNAMICALLY_ALLOCATED_STACK_AND_TCB )
|
|
8007448: 687b ldr r3, [r7, #4]
|
|
800744a: f893 3059 ldrb.w r3, [r3, #89] @ 0x59
|
|
800744e: 2b00 cmp r3, #0
|
|
8007450: d108 bne.n 8007464 <prvDeleteTCB+0x24>
|
|
{
|
|
/* Both the stack and TCB were allocated dynamically, so both
|
|
must be freed. */
|
|
vPortFree( pxTCB->pxStack );
|
|
8007452: 687b ldr r3, [r7, #4]
|
|
8007454: 6b1b ldr r3, [r3, #48] @ 0x30
|
|
8007456: 4618 mov r0, r3
|
|
8007458: f001 f89e bl 8008598 <vPortFree>
|
|
vPortFree( pxTCB );
|
|
800745c: 6878 ldr r0, [r7, #4]
|
|
800745e: f001 f89b bl 8008598 <vPortFree>
|
|
configASSERT( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB );
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
|
|
}
|
|
8007462: e019 b.n 8007498 <prvDeleteTCB+0x58>
|
|
else if( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_ONLY )
|
|
8007464: 687b ldr r3, [r7, #4]
|
|
8007466: f893 3059 ldrb.w r3, [r3, #89] @ 0x59
|
|
800746a: 2b01 cmp r3, #1
|
|
800746c: d103 bne.n 8007476 <prvDeleteTCB+0x36>
|
|
vPortFree( pxTCB );
|
|
800746e: 6878 ldr r0, [r7, #4]
|
|
8007470: f001 f892 bl 8008598 <vPortFree>
|
|
}
|
|
8007474: e010 b.n 8007498 <prvDeleteTCB+0x58>
|
|
configASSERT( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB );
|
|
8007476: 687b ldr r3, [r7, #4]
|
|
8007478: f893 3059 ldrb.w r3, [r3, #89] @ 0x59
|
|
800747c: 2b02 cmp r3, #2
|
|
800747e: d00b beq.n 8007498 <prvDeleteTCB+0x58>
|
|
__asm volatile
|
|
8007480: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8007484: f383 8811 msr BASEPRI, r3
|
|
8007488: f3bf 8f6f isb sy
|
|
800748c: f3bf 8f4f dsb sy
|
|
8007490: 60fb str r3, [r7, #12]
|
|
}
|
|
8007492: bf00 nop
|
|
8007494: bf00 nop
|
|
8007496: e7fd b.n 8007494 <prvDeleteTCB+0x54>
|
|
}
|
|
8007498: bf00 nop
|
|
800749a: 3710 adds r7, #16
|
|
800749c: 46bd mov sp, r7
|
|
800749e: bd80 pop {r7, pc}
|
|
|
|
080074a0 <prvResetNextTaskUnblockTime>:
|
|
|
|
#endif /* INCLUDE_vTaskDelete */
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static void prvResetNextTaskUnblockTime( void )
|
|
{
|
|
80074a0: b480 push {r7}
|
|
80074a2: b083 sub sp, #12
|
|
80074a4: af00 add r7, sp, #0
|
|
TCB_t *pxTCB;
|
|
|
|
if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE )
|
|
80074a6: 4b0c ldr r3, [pc, #48] @ (80074d8 <prvResetNextTaskUnblockTime+0x38>)
|
|
80074a8: 681b ldr r3, [r3, #0]
|
|
80074aa: 681b ldr r3, [r3, #0]
|
|
80074ac: 2b00 cmp r3, #0
|
|
80074ae: d104 bne.n 80074ba <prvResetNextTaskUnblockTime+0x1a>
|
|
{
|
|
/* The new current delayed list is empty. Set xNextTaskUnblockTime to
|
|
the maximum possible value so it is extremely unlikely that the
|
|
if( xTickCount >= xNextTaskUnblockTime ) test will pass until
|
|
there is an item in the delayed list. */
|
|
xNextTaskUnblockTime = portMAX_DELAY;
|
|
80074b0: 4b0a ldr r3, [pc, #40] @ (80074dc <prvResetNextTaskUnblockTime+0x3c>)
|
|
80074b2: f04f 32ff mov.w r2, #4294967295
|
|
80074b6: 601a str r2, [r3, #0]
|
|
which the task at the head of the delayed list should be removed
|
|
from the Blocked state. */
|
|
( pxTCB ) = listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
|
|
xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xStateListItem ) );
|
|
}
|
|
}
|
|
80074b8: e008 b.n 80074cc <prvResetNextTaskUnblockTime+0x2c>
|
|
( pxTCB ) = listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
|
|
80074ba: 4b07 ldr r3, [pc, #28] @ (80074d8 <prvResetNextTaskUnblockTime+0x38>)
|
|
80074bc: 681b ldr r3, [r3, #0]
|
|
80074be: 68db ldr r3, [r3, #12]
|
|
80074c0: 68db ldr r3, [r3, #12]
|
|
80074c2: 607b str r3, [r7, #4]
|
|
xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xStateListItem ) );
|
|
80074c4: 687b ldr r3, [r7, #4]
|
|
80074c6: 685b ldr r3, [r3, #4]
|
|
80074c8: 4a04 ldr r2, [pc, #16] @ (80074dc <prvResetNextTaskUnblockTime+0x3c>)
|
|
80074ca: 6013 str r3, [r2, #0]
|
|
}
|
|
80074cc: bf00 nop
|
|
80074ce: 370c adds r7, #12
|
|
80074d0: 46bd mov sp, r7
|
|
80074d2: f85d 7b04 ldr.w r7, [sp], #4
|
|
80074d6: 4770 bx lr
|
|
80074d8: 20001330 .word 0x20001330
|
|
80074dc: 20001398 .word 0x20001398
|
|
|
|
080074e0 <xTaskGetSchedulerState>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
|
|
|
|
BaseType_t xTaskGetSchedulerState( void )
|
|
{
|
|
80074e0: b480 push {r7}
|
|
80074e2: b083 sub sp, #12
|
|
80074e4: af00 add r7, sp, #0
|
|
BaseType_t xReturn;
|
|
|
|
if( xSchedulerRunning == pdFALSE )
|
|
80074e6: 4b0b ldr r3, [pc, #44] @ (8007514 <xTaskGetSchedulerState+0x34>)
|
|
80074e8: 681b ldr r3, [r3, #0]
|
|
80074ea: 2b00 cmp r3, #0
|
|
80074ec: d102 bne.n 80074f4 <xTaskGetSchedulerState+0x14>
|
|
{
|
|
xReturn = taskSCHEDULER_NOT_STARTED;
|
|
80074ee: 2301 movs r3, #1
|
|
80074f0: 607b str r3, [r7, #4]
|
|
80074f2: e008 b.n 8007506 <xTaskGetSchedulerState+0x26>
|
|
}
|
|
else
|
|
{
|
|
if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
|
|
80074f4: 4b08 ldr r3, [pc, #32] @ (8007518 <xTaskGetSchedulerState+0x38>)
|
|
80074f6: 681b ldr r3, [r3, #0]
|
|
80074f8: 2b00 cmp r3, #0
|
|
80074fa: d102 bne.n 8007502 <xTaskGetSchedulerState+0x22>
|
|
{
|
|
xReturn = taskSCHEDULER_RUNNING;
|
|
80074fc: 2302 movs r3, #2
|
|
80074fe: 607b str r3, [r7, #4]
|
|
8007500: e001 b.n 8007506 <xTaskGetSchedulerState+0x26>
|
|
}
|
|
else
|
|
{
|
|
xReturn = taskSCHEDULER_SUSPENDED;
|
|
8007502: 2300 movs r3, #0
|
|
8007504: 607b str r3, [r7, #4]
|
|
}
|
|
}
|
|
|
|
return xReturn;
|
|
8007506: 687b ldr r3, [r7, #4]
|
|
}
|
|
8007508: 4618 mov r0, r3
|
|
800750a: 370c adds r7, #12
|
|
800750c: 46bd mov sp, r7
|
|
800750e: f85d 7b04 ldr.w r7, [sp], #4
|
|
8007512: 4770 bx lr
|
|
8007514: 20001384 .word 0x20001384
|
|
8007518: 200013a0 .word 0x200013a0
|
|
|
|
0800751c <xTaskPriorityInherit>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if ( configUSE_MUTEXES == 1 )
|
|
|
|
BaseType_t xTaskPriorityInherit( TaskHandle_t const pxMutexHolder )
|
|
{
|
|
800751c: b580 push {r7, lr}
|
|
800751e: b084 sub sp, #16
|
|
8007520: af00 add r7, sp, #0
|
|
8007522: 6078 str r0, [r7, #4]
|
|
TCB_t * const pxMutexHolderTCB = pxMutexHolder;
|
|
8007524: 687b ldr r3, [r7, #4]
|
|
8007526: 60bb str r3, [r7, #8]
|
|
BaseType_t xReturn = pdFALSE;
|
|
8007528: 2300 movs r3, #0
|
|
800752a: 60fb str r3, [r7, #12]
|
|
|
|
/* If the mutex was given back by an interrupt while the queue was
|
|
locked then the mutex holder might now be NULL. _RB_ Is this still
|
|
needed as interrupts can no longer use mutexes? */
|
|
if( pxMutexHolder != NULL )
|
|
800752c: 687b ldr r3, [r7, #4]
|
|
800752e: 2b00 cmp r3, #0
|
|
8007530: d051 beq.n 80075d6 <xTaskPriorityInherit+0xba>
|
|
{
|
|
/* If the holder of the mutex has a priority below the priority of
|
|
the task attempting to obtain the mutex then it will temporarily
|
|
inherit the priority of the task attempting to obtain the mutex. */
|
|
if( pxMutexHolderTCB->uxPriority < pxCurrentTCB->uxPriority )
|
|
8007532: 68bb ldr r3, [r7, #8]
|
|
8007534: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8007536: 4b2a ldr r3, [pc, #168] @ (80075e0 <xTaskPriorityInherit+0xc4>)
|
|
8007538: 681b ldr r3, [r3, #0]
|
|
800753a: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
800753c: 429a cmp r2, r3
|
|
800753e: d241 bcs.n 80075c4 <xTaskPriorityInherit+0xa8>
|
|
{
|
|
/* Adjust the mutex holder state to account for its new
|
|
priority. Only reset the event list item value if the value is
|
|
not being used for anything else. */
|
|
if( ( listGET_LIST_ITEM_VALUE( &( pxMutexHolderTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) == 0UL )
|
|
8007540: 68bb ldr r3, [r7, #8]
|
|
8007542: 699b ldr r3, [r3, #24]
|
|
8007544: 2b00 cmp r3, #0
|
|
8007546: db06 blt.n 8007556 <xTaskPriorityInherit+0x3a>
|
|
{
|
|
listSET_LIST_ITEM_VALUE( &( pxMutexHolderTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxCurrentTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
|
|
8007548: 4b25 ldr r3, [pc, #148] @ (80075e0 <xTaskPriorityInherit+0xc4>)
|
|
800754a: 681b ldr r3, [r3, #0]
|
|
800754c: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
800754e: f1c3 0238 rsb r2, r3, #56 @ 0x38
|
|
8007552: 68bb ldr r3, [r7, #8]
|
|
8007554: 619a str r2, [r3, #24]
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
/* If the task being modified is in the ready state it will need
|
|
to be moved into a new list. */
|
|
if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ pxMutexHolderTCB->uxPriority ] ), &( pxMutexHolderTCB->xStateListItem ) ) != pdFALSE )
|
|
8007556: 68bb ldr r3, [r7, #8]
|
|
8007558: 6959 ldr r1, [r3, #20]
|
|
800755a: 68bb ldr r3, [r7, #8]
|
|
800755c: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
800755e: 4613 mov r3, r2
|
|
8007560: 009b lsls r3, r3, #2
|
|
8007562: 4413 add r3, r2
|
|
8007564: 009b lsls r3, r3, #2
|
|
8007566: 4a1f ldr r2, [pc, #124] @ (80075e4 <xTaskPriorityInherit+0xc8>)
|
|
8007568: 4413 add r3, r2
|
|
800756a: 4299 cmp r1, r3
|
|
800756c: d122 bne.n 80075b4 <xTaskPriorityInherit+0x98>
|
|
{
|
|
if( uxListRemove( &( pxMutexHolderTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
|
|
800756e: 68bb ldr r3, [r7, #8]
|
|
8007570: 3304 adds r3, #4
|
|
8007572: 4618 mov r0, r3
|
|
8007574: f7fe f8c0 bl 80056f8 <uxListRemove>
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
/* Inherit the priority before being moved into the new list. */
|
|
pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority;
|
|
8007578: 4b19 ldr r3, [pc, #100] @ (80075e0 <xTaskPriorityInherit+0xc4>)
|
|
800757a: 681b ldr r3, [r3, #0]
|
|
800757c: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
800757e: 68bb ldr r3, [r7, #8]
|
|
8007580: 62da str r2, [r3, #44] @ 0x2c
|
|
prvAddTaskToReadyList( pxMutexHolderTCB );
|
|
8007582: 68bb ldr r3, [r7, #8]
|
|
8007584: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8007586: 4b18 ldr r3, [pc, #96] @ (80075e8 <xTaskPriorityInherit+0xcc>)
|
|
8007588: 681b ldr r3, [r3, #0]
|
|
800758a: 429a cmp r2, r3
|
|
800758c: d903 bls.n 8007596 <xTaskPriorityInherit+0x7a>
|
|
800758e: 68bb ldr r3, [r7, #8]
|
|
8007590: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
8007592: 4a15 ldr r2, [pc, #84] @ (80075e8 <xTaskPriorityInherit+0xcc>)
|
|
8007594: 6013 str r3, [r2, #0]
|
|
8007596: 68bb ldr r3, [r7, #8]
|
|
8007598: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
800759a: 4613 mov r3, r2
|
|
800759c: 009b lsls r3, r3, #2
|
|
800759e: 4413 add r3, r2
|
|
80075a0: 009b lsls r3, r3, #2
|
|
80075a2: 4a10 ldr r2, [pc, #64] @ (80075e4 <xTaskPriorityInherit+0xc8>)
|
|
80075a4: 441a add r2, r3
|
|
80075a6: 68bb ldr r3, [r7, #8]
|
|
80075a8: 3304 adds r3, #4
|
|
80075aa: 4619 mov r1, r3
|
|
80075ac: 4610 mov r0, r2
|
|
80075ae: f7fe f846 bl 800563e <vListInsertEnd>
|
|
80075b2: e004 b.n 80075be <xTaskPriorityInherit+0xa2>
|
|
}
|
|
else
|
|
{
|
|
/* Just inherit the priority. */
|
|
pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority;
|
|
80075b4: 4b0a ldr r3, [pc, #40] @ (80075e0 <xTaskPriorityInherit+0xc4>)
|
|
80075b6: 681b ldr r3, [r3, #0]
|
|
80075b8: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
80075ba: 68bb ldr r3, [r7, #8]
|
|
80075bc: 62da str r2, [r3, #44] @ 0x2c
|
|
}
|
|
|
|
traceTASK_PRIORITY_INHERIT( pxMutexHolderTCB, pxCurrentTCB->uxPriority );
|
|
|
|
/* Inheritance occurred. */
|
|
xReturn = pdTRUE;
|
|
80075be: 2301 movs r3, #1
|
|
80075c0: 60fb str r3, [r7, #12]
|
|
80075c2: e008 b.n 80075d6 <xTaskPriorityInherit+0xba>
|
|
}
|
|
else
|
|
{
|
|
if( pxMutexHolderTCB->uxBasePriority < pxCurrentTCB->uxPriority )
|
|
80075c4: 68bb ldr r3, [r7, #8]
|
|
80075c6: 6cda ldr r2, [r3, #76] @ 0x4c
|
|
80075c8: 4b05 ldr r3, [pc, #20] @ (80075e0 <xTaskPriorityInherit+0xc4>)
|
|
80075ca: 681b ldr r3, [r3, #0]
|
|
80075cc: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
80075ce: 429a cmp r2, r3
|
|
80075d0: d201 bcs.n 80075d6 <xTaskPriorityInherit+0xba>
|
|
current priority of the mutex holder is not lower than the
|
|
priority of the task attempting to take the mutex.
|
|
Therefore the mutex holder must have already inherited a
|
|
priority, but inheritance would have occurred if that had
|
|
not been the case. */
|
|
xReturn = pdTRUE;
|
|
80075d2: 2301 movs r3, #1
|
|
80075d4: 60fb str r3, [r7, #12]
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
return xReturn;
|
|
80075d6: 68fb ldr r3, [r7, #12]
|
|
}
|
|
80075d8: 4618 mov r0, r3
|
|
80075da: 3710 adds r7, #16
|
|
80075dc: 46bd mov sp, r7
|
|
80075de: bd80 pop {r7, pc}
|
|
80075e0: 20000ea4 .word 0x20000ea4
|
|
80075e4: 20000ea8 .word 0x20000ea8
|
|
80075e8: 20001380 .word 0x20001380
|
|
|
|
080075ec <xTaskPriorityDisinherit>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if ( configUSE_MUTEXES == 1 )
|
|
|
|
BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder )
|
|
{
|
|
80075ec: b580 push {r7, lr}
|
|
80075ee: b086 sub sp, #24
|
|
80075f0: af00 add r7, sp, #0
|
|
80075f2: 6078 str r0, [r7, #4]
|
|
TCB_t * const pxTCB = pxMutexHolder;
|
|
80075f4: 687b ldr r3, [r7, #4]
|
|
80075f6: 613b str r3, [r7, #16]
|
|
BaseType_t xReturn = pdFALSE;
|
|
80075f8: 2300 movs r3, #0
|
|
80075fa: 617b str r3, [r7, #20]
|
|
|
|
if( pxMutexHolder != NULL )
|
|
80075fc: 687b ldr r3, [r7, #4]
|
|
80075fe: 2b00 cmp r3, #0
|
|
8007600: d058 beq.n 80076b4 <xTaskPriorityDisinherit+0xc8>
|
|
{
|
|
/* A task can only have an inherited priority if it holds the mutex.
|
|
If the mutex is held by a task then it cannot be given from an
|
|
interrupt, and if a mutex is given by the holding task then it must
|
|
be the running state task. */
|
|
configASSERT( pxTCB == pxCurrentTCB );
|
|
8007602: 4b2f ldr r3, [pc, #188] @ (80076c0 <xTaskPriorityDisinherit+0xd4>)
|
|
8007604: 681b ldr r3, [r3, #0]
|
|
8007606: 693a ldr r2, [r7, #16]
|
|
8007608: 429a cmp r2, r3
|
|
800760a: d00b beq.n 8007624 <xTaskPriorityDisinherit+0x38>
|
|
__asm volatile
|
|
800760c: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8007610: f383 8811 msr BASEPRI, r3
|
|
8007614: f3bf 8f6f isb sy
|
|
8007618: f3bf 8f4f dsb sy
|
|
800761c: 60fb str r3, [r7, #12]
|
|
}
|
|
800761e: bf00 nop
|
|
8007620: bf00 nop
|
|
8007622: e7fd b.n 8007620 <xTaskPriorityDisinherit+0x34>
|
|
configASSERT( pxTCB->uxMutexesHeld );
|
|
8007624: 693b ldr r3, [r7, #16]
|
|
8007626: 6d1b ldr r3, [r3, #80] @ 0x50
|
|
8007628: 2b00 cmp r3, #0
|
|
800762a: d10b bne.n 8007644 <xTaskPriorityDisinherit+0x58>
|
|
__asm volatile
|
|
800762c: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8007630: f383 8811 msr BASEPRI, r3
|
|
8007634: f3bf 8f6f isb sy
|
|
8007638: f3bf 8f4f dsb sy
|
|
800763c: 60bb str r3, [r7, #8]
|
|
}
|
|
800763e: bf00 nop
|
|
8007640: bf00 nop
|
|
8007642: e7fd b.n 8007640 <xTaskPriorityDisinherit+0x54>
|
|
( pxTCB->uxMutexesHeld )--;
|
|
8007644: 693b ldr r3, [r7, #16]
|
|
8007646: 6d1b ldr r3, [r3, #80] @ 0x50
|
|
8007648: 1e5a subs r2, r3, #1
|
|
800764a: 693b ldr r3, [r7, #16]
|
|
800764c: 651a str r2, [r3, #80] @ 0x50
|
|
|
|
/* Has the holder of the mutex inherited the priority of another
|
|
task? */
|
|
if( pxTCB->uxPriority != pxTCB->uxBasePriority )
|
|
800764e: 693b ldr r3, [r7, #16]
|
|
8007650: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8007652: 693b ldr r3, [r7, #16]
|
|
8007654: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8007656: 429a cmp r2, r3
|
|
8007658: d02c beq.n 80076b4 <xTaskPriorityDisinherit+0xc8>
|
|
{
|
|
/* Only disinherit if no other mutexes are held. */
|
|
if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 )
|
|
800765a: 693b ldr r3, [r7, #16]
|
|
800765c: 6d1b ldr r3, [r3, #80] @ 0x50
|
|
800765e: 2b00 cmp r3, #0
|
|
8007660: d128 bne.n 80076b4 <xTaskPriorityDisinherit+0xc8>
|
|
/* A task can only have an inherited priority if it holds
|
|
the mutex. If the mutex is held by a task then it cannot be
|
|
given from an interrupt, and if a mutex is given by the
|
|
holding task then it must be the running state task. Remove
|
|
the holding task from the ready/delayed list. */
|
|
if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
|
|
8007662: 693b ldr r3, [r7, #16]
|
|
8007664: 3304 adds r3, #4
|
|
8007666: 4618 mov r0, r3
|
|
8007668: f7fe f846 bl 80056f8 <uxListRemove>
|
|
}
|
|
|
|
/* Disinherit the priority before adding the task into the
|
|
new ready list. */
|
|
traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority );
|
|
pxTCB->uxPriority = pxTCB->uxBasePriority;
|
|
800766c: 693b ldr r3, [r7, #16]
|
|
800766e: 6cda ldr r2, [r3, #76] @ 0x4c
|
|
8007670: 693b ldr r3, [r7, #16]
|
|
8007672: 62da str r2, [r3, #44] @ 0x2c
|
|
|
|
/* Reset the event list item value. It cannot be in use for
|
|
any other purpose if this task is running, and it must be
|
|
running to give back the mutex. */
|
|
listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
|
|
8007674: 693b ldr r3, [r7, #16]
|
|
8007676: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
8007678: f1c3 0238 rsb r2, r3, #56 @ 0x38
|
|
800767c: 693b ldr r3, [r7, #16]
|
|
800767e: 619a str r2, [r3, #24]
|
|
prvAddTaskToReadyList( pxTCB );
|
|
8007680: 693b ldr r3, [r7, #16]
|
|
8007682: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8007684: 4b0f ldr r3, [pc, #60] @ (80076c4 <xTaskPriorityDisinherit+0xd8>)
|
|
8007686: 681b ldr r3, [r3, #0]
|
|
8007688: 429a cmp r2, r3
|
|
800768a: d903 bls.n 8007694 <xTaskPriorityDisinherit+0xa8>
|
|
800768c: 693b ldr r3, [r7, #16]
|
|
800768e: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
8007690: 4a0c ldr r2, [pc, #48] @ (80076c4 <xTaskPriorityDisinherit+0xd8>)
|
|
8007692: 6013 str r3, [r2, #0]
|
|
8007694: 693b ldr r3, [r7, #16]
|
|
8007696: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8007698: 4613 mov r3, r2
|
|
800769a: 009b lsls r3, r3, #2
|
|
800769c: 4413 add r3, r2
|
|
800769e: 009b lsls r3, r3, #2
|
|
80076a0: 4a09 ldr r2, [pc, #36] @ (80076c8 <xTaskPriorityDisinherit+0xdc>)
|
|
80076a2: 441a add r2, r3
|
|
80076a4: 693b ldr r3, [r7, #16]
|
|
80076a6: 3304 adds r3, #4
|
|
80076a8: 4619 mov r1, r3
|
|
80076aa: 4610 mov r0, r2
|
|
80076ac: f7fd ffc7 bl 800563e <vListInsertEnd>
|
|
in an order different to that in which they were taken.
|
|
If a context switch did not occur when the first mutex was
|
|
returned, even if a task was waiting on it, then a context
|
|
switch should occur when the last mutex is returned whether
|
|
a task is waiting on it or not. */
|
|
xReturn = pdTRUE;
|
|
80076b0: 2301 movs r3, #1
|
|
80076b2: 617b str r3, [r7, #20]
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
return xReturn;
|
|
80076b4: 697b ldr r3, [r7, #20]
|
|
}
|
|
80076b6: 4618 mov r0, r3
|
|
80076b8: 3718 adds r7, #24
|
|
80076ba: 46bd mov sp, r7
|
|
80076bc: bd80 pop {r7, pc}
|
|
80076be: bf00 nop
|
|
80076c0: 20000ea4 .word 0x20000ea4
|
|
80076c4: 20001380 .word 0x20001380
|
|
80076c8: 20000ea8 .word 0x20000ea8
|
|
|
|
080076cc <vTaskPriorityDisinheritAfterTimeout>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if ( configUSE_MUTEXES == 1 )
|
|
|
|
void vTaskPriorityDisinheritAfterTimeout( TaskHandle_t const pxMutexHolder, UBaseType_t uxHighestPriorityWaitingTask )
|
|
{
|
|
80076cc: b580 push {r7, lr}
|
|
80076ce: b088 sub sp, #32
|
|
80076d0: af00 add r7, sp, #0
|
|
80076d2: 6078 str r0, [r7, #4]
|
|
80076d4: 6039 str r1, [r7, #0]
|
|
TCB_t * const pxTCB = pxMutexHolder;
|
|
80076d6: 687b ldr r3, [r7, #4]
|
|
80076d8: 61bb str r3, [r7, #24]
|
|
UBaseType_t uxPriorityUsedOnEntry, uxPriorityToUse;
|
|
const UBaseType_t uxOnlyOneMutexHeld = ( UBaseType_t ) 1;
|
|
80076da: 2301 movs r3, #1
|
|
80076dc: 617b str r3, [r7, #20]
|
|
|
|
if( pxMutexHolder != NULL )
|
|
80076de: 687b ldr r3, [r7, #4]
|
|
80076e0: 2b00 cmp r3, #0
|
|
80076e2: d06c beq.n 80077be <vTaskPriorityDisinheritAfterTimeout+0xf2>
|
|
{
|
|
/* If pxMutexHolder is not NULL then the holder must hold at least
|
|
one mutex. */
|
|
configASSERT( pxTCB->uxMutexesHeld );
|
|
80076e4: 69bb ldr r3, [r7, #24]
|
|
80076e6: 6d1b ldr r3, [r3, #80] @ 0x50
|
|
80076e8: 2b00 cmp r3, #0
|
|
80076ea: d10b bne.n 8007704 <vTaskPriorityDisinheritAfterTimeout+0x38>
|
|
__asm volatile
|
|
80076ec: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80076f0: f383 8811 msr BASEPRI, r3
|
|
80076f4: f3bf 8f6f isb sy
|
|
80076f8: f3bf 8f4f dsb sy
|
|
80076fc: 60fb str r3, [r7, #12]
|
|
}
|
|
80076fe: bf00 nop
|
|
8007700: bf00 nop
|
|
8007702: e7fd b.n 8007700 <vTaskPriorityDisinheritAfterTimeout+0x34>
|
|
|
|
/* Determine the priority to which the priority of the task that
|
|
holds the mutex should be set. This will be the greater of the
|
|
holding task's base priority and the priority of the highest
|
|
priority task that is waiting to obtain the mutex. */
|
|
if( pxTCB->uxBasePriority < uxHighestPriorityWaitingTask )
|
|
8007704: 69bb ldr r3, [r7, #24]
|
|
8007706: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8007708: 683a ldr r2, [r7, #0]
|
|
800770a: 429a cmp r2, r3
|
|
800770c: d902 bls.n 8007714 <vTaskPriorityDisinheritAfterTimeout+0x48>
|
|
{
|
|
uxPriorityToUse = uxHighestPriorityWaitingTask;
|
|
800770e: 683b ldr r3, [r7, #0]
|
|
8007710: 61fb str r3, [r7, #28]
|
|
8007712: e002 b.n 800771a <vTaskPriorityDisinheritAfterTimeout+0x4e>
|
|
}
|
|
else
|
|
{
|
|
uxPriorityToUse = pxTCB->uxBasePriority;
|
|
8007714: 69bb ldr r3, [r7, #24]
|
|
8007716: 6cdb ldr r3, [r3, #76] @ 0x4c
|
|
8007718: 61fb str r3, [r7, #28]
|
|
}
|
|
|
|
/* Does the priority need to change? */
|
|
if( pxTCB->uxPriority != uxPriorityToUse )
|
|
800771a: 69bb ldr r3, [r7, #24]
|
|
800771c: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
800771e: 69fa ldr r2, [r7, #28]
|
|
8007720: 429a cmp r2, r3
|
|
8007722: d04c beq.n 80077be <vTaskPriorityDisinheritAfterTimeout+0xf2>
|
|
{
|
|
/* Only disinherit if no other mutexes are held. This is a
|
|
simplification in the priority inheritance implementation. If
|
|
the task that holds the mutex is also holding other mutexes then
|
|
the other mutexes may have caused the priority inheritance. */
|
|
if( pxTCB->uxMutexesHeld == uxOnlyOneMutexHeld )
|
|
8007724: 69bb ldr r3, [r7, #24]
|
|
8007726: 6d1b ldr r3, [r3, #80] @ 0x50
|
|
8007728: 697a ldr r2, [r7, #20]
|
|
800772a: 429a cmp r2, r3
|
|
800772c: d147 bne.n 80077be <vTaskPriorityDisinheritAfterTimeout+0xf2>
|
|
{
|
|
/* If a task has timed out because it already holds the
|
|
mutex it was trying to obtain then it cannot of inherited
|
|
its own priority. */
|
|
configASSERT( pxTCB != pxCurrentTCB );
|
|
800772e: 4b26 ldr r3, [pc, #152] @ (80077c8 <vTaskPriorityDisinheritAfterTimeout+0xfc>)
|
|
8007730: 681b ldr r3, [r3, #0]
|
|
8007732: 69ba ldr r2, [r7, #24]
|
|
8007734: 429a cmp r2, r3
|
|
8007736: d10b bne.n 8007750 <vTaskPriorityDisinheritAfterTimeout+0x84>
|
|
__asm volatile
|
|
8007738: f04f 0350 mov.w r3, #80 @ 0x50
|
|
800773c: f383 8811 msr BASEPRI, r3
|
|
8007740: f3bf 8f6f isb sy
|
|
8007744: f3bf 8f4f dsb sy
|
|
8007748: 60bb str r3, [r7, #8]
|
|
}
|
|
800774a: bf00 nop
|
|
800774c: bf00 nop
|
|
800774e: e7fd b.n 800774c <vTaskPriorityDisinheritAfterTimeout+0x80>
|
|
|
|
/* Disinherit the priority, remembering the previous
|
|
priority to facilitate determining the subject task's
|
|
state. */
|
|
traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority );
|
|
uxPriorityUsedOnEntry = pxTCB->uxPriority;
|
|
8007750: 69bb ldr r3, [r7, #24]
|
|
8007752: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
8007754: 613b str r3, [r7, #16]
|
|
pxTCB->uxPriority = uxPriorityToUse;
|
|
8007756: 69bb ldr r3, [r7, #24]
|
|
8007758: 69fa ldr r2, [r7, #28]
|
|
800775a: 62da str r2, [r3, #44] @ 0x2c
|
|
|
|
/* Only reset the event list item value if the value is not
|
|
being used for anything else. */
|
|
if( ( listGET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) == 0UL )
|
|
800775c: 69bb ldr r3, [r7, #24]
|
|
800775e: 699b ldr r3, [r3, #24]
|
|
8007760: 2b00 cmp r3, #0
|
|
8007762: db04 blt.n 800776e <vTaskPriorityDisinheritAfterTimeout+0xa2>
|
|
{
|
|
listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) uxPriorityToUse ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
|
|
8007764: 69fb ldr r3, [r7, #28]
|
|
8007766: f1c3 0238 rsb r2, r3, #56 @ 0x38
|
|
800776a: 69bb ldr r3, [r7, #24]
|
|
800776c: 619a str r2, [r3, #24]
|
|
then the task that holds the mutex could be in either the
|
|
Ready, Blocked or Suspended states. Only remove the task
|
|
from its current state list if it is in the Ready state as
|
|
the task's priority is going to change and there is one
|
|
Ready list per priority. */
|
|
if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ uxPriorityUsedOnEntry ] ), &( pxTCB->xStateListItem ) ) != pdFALSE )
|
|
800776e: 69bb ldr r3, [r7, #24]
|
|
8007770: 6959 ldr r1, [r3, #20]
|
|
8007772: 693a ldr r2, [r7, #16]
|
|
8007774: 4613 mov r3, r2
|
|
8007776: 009b lsls r3, r3, #2
|
|
8007778: 4413 add r3, r2
|
|
800777a: 009b lsls r3, r3, #2
|
|
800777c: 4a13 ldr r2, [pc, #76] @ (80077cc <vTaskPriorityDisinheritAfterTimeout+0x100>)
|
|
800777e: 4413 add r3, r2
|
|
8007780: 4299 cmp r1, r3
|
|
8007782: d11c bne.n 80077be <vTaskPriorityDisinheritAfterTimeout+0xf2>
|
|
{
|
|
if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
|
|
8007784: 69bb ldr r3, [r7, #24]
|
|
8007786: 3304 adds r3, #4
|
|
8007788: 4618 mov r0, r3
|
|
800778a: f7fd ffb5 bl 80056f8 <uxListRemove>
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
prvAddTaskToReadyList( pxTCB );
|
|
800778e: 69bb ldr r3, [r7, #24]
|
|
8007790: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
8007792: 4b0f ldr r3, [pc, #60] @ (80077d0 <vTaskPriorityDisinheritAfterTimeout+0x104>)
|
|
8007794: 681b ldr r3, [r3, #0]
|
|
8007796: 429a cmp r2, r3
|
|
8007798: d903 bls.n 80077a2 <vTaskPriorityDisinheritAfterTimeout+0xd6>
|
|
800779a: 69bb ldr r3, [r7, #24]
|
|
800779c: 6adb ldr r3, [r3, #44] @ 0x2c
|
|
800779e: 4a0c ldr r2, [pc, #48] @ (80077d0 <vTaskPriorityDisinheritAfterTimeout+0x104>)
|
|
80077a0: 6013 str r3, [r2, #0]
|
|
80077a2: 69bb ldr r3, [r7, #24]
|
|
80077a4: 6ada ldr r2, [r3, #44] @ 0x2c
|
|
80077a6: 4613 mov r3, r2
|
|
80077a8: 009b lsls r3, r3, #2
|
|
80077aa: 4413 add r3, r2
|
|
80077ac: 009b lsls r3, r3, #2
|
|
80077ae: 4a07 ldr r2, [pc, #28] @ (80077cc <vTaskPriorityDisinheritAfterTimeout+0x100>)
|
|
80077b0: 441a add r2, r3
|
|
80077b2: 69bb ldr r3, [r7, #24]
|
|
80077b4: 3304 adds r3, #4
|
|
80077b6: 4619 mov r1, r3
|
|
80077b8: 4610 mov r0, r2
|
|
80077ba: f7fd ff40 bl 800563e <vListInsertEnd>
|
|
}
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
80077be: bf00 nop
|
|
80077c0: 3720 adds r7, #32
|
|
80077c2: 46bd mov sp, r7
|
|
80077c4: bd80 pop {r7, pc}
|
|
80077c6: bf00 nop
|
|
80077c8: 20000ea4 .word 0x20000ea4
|
|
80077cc: 20000ea8 .word 0x20000ea8
|
|
80077d0: 20001380 .word 0x20001380
|
|
|
|
080077d4 <pvTaskIncrementMutexHeldCount>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if ( configUSE_MUTEXES == 1 )
|
|
|
|
TaskHandle_t pvTaskIncrementMutexHeldCount( void )
|
|
{
|
|
80077d4: b480 push {r7}
|
|
80077d6: af00 add r7, sp, #0
|
|
/* If xSemaphoreCreateMutex() is called before any tasks have been created
|
|
then pxCurrentTCB will be NULL. */
|
|
if( pxCurrentTCB != NULL )
|
|
80077d8: 4b07 ldr r3, [pc, #28] @ (80077f8 <pvTaskIncrementMutexHeldCount+0x24>)
|
|
80077da: 681b ldr r3, [r3, #0]
|
|
80077dc: 2b00 cmp r3, #0
|
|
80077de: d004 beq.n 80077ea <pvTaskIncrementMutexHeldCount+0x16>
|
|
{
|
|
( pxCurrentTCB->uxMutexesHeld )++;
|
|
80077e0: 4b05 ldr r3, [pc, #20] @ (80077f8 <pvTaskIncrementMutexHeldCount+0x24>)
|
|
80077e2: 681b ldr r3, [r3, #0]
|
|
80077e4: 6d1a ldr r2, [r3, #80] @ 0x50
|
|
80077e6: 3201 adds r2, #1
|
|
80077e8: 651a str r2, [r3, #80] @ 0x50
|
|
}
|
|
|
|
return pxCurrentTCB;
|
|
80077ea: 4b03 ldr r3, [pc, #12] @ (80077f8 <pvTaskIncrementMutexHeldCount+0x24>)
|
|
80077ec: 681b ldr r3, [r3, #0]
|
|
}
|
|
80077ee: 4618 mov r0, r3
|
|
80077f0: 46bd mov sp, r7
|
|
80077f2: f85d 7b04 ldr.w r7, [sp], #4
|
|
80077f6: 4770 bx lr
|
|
80077f8: 20000ea4 .word 0x20000ea4
|
|
|
|
080077fc <prvAddCurrentTaskToDelayedList>:
|
|
|
|
#endif
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, const BaseType_t xCanBlockIndefinitely )
|
|
{
|
|
80077fc: b580 push {r7, lr}
|
|
80077fe: b084 sub sp, #16
|
|
8007800: af00 add r7, sp, #0
|
|
8007802: 6078 str r0, [r7, #4]
|
|
8007804: 6039 str r1, [r7, #0]
|
|
TickType_t xTimeToWake;
|
|
const TickType_t xConstTickCount = xTickCount;
|
|
8007806: 4b21 ldr r3, [pc, #132] @ (800788c <prvAddCurrentTaskToDelayedList+0x90>)
|
|
8007808: 681b ldr r3, [r3, #0]
|
|
800780a: 60fb str r3, [r7, #12]
|
|
}
|
|
#endif
|
|
|
|
/* Remove the task from the ready list before adding it to the blocked list
|
|
as the same list item is used for both lists. */
|
|
if( uxListRemove( &( pxCurrentTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
|
|
800780c: 4b20 ldr r3, [pc, #128] @ (8007890 <prvAddCurrentTaskToDelayedList+0x94>)
|
|
800780e: 681b ldr r3, [r3, #0]
|
|
8007810: 3304 adds r3, #4
|
|
8007812: 4618 mov r0, r3
|
|
8007814: f7fd ff70 bl 80056f8 <uxListRemove>
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
#if ( INCLUDE_vTaskSuspend == 1 )
|
|
{
|
|
if( ( xTicksToWait == portMAX_DELAY ) && ( xCanBlockIndefinitely != pdFALSE ) )
|
|
8007818: 687b ldr r3, [r7, #4]
|
|
800781a: f1b3 3fff cmp.w r3, #4294967295
|
|
800781e: d10a bne.n 8007836 <prvAddCurrentTaskToDelayedList+0x3a>
|
|
8007820: 683b ldr r3, [r7, #0]
|
|
8007822: 2b00 cmp r3, #0
|
|
8007824: d007 beq.n 8007836 <prvAddCurrentTaskToDelayedList+0x3a>
|
|
{
|
|
/* Add the task to the suspended task list instead of a delayed task
|
|
list to ensure it is not woken by a timing event. It will block
|
|
indefinitely. */
|
|
vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xStateListItem ) );
|
|
8007826: 4b1a ldr r3, [pc, #104] @ (8007890 <prvAddCurrentTaskToDelayedList+0x94>)
|
|
8007828: 681b ldr r3, [r3, #0]
|
|
800782a: 3304 adds r3, #4
|
|
800782c: 4619 mov r1, r3
|
|
800782e: 4819 ldr r0, [pc, #100] @ (8007894 <prvAddCurrentTaskToDelayedList+0x98>)
|
|
8007830: f7fd ff05 bl 800563e <vListInsertEnd>
|
|
|
|
/* Avoid compiler warning when INCLUDE_vTaskSuspend is not 1. */
|
|
( void ) xCanBlockIndefinitely;
|
|
}
|
|
#endif /* INCLUDE_vTaskSuspend */
|
|
}
|
|
8007834: e026 b.n 8007884 <prvAddCurrentTaskToDelayedList+0x88>
|
|
xTimeToWake = xConstTickCount + xTicksToWait;
|
|
8007836: 68fa ldr r2, [r7, #12]
|
|
8007838: 687b ldr r3, [r7, #4]
|
|
800783a: 4413 add r3, r2
|
|
800783c: 60bb str r3, [r7, #8]
|
|
listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xStateListItem ), xTimeToWake );
|
|
800783e: 4b14 ldr r3, [pc, #80] @ (8007890 <prvAddCurrentTaskToDelayedList+0x94>)
|
|
8007840: 681b ldr r3, [r3, #0]
|
|
8007842: 68ba ldr r2, [r7, #8]
|
|
8007844: 605a str r2, [r3, #4]
|
|
if( xTimeToWake < xConstTickCount )
|
|
8007846: 68ba ldr r2, [r7, #8]
|
|
8007848: 68fb ldr r3, [r7, #12]
|
|
800784a: 429a cmp r2, r3
|
|
800784c: d209 bcs.n 8007862 <prvAddCurrentTaskToDelayedList+0x66>
|
|
vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) );
|
|
800784e: 4b12 ldr r3, [pc, #72] @ (8007898 <prvAddCurrentTaskToDelayedList+0x9c>)
|
|
8007850: 681a ldr r2, [r3, #0]
|
|
8007852: 4b0f ldr r3, [pc, #60] @ (8007890 <prvAddCurrentTaskToDelayedList+0x94>)
|
|
8007854: 681b ldr r3, [r3, #0]
|
|
8007856: 3304 adds r3, #4
|
|
8007858: 4619 mov r1, r3
|
|
800785a: 4610 mov r0, r2
|
|
800785c: f7fd ff13 bl 8005686 <vListInsert>
|
|
}
|
|
8007860: e010 b.n 8007884 <prvAddCurrentTaskToDelayedList+0x88>
|
|
vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) );
|
|
8007862: 4b0e ldr r3, [pc, #56] @ (800789c <prvAddCurrentTaskToDelayedList+0xa0>)
|
|
8007864: 681a ldr r2, [r3, #0]
|
|
8007866: 4b0a ldr r3, [pc, #40] @ (8007890 <prvAddCurrentTaskToDelayedList+0x94>)
|
|
8007868: 681b ldr r3, [r3, #0]
|
|
800786a: 3304 adds r3, #4
|
|
800786c: 4619 mov r1, r3
|
|
800786e: 4610 mov r0, r2
|
|
8007870: f7fd ff09 bl 8005686 <vListInsert>
|
|
if( xTimeToWake < xNextTaskUnblockTime )
|
|
8007874: 4b0a ldr r3, [pc, #40] @ (80078a0 <prvAddCurrentTaskToDelayedList+0xa4>)
|
|
8007876: 681b ldr r3, [r3, #0]
|
|
8007878: 68ba ldr r2, [r7, #8]
|
|
800787a: 429a cmp r2, r3
|
|
800787c: d202 bcs.n 8007884 <prvAddCurrentTaskToDelayedList+0x88>
|
|
xNextTaskUnblockTime = xTimeToWake;
|
|
800787e: 4a08 ldr r2, [pc, #32] @ (80078a0 <prvAddCurrentTaskToDelayedList+0xa4>)
|
|
8007880: 68bb ldr r3, [r7, #8]
|
|
8007882: 6013 str r3, [r2, #0]
|
|
}
|
|
8007884: bf00 nop
|
|
8007886: 3710 adds r7, #16
|
|
8007888: 46bd mov sp, r7
|
|
800788a: bd80 pop {r7, pc}
|
|
800788c: 2000137c .word 0x2000137c
|
|
8007890: 20000ea4 .word 0x20000ea4
|
|
8007894: 20001364 .word 0x20001364
|
|
8007898: 20001334 .word 0x20001334
|
|
800789c: 20001330 .word 0x20001330
|
|
80078a0: 20001398 .word 0x20001398
|
|
|
|
080078a4 <xTimerCreateTimerTask>:
|
|
TimerCallbackFunction_t pxCallbackFunction,
|
|
Timer_t *pxNewTimer ) PRIVILEGED_FUNCTION;
|
|
/*-----------------------------------------------------------*/
|
|
|
|
BaseType_t xTimerCreateTimerTask( void )
|
|
{
|
|
80078a4: b580 push {r7, lr}
|
|
80078a6: b08a sub sp, #40 @ 0x28
|
|
80078a8: af04 add r7, sp, #16
|
|
BaseType_t xReturn = pdFAIL;
|
|
80078aa: 2300 movs r3, #0
|
|
80078ac: 617b str r3, [r7, #20]
|
|
|
|
/* This function is called when the scheduler is started if
|
|
configUSE_TIMERS is set to 1. Check that the infrastructure used by the
|
|
timer service task has been created/initialised. If timers have already
|
|
been created then the initialisation will already have been performed. */
|
|
prvCheckForValidListAndQueue();
|
|
80078ae: f000 fb13 bl 8007ed8 <prvCheckForValidListAndQueue>
|
|
|
|
if( xTimerQueue != NULL )
|
|
80078b2: 4b1d ldr r3, [pc, #116] @ (8007928 <xTimerCreateTimerTask+0x84>)
|
|
80078b4: 681b ldr r3, [r3, #0]
|
|
80078b6: 2b00 cmp r3, #0
|
|
80078b8: d021 beq.n 80078fe <xTimerCreateTimerTask+0x5a>
|
|
{
|
|
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
|
|
{
|
|
StaticTask_t *pxTimerTaskTCBBuffer = NULL;
|
|
80078ba: 2300 movs r3, #0
|
|
80078bc: 60fb str r3, [r7, #12]
|
|
StackType_t *pxTimerTaskStackBuffer = NULL;
|
|
80078be: 2300 movs r3, #0
|
|
80078c0: 60bb str r3, [r7, #8]
|
|
uint32_t ulTimerTaskStackSize;
|
|
|
|
vApplicationGetTimerTaskMemory( &pxTimerTaskTCBBuffer, &pxTimerTaskStackBuffer, &ulTimerTaskStackSize );
|
|
80078c2: 1d3a adds r2, r7, #4
|
|
80078c4: f107 0108 add.w r1, r7, #8
|
|
80078c8: f107 030c add.w r3, r7, #12
|
|
80078cc: 4618 mov r0, r3
|
|
80078ce: f7fd fe6f bl 80055b0 <vApplicationGetTimerTaskMemory>
|
|
xTimerTaskHandle = xTaskCreateStatic( prvTimerTask,
|
|
80078d2: 6879 ldr r1, [r7, #4]
|
|
80078d4: 68bb ldr r3, [r7, #8]
|
|
80078d6: 68fa ldr r2, [r7, #12]
|
|
80078d8: 9202 str r2, [sp, #8]
|
|
80078da: 9301 str r3, [sp, #4]
|
|
80078dc: 2302 movs r3, #2
|
|
80078de: 9300 str r3, [sp, #0]
|
|
80078e0: 2300 movs r3, #0
|
|
80078e2: 460a mov r2, r1
|
|
80078e4: 4911 ldr r1, [pc, #68] @ (800792c <xTimerCreateTimerTask+0x88>)
|
|
80078e6: 4812 ldr r0, [pc, #72] @ (8007930 <xTimerCreateTimerTask+0x8c>)
|
|
80078e8: f7fe ff5c bl 80067a4 <xTaskCreateStatic>
|
|
80078ec: 4603 mov r3, r0
|
|
80078ee: 4a11 ldr r2, [pc, #68] @ (8007934 <xTimerCreateTimerTask+0x90>)
|
|
80078f0: 6013 str r3, [r2, #0]
|
|
NULL,
|
|
( ( UBaseType_t ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT,
|
|
pxTimerTaskStackBuffer,
|
|
pxTimerTaskTCBBuffer );
|
|
|
|
if( xTimerTaskHandle != NULL )
|
|
80078f2: 4b10 ldr r3, [pc, #64] @ (8007934 <xTimerCreateTimerTask+0x90>)
|
|
80078f4: 681b ldr r3, [r3, #0]
|
|
80078f6: 2b00 cmp r3, #0
|
|
80078f8: d001 beq.n 80078fe <xTimerCreateTimerTask+0x5a>
|
|
{
|
|
xReturn = pdPASS;
|
|
80078fa: 2301 movs r3, #1
|
|
80078fc: 617b str r3, [r7, #20]
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
configASSERT( xReturn );
|
|
80078fe: 697b ldr r3, [r7, #20]
|
|
8007900: 2b00 cmp r3, #0
|
|
8007902: d10b bne.n 800791c <xTimerCreateTimerTask+0x78>
|
|
__asm volatile
|
|
8007904: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8007908: f383 8811 msr BASEPRI, r3
|
|
800790c: f3bf 8f6f isb sy
|
|
8007910: f3bf 8f4f dsb sy
|
|
8007914: 613b str r3, [r7, #16]
|
|
}
|
|
8007916: bf00 nop
|
|
8007918: bf00 nop
|
|
800791a: e7fd b.n 8007918 <xTimerCreateTimerTask+0x74>
|
|
return xReturn;
|
|
800791c: 697b ldr r3, [r7, #20]
|
|
}
|
|
800791e: 4618 mov r0, r3
|
|
8007920: 3718 adds r7, #24
|
|
8007922: 46bd mov sp, r7
|
|
8007924: bd80 pop {r7, pc}
|
|
8007926: bf00 nop
|
|
8007928: 200013d4 .word 0x200013d4
|
|
800792c: 080088c4 .word 0x080088c4
|
|
8007930: 08007a71 .word 0x08007a71
|
|
8007934: 200013d8 .word 0x200013d8
|
|
|
|
08007938 <xTimerGenericCommand>:
|
|
}
|
|
}
|
|
/*-----------------------------------------------------------*/
|
|
|
|
BaseType_t xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait )
|
|
{
|
|
8007938: b580 push {r7, lr}
|
|
800793a: b08a sub sp, #40 @ 0x28
|
|
800793c: af00 add r7, sp, #0
|
|
800793e: 60f8 str r0, [r7, #12]
|
|
8007940: 60b9 str r1, [r7, #8]
|
|
8007942: 607a str r2, [r7, #4]
|
|
8007944: 603b str r3, [r7, #0]
|
|
BaseType_t xReturn = pdFAIL;
|
|
8007946: 2300 movs r3, #0
|
|
8007948: 627b str r3, [r7, #36] @ 0x24
|
|
DaemonTaskMessage_t xMessage;
|
|
|
|
configASSERT( xTimer );
|
|
800794a: 68fb ldr r3, [r7, #12]
|
|
800794c: 2b00 cmp r3, #0
|
|
800794e: d10b bne.n 8007968 <xTimerGenericCommand+0x30>
|
|
__asm volatile
|
|
8007950: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8007954: f383 8811 msr BASEPRI, r3
|
|
8007958: f3bf 8f6f isb sy
|
|
800795c: f3bf 8f4f dsb sy
|
|
8007960: 623b str r3, [r7, #32]
|
|
}
|
|
8007962: bf00 nop
|
|
8007964: bf00 nop
|
|
8007966: e7fd b.n 8007964 <xTimerGenericCommand+0x2c>
|
|
|
|
/* Send a message to the timer service task to perform a particular action
|
|
on a particular timer definition. */
|
|
if( xTimerQueue != NULL )
|
|
8007968: 4b19 ldr r3, [pc, #100] @ (80079d0 <xTimerGenericCommand+0x98>)
|
|
800796a: 681b ldr r3, [r3, #0]
|
|
800796c: 2b00 cmp r3, #0
|
|
800796e: d02a beq.n 80079c6 <xTimerGenericCommand+0x8e>
|
|
{
|
|
/* Send a command to the timer service task to start the xTimer timer. */
|
|
xMessage.xMessageID = xCommandID;
|
|
8007970: 68bb ldr r3, [r7, #8]
|
|
8007972: 613b str r3, [r7, #16]
|
|
xMessage.u.xTimerParameters.xMessageValue = xOptionalValue;
|
|
8007974: 687b ldr r3, [r7, #4]
|
|
8007976: 617b str r3, [r7, #20]
|
|
xMessage.u.xTimerParameters.pxTimer = xTimer;
|
|
8007978: 68fb ldr r3, [r7, #12]
|
|
800797a: 61bb str r3, [r7, #24]
|
|
|
|
if( xCommandID < tmrFIRST_FROM_ISR_COMMAND )
|
|
800797c: 68bb ldr r3, [r7, #8]
|
|
800797e: 2b05 cmp r3, #5
|
|
8007980: dc18 bgt.n 80079b4 <xTimerGenericCommand+0x7c>
|
|
{
|
|
if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
|
|
8007982: f7ff fdad bl 80074e0 <xTaskGetSchedulerState>
|
|
8007986: 4603 mov r3, r0
|
|
8007988: 2b02 cmp r3, #2
|
|
800798a: d109 bne.n 80079a0 <xTimerGenericCommand+0x68>
|
|
{
|
|
xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait );
|
|
800798c: 4b10 ldr r3, [pc, #64] @ (80079d0 <xTimerGenericCommand+0x98>)
|
|
800798e: 6818 ldr r0, [r3, #0]
|
|
8007990: f107 0110 add.w r1, r7, #16
|
|
8007994: 2300 movs r3, #0
|
|
8007996: 6b3a ldr r2, [r7, #48] @ 0x30
|
|
8007998: f7fe f88c bl 8005ab4 <xQueueGenericSend>
|
|
800799c: 6278 str r0, [r7, #36] @ 0x24
|
|
800799e: e012 b.n 80079c6 <xTimerGenericCommand+0x8e>
|
|
}
|
|
else
|
|
{
|
|
xReturn = xQueueSendToBack( xTimerQueue, &xMessage, tmrNO_DELAY );
|
|
80079a0: 4b0b ldr r3, [pc, #44] @ (80079d0 <xTimerGenericCommand+0x98>)
|
|
80079a2: 6818 ldr r0, [r3, #0]
|
|
80079a4: f107 0110 add.w r1, r7, #16
|
|
80079a8: 2300 movs r3, #0
|
|
80079aa: 2200 movs r2, #0
|
|
80079ac: f7fe f882 bl 8005ab4 <xQueueGenericSend>
|
|
80079b0: 6278 str r0, [r7, #36] @ 0x24
|
|
80079b2: e008 b.n 80079c6 <xTimerGenericCommand+0x8e>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
xReturn = xQueueSendToBackFromISR( xTimerQueue, &xMessage, pxHigherPriorityTaskWoken );
|
|
80079b4: 4b06 ldr r3, [pc, #24] @ (80079d0 <xTimerGenericCommand+0x98>)
|
|
80079b6: 6818 ldr r0, [r3, #0]
|
|
80079b8: f107 0110 add.w r1, r7, #16
|
|
80079bc: 2300 movs r3, #0
|
|
80079be: 683a ldr r2, [r7, #0]
|
|
80079c0: f7fe f97a bl 8005cb8 <xQueueGenericSendFromISR>
|
|
80079c4: 6278 str r0, [r7, #36] @ 0x24
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
return xReturn;
|
|
80079c6: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
}
|
|
80079c8: 4618 mov r0, r3
|
|
80079ca: 3728 adds r7, #40 @ 0x28
|
|
80079cc: 46bd mov sp, r7
|
|
80079ce: bd80 pop {r7, pc}
|
|
80079d0: 200013d4 .word 0x200013d4
|
|
|
|
080079d4 <prvProcessExpiredTimer>:
|
|
return pxTimer->pcTimerName;
|
|
}
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static void prvProcessExpiredTimer( const TickType_t xNextExpireTime, const TickType_t xTimeNow )
|
|
{
|
|
80079d4: b580 push {r7, lr}
|
|
80079d6: b088 sub sp, #32
|
|
80079d8: af02 add r7, sp, #8
|
|
80079da: 6078 str r0, [r7, #4]
|
|
80079dc: 6039 str r1, [r7, #0]
|
|
BaseType_t xResult;
|
|
Timer_t * const pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); /*lint !e9087 !e9079 void * is used as this macro is used with tasks and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
|
|
80079de: 4b23 ldr r3, [pc, #140] @ (8007a6c <prvProcessExpiredTimer+0x98>)
|
|
80079e0: 681b ldr r3, [r3, #0]
|
|
80079e2: 68db ldr r3, [r3, #12]
|
|
80079e4: 68db ldr r3, [r3, #12]
|
|
80079e6: 617b str r3, [r7, #20]
|
|
|
|
/* Remove the timer from the list of active timers. A check has already
|
|
been performed to ensure the list is not empty. */
|
|
( void ) uxListRemove( &( pxTimer->xTimerListItem ) );
|
|
80079e8: 697b ldr r3, [r7, #20]
|
|
80079ea: 3304 adds r3, #4
|
|
80079ec: 4618 mov r0, r3
|
|
80079ee: f7fd fe83 bl 80056f8 <uxListRemove>
|
|
traceTIMER_EXPIRED( pxTimer );
|
|
|
|
/* If the timer is an auto-reload timer then calculate the next
|
|
expiry time and re-insert the timer in the list of active timers. */
|
|
if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 )
|
|
80079f2: 697b ldr r3, [r7, #20]
|
|
80079f4: f893 3028 ldrb.w r3, [r3, #40] @ 0x28
|
|
80079f8: f003 0304 and.w r3, r3, #4
|
|
80079fc: 2b00 cmp r3, #0
|
|
80079fe: d023 beq.n 8007a48 <prvProcessExpiredTimer+0x74>
|
|
{
|
|
/* The timer is inserted into a list using a time relative to anything
|
|
other than the current time. It will therefore be inserted into the
|
|
correct list relative to the time this task thinks it is now. */
|
|
if( prvInsertTimerInActiveList( pxTimer, ( xNextExpireTime + pxTimer->xTimerPeriodInTicks ), xTimeNow, xNextExpireTime ) != pdFALSE )
|
|
8007a00: 697b ldr r3, [r7, #20]
|
|
8007a02: 699a ldr r2, [r3, #24]
|
|
8007a04: 687b ldr r3, [r7, #4]
|
|
8007a06: 18d1 adds r1, r2, r3
|
|
8007a08: 687b ldr r3, [r7, #4]
|
|
8007a0a: 683a ldr r2, [r7, #0]
|
|
8007a0c: 6978 ldr r0, [r7, #20]
|
|
8007a0e: f000 f8d5 bl 8007bbc <prvInsertTimerInActiveList>
|
|
8007a12: 4603 mov r3, r0
|
|
8007a14: 2b00 cmp r3, #0
|
|
8007a16: d020 beq.n 8007a5a <prvProcessExpiredTimer+0x86>
|
|
{
|
|
/* The timer expired before it was added to the active timer
|
|
list. Reload it now. */
|
|
xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY );
|
|
8007a18: 2300 movs r3, #0
|
|
8007a1a: 9300 str r3, [sp, #0]
|
|
8007a1c: 2300 movs r3, #0
|
|
8007a1e: 687a ldr r2, [r7, #4]
|
|
8007a20: 2100 movs r1, #0
|
|
8007a22: 6978 ldr r0, [r7, #20]
|
|
8007a24: f7ff ff88 bl 8007938 <xTimerGenericCommand>
|
|
8007a28: 6138 str r0, [r7, #16]
|
|
configASSERT( xResult );
|
|
8007a2a: 693b ldr r3, [r7, #16]
|
|
8007a2c: 2b00 cmp r3, #0
|
|
8007a2e: d114 bne.n 8007a5a <prvProcessExpiredTimer+0x86>
|
|
__asm volatile
|
|
8007a30: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8007a34: f383 8811 msr BASEPRI, r3
|
|
8007a38: f3bf 8f6f isb sy
|
|
8007a3c: f3bf 8f4f dsb sy
|
|
8007a40: 60fb str r3, [r7, #12]
|
|
}
|
|
8007a42: bf00 nop
|
|
8007a44: bf00 nop
|
|
8007a46: e7fd b.n 8007a44 <prvProcessExpiredTimer+0x70>
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
|
|
8007a48: 697b ldr r3, [r7, #20]
|
|
8007a4a: f893 3028 ldrb.w r3, [r3, #40] @ 0x28
|
|
8007a4e: f023 0301 bic.w r3, r3, #1
|
|
8007a52: b2da uxtb r2, r3
|
|
8007a54: 697b ldr r3, [r7, #20]
|
|
8007a56: f883 2028 strb.w r2, [r3, #40] @ 0x28
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
/* Call the timer callback. */
|
|
pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer );
|
|
8007a5a: 697b ldr r3, [r7, #20]
|
|
8007a5c: 6a1b ldr r3, [r3, #32]
|
|
8007a5e: 6978 ldr r0, [r7, #20]
|
|
8007a60: 4798 blx r3
|
|
}
|
|
8007a62: bf00 nop
|
|
8007a64: 3718 adds r7, #24
|
|
8007a66: 46bd mov sp, r7
|
|
8007a68: bd80 pop {r7, pc}
|
|
8007a6a: bf00 nop
|
|
8007a6c: 200013cc .word 0x200013cc
|
|
|
|
08007a70 <prvTimerTask>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static portTASK_FUNCTION( prvTimerTask, pvParameters )
|
|
{
|
|
8007a70: b580 push {r7, lr}
|
|
8007a72: b084 sub sp, #16
|
|
8007a74: af00 add r7, sp, #0
|
|
8007a76: 6078 str r0, [r7, #4]
|
|
|
|
for( ;; )
|
|
{
|
|
/* Query the timers list to see if it contains any timers, and if so,
|
|
obtain the time at which the next timer will expire. */
|
|
xNextExpireTime = prvGetNextExpireTime( &xListWasEmpty );
|
|
8007a78: f107 0308 add.w r3, r7, #8
|
|
8007a7c: 4618 mov r0, r3
|
|
8007a7e: f000 f859 bl 8007b34 <prvGetNextExpireTime>
|
|
8007a82: 60f8 str r0, [r7, #12]
|
|
|
|
/* If a timer has expired, process it. Otherwise, block this task
|
|
until either a timer does expire, or a command is received. */
|
|
prvProcessTimerOrBlockTask( xNextExpireTime, xListWasEmpty );
|
|
8007a84: 68bb ldr r3, [r7, #8]
|
|
8007a86: 4619 mov r1, r3
|
|
8007a88: 68f8 ldr r0, [r7, #12]
|
|
8007a8a: f000 f805 bl 8007a98 <prvProcessTimerOrBlockTask>
|
|
|
|
/* Empty the command queue. */
|
|
prvProcessReceivedCommands();
|
|
8007a8e: f000 f8d7 bl 8007c40 <prvProcessReceivedCommands>
|
|
xNextExpireTime = prvGetNextExpireTime( &xListWasEmpty );
|
|
8007a92: bf00 nop
|
|
8007a94: e7f0 b.n 8007a78 <prvTimerTask+0x8>
|
|
...
|
|
|
|
08007a98 <prvProcessTimerOrBlockTask>:
|
|
}
|
|
}
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static void prvProcessTimerOrBlockTask( const TickType_t xNextExpireTime, BaseType_t xListWasEmpty )
|
|
{
|
|
8007a98: b580 push {r7, lr}
|
|
8007a9a: b084 sub sp, #16
|
|
8007a9c: af00 add r7, sp, #0
|
|
8007a9e: 6078 str r0, [r7, #4]
|
|
8007aa0: 6039 str r1, [r7, #0]
|
|
TickType_t xTimeNow;
|
|
BaseType_t xTimerListsWereSwitched;
|
|
|
|
vTaskSuspendAll();
|
|
8007aa2: f7ff f937 bl 8006d14 <vTaskSuspendAll>
|
|
/* Obtain the time now to make an assessment as to whether the timer
|
|
has expired or not. If obtaining the time causes the lists to switch
|
|
then don't process this timer as any timers that remained in the list
|
|
when the lists were switched will have been processed within the
|
|
prvSampleTimeNow() function. */
|
|
xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched );
|
|
8007aa6: f107 0308 add.w r3, r7, #8
|
|
8007aaa: 4618 mov r0, r3
|
|
8007aac: f000 f866 bl 8007b7c <prvSampleTimeNow>
|
|
8007ab0: 60f8 str r0, [r7, #12]
|
|
if( xTimerListsWereSwitched == pdFALSE )
|
|
8007ab2: 68bb ldr r3, [r7, #8]
|
|
8007ab4: 2b00 cmp r3, #0
|
|
8007ab6: d130 bne.n 8007b1a <prvProcessTimerOrBlockTask+0x82>
|
|
{
|
|
/* The tick count has not overflowed, has the timer expired? */
|
|
if( ( xListWasEmpty == pdFALSE ) && ( xNextExpireTime <= xTimeNow ) )
|
|
8007ab8: 683b ldr r3, [r7, #0]
|
|
8007aba: 2b00 cmp r3, #0
|
|
8007abc: d10a bne.n 8007ad4 <prvProcessTimerOrBlockTask+0x3c>
|
|
8007abe: 687a ldr r2, [r7, #4]
|
|
8007ac0: 68fb ldr r3, [r7, #12]
|
|
8007ac2: 429a cmp r2, r3
|
|
8007ac4: d806 bhi.n 8007ad4 <prvProcessTimerOrBlockTask+0x3c>
|
|
{
|
|
( void ) xTaskResumeAll();
|
|
8007ac6: f7ff f933 bl 8006d30 <xTaskResumeAll>
|
|
prvProcessExpiredTimer( xNextExpireTime, xTimeNow );
|
|
8007aca: 68f9 ldr r1, [r7, #12]
|
|
8007acc: 6878 ldr r0, [r7, #4]
|
|
8007ace: f7ff ff81 bl 80079d4 <prvProcessExpiredTimer>
|
|
else
|
|
{
|
|
( void ) xTaskResumeAll();
|
|
}
|
|
}
|
|
}
|
|
8007ad2: e024 b.n 8007b1e <prvProcessTimerOrBlockTask+0x86>
|
|
if( xListWasEmpty != pdFALSE )
|
|
8007ad4: 683b ldr r3, [r7, #0]
|
|
8007ad6: 2b00 cmp r3, #0
|
|
8007ad8: d008 beq.n 8007aec <prvProcessTimerOrBlockTask+0x54>
|
|
xListWasEmpty = listLIST_IS_EMPTY( pxOverflowTimerList );
|
|
8007ada: 4b13 ldr r3, [pc, #76] @ (8007b28 <prvProcessTimerOrBlockTask+0x90>)
|
|
8007adc: 681b ldr r3, [r3, #0]
|
|
8007ade: 681b ldr r3, [r3, #0]
|
|
8007ae0: 2b00 cmp r3, #0
|
|
8007ae2: d101 bne.n 8007ae8 <prvProcessTimerOrBlockTask+0x50>
|
|
8007ae4: 2301 movs r3, #1
|
|
8007ae6: e000 b.n 8007aea <prvProcessTimerOrBlockTask+0x52>
|
|
8007ae8: 2300 movs r3, #0
|
|
8007aea: 603b str r3, [r7, #0]
|
|
vQueueWaitForMessageRestricted( xTimerQueue, ( xNextExpireTime - xTimeNow ), xListWasEmpty );
|
|
8007aec: 4b0f ldr r3, [pc, #60] @ (8007b2c <prvProcessTimerOrBlockTask+0x94>)
|
|
8007aee: 6818 ldr r0, [r3, #0]
|
|
8007af0: 687a ldr r2, [r7, #4]
|
|
8007af2: 68fb ldr r3, [r7, #12]
|
|
8007af4: 1ad3 subs r3, r2, r3
|
|
8007af6: 683a ldr r2, [r7, #0]
|
|
8007af8: 4619 mov r1, r3
|
|
8007afa: f7fe fe1f bl 800673c <vQueueWaitForMessageRestricted>
|
|
if( xTaskResumeAll() == pdFALSE )
|
|
8007afe: f7ff f917 bl 8006d30 <xTaskResumeAll>
|
|
8007b02: 4603 mov r3, r0
|
|
8007b04: 2b00 cmp r3, #0
|
|
8007b06: d10a bne.n 8007b1e <prvProcessTimerOrBlockTask+0x86>
|
|
portYIELD_WITHIN_API();
|
|
8007b08: 4b09 ldr r3, [pc, #36] @ (8007b30 <prvProcessTimerOrBlockTask+0x98>)
|
|
8007b0a: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
8007b0e: 601a str r2, [r3, #0]
|
|
8007b10: f3bf 8f4f dsb sy
|
|
8007b14: f3bf 8f6f isb sy
|
|
}
|
|
8007b18: e001 b.n 8007b1e <prvProcessTimerOrBlockTask+0x86>
|
|
( void ) xTaskResumeAll();
|
|
8007b1a: f7ff f909 bl 8006d30 <xTaskResumeAll>
|
|
}
|
|
8007b1e: bf00 nop
|
|
8007b20: 3710 adds r7, #16
|
|
8007b22: 46bd mov sp, r7
|
|
8007b24: bd80 pop {r7, pc}
|
|
8007b26: bf00 nop
|
|
8007b28: 200013d0 .word 0x200013d0
|
|
8007b2c: 200013d4 .word 0x200013d4
|
|
8007b30: e000ed04 .word 0xe000ed04
|
|
|
|
08007b34 <prvGetNextExpireTime>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static TickType_t prvGetNextExpireTime( BaseType_t * const pxListWasEmpty )
|
|
{
|
|
8007b34: b480 push {r7}
|
|
8007b36: b085 sub sp, #20
|
|
8007b38: af00 add r7, sp, #0
|
|
8007b3a: 6078 str r0, [r7, #4]
|
|
the timer with the nearest expiry time will expire. If there are no
|
|
active timers then just set the next expire time to 0. That will cause
|
|
this task to unblock when the tick count overflows, at which point the
|
|
timer lists will be switched and the next expiry time can be
|
|
re-assessed. */
|
|
*pxListWasEmpty = listLIST_IS_EMPTY( pxCurrentTimerList );
|
|
8007b3c: 4b0e ldr r3, [pc, #56] @ (8007b78 <prvGetNextExpireTime+0x44>)
|
|
8007b3e: 681b ldr r3, [r3, #0]
|
|
8007b40: 681b ldr r3, [r3, #0]
|
|
8007b42: 2b00 cmp r3, #0
|
|
8007b44: d101 bne.n 8007b4a <prvGetNextExpireTime+0x16>
|
|
8007b46: 2201 movs r2, #1
|
|
8007b48: e000 b.n 8007b4c <prvGetNextExpireTime+0x18>
|
|
8007b4a: 2200 movs r2, #0
|
|
8007b4c: 687b ldr r3, [r7, #4]
|
|
8007b4e: 601a str r2, [r3, #0]
|
|
if( *pxListWasEmpty == pdFALSE )
|
|
8007b50: 687b ldr r3, [r7, #4]
|
|
8007b52: 681b ldr r3, [r3, #0]
|
|
8007b54: 2b00 cmp r3, #0
|
|
8007b56: d105 bne.n 8007b64 <prvGetNextExpireTime+0x30>
|
|
{
|
|
xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList );
|
|
8007b58: 4b07 ldr r3, [pc, #28] @ (8007b78 <prvGetNextExpireTime+0x44>)
|
|
8007b5a: 681b ldr r3, [r3, #0]
|
|
8007b5c: 68db ldr r3, [r3, #12]
|
|
8007b5e: 681b ldr r3, [r3, #0]
|
|
8007b60: 60fb str r3, [r7, #12]
|
|
8007b62: e001 b.n 8007b68 <prvGetNextExpireTime+0x34>
|
|
}
|
|
else
|
|
{
|
|
/* Ensure the task unblocks when the tick count rolls over. */
|
|
xNextExpireTime = ( TickType_t ) 0U;
|
|
8007b64: 2300 movs r3, #0
|
|
8007b66: 60fb str r3, [r7, #12]
|
|
}
|
|
|
|
return xNextExpireTime;
|
|
8007b68: 68fb ldr r3, [r7, #12]
|
|
}
|
|
8007b6a: 4618 mov r0, r3
|
|
8007b6c: 3714 adds r7, #20
|
|
8007b6e: 46bd mov sp, r7
|
|
8007b70: f85d 7b04 ldr.w r7, [sp], #4
|
|
8007b74: 4770 bx lr
|
|
8007b76: bf00 nop
|
|
8007b78: 200013cc .word 0x200013cc
|
|
|
|
08007b7c <prvSampleTimeNow>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static TickType_t prvSampleTimeNow( BaseType_t * const pxTimerListsWereSwitched )
|
|
{
|
|
8007b7c: b580 push {r7, lr}
|
|
8007b7e: b084 sub sp, #16
|
|
8007b80: af00 add r7, sp, #0
|
|
8007b82: 6078 str r0, [r7, #4]
|
|
TickType_t xTimeNow;
|
|
PRIVILEGED_DATA static TickType_t xLastTime = ( TickType_t ) 0U; /*lint !e956 Variable is only accessible to one task. */
|
|
|
|
xTimeNow = xTaskGetTickCount();
|
|
8007b84: f7ff f972 bl 8006e6c <xTaskGetTickCount>
|
|
8007b88: 60f8 str r0, [r7, #12]
|
|
|
|
if( xTimeNow < xLastTime )
|
|
8007b8a: 4b0b ldr r3, [pc, #44] @ (8007bb8 <prvSampleTimeNow+0x3c>)
|
|
8007b8c: 681b ldr r3, [r3, #0]
|
|
8007b8e: 68fa ldr r2, [r7, #12]
|
|
8007b90: 429a cmp r2, r3
|
|
8007b92: d205 bcs.n 8007ba0 <prvSampleTimeNow+0x24>
|
|
{
|
|
prvSwitchTimerLists();
|
|
8007b94: f000 f93a bl 8007e0c <prvSwitchTimerLists>
|
|
*pxTimerListsWereSwitched = pdTRUE;
|
|
8007b98: 687b ldr r3, [r7, #4]
|
|
8007b9a: 2201 movs r2, #1
|
|
8007b9c: 601a str r2, [r3, #0]
|
|
8007b9e: e002 b.n 8007ba6 <prvSampleTimeNow+0x2a>
|
|
}
|
|
else
|
|
{
|
|
*pxTimerListsWereSwitched = pdFALSE;
|
|
8007ba0: 687b ldr r3, [r7, #4]
|
|
8007ba2: 2200 movs r2, #0
|
|
8007ba4: 601a str r2, [r3, #0]
|
|
}
|
|
|
|
xLastTime = xTimeNow;
|
|
8007ba6: 4a04 ldr r2, [pc, #16] @ (8007bb8 <prvSampleTimeNow+0x3c>)
|
|
8007ba8: 68fb ldr r3, [r7, #12]
|
|
8007baa: 6013 str r3, [r2, #0]
|
|
|
|
return xTimeNow;
|
|
8007bac: 68fb ldr r3, [r7, #12]
|
|
}
|
|
8007bae: 4618 mov r0, r3
|
|
8007bb0: 3710 adds r7, #16
|
|
8007bb2: 46bd mov sp, r7
|
|
8007bb4: bd80 pop {r7, pc}
|
|
8007bb6: bf00 nop
|
|
8007bb8: 200013dc .word 0x200013dc
|
|
|
|
08007bbc <prvInsertTimerInActiveList>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime )
|
|
{
|
|
8007bbc: b580 push {r7, lr}
|
|
8007bbe: b086 sub sp, #24
|
|
8007bc0: af00 add r7, sp, #0
|
|
8007bc2: 60f8 str r0, [r7, #12]
|
|
8007bc4: 60b9 str r1, [r7, #8]
|
|
8007bc6: 607a str r2, [r7, #4]
|
|
8007bc8: 603b str r3, [r7, #0]
|
|
BaseType_t xProcessTimerNow = pdFALSE;
|
|
8007bca: 2300 movs r3, #0
|
|
8007bcc: 617b str r3, [r7, #20]
|
|
|
|
listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xNextExpiryTime );
|
|
8007bce: 68fb ldr r3, [r7, #12]
|
|
8007bd0: 68ba ldr r2, [r7, #8]
|
|
8007bd2: 605a str r2, [r3, #4]
|
|
listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer );
|
|
8007bd4: 68fb ldr r3, [r7, #12]
|
|
8007bd6: 68fa ldr r2, [r7, #12]
|
|
8007bd8: 611a str r2, [r3, #16]
|
|
|
|
if( xNextExpiryTime <= xTimeNow )
|
|
8007bda: 68ba ldr r2, [r7, #8]
|
|
8007bdc: 687b ldr r3, [r7, #4]
|
|
8007bde: 429a cmp r2, r3
|
|
8007be0: d812 bhi.n 8007c08 <prvInsertTimerInActiveList+0x4c>
|
|
{
|
|
/* Has the expiry time elapsed between the command to start/reset a
|
|
timer was issued, and the time the command was processed? */
|
|
if( ( ( TickType_t ) ( xTimeNow - xCommandTime ) ) >= pxTimer->xTimerPeriodInTicks ) /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
|
|
8007be2: 687a ldr r2, [r7, #4]
|
|
8007be4: 683b ldr r3, [r7, #0]
|
|
8007be6: 1ad2 subs r2, r2, r3
|
|
8007be8: 68fb ldr r3, [r7, #12]
|
|
8007bea: 699b ldr r3, [r3, #24]
|
|
8007bec: 429a cmp r2, r3
|
|
8007bee: d302 bcc.n 8007bf6 <prvInsertTimerInActiveList+0x3a>
|
|
{
|
|
/* The time between a command being issued and the command being
|
|
processed actually exceeds the timers period. */
|
|
xProcessTimerNow = pdTRUE;
|
|
8007bf0: 2301 movs r3, #1
|
|
8007bf2: 617b str r3, [r7, #20]
|
|
8007bf4: e01b b.n 8007c2e <prvInsertTimerInActiveList+0x72>
|
|
}
|
|
else
|
|
{
|
|
vListInsert( pxOverflowTimerList, &( pxTimer->xTimerListItem ) );
|
|
8007bf6: 4b10 ldr r3, [pc, #64] @ (8007c38 <prvInsertTimerInActiveList+0x7c>)
|
|
8007bf8: 681a ldr r2, [r3, #0]
|
|
8007bfa: 68fb ldr r3, [r7, #12]
|
|
8007bfc: 3304 adds r3, #4
|
|
8007bfe: 4619 mov r1, r3
|
|
8007c00: 4610 mov r0, r2
|
|
8007c02: f7fd fd40 bl 8005686 <vListInsert>
|
|
8007c06: e012 b.n 8007c2e <prvInsertTimerInActiveList+0x72>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if( ( xTimeNow < xCommandTime ) && ( xNextExpiryTime >= xCommandTime ) )
|
|
8007c08: 687a ldr r2, [r7, #4]
|
|
8007c0a: 683b ldr r3, [r7, #0]
|
|
8007c0c: 429a cmp r2, r3
|
|
8007c0e: d206 bcs.n 8007c1e <prvInsertTimerInActiveList+0x62>
|
|
8007c10: 68ba ldr r2, [r7, #8]
|
|
8007c12: 683b ldr r3, [r7, #0]
|
|
8007c14: 429a cmp r2, r3
|
|
8007c16: d302 bcc.n 8007c1e <prvInsertTimerInActiveList+0x62>
|
|
{
|
|
/* If, since the command was issued, the tick count has overflowed
|
|
but the expiry time has not, then the timer must have already passed
|
|
its expiry time and should be processed immediately. */
|
|
xProcessTimerNow = pdTRUE;
|
|
8007c18: 2301 movs r3, #1
|
|
8007c1a: 617b str r3, [r7, #20]
|
|
8007c1c: e007 b.n 8007c2e <prvInsertTimerInActiveList+0x72>
|
|
}
|
|
else
|
|
{
|
|
vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) );
|
|
8007c1e: 4b07 ldr r3, [pc, #28] @ (8007c3c <prvInsertTimerInActiveList+0x80>)
|
|
8007c20: 681a ldr r2, [r3, #0]
|
|
8007c22: 68fb ldr r3, [r7, #12]
|
|
8007c24: 3304 adds r3, #4
|
|
8007c26: 4619 mov r1, r3
|
|
8007c28: 4610 mov r0, r2
|
|
8007c2a: f7fd fd2c bl 8005686 <vListInsert>
|
|
}
|
|
}
|
|
|
|
return xProcessTimerNow;
|
|
8007c2e: 697b ldr r3, [r7, #20]
|
|
}
|
|
8007c30: 4618 mov r0, r3
|
|
8007c32: 3718 adds r7, #24
|
|
8007c34: 46bd mov sp, r7
|
|
8007c36: bd80 pop {r7, pc}
|
|
8007c38: 200013d0 .word 0x200013d0
|
|
8007c3c: 200013cc .word 0x200013cc
|
|
|
|
08007c40 <prvProcessReceivedCommands>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static void prvProcessReceivedCommands( void )
|
|
{
|
|
8007c40: b580 push {r7, lr}
|
|
8007c42: b08e sub sp, #56 @ 0x38
|
|
8007c44: af02 add r7, sp, #8
|
|
DaemonTaskMessage_t xMessage;
|
|
Timer_t *pxTimer;
|
|
BaseType_t xTimerListsWereSwitched, xResult;
|
|
TickType_t xTimeNow;
|
|
|
|
while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL ) /*lint !e603 xMessage does not have to be initialised as it is passed out, not in, and it is not used unless xQueueReceive() returns pdTRUE. */
|
|
8007c46: e0ce b.n 8007de6 <prvProcessReceivedCommands+0x1a6>
|
|
{
|
|
#if ( INCLUDE_xTimerPendFunctionCall == 1 )
|
|
{
|
|
/* Negative commands are pended function calls rather than timer
|
|
commands. */
|
|
if( xMessage.xMessageID < ( BaseType_t ) 0 )
|
|
8007c48: 687b ldr r3, [r7, #4]
|
|
8007c4a: 2b00 cmp r3, #0
|
|
8007c4c: da19 bge.n 8007c82 <prvProcessReceivedCommands+0x42>
|
|
{
|
|
const CallbackParameters_t * const pxCallback = &( xMessage.u.xCallbackParameters );
|
|
8007c4e: 1d3b adds r3, r7, #4
|
|
8007c50: 3304 adds r3, #4
|
|
8007c52: 62fb str r3, [r7, #44] @ 0x2c
|
|
|
|
/* The timer uses the xCallbackParameters member to request a
|
|
callback be executed. Check the callback is not NULL. */
|
|
configASSERT( pxCallback );
|
|
8007c54: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8007c56: 2b00 cmp r3, #0
|
|
8007c58: d10b bne.n 8007c72 <prvProcessReceivedCommands+0x32>
|
|
__asm volatile
|
|
8007c5a: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8007c5e: f383 8811 msr BASEPRI, r3
|
|
8007c62: f3bf 8f6f isb sy
|
|
8007c66: f3bf 8f4f dsb sy
|
|
8007c6a: 61fb str r3, [r7, #28]
|
|
}
|
|
8007c6c: bf00 nop
|
|
8007c6e: bf00 nop
|
|
8007c70: e7fd b.n 8007c6e <prvProcessReceivedCommands+0x2e>
|
|
|
|
/* Call the function. */
|
|
pxCallback->pxCallbackFunction( pxCallback->pvParameter1, pxCallback->ulParameter2 );
|
|
8007c72: 6afb ldr r3, [r7, #44] @ 0x2c
|
|
8007c74: 681b ldr r3, [r3, #0]
|
|
8007c76: 6afa ldr r2, [r7, #44] @ 0x2c
|
|
8007c78: 6850 ldr r0, [r2, #4]
|
|
8007c7a: 6afa ldr r2, [r7, #44] @ 0x2c
|
|
8007c7c: 6892 ldr r2, [r2, #8]
|
|
8007c7e: 4611 mov r1, r2
|
|
8007c80: 4798 blx r3
|
|
}
|
|
#endif /* INCLUDE_xTimerPendFunctionCall */
|
|
|
|
/* Commands that are positive are timer commands rather than pended
|
|
function calls. */
|
|
if( xMessage.xMessageID >= ( BaseType_t ) 0 )
|
|
8007c82: 687b ldr r3, [r7, #4]
|
|
8007c84: 2b00 cmp r3, #0
|
|
8007c86: f2c0 80ae blt.w 8007de6 <prvProcessReceivedCommands+0x1a6>
|
|
{
|
|
/* The messages uses the xTimerParameters member to work on a
|
|
software timer. */
|
|
pxTimer = xMessage.u.xTimerParameters.pxTimer;
|
|
8007c8a: 68fb ldr r3, [r7, #12]
|
|
8007c8c: 62bb str r3, [r7, #40] @ 0x28
|
|
|
|
if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE ) /*lint !e961. The cast is only redundant when NULL is passed into the macro. */
|
|
8007c8e: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007c90: 695b ldr r3, [r3, #20]
|
|
8007c92: 2b00 cmp r3, #0
|
|
8007c94: d004 beq.n 8007ca0 <prvProcessReceivedCommands+0x60>
|
|
{
|
|
/* The timer is in a list, remove it. */
|
|
( void ) uxListRemove( &( pxTimer->xTimerListItem ) );
|
|
8007c96: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007c98: 3304 adds r3, #4
|
|
8007c9a: 4618 mov r0, r3
|
|
8007c9c: f7fd fd2c bl 80056f8 <uxListRemove>
|
|
it must be present in the function call. prvSampleTimeNow() must be
|
|
called after the message is received from xTimerQueue so there is no
|
|
possibility of a higher priority task adding a message to the message
|
|
queue with a time that is ahead of the timer daemon task (because it
|
|
pre-empted the timer daemon task after the xTimeNow value was set). */
|
|
xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched );
|
|
8007ca0: 463b mov r3, r7
|
|
8007ca2: 4618 mov r0, r3
|
|
8007ca4: f7ff ff6a bl 8007b7c <prvSampleTimeNow>
|
|
8007ca8: 6278 str r0, [r7, #36] @ 0x24
|
|
|
|
switch( xMessage.xMessageID )
|
|
8007caa: 687b ldr r3, [r7, #4]
|
|
8007cac: 2b09 cmp r3, #9
|
|
8007cae: f200 8097 bhi.w 8007de0 <prvProcessReceivedCommands+0x1a0>
|
|
8007cb2: a201 add r2, pc, #4 @ (adr r2, 8007cb8 <prvProcessReceivedCommands+0x78>)
|
|
8007cb4: f852 f023 ldr.w pc, [r2, r3, lsl #2]
|
|
8007cb8: 08007ce1 .word 0x08007ce1
|
|
8007cbc: 08007ce1 .word 0x08007ce1
|
|
8007cc0: 08007ce1 .word 0x08007ce1
|
|
8007cc4: 08007d57 .word 0x08007d57
|
|
8007cc8: 08007d6b .word 0x08007d6b
|
|
8007ccc: 08007db7 .word 0x08007db7
|
|
8007cd0: 08007ce1 .word 0x08007ce1
|
|
8007cd4: 08007ce1 .word 0x08007ce1
|
|
8007cd8: 08007d57 .word 0x08007d57
|
|
8007cdc: 08007d6b .word 0x08007d6b
|
|
case tmrCOMMAND_START_FROM_ISR :
|
|
case tmrCOMMAND_RESET :
|
|
case tmrCOMMAND_RESET_FROM_ISR :
|
|
case tmrCOMMAND_START_DONT_TRACE :
|
|
/* Start or restart a timer. */
|
|
pxTimer->ucStatus |= tmrSTATUS_IS_ACTIVE;
|
|
8007ce0: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007ce2: f893 3028 ldrb.w r3, [r3, #40] @ 0x28
|
|
8007ce6: f043 0301 orr.w r3, r3, #1
|
|
8007cea: b2da uxtb r2, r3
|
|
8007cec: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007cee: f883 2028 strb.w r2, [r3, #40] @ 0x28
|
|
if( prvInsertTimerInActiveList( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow, xMessage.u.xTimerParameters.xMessageValue ) != pdFALSE )
|
|
8007cf2: 68ba ldr r2, [r7, #8]
|
|
8007cf4: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007cf6: 699b ldr r3, [r3, #24]
|
|
8007cf8: 18d1 adds r1, r2, r3
|
|
8007cfa: 68bb ldr r3, [r7, #8]
|
|
8007cfc: 6a7a ldr r2, [r7, #36] @ 0x24
|
|
8007cfe: 6ab8 ldr r0, [r7, #40] @ 0x28
|
|
8007d00: f7ff ff5c bl 8007bbc <prvInsertTimerInActiveList>
|
|
8007d04: 4603 mov r3, r0
|
|
8007d06: 2b00 cmp r3, #0
|
|
8007d08: d06c beq.n 8007de4 <prvProcessReceivedCommands+0x1a4>
|
|
{
|
|
/* The timer expired before it was added to the active
|
|
timer list. Process it now. */
|
|
pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer );
|
|
8007d0a: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007d0c: 6a1b ldr r3, [r3, #32]
|
|
8007d0e: 6ab8 ldr r0, [r7, #40] @ 0x28
|
|
8007d10: 4798 blx r3
|
|
traceTIMER_EXPIRED( pxTimer );
|
|
|
|
if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 )
|
|
8007d12: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007d14: f893 3028 ldrb.w r3, [r3, #40] @ 0x28
|
|
8007d18: f003 0304 and.w r3, r3, #4
|
|
8007d1c: 2b00 cmp r3, #0
|
|
8007d1e: d061 beq.n 8007de4 <prvProcessReceivedCommands+0x1a4>
|
|
{
|
|
xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY );
|
|
8007d20: 68ba ldr r2, [r7, #8]
|
|
8007d22: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007d24: 699b ldr r3, [r3, #24]
|
|
8007d26: 441a add r2, r3
|
|
8007d28: 2300 movs r3, #0
|
|
8007d2a: 9300 str r3, [sp, #0]
|
|
8007d2c: 2300 movs r3, #0
|
|
8007d2e: 2100 movs r1, #0
|
|
8007d30: 6ab8 ldr r0, [r7, #40] @ 0x28
|
|
8007d32: f7ff fe01 bl 8007938 <xTimerGenericCommand>
|
|
8007d36: 6238 str r0, [r7, #32]
|
|
configASSERT( xResult );
|
|
8007d38: 6a3b ldr r3, [r7, #32]
|
|
8007d3a: 2b00 cmp r3, #0
|
|
8007d3c: d152 bne.n 8007de4 <prvProcessReceivedCommands+0x1a4>
|
|
__asm volatile
|
|
8007d3e: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8007d42: f383 8811 msr BASEPRI, r3
|
|
8007d46: f3bf 8f6f isb sy
|
|
8007d4a: f3bf 8f4f dsb sy
|
|
8007d4e: 61bb str r3, [r7, #24]
|
|
}
|
|
8007d50: bf00 nop
|
|
8007d52: bf00 nop
|
|
8007d54: e7fd b.n 8007d52 <prvProcessReceivedCommands+0x112>
|
|
break;
|
|
|
|
case tmrCOMMAND_STOP :
|
|
case tmrCOMMAND_STOP_FROM_ISR :
|
|
/* The timer has already been removed from the active list. */
|
|
pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
|
|
8007d56: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007d58: f893 3028 ldrb.w r3, [r3, #40] @ 0x28
|
|
8007d5c: f023 0301 bic.w r3, r3, #1
|
|
8007d60: b2da uxtb r2, r3
|
|
8007d62: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007d64: f883 2028 strb.w r2, [r3, #40] @ 0x28
|
|
break;
|
|
8007d68: e03d b.n 8007de6 <prvProcessReceivedCommands+0x1a6>
|
|
|
|
case tmrCOMMAND_CHANGE_PERIOD :
|
|
case tmrCOMMAND_CHANGE_PERIOD_FROM_ISR :
|
|
pxTimer->ucStatus |= tmrSTATUS_IS_ACTIVE;
|
|
8007d6a: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007d6c: f893 3028 ldrb.w r3, [r3, #40] @ 0x28
|
|
8007d70: f043 0301 orr.w r3, r3, #1
|
|
8007d74: b2da uxtb r2, r3
|
|
8007d76: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007d78: f883 2028 strb.w r2, [r3, #40] @ 0x28
|
|
pxTimer->xTimerPeriodInTicks = xMessage.u.xTimerParameters.xMessageValue;
|
|
8007d7c: 68ba ldr r2, [r7, #8]
|
|
8007d7e: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007d80: 619a str r2, [r3, #24]
|
|
configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) );
|
|
8007d82: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007d84: 699b ldr r3, [r3, #24]
|
|
8007d86: 2b00 cmp r3, #0
|
|
8007d88: d10b bne.n 8007da2 <prvProcessReceivedCommands+0x162>
|
|
__asm volatile
|
|
8007d8a: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8007d8e: f383 8811 msr BASEPRI, r3
|
|
8007d92: f3bf 8f6f isb sy
|
|
8007d96: f3bf 8f4f dsb sy
|
|
8007d9a: 617b str r3, [r7, #20]
|
|
}
|
|
8007d9c: bf00 nop
|
|
8007d9e: bf00 nop
|
|
8007da0: e7fd b.n 8007d9e <prvProcessReceivedCommands+0x15e>
|
|
be longer or shorter than the old one. The command time is
|
|
therefore set to the current time, and as the period cannot
|
|
be zero the next expiry time can only be in the future,
|
|
meaning (unlike for the xTimerStart() case above) there is
|
|
no fail case that needs to be handled here. */
|
|
( void ) prvInsertTimerInActiveList( pxTimer, ( xTimeNow + pxTimer->xTimerPeriodInTicks ), xTimeNow, xTimeNow );
|
|
8007da2: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007da4: 699a ldr r2, [r3, #24]
|
|
8007da6: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
8007da8: 18d1 adds r1, r2, r3
|
|
8007daa: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
8007dac: 6a7a ldr r2, [r7, #36] @ 0x24
|
|
8007dae: 6ab8 ldr r0, [r7, #40] @ 0x28
|
|
8007db0: f7ff ff04 bl 8007bbc <prvInsertTimerInActiveList>
|
|
break;
|
|
8007db4: e017 b.n 8007de6 <prvProcessReceivedCommands+0x1a6>
|
|
#if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
|
{
|
|
/* The timer has already been removed from the active list,
|
|
just free up the memory if the memory was dynamically
|
|
allocated. */
|
|
if( ( pxTimer->ucStatus & tmrSTATUS_IS_STATICALLY_ALLOCATED ) == ( uint8_t ) 0 )
|
|
8007db6: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007db8: f893 3028 ldrb.w r3, [r3, #40] @ 0x28
|
|
8007dbc: f003 0302 and.w r3, r3, #2
|
|
8007dc0: 2b00 cmp r3, #0
|
|
8007dc2: d103 bne.n 8007dcc <prvProcessReceivedCommands+0x18c>
|
|
{
|
|
vPortFree( pxTimer );
|
|
8007dc4: 6ab8 ldr r0, [r7, #40] @ 0x28
|
|
8007dc6: f000 fbe7 bl 8008598 <vPortFree>
|
|
no need to free the memory - just mark the timer as
|
|
"not active". */
|
|
pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
|
|
}
|
|
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
|
|
break;
|
|
8007dca: e00c b.n 8007de6 <prvProcessReceivedCommands+0x1a6>
|
|
pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
|
|
8007dcc: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007dce: f893 3028 ldrb.w r3, [r3, #40] @ 0x28
|
|
8007dd2: f023 0301 bic.w r3, r3, #1
|
|
8007dd6: b2da uxtb r2, r3
|
|
8007dd8: 6abb ldr r3, [r7, #40] @ 0x28
|
|
8007dda: f883 2028 strb.w r2, [r3, #40] @ 0x28
|
|
break;
|
|
8007dde: e002 b.n 8007de6 <prvProcessReceivedCommands+0x1a6>
|
|
|
|
default :
|
|
/* Don't expect to get here. */
|
|
break;
|
|
8007de0: bf00 nop
|
|
8007de2: e000 b.n 8007de6 <prvProcessReceivedCommands+0x1a6>
|
|
break;
|
|
8007de4: bf00 nop
|
|
while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL ) /*lint !e603 xMessage does not have to be initialised as it is passed out, not in, and it is not used unless xQueueReceive() returns pdTRUE. */
|
|
8007de6: 4b08 ldr r3, [pc, #32] @ (8007e08 <prvProcessReceivedCommands+0x1c8>)
|
|
8007de8: 681b ldr r3, [r3, #0]
|
|
8007dea: 1d39 adds r1, r7, #4
|
|
8007dec: 2200 movs r2, #0
|
|
8007dee: 4618 mov r0, r3
|
|
8007df0: f7fe f890 bl 8005f14 <xQueueReceive>
|
|
8007df4: 4603 mov r3, r0
|
|
8007df6: 2b00 cmp r3, #0
|
|
8007df8: f47f af26 bne.w 8007c48 <prvProcessReceivedCommands+0x8>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
8007dfc: bf00 nop
|
|
8007dfe: bf00 nop
|
|
8007e00: 3730 adds r7, #48 @ 0x30
|
|
8007e02: 46bd mov sp, r7
|
|
8007e04: bd80 pop {r7, pc}
|
|
8007e06: bf00 nop
|
|
8007e08: 200013d4 .word 0x200013d4
|
|
|
|
08007e0c <prvSwitchTimerLists>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static void prvSwitchTimerLists( void )
|
|
{
|
|
8007e0c: b580 push {r7, lr}
|
|
8007e0e: b088 sub sp, #32
|
|
8007e10: af02 add r7, sp, #8
|
|
|
|
/* The tick count has overflowed. The timer lists must be switched.
|
|
If there are any timers still referenced from the current timer list
|
|
then they must have expired and should be processed before the lists
|
|
are switched. */
|
|
while( listLIST_IS_EMPTY( pxCurrentTimerList ) == pdFALSE )
|
|
8007e12: e049 b.n 8007ea8 <prvSwitchTimerLists+0x9c>
|
|
{
|
|
xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList );
|
|
8007e14: 4b2e ldr r3, [pc, #184] @ (8007ed0 <prvSwitchTimerLists+0xc4>)
|
|
8007e16: 681b ldr r3, [r3, #0]
|
|
8007e18: 68db ldr r3, [r3, #12]
|
|
8007e1a: 681b ldr r3, [r3, #0]
|
|
8007e1c: 613b str r3, [r7, #16]
|
|
|
|
/* Remove the timer from the list. */
|
|
pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); /*lint !e9087 !e9079 void * is used as this macro is used with tasks and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
|
|
8007e1e: 4b2c ldr r3, [pc, #176] @ (8007ed0 <prvSwitchTimerLists+0xc4>)
|
|
8007e20: 681b ldr r3, [r3, #0]
|
|
8007e22: 68db ldr r3, [r3, #12]
|
|
8007e24: 68db ldr r3, [r3, #12]
|
|
8007e26: 60fb str r3, [r7, #12]
|
|
( void ) uxListRemove( &( pxTimer->xTimerListItem ) );
|
|
8007e28: 68fb ldr r3, [r7, #12]
|
|
8007e2a: 3304 adds r3, #4
|
|
8007e2c: 4618 mov r0, r3
|
|
8007e2e: f7fd fc63 bl 80056f8 <uxListRemove>
|
|
traceTIMER_EXPIRED( pxTimer );
|
|
|
|
/* Execute its callback, then send a command to restart the timer if
|
|
it is an auto-reload timer. It cannot be restarted here as the lists
|
|
have not yet been switched. */
|
|
pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer );
|
|
8007e32: 68fb ldr r3, [r7, #12]
|
|
8007e34: 6a1b ldr r3, [r3, #32]
|
|
8007e36: 68f8 ldr r0, [r7, #12]
|
|
8007e38: 4798 blx r3
|
|
|
|
if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 )
|
|
8007e3a: 68fb ldr r3, [r7, #12]
|
|
8007e3c: f893 3028 ldrb.w r3, [r3, #40] @ 0x28
|
|
8007e40: f003 0304 and.w r3, r3, #4
|
|
8007e44: 2b00 cmp r3, #0
|
|
8007e46: d02f beq.n 8007ea8 <prvSwitchTimerLists+0x9c>
|
|
the timer going into the same timer list then it has already expired
|
|
and the timer should be re-inserted into the current list so it is
|
|
processed again within this loop. Otherwise a command should be sent
|
|
to restart the timer to ensure it is only inserted into a list after
|
|
the lists have been swapped. */
|
|
xReloadTime = ( xNextExpireTime + pxTimer->xTimerPeriodInTicks );
|
|
8007e48: 68fb ldr r3, [r7, #12]
|
|
8007e4a: 699b ldr r3, [r3, #24]
|
|
8007e4c: 693a ldr r2, [r7, #16]
|
|
8007e4e: 4413 add r3, r2
|
|
8007e50: 60bb str r3, [r7, #8]
|
|
if( xReloadTime > xNextExpireTime )
|
|
8007e52: 68ba ldr r2, [r7, #8]
|
|
8007e54: 693b ldr r3, [r7, #16]
|
|
8007e56: 429a cmp r2, r3
|
|
8007e58: d90e bls.n 8007e78 <prvSwitchTimerLists+0x6c>
|
|
{
|
|
listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xReloadTime );
|
|
8007e5a: 68fb ldr r3, [r7, #12]
|
|
8007e5c: 68ba ldr r2, [r7, #8]
|
|
8007e5e: 605a str r2, [r3, #4]
|
|
listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer );
|
|
8007e60: 68fb ldr r3, [r7, #12]
|
|
8007e62: 68fa ldr r2, [r7, #12]
|
|
8007e64: 611a str r2, [r3, #16]
|
|
vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) );
|
|
8007e66: 4b1a ldr r3, [pc, #104] @ (8007ed0 <prvSwitchTimerLists+0xc4>)
|
|
8007e68: 681a ldr r2, [r3, #0]
|
|
8007e6a: 68fb ldr r3, [r7, #12]
|
|
8007e6c: 3304 adds r3, #4
|
|
8007e6e: 4619 mov r1, r3
|
|
8007e70: 4610 mov r0, r2
|
|
8007e72: f7fd fc08 bl 8005686 <vListInsert>
|
|
8007e76: e017 b.n 8007ea8 <prvSwitchTimerLists+0x9c>
|
|
}
|
|
else
|
|
{
|
|
xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY );
|
|
8007e78: 2300 movs r3, #0
|
|
8007e7a: 9300 str r3, [sp, #0]
|
|
8007e7c: 2300 movs r3, #0
|
|
8007e7e: 693a ldr r2, [r7, #16]
|
|
8007e80: 2100 movs r1, #0
|
|
8007e82: 68f8 ldr r0, [r7, #12]
|
|
8007e84: f7ff fd58 bl 8007938 <xTimerGenericCommand>
|
|
8007e88: 6078 str r0, [r7, #4]
|
|
configASSERT( xResult );
|
|
8007e8a: 687b ldr r3, [r7, #4]
|
|
8007e8c: 2b00 cmp r3, #0
|
|
8007e8e: d10b bne.n 8007ea8 <prvSwitchTimerLists+0x9c>
|
|
__asm volatile
|
|
8007e90: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8007e94: f383 8811 msr BASEPRI, r3
|
|
8007e98: f3bf 8f6f isb sy
|
|
8007e9c: f3bf 8f4f dsb sy
|
|
8007ea0: 603b str r3, [r7, #0]
|
|
}
|
|
8007ea2: bf00 nop
|
|
8007ea4: bf00 nop
|
|
8007ea6: e7fd b.n 8007ea4 <prvSwitchTimerLists+0x98>
|
|
while( listLIST_IS_EMPTY( pxCurrentTimerList ) == pdFALSE )
|
|
8007ea8: 4b09 ldr r3, [pc, #36] @ (8007ed0 <prvSwitchTimerLists+0xc4>)
|
|
8007eaa: 681b ldr r3, [r3, #0]
|
|
8007eac: 681b ldr r3, [r3, #0]
|
|
8007eae: 2b00 cmp r3, #0
|
|
8007eb0: d1b0 bne.n 8007e14 <prvSwitchTimerLists+0x8>
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
|
|
pxTemp = pxCurrentTimerList;
|
|
8007eb2: 4b07 ldr r3, [pc, #28] @ (8007ed0 <prvSwitchTimerLists+0xc4>)
|
|
8007eb4: 681b ldr r3, [r3, #0]
|
|
8007eb6: 617b str r3, [r7, #20]
|
|
pxCurrentTimerList = pxOverflowTimerList;
|
|
8007eb8: 4b06 ldr r3, [pc, #24] @ (8007ed4 <prvSwitchTimerLists+0xc8>)
|
|
8007eba: 681b ldr r3, [r3, #0]
|
|
8007ebc: 4a04 ldr r2, [pc, #16] @ (8007ed0 <prvSwitchTimerLists+0xc4>)
|
|
8007ebe: 6013 str r3, [r2, #0]
|
|
pxOverflowTimerList = pxTemp;
|
|
8007ec0: 4a04 ldr r2, [pc, #16] @ (8007ed4 <prvSwitchTimerLists+0xc8>)
|
|
8007ec2: 697b ldr r3, [r7, #20]
|
|
8007ec4: 6013 str r3, [r2, #0]
|
|
}
|
|
8007ec6: bf00 nop
|
|
8007ec8: 3718 adds r7, #24
|
|
8007eca: 46bd mov sp, r7
|
|
8007ecc: bd80 pop {r7, pc}
|
|
8007ece: bf00 nop
|
|
8007ed0: 200013cc .word 0x200013cc
|
|
8007ed4: 200013d0 .word 0x200013d0
|
|
|
|
08007ed8 <prvCheckForValidListAndQueue>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static void prvCheckForValidListAndQueue( void )
|
|
{
|
|
8007ed8: b580 push {r7, lr}
|
|
8007eda: b082 sub sp, #8
|
|
8007edc: af02 add r7, sp, #8
|
|
/* Check that the list from which active timers are referenced, and the
|
|
queue used to communicate with the timer service, have been
|
|
initialised. */
|
|
taskENTER_CRITICAL();
|
|
8007ede: f000 f96b bl 80081b8 <vPortEnterCritical>
|
|
{
|
|
if( xTimerQueue == NULL )
|
|
8007ee2: 4b15 ldr r3, [pc, #84] @ (8007f38 <prvCheckForValidListAndQueue+0x60>)
|
|
8007ee4: 681b ldr r3, [r3, #0]
|
|
8007ee6: 2b00 cmp r3, #0
|
|
8007ee8: d120 bne.n 8007f2c <prvCheckForValidListAndQueue+0x54>
|
|
{
|
|
vListInitialise( &xActiveTimerList1 );
|
|
8007eea: 4814 ldr r0, [pc, #80] @ (8007f3c <prvCheckForValidListAndQueue+0x64>)
|
|
8007eec: f7fd fb7a bl 80055e4 <vListInitialise>
|
|
vListInitialise( &xActiveTimerList2 );
|
|
8007ef0: 4813 ldr r0, [pc, #76] @ (8007f40 <prvCheckForValidListAndQueue+0x68>)
|
|
8007ef2: f7fd fb77 bl 80055e4 <vListInitialise>
|
|
pxCurrentTimerList = &xActiveTimerList1;
|
|
8007ef6: 4b13 ldr r3, [pc, #76] @ (8007f44 <prvCheckForValidListAndQueue+0x6c>)
|
|
8007ef8: 4a10 ldr r2, [pc, #64] @ (8007f3c <prvCheckForValidListAndQueue+0x64>)
|
|
8007efa: 601a str r2, [r3, #0]
|
|
pxOverflowTimerList = &xActiveTimerList2;
|
|
8007efc: 4b12 ldr r3, [pc, #72] @ (8007f48 <prvCheckForValidListAndQueue+0x70>)
|
|
8007efe: 4a10 ldr r2, [pc, #64] @ (8007f40 <prvCheckForValidListAndQueue+0x68>)
|
|
8007f00: 601a str r2, [r3, #0]
|
|
/* The timer queue is allocated statically in case
|
|
configSUPPORT_DYNAMIC_ALLOCATION is 0. */
|
|
static StaticQueue_t xStaticTimerQueue; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */
|
|
static uint8_t ucStaticTimerQueueStorage[ ( size_t ) configTIMER_QUEUE_LENGTH * sizeof( DaemonTaskMessage_t ) ]; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */
|
|
|
|
xTimerQueue = xQueueCreateStatic( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, ( UBaseType_t ) sizeof( DaemonTaskMessage_t ), &( ucStaticTimerQueueStorage[ 0 ] ), &xStaticTimerQueue );
|
|
8007f02: 2300 movs r3, #0
|
|
8007f04: 9300 str r3, [sp, #0]
|
|
8007f06: 4b11 ldr r3, [pc, #68] @ (8007f4c <prvCheckForValidListAndQueue+0x74>)
|
|
8007f08: 4a11 ldr r2, [pc, #68] @ (8007f50 <prvCheckForValidListAndQueue+0x78>)
|
|
8007f0a: 2110 movs r1, #16
|
|
8007f0c: 200a movs r0, #10
|
|
8007f0e: f7fd fc87 bl 8005820 <xQueueGenericCreateStatic>
|
|
8007f12: 4603 mov r3, r0
|
|
8007f14: 4a08 ldr r2, [pc, #32] @ (8007f38 <prvCheckForValidListAndQueue+0x60>)
|
|
8007f16: 6013 str r3, [r2, #0]
|
|
}
|
|
#endif
|
|
|
|
#if ( configQUEUE_REGISTRY_SIZE > 0 )
|
|
{
|
|
if( xTimerQueue != NULL )
|
|
8007f18: 4b07 ldr r3, [pc, #28] @ (8007f38 <prvCheckForValidListAndQueue+0x60>)
|
|
8007f1a: 681b ldr r3, [r3, #0]
|
|
8007f1c: 2b00 cmp r3, #0
|
|
8007f1e: d005 beq.n 8007f2c <prvCheckForValidListAndQueue+0x54>
|
|
{
|
|
vQueueAddToRegistry( xTimerQueue, "TmrQ" );
|
|
8007f20: 4b05 ldr r3, [pc, #20] @ (8007f38 <prvCheckForValidListAndQueue+0x60>)
|
|
8007f22: 681b ldr r3, [r3, #0]
|
|
8007f24: 490b ldr r1, [pc, #44] @ (8007f54 <prvCheckForValidListAndQueue+0x7c>)
|
|
8007f26: 4618 mov r0, r3
|
|
8007f28: f7fe fbb4 bl 8006694 <vQueueAddToRegistry>
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
taskEXIT_CRITICAL();
|
|
8007f2c: f000 f976 bl 800821c <vPortExitCritical>
|
|
}
|
|
8007f30: bf00 nop
|
|
8007f32: 46bd mov sp, r7
|
|
8007f34: bd80 pop {r7, pc}
|
|
8007f36: bf00 nop
|
|
8007f38: 200013d4 .word 0x200013d4
|
|
8007f3c: 200013a4 .word 0x200013a4
|
|
8007f40: 200013b8 .word 0x200013b8
|
|
8007f44: 200013cc .word 0x200013cc
|
|
8007f48: 200013d0 .word 0x200013d0
|
|
8007f4c: 20001480 .word 0x20001480
|
|
8007f50: 200013e0 .word 0x200013e0
|
|
8007f54: 080088cc .word 0x080088cc
|
|
|
|
08007f58 <pxPortInitialiseStack>:
|
|
|
|
/*
|
|
* See header file for description.
|
|
*/
|
|
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
|
|
{
|
|
8007f58: b480 push {r7}
|
|
8007f5a: b085 sub sp, #20
|
|
8007f5c: af00 add r7, sp, #0
|
|
8007f5e: 60f8 str r0, [r7, #12]
|
|
8007f60: 60b9 str r1, [r7, #8]
|
|
8007f62: 607a str r2, [r7, #4]
|
|
/* Simulate the stack frame as it would be created by a context switch
|
|
interrupt. */
|
|
|
|
/* Offset added to account for the way the MCU uses the stack on entry/exit
|
|
of interrupts, and to ensure alignment. */
|
|
pxTopOfStack--;
|
|
8007f64: 68fb ldr r3, [r7, #12]
|
|
8007f66: 3b04 subs r3, #4
|
|
8007f68: 60fb str r3, [r7, #12]
|
|
|
|
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */
|
|
8007f6a: 68fb ldr r3, [r7, #12]
|
|
8007f6c: f04f 7280 mov.w r2, #16777216 @ 0x1000000
|
|
8007f70: 601a str r2, [r3, #0]
|
|
pxTopOfStack--;
|
|
8007f72: 68fb ldr r3, [r7, #12]
|
|
8007f74: 3b04 subs r3, #4
|
|
8007f76: 60fb str r3, [r7, #12]
|
|
*pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */
|
|
8007f78: 68bb ldr r3, [r7, #8]
|
|
8007f7a: f023 0201 bic.w r2, r3, #1
|
|
8007f7e: 68fb ldr r3, [r7, #12]
|
|
8007f80: 601a str r2, [r3, #0]
|
|
pxTopOfStack--;
|
|
8007f82: 68fb ldr r3, [r7, #12]
|
|
8007f84: 3b04 subs r3, #4
|
|
8007f86: 60fb str r3, [r7, #12]
|
|
*pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */
|
|
8007f88: 4a0c ldr r2, [pc, #48] @ (8007fbc <pxPortInitialiseStack+0x64>)
|
|
8007f8a: 68fb ldr r3, [r7, #12]
|
|
8007f8c: 601a str r2, [r3, #0]
|
|
|
|
/* Save code space by skipping register initialisation. */
|
|
pxTopOfStack -= 5; /* R12, R3, R2 and R1. */
|
|
8007f8e: 68fb ldr r3, [r7, #12]
|
|
8007f90: 3b14 subs r3, #20
|
|
8007f92: 60fb str r3, [r7, #12]
|
|
*pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */
|
|
8007f94: 687a ldr r2, [r7, #4]
|
|
8007f96: 68fb ldr r3, [r7, #12]
|
|
8007f98: 601a str r2, [r3, #0]
|
|
|
|
/* A save method is being used that requires each task to maintain its
|
|
own exec return value. */
|
|
pxTopOfStack--;
|
|
8007f9a: 68fb ldr r3, [r7, #12]
|
|
8007f9c: 3b04 subs r3, #4
|
|
8007f9e: 60fb str r3, [r7, #12]
|
|
*pxTopOfStack = portINITIAL_EXC_RETURN;
|
|
8007fa0: 68fb ldr r3, [r7, #12]
|
|
8007fa2: f06f 0202 mvn.w r2, #2
|
|
8007fa6: 601a str r2, [r3, #0]
|
|
|
|
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
|
8007fa8: 68fb ldr r3, [r7, #12]
|
|
8007faa: 3b20 subs r3, #32
|
|
8007fac: 60fb str r3, [r7, #12]
|
|
|
|
return pxTopOfStack;
|
|
8007fae: 68fb ldr r3, [r7, #12]
|
|
}
|
|
8007fb0: 4618 mov r0, r3
|
|
8007fb2: 3714 adds r7, #20
|
|
8007fb4: 46bd mov sp, r7
|
|
8007fb6: f85d 7b04 ldr.w r7, [sp], #4
|
|
8007fba: 4770 bx lr
|
|
8007fbc: 08007fc1 .word 0x08007fc1
|
|
|
|
08007fc0 <prvTaskExitError>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static void prvTaskExitError( void )
|
|
{
|
|
8007fc0: b480 push {r7}
|
|
8007fc2: b085 sub sp, #20
|
|
8007fc4: af00 add r7, sp, #0
|
|
volatile uint32_t ulDummy = 0;
|
|
8007fc6: 2300 movs r3, #0
|
|
8007fc8: 607b str r3, [r7, #4]
|
|
its caller as there is nothing to return to. If a task wants to exit it
|
|
should instead call vTaskDelete( NULL ).
|
|
|
|
Artificially force an assert() to be triggered if configASSERT() is
|
|
defined, then stop here so application writers can catch the error. */
|
|
configASSERT( uxCriticalNesting == ~0UL );
|
|
8007fca: 4b13 ldr r3, [pc, #76] @ (8008018 <prvTaskExitError+0x58>)
|
|
8007fcc: 681b ldr r3, [r3, #0]
|
|
8007fce: f1b3 3fff cmp.w r3, #4294967295
|
|
8007fd2: d00b beq.n 8007fec <prvTaskExitError+0x2c>
|
|
__asm volatile
|
|
8007fd4: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8007fd8: f383 8811 msr BASEPRI, r3
|
|
8007fdc: f3bf 8f6f isb sy
|
|
8007fe0: f3bf 8f4f dsb sy
|
|
8007fe4: 60fb str r3, [r7, #12]
|
|
}
|
|
8007fe6: bf00 nop
|
|
8007fe8: bf00 nop
|
|
8007fea: e7fd b.n 8007fe8 <prvTaskExitError+0x28>
|
|
__asm volatile
|
|
8007fec: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8007ff0: f383 8811 msr BASEPRI, r3
|
|
8007ff4: f3bf 8f6f isb sy
|
|
8007ff8: f3bf 8f4f dsb sy
|
|
8007ffc: 60bb str r3, [r7, #8]
|
|
}
|
|
8007ffe: bf00 nop
|
|
portDISABLE_INTERRUPTS();
|
|
while( ulDummy == 0 )
|
|
8008000: bf00 nop
|
|
8008002: 687b ldr r3, [r7, #4]
|
|
8008004: 2b00 cmp r3, #0
|
|
8008006: d0fc beq.n 8008002 <prvTaskExitError+0x42>
|
|
about code appearing after this function is called - making ulDummy
|
|
volatile makes the compiler think the function could return and
|
|
therefore not output an 'unreachable code' warning for code that appears
|
|
after it. */
|
|
}
|
|
}
|
|
8008008: bf00 nop
|
|
800800a: bf00 nop
|
|
800800c: 3714 adds r7, #20
|
|
800800e: 46bd mov sp, r7
|
|
8008010: f85d 7b04 ldr.w r7, [sp], #4
|
|
8008014: 4770 bx lr
|
|
8008016: bf00 nop
|
|
8008018: 2000000c .word 0x2000000c
|
|
800801c: 00000000 .word 0x00000000
|
|
|
|
08008020 <SVC_Handler>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
void vPortSVCHandler( void )
|
|
{
|
|
__asm volatile (
|
|
8008020: 4b07 ldr r3, [pc, #28] @ (8008040 <pxCurrentTCBConst2>)
|
|
8008022: 6819 ldr r1, [r3, #0]
|
|
8008024: 6808 ldr r0, [r1, #0]
|
|
8008026: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
|
|
800802a: f380 8809 msr PSP, r0
|
|
800802e: f3bf 8f6f isb sy
|
|
8008032: f04f 0000 mov.w r0, #0
|
|
8008036: f380 8811 msr BASEPRI, r0
|
|
800803a: 4770 bx lr
|
|
800803c: f3af 8000 nop.w
|
|
|
|
08008040 <pxCurrentTCBConst2>:
|
|
8008040: 20000ea4 .word 0x20000ea4
|
|
" bx r14 \n"
|
|
" \n"
|
|
" .align 4 \n"
|
|
"pxCurrentTCBConst2: .word pxCurrentTCB \n"
|
|
);
|
|
}
|
|
8008044: bf00 nop
|
|
8008046: bf00 nop
|
|
|
|
08008048 <prvPortStartFirstTask>:
|
|
{
|
|
/* Start the first task. This also clears the bit that indicates the FPU is
|
|
in use in case the FPU was used before the scheduler was started - which
|
|
would otherwise result in the unnecessary leaving of space in the SVC stack
|
|
for lazy saving of FPU registers. */
|
|
__asm volatile(
|
|
8008048: 4808 ldr r0, [pc, #32] @ (800806c <prvPortStartFirstTask+0x24>)
|
|
800804a: 6800 ldr r0, [r0, #0]
|
|
800804c: 6800 ldr r0, [r0, #0]
|
|
800804e: f380 8808 msr MSP, r0
|
|
8008052: f04f 0000 mov.w r0, #0
|
|
8008056: f380 8814 msr CONTROL, r0
|
|
800805a: b662 cpsie i
|
|
800805c: b661 cpsie f
|
|
800805e: f3bf 8f4f dsb sy
|
|
8008062: f3bf 8f6f isb sy
|
|
8008066: df00 svc 0
|
|
8008068: bf00 nop
|
|
" dsb \n"
|
|
" isb \n"
|
|
" svc 0 \n" /* System call to start first task. */
|
|
" nop \n"
|
|
);
|
|
}
|
|
800806a: bf00 nop
|
|
800806c: e000ed08 .word 0xe000ed08
|
|
|
|
08008070 <xPortStartScheduler>:
|
|
|
|
/*
|
|
* See header file for description.
|
|
*/
|
|
BaseType_t xPortStartScheduler( void )
|
|
{
|
|
8008070: b580 push {r7, lr}
|
|
8008072: b086 sub sp, #24
|
|
8008074: af00 add r7, sp, #0
|
|
configASSERT( configMAX_SYSCALL_INTERRUPT_PRIORITY );
|
|
|
|
/* This port can be used on all revisions of the Cortex-M7 core other than
|
|
the r0p1 parts. r0p1 parts should use the port from the
|
|
/source/portable/GCC/ARM_CM7/r0p1 directory. */
|
|
configASSERT( portCPUID != portCORTEX_M7_r0p1_ID );
|
|
8008076: 4b47 ldr r3, [pc, #284] @ (8008194 <xPortStartScheduler+0x124>)
|
|
8008078: 681b ldr r3, [r3, #0]
|
|
800807a: 4a47 ldr r2, [pc, #284] @ (8008198 <xPortStartScheduler+0x128>)
|
|
800807c: 4293 cmp r3, r2
|
|
800807e: d10b bne.n 8008098 <xPortStartScheduler+0x28>
|
|
__asm volatile
|
|
8008080: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8008084: f383 8811 msr BASEPRI, r3
|
|
8008088: f3bf 8f6f isb sy
|
|
800808c: f3bf 8f4f dsb sy
|
|
8008090: 60fb str r3, [r7, #12]
|
|
}
|
|
8008092: bf00 nop
|
|
8008094: bf00 nop
|
|
8008096: e7fd b.n 8008094 <xPortStartScheduler+0x24>
|
|
configASSERT( portCPUID != portCORTEX_M7_r0p0_ID );
|
|
8008098: 4b3e ldr r3, [pc, #248] @ (8008194 <xPortStartScheduler+0x124>)
|
|
800809a: 681b ldr r3, [r3, #0]
|
|
800809c: 4a3f ldr r2, [pc, #252] @ (800819c <xPortStartScheduler+0x12c>)
|
|
800809e: 4293 cmp r3, r2
|
|
80080a0: d10b bne.n 80080ba <xPortStartScheduler+0x4a>
|
|
__asm volatile
|
|
80080a2: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80080a6: f383 8811 msr BASEPRI, r3
|
|
80080aa: f3bf 8f6f isb sy
|
|
80080ae: f3bf 8f4f dsb sy
|
|
80080b2: 613b str r3, [r7, #16]
|
|
}
|
|
80080b4: bf00 nop
|
|
80080b6: bf00 nop
|
|
80080b8: e7fd b.n 80080b6 <xPortStartScheduler+0x46>
|
|
|
|
#if( configASSERT_DEFINED == 1 )
|
|
{
|
|
volatile uint32_t ulOriginalPriority;
|
|
volatile uint8_t * const pucFirstUserPriorityRegister = ( volatile uint8_t * const ) ( portNVIC_IP_REGISTERS_OFFSET_16 + portFIRST_USER_INTERRUPT_NUMBER );
|
|
80080ba: 4b39 ldr r3, [pc, #228] @ (80081a0 <xPortStartScheduler+0x130>)
|
|
80080bc: 617b str r3, [r7, #20]
|
|
functions can be called. ISR safe functions are those that end in
|
|
"FromISR". FreeRTOS maintains separate thread and ISR API functions to
|
|
ensure interrupt entry is as fast and simple as possible.
|
|
|
|
Save the interrupt priority value that is about to be clobbered. */
|
|
ulOriginalPriority = *pucFirstUserPriorityRegister;
|
|
80080be: 697b ldr r3, [r7, #20]
|
|
80080c0: 781b ldrb r3, [r3, #0]
|
|
80080c2: b2db uxtb r3, r3
|
|
80080c4: 607b str r3, [r7, #4]
|
|
|
|
/* Determine the number of priority bits available. First write to all
|
|
possible bits. */
|
|
*pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE;
|
|
80080c6: 697b ldr r3, [r7, #20]
|
|
80080c8: 22ff movs r2, #255 @ 0xff
|
|
80080ca: 701a strb r2, [r3, #0]
|
|
|
|
/* Read the value back to see how many bits stuck. */
|
|
ucMaxPriorityValue = *pucFirstUserPriorityRegister;
|
|
80080cc: 697b ldr r3, [r7, #20]
|
|
80080ce: 781b ldrb r3, [r3, #0]
|
|
80080d0: b2db uxtb r3, r3
|
|
80080d2: 70fb strb r3, [r7, #3]
|
|
|
|
/* Use the same mask on the maximum system call priority. */
|
|
ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue;
|
|
80080d4: 78fb ldrb r3, [r7, #3]
|
|
80080d6: b2db uxtb r3, r3
|
|
80080d8: f003 0350 and.w r3, r3, #80 @ 0x50
|
|
80080dc: b2da uxtb r2, r3
|
|
80080de: 4b31 ldr r3, [pc, #196] @ (80081a4 <xPortStartScheduler+0x134>)
|
|
80080e0: 701a strb r2, [r3, #0]
|
|
|
|
/* Calculate the maximum acceptable priority group value for the number
|
|
of bits read back. */
|
|
ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS;
|
|
80080e2: 4b31 ldr r3, [pc, #196] @ (80081a8 <xPortStartScheduler+0x138>)
|
|
80080e4: 2207 movs r2, #7
|
|
80080e6: 601a str r2, [r3, #0]
|
|
while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE )
|
|
80080e8: e009 b.n 80080fe <xPortStartScheduler+0x8e>
|
|
{
|
|
ulMaxPRIGROUPValue--;
|
|
80080ea: 4b2f ldr r3, [pc, #188] @ (80081a8 <xPortStartScheduler+0x138>)
|
|
80080ec: 681b ldr r3, [r3, #0]
|
|
80080ee: 3b01 subs r3, #1
|
|
80080f0: 4a2d ldr r2, [pc, #180] @ (80081a8 <xPortStartScheduler+0x138>)
|
|
80080f2: 6013 str r3, [r2, #0]
|
|
ucMaxPriorityValue <<= ( uint8_t ) 0x01;
|
|
80080f4: 78fb ldrb r3, [r7, #3]
|
|
80080f6: b2db uxtb r3, r3
|
|
80080f8: 005b lsls r3, r3, #1
|
|
80080fa: b2db uxtb r3, r3
|
|
80080fc: 70fb strb r3, [r7, #3]
|
|
while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE )
|
|
80080fe: 78fb ldrb r3, [r7, #3]
|
|
8008100: b2db uxtb r3, r3
|
|
8008102: f003 0380 and.w r3, r3, #128 @ 0x80
|
|
8008106: 2b80 cmp r3, #128 @ 0x80
|
|
8008108: d0ef beq.n 80080ea <xPortStartScheduler+0x7a>
|
|
#ifdef configPRIO_BITS
|
|
{
|
|
/* Check the FreeRTOS configuration that defines the number of
|
|
priority bits matches the number of priority bits actually queried
|
|
from the hardware. */
|
|
configASSERT( ( portMAX_PRIGROUP_BITS - ulMaxPRIGROUPValue ) == configPRIO_BITS );
|
|
800810a: 4b27 ldr r3, [pc, #156] @ (80081a8 <xPortStartScheduler+0x138>)
|
|
800810c: 681b ldr r3, [r3, #0]
|
|
800810e: f1c3 0307 rsb r3, r3, #7
|
|
8008112: 2b04 cmp r3, #4
|
|
8008114: d00b beq.n 800812e <xPortStartScheduler+0xbe>
|
|
__asm volatile
|
|
8008116: f04f 0350 mov.w r3, #80 @ 0x50
|
|
800811a: f383 8811 msr BASEPRI, r3
|
|
800811e: f3bf 8f6f isb sy
|
|
8008122: f3bf 8f4f dsb sy
|
|
8008126: 60bb str r3, [r7, #8]
|
|
}
|
|
8008128: bf00 nop
|
|
800812a: bf00 nop
|
|
800812c: e7fd b.n 800812a <xPortStartScheduler+0xba>
|
|
}
|
|
#endif
|
|
|
|
/* Shift the priority group value back to its position within the AIRCR
|
|
register. */
|
|
ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT;
|
|
800812e: 4b1e ldr r3, [pc, #120] @ (80081a8 <xPortStartScheduler+0x138>)
|
|
8008130: 681b ldr r3, [r3, #0]
|
|
8008132: 021b lsls r3, r3, #8
|
|
8008134: 4a1c ldr r2, [pc, #112] @ (80081a8 <xPortStartScheduler+0x138>)
|
|
8008136: 6013 str r3, [r2, #0]
|
|
ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK;
|
|
8008138: 4b1b ldr r3, [pc, #108] @ (80081a8 <xPortStartScheduler+0x138>)
|
|
800813a: 681b ldr r3, [r3, #0]
|
|
800813c: f403 63e0 and.w r3, r3, #1792 @ 0x700
|
|
8008140: 4a19 ldr r2, [pc, #100] @ (80081a8 <xPortStartScheduler+0x138>)
|
|
8008142: 6013 str r3, [r2, #0]
|
|
|
|
/* Restore the clobbered interrupt priority register to its original
|
|
value. */
|
|
*pucFirstUserPriorityRegister = ulOriginalPriority;
|
|
8008144: 687b ldr r3, [r7, #4]
|
|
8008146: b2da uxtb r2, r3
|
|
8008148: 697b ldr r3, [r7, #20]
|
|
800814a: 701a strb r2, [r3, #0]
|
|
}
|
|
#endif /* conifgASSERT_DEFINED */
|
|
|
|
/* Make PendSV and SysTick the lowest priority interrupts. */
|
|
portNVIC_SYSPRI2_REG |= portNVIC_PENDSV_PRI;
|
|
800814c: 4b17 ldr r3, [pc, #92] @ (80081ac <xPortStartScheduler+0x13c>)
|
|
800814e: 681b ldr r3, [r3, #0]
|
|
8008150: 4a16 ldr r2, [pc, #88] @ (80081ac <xPortStartScheduler+0x13c>)
|
|
8008152: f443 0370 orr.w r3, r3, #15728640 @ 0xf00000
|
|
8008156: 6013 str r3, [r2, #0]
|
|
portNVIC_SYSPRI2_REG |= portNVIC_SYSTICK_PRI;
|
|
8008158: 4b14 ldr r3, [pc, #80] @ (80081ac <xPortStartScheduler+0x13c>)
|
|
800815a: 681b ldr r3, [r3, #0]
|
|
800815c: 4a13 ldr r2, [pc, #76] @ (80081ac <xPortStartScheduler+0x13c>)
|
|
800815e: f043 4370 orr.w r3, r3, #4026531840 @ 0xf0000000
|
|
8008162: 6013 str r3, [r2, #0]
|
|
|
|
/* Start the timer that generates the tick ISR. Interrupts are disabled
|
|
here already. */
|
|
vPortSetupTimerInterrupt();
|
|
8008164: f000 f8da bl 800831c <vPortSetupTimerInterrupt>
|
|
|
|
/* Initialise the critical nesting count ready for the first task. */
|
|
uxCriticalNesting = 0;
|
|
8008168: 4b11 ldr r3, [pc, #68] @ (80081b0 <xPortStartScheduler+0x140>)
|
|
800816a: 2200 movs r2, #0
|
|
800816c: 601a str r2, [r3, #0]
|
|
|
|
/* Ensure the VFP is enabled - it should be anyway. */
|
|
vPortEnableVFP();
|
|
800816e: f000 f8f9 bl 8008364 <vPortEnableVFP>
|
|
|
|
/* Lazy save always. */
|
|
*( portFPCCR ) |= portASPEN_AND_LSPEN_BITS;
|
|
8008172: 4b10 ldr r3, [pc, #64] @ (80081b4 <xPortStartScheduler+0x144>)
|
|
8008174: 681b ldr r3, [r3, #0]
|
|
8008176: 4a0f ldr r2, [pc, #60] @ (80081b4 <xPortStartScheduler+0x144>)
|
|
8008178: f043 4340 orr.w r3, r3, #3221225472 @ 0xc0000000
|
|
800817c: 6013 str r3, [r2, #0]
|
|
|
|
/* Start the first task. */
|
|
prvPortStartFirstTask();
|
|
800817e: f7ff ff63 bl 8008048 <prvPortStartFirstTask>
|
|
exit error function to prevent compiler warnings about a static function
|
|
not being called in the case that the application writer overrides this
|
|
functionality by defining configTASK_RETURN_ADDRESS. Call
|
|
vTaskSwitchContext() so link time optimisation does not remove the
|
|
symbol. */
|
|
vTaskSwitchContext();
|
|
8008182: f7fe ff3d bl 8007000 <vTaskSwitchContext>
|
|
prvTaskExitError();
|
|
8008186: f7ff ff1b bl 8007fc0 <prvTaskExitError>
|
|
|
|
/* Should not get here! */
|
|
return 0;
|
|
800818a: 2300 movs r3, #0
|
|
}
|
|
800818c: 4618 mov r0, r3
|
|
800818e: 3718 adds r7, #24
|
|
8008190: 46bd mov sp, r7
|
|
8008192: bd80 pop {r7, pc}
|
|
8008194: e000ed00 .word 0xe000ed00
|
|
8008198: 410fc271 .word 0x410fc271
|
|
800819c: 410fc270 .word 0x410fc270
|
|
80081a0: e000e400 .word 0xe000e400
|
|
80081a4: 200014d0 .word 0x200014d0
|
|
80081a8: 200014d4 .word 0x200014d4
|
|
80081ac: e000ed20 .word 0xe000ed20
|
|
80081b0: 2000000c .word 0x2000000c
|
|
80081b4: e000ef34 .word 0xe000ef34
|
|
|
|
080081b8 <vPortEnterCritical>:
|
|
configASSERT( uxCriticalNesting == 1000UL );
|
|
}
|
|
/*-----------------------------------------------------------*/
|
|
|
|
void vPortEnterCritical( void )
|
|
{
|
|
80081b8: b480 push {r7}
|
|
80081ba: b083 sub sp, #12
|
|
80081bc: af00 add r7, sp, #0
|
|
__asm volatile
|
|
80081be: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80081c2: f383 8811 msr BASEPRI, r3
|
|
80081c6: f3bf 8f6f isb sy
|
|
80081ca: f3bf 8f4f dsb sy
|
|
80081ce: 607b str r3, [r7, #4]
|
|
}
|
|
80081d0: bf00 nop
|
|
portDISABLE_INTERRUPTS();
|
|
uxCriticalNesting++;
|
|
80081d2: 4b10 ldr r3, [pc, #64] @ (8008214 <vPortEnterCritical+0x5c>)
|
|
80081d4: 681b ldr r3, [r3, #0]
|
|
80081d6: 3301 adds r3, #1
|
|
80081d8: 4a0e ldr r2, [pc, #56] @ (8008214 <vPortEnterCritical+0x5c>)
|
|
80081da: 6013 str r3, [r2, #0]
|
|
/* This is not the interrupt safe version of the enter critical function so
|
|
assert() if it is being called from an interrupt context. Only API
|
|
functions that end in "FromISR" can be used in an interrupt. Only assert if
|
|
the critical nesting count is 1 to protect against recursive calls if the
|
|
assert function also uses a critical section. */
|
|
if( uxCriticalNesting == 1 )
|
|
80081dc: 4b0d ldr r3, [pc, #52] @ (8008214 <vPortEnterCritical+0x5c>)
|
|
80081de: 681b ldr r3, [r3, #0]
|
|
80081e0: 2b01 cmp r3, #1
|
|
80081e2: d110 bne.n 8008206 <vPortEnterCritical+0x4e>
|
|
{
|
|
configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 );
|
|
80081e4: 4b0c ldr r3, [pc, #48] @ (8008218 <vPortEnterCritical+0x60>)
|
|
80081e6: 681b ldr r3, [r3, #0]
|
|
80081e8: b2db uxtb r3, r3
|
|
80081ea: 2b00 cmp r3, #0
|
|
80081ec: d00b beq.n 8008206 <vPortEnterCritical+0x4e>
|
|
__asm volatile
|
|
80081ee: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80081f2: f383 8811 msr BASEPRI, r3
|
|
80081f6: f3bf 8f6f isb sy
|
|
80081fa: f3bf 8f4f dsb sy
|
|
80081fe: 603b str r3, [r7, #0]
|
|
}
|
|
8008200: bf00 nop
|
|
8008202: bf00 nop
|
|
8008204: e7fd b.n 8008202 <vPortEnterCritical+0x4a>
|
|
}
|
|
}
|
|
8008206: bf00 nop
|
|
8008208: 370c adds r7, #12
|
|
800820a: 46bd mov sp, r7
|
|
800820c: f85d 7b04 ldr.w r7, [sp], #4
|
|
8008210: 4770 bx lr
|
|
8008212: bf00 nop
|
|
8008214: 2000000c .word 0x2000000c
|
|
8008218: e000ed04 .word 0xe000ed04
|
|
|
|
0800821c <vPortExitCritical>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
void vPortExitCritical( void )
|
|
{
|
|
800821c: b480 push {r7}
|
|
800821e: b083 sub sp, #12
|
|
8008220: af00 add r7, sp, #0
|
|
configASSERT( uxCriticalNesting );
|
|
8008222: 4b12 ldr r3, [pc, #72] @ (800826c <vPortExitCritical+0x50>)
|
|
8008224: 681b ldr r3, [r3, #0]
|
|
8008226: 2b00 cmp r3, #0
|
|
8008228: d10b bne.n 8008242 <vPortExitCritical+0x26>
|
|
__asm volatile
|
|
800822a: f04f 0350 mov.w r3, #80 @ 0x50
|
|
800822e: f383 8811 msr BASEPRI, r3
|
|
8008232: f3bf 8f6f isb sy
|
|
8008236: f3bf 8f4f dsb sy
|
|
800823a: 607b str r3, [r7, #4]
|
|
}
|
|
800823c: bf00 nop
|
|
800823e: bf00 nop
|
|
8008240: e7fd b.n 800823e <vPortExitCritical+0x22>
|
|
uxCriticalNesting--;
|
|
8008242: 4b0a ldr r3, [pc, #40] @ (800826c <vPortExitCritical+0x50>)
|
|
8008244: 681b ldr r3, [r3, #0]
|
|
8008246: 3b01 subs r3, #1
|
|
8008248: 4a08 ldr r2, [pc, #32] @ (800826c <vPortExitCritical+0x50>)
|
|
800824a: 6013 str r3, [r2, #0]
|
|
if( uxCriticalNesting == 0 )
|
|
800824c: 4b07 ldr r3, [pc, #28] @ (800826c <vPortExitCritical+0x50>)
|
|
800824e: 681b ldr r3, [r3, #0]
|
|
8008250: 2b00 cmp r3, #0
|
|
8008252: d105 bne.n 8008260 <vPortExitCritical+0x44>
|
|
8008254: 2300 movs r3, #0
|
|
8008256: 603b str r3, [r7, #0]
|
|
__asm volatile
|
|
8008258: 683b ldr r3, [r7, #0]
|
|
800825a: f383 8811 msr BASEPRI, r3
|
|
}
|
|
800825e: bf00 nop
|
|
{
|
|
portENABLE_INTERRUPTS();
|
|
}
|
|
}
|
|
8008260: bf00 nop
|
|
8008262: 370c adds r7, #12
|
|
8008264: 46bd mov sp, r7
|
|
8008266: f85d 7b04 ldr.w r7, [sp], #4
|
|
800826a: 4770 bx lr
|
|
800826c: 2000000c .word 0x2000000c
|
|
|
|
08008270 <PendSV_Handler>:
|
|
|
|
void xPortPendSVHandler( void )
|
|
{
|
|
/* This is a naked function. */
|
|
|
|
__asm volatile
|
|
8008270: f3ef 8009 mrs r0, PSP
|
|
8008274: f3bf 8f6f isb sy
|
|
8008278: 4b15 ldr r3, [pc, #84] @ (80082d0 <pxCurrentTCBConst>)
|
|
800827a: 681a ldr r2, [r3, #0]
|
|
800827c: f01e 0f10 tst.w lr, #16
|
|
8008280: bf08 it eq
|
|
8008282: ed20 8a10 vstmdbeq r0!, {s16-s31}
|
|
8008286: e920 4ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
|
|
800828a: 6010 str r0, [r2, #0]
|
|
800828c: e92d 0009 stmdb sp!, {r0, r3}
|
|
8008290: f04f 0050 mov.w r0, #80 @ 0x50
|
|
8008294: f380 8811 msr BASEPRI, r0
|
|
8008298: f3bf 8f4f dsb sy
|
|
800829c: f3bf 8f6f isb sy
|
|
80082a0: f7fe feae bl 8007000 <vTaskSwitchContext>
|
|
80082a4: f04f 0000 mov.w r0, #0
|
|
80082a8: f380 8811 msr BASEPRI, r0
|
|
80082ac: bc09 pop {r0, r3}
|
|
80082ae: 6819 ldr r1, [r3, #0]
|
|
80082b0: 6808 ldr r0, [r1, #0]
|
|
80082b2: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
|
|
80082b6: f01e 0f10 tst.w lr, #16
|
|
80082ba: bf08 it eq
|
|
80082bc: ecb0 8a10 vldmiaeq r0!, {s16-s31}
|
|
80082c0: f380 8809 msr PSP, r0
|
|
80082c4: f3bf 8f6f isb sy
|
|
80082c8: 4770 bx lr
|
|
80082ca: bf00 nop
|
|
80082cc: f3af 8000 nop.w
|
|
|
|
080082d0 <pxCurrentTCBConst>:
|
|
80082d0: 20000ea4 .word 0x20000ea4
|
|
" \n"
|
|
" .align 4 \n"
|
|
"pxCurrentTCBConst: .word pxCurrentTCB \n"
|
|
::"i"(configMAX_SYSCALL_INTERRUPT_PRIORITY)
|
|
);
|
|
}
|
|
80082d4: bf00 nop
|
|
80082d6: bf00 nop
|
|
|
|
080082d8 <xPortSysTickHandler>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
void xPortSysTickHandler( void )
|
|
{
|
|
80082d8: b580 push {r7, lr}
|
|
80082da: b082 sub sp, #8
|
|
80082dc: af00 add r7, sp, #0
|
|
__asm volatile
|
|
80082de: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80082e2: f383 8811 msr BASEPRI, r3
|
|
80082e6: f3bf 8f6f isb sy
|
|
80082ea: f3bf 8f4f dsb sy
|
|
80082ee: 607b str r3, [r7, #4]
|
|
}
|
|
80082f0: bf00 nop
|
|
save and then restore the interrupt mask value as its value is already
|
|
known. */
|
|
portDISABLE_INTERRUPTS();
|
|
{
|
|
/* Increment the RTOS tick. */
|
|
if( xTaskIncrementTick() != pdFALSE )
|
|
80082f2: f7fe fdcb bl 8006e8c <xTaskIncrementTick>
|
|
80082f6: 4603 mov r3, r0
|
|
80082f8: 2b00 cmp r3, #0
|
|
80082fa: d003 beq.n 8008304 <xPortSysTickHandler+0x2c>
|
|
{
|
|
/* A context switch is required. Context switching is performed in
|
|
the PendSV interrupt. Pend the PendSV interrupt. */
|
|
portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
|
|
80082fc: 4b06 ldr r3, [pc, #24] @ (8008318 <xPortSysTickHandler+0x40>)
|
|
80082fe: f04f 5280 mov.w r2, #268435456 @ 0x10000000
|
|
8008302: 601a str r2, [r3, #0]
|
|
8008304: 2300 movs r3, #0
|
|
8008306: 603b str r3, [r7, #0]
|
|
__asm volatile
|
|
8008308: 683b ldr r3, [r7, #0]
|
|
800830a: f383 8811 msr BASEPRI, r3
|
|
}
|
|
800830e: bf00 nop
|
|
}
|
|
}
|
|
portENABLE_INTERRUPTS();
|
|
}
|
|
8008310: bf00 nop
|
|
8008312: 3708 adds r7, #8
|
|
8008314: 46bd mov sp, r7
|
|
8008316: bd80 pop {r7, pc}
|
|
8008318: e000ed04 .word 0xe000ed04
|
|
|
|
0800831c <vPortSetupTimerInterrupt>:
|
|
/*
|
|
* Setup the systick timer to generate the tick interrupts at the required
|
|
* frequency.
|
|
*/
|
|
__attribute__(( weak )) void vPortSetupTimerInterrupt( void )
|
|
{
|
|
800831c: b480 push {r7}
|
|
800831e: af00 add r7, sp, #0
|
|
ulStoppedTimerCompensation = portMISSED_COUNTS_FACTOR / ( configCPU_CLOCK_HZ / configSYSTICK_CLOCK_HZ );
|
|
}
|
|
#endif /* configUSE_TICKLESS_IDLE */
|
|
|
|
/* Stop and clear the SysTick. */
|
|
portNVIC_SYSTICK_CTRL_REG = 0UL;
|
|
8008320: 4b0b ldr r3, [pc, #44] @ (8008350 <vPortSetupTimerInterrupt+0x34>)
|
|
8008322: 2200 movs r2, #0
|
|
8008324: 601a str r2, [r3, #0]
|
|
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;
|
|
8008326: 4b0b ldr r3, [pc, #44] @ (8008354 <vPortSetupTimerInterrupt+0x38>)
|
|
8008328: 2200 movs r2, #0
|
|
800832a: 601a str r2, [r3, #0]
|
|
|
|
/* Configure SysTick to interrupt at the requested rate. */
|
|
portNVIC_SYSTICK_LOAD_REG = ( configSYSTICK_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL;
|
|
800832c: 4b0a ldr r3, [pc, #40] @ (8008358 <vPortSetupTimerInterrupt+0x3c>)
|
|
800832e: 681b ldr r3, [r3, #0]
|
|
8008330: 4a0a ldr r2, [pc, #40] @ (800835c <vPortSetupTimerInterrupt+0x40>)
|
|
8008332: fba2 2303 umull r2, r3, r2, r3
|
|
8008336: 099b lsrs r3, r3, #6
|
|
8008338: 4a09 ldr r2, [pc, #36] @ (8008360 <vPortSetupTimerInterrupt+0x44>)
|
|
800833a: 3b01 subs r3, #1
|
|
800833c: 6013 str r3, [r2, #0]
|
|
portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT );
|
|
800833e: 4b04 ldr r3, [pc, #16] @ (8008350 <vPortSetupTimerInterrupt+0x34>)
|
|
8008340: 2207 movs r2, #7
|
|
8008342: 601a str r2, [r3, #0]
|
|
}
|
|
8008344: bf00 nop
|
|
8008346: 46bd mov sp, r7
|
|
8008348: f85d 7b04 ldr.w r7, [sp], #4
|
|
800834c: 4770 bx lr
|
|
800834e: bf00 nop
|
|
8008350: e000e010 .word 0xe000e010
|
|
8008354: e000e018 .word 0xe000e018
|
|
8008358: 20000000 .word 0x20000000
|
|
800835c: 10624dd3 .word 0x10624dd3
|
|
8008360: e000e014 .word 0xe000e014
|
|
|
|
08008364 <vPortEnableVFP>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
/* This is a naked function. */
|
|
static void vPortEnableVFP( void )
|
|
{
|
|
__asm volatile
|
|
8008364: f8df 000c ldr.w r0, [pc, #12] @ 8008374 <vPortEnableVFP+0x10>
|
|
8008368: 6801 ldr r1, [r0, #0]
|
|
800836a: f441 0170 orr.w r1, r1, #15728640 @ 0xf00000
|
|
800836e: 6001 str r1, [r0, #0]
|
|
8008370: 4770 bx lr
|
|
" \n"
|
|
" orr r1, r1, #( 0xf << 20 ) \n" /* Enable CP10 and CP11 coprocessors, then save back. */
|
|
" str r1, [r0] \n"
|
|
" bx r14 "
|
|
);
|
|
}
|
|
8008372: bf00 nop
|
|
8008374: e000ed88 .word 0xe000ed88
|
|
|
|
08008378 <vPortValidateInterruptPriority>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
#if( configASSERT_DEFINED == 1 )
|
|
|
|
void vPortValidateInterruptPriority( void )
|
|
{
|
|
8008378: b480 push {r7}
|
|
800837a: b085 sub sp, #20
|
|
800837c: af00 add r7, sp, #0
|
|
uint32_t ulCurrentInterrupt;
|
|
uint8_t ucCurrentPriority;
|
|
|
|
/* Obtain the number of the currently executing interrupt. */
|
|
__asm volatile( "mrs %0, ipsr" : "=r"( ulCurrentInterrupt ) :: "memory" );
|
|
800837e: f3ef 8305 mrs r3, IPSR
|
|
8008382: 60fb str r3, [r7, #12]
|
|
|
|
/* Is the interrupt number a user defined interrupt? */
|
|
if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER )
|
|
8008384: 68fb ldr r3, [r7, #12]
|
|
8008386: 2b0f cmp r3, #15
|
|
8008388: d915 bls.n 80083b6 <vPortValidateInterruptPriority+0x3e>
|
|
{
|
|
/* Look up the interrupt's priority. */
|
|
ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ];
|
|
800838a: 4a18 ldr r2, [pc, #96] @ (80083ec <vPortValidateInterruptPriority+0x74>)
|
|
800838c: 68fb ldr r3, [r7, #12]
|
|
800838e: 4413 add r3, r2
|
|
8008390: 781b ldrb r3, [r3, #0]
|
|
8008392: 72fb strb r3, [r7, #11]
|
|
interrupt entry is as fast and simple as possible.
|
|
|
|
The following links provide detailed information:
|
|
http://www.freertos.org/RTOS-Cortex-M3-M4.html
|
|
http://www.freertos.org/FAQHelp.html */
|
|
configASSERT( ucCurrentPriority >= ucMaxSysCallPriority );
|
|
8008394: 4b16 ldr r3, [pc, #88] @ (80083f0 <vPortValidateInterruptPriority+0x78>)
|
|
8008396: 781b ldrb r3, [r3, #0]
|
|
8008398: 7afa ldrb r2, [r7, #11]
|
|
800839a: 429a cmp r2, r3
|
|
800839c: d20b bcs.n 80083b6 <vPortValidateInterruptPriority+0x3e>
|
|
__asm volatile
|
|
800839e: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80083a2: f383 8811 msr BASEPRI, r3
|
|
80083a6: f3bf 8f6f isb sy
|
|
80083aa: f3bf 8f4f dsb sy
|
|
80083ae: 607b str r3, [r7, #4]
|
|
}
|
|
80083b0: bf00 nop
|
|
80083b2: bf00 nop
|
|
80083b4: e7fd b.n 80083b2 <vPortValidateInterruptPriority+0x3a>
|
|
configuration then the correct setting can be achieved on all Cortex-M
|
|
devices by calling NVIC_SetPriorityGrouping( 0 ); before starting the
|
|
scheduler. Note however that some vendor specific peripheral libraries
|
|
assume a non-zero priority group setting, in which cases using a value
|
|
of zero will result in unpredictable behaviour. */
|
|
configASSERT( ( portAIRCR_REG & portPRIORITY_GROUP_MASK ) <= ulMaxPRIGROUPValue );
|
|
80083b6: 4b0f ldr r3, [pc, #60] @ (80083f4 <vPortValidateInterruptPriority+0x7c>)
|
|
80083b8: 681b ldr r3, [r3, #0]
|
|
80083ba: f403 62e0 and.w r2, r3, #1792 @ 0x700
|
|
80083be: 4b0e ldr r3, [pc, #56] @ (80083f8 <vPortValidateInterruptPriority+0x80>)
|
|
80083c0: 681b ldr r3, [r3, #0]
|
|
80083c2: 429a cmp r2, r3
|
|
80083c4: d90b bls.n 80083de <vPortValidateInterruptPriority+0x66>
|
|
__asm volatile
|
|
80083c6: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80083ca: f383 8811 msr BASEPRI, r3
|
|
80083ce: f3bf 8f6f isb sy
|
|
80083d2: f3bf 8f4f dsb sy
|
|
80083d6: 603b str r3, [r7, #0]
|
|
}
|
|
80083d8: bf00 nop
|
|
80083da: bf00 nop
|
|
80083dc: e7fd b.n 80083da <vPortValidateInterruptPriority+0x62>
|
|
}
|
|
80083de: bf00 nop
|
|
80083e0: 3714 adds r7, #20
|
|
80083e2: 46bd mov sp, r7
|
|
80083e4: f85d 7b04 ldr.w r7, [sp], #4
|
|
80083e8: 4770 bx lr
|
|
80083ea: bf00 nop
|
|
80083ec: e000e3f0 .word 0xe000e3f0
|
|
80083f0: 200014d0 .word 0x200014d0
|
|
80083f4: e000ed0c .word 0xe000ed0c
|
|
80083f8: 200014d4 .word 0x200014d4
|
|
|
|
080083fc <pvPortMalloc>:
|
|
static size_t xBlockAllocatedBit = 0;
|
|
|
|
/*-----------------------------------------------------------*/
|
|
|
|
void *pvPortMalloc( size_t xWantedSize )
|
|
{
|
|
80083fc: b580 push {r7, lr}
|
|
80083fe: b08a sub sp, #40 @ 0x28
|
|
8008400: af00 add r7, sp, #0
|
|
8008402: 6078 str r0, [r7, #4]
|
|
BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink;
|
|
void *pvReturn = NULL;
|
|
8008404: 2300 movs r3, #0
|
|
8008406: 61fb str r3, [r7, #28]
|
|
|
|
vTaskSuspendAll();
|
|
8008408: f7fe fc84 bl 8006d14 <vTaskSuspendAll>
|
|
{
|
|
/* If this is the first call to malloc then the heap will require
|
|
initialisation to setup the list of free blocks. */
|
|
if( pxEnd == NULL )
|
|
800840c: 4b5c ldr r3, [pc, #368] @ (8008580 <pvPortMalloc+0x184>)
|
|
800840e: 681b ldr r3, [r3, #0]
|
|
8008410: 2b00 cmp r3, #0
|
|
8008412: d101 bne.n 8008418 <pvPortMalloc+0x1c>
|
|
{
|
|
prvHeapInit();
|
|
8008414: f000 f924 bl 8008660 <prvHeapInit>
|
|
|
|
/* Check the requested block size is not so large that the top bit is
|
|
set. The top bit of the block size member of the BlockLink_t structure
|
|
is used to determine who owns the block - the application or the
|
|
kernel, so it must be free. */
|
|
if( ( xWantedSize & xBlockAllocatedBit ) == 0 )
|
|
8008418: 4b5a ldr r3, [pc, #360] @ (8008584 <pvPortMalloc+0x188>)
|
|
800841a: 681a ldr r2, [r3, #0]
|
|
800841c: 687b ldr r3, [r7, #4]
|
|
800841e: 4013 ands r3, r2
|
|
8008420: 2b00 cmp r3, #0
|
|
8008422: f040 8095 bne.w 8008550 <pvPortMalloc+0x154>
|
|
{
|
|
/* The wanted size is increased so it can contain a BlockLink_t
|
|
structure in addition to the requested amount of bytes. */
|
|
if( xWantedSize > 0 )
|
|
8008426: 687b ldr r3, [r7, #4]
|
|
8008428: 2b00 cmp r3, #0
|
|
800842a: d01e beq.n 800846a <pvPortMalloc+0x6e>
|
|
{
|
|
xWantedSize += xHeapStructSize;
|
|
800842c: 2208 movs r2, #8
|
|
800842e: 687b ldr r3, [r7, #4]
|
|
8008430: 4413 add r3, r2
|
|
8008432: 607b str r3, [r7, #4]
|
|
|
|
/* Ensure that blocks are always aligned to the required number
|
|
of bytes. */
|
|
if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 )
|
|
8008434: 687b ldr r3, [r7, #4]
|
|
8008436: f003 0307 and.w r3, r3, #7
|
|
800843a: 2b00 cmp r3, #0
|
|
800843c: d015 beq.n 800846a <pvPortMalloc+0x6e>
|
|
{
|
|
/* Byte alignment required. */
|
|
xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );
|
|
800843e: 687b ldr r3, [r7, #4]
|
|
8008440: f023 0307 bic.w r3, r3, #7
|
|
8008444: 3308 adds r3, #8
|
|
8008446: 607b str r3, [r7, #4]
|
|
configASSERT( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) == 0 );
|
|
8008448: 687b ldr r3, [r7, #4]
|
|
800844a: f003 0307 and.w r3, r3, #7
|
|
800844e: 2b00 cmp r3, #0
|
|
8008450: d00b beq.n 800846a <pvPortMalloc+0x6e>
|
|
__asm volatile
|
|
8008452: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8008456: f383 8811 msr BASEPRI, r3
|
|
800845a: f3bf 8f6f isb sy
|
|
800845e: f3bf 8f4f dsb sy
|
|
8008462: 617b str r3, [r7, #20]
|
|
}
|
|
8008464: bf00 nop
|
|
8008466: bf00 nop
|
|
8008468: e7fd b.n 8008466 <pvPortMalloc+0x6a>
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) )
|
|
800846a: 687b ldr r3, [r7, #4]
|
|
800846c: 2b00 cmp r3, #0
|
|
800846e: d06f beq.n 8008550 <pvPortMalloc+0x154>
|
|
8008470: 4b45 ldr r3, [pc, #276] @ (8008588 <pvPortMalloc+0x18c>)
|
|
8008472: 681b ldr r3, [r3, #0]
|
|
8008474: 687a ldr r2, [r7, #4]
|
|
8008476: 429a cmp r2, r3
|
|
8008478: d86a bhi.n 8008550 <pvPortMalloc+0x154>
|
|
{
|
|
/* Traverse the list from the start (lowest address) block until
|
|
one of adequate size is found. */
|
|
pxPreviousBlock = &xStart;
|
|
800847a: 4b44 ldr r3, [pc, #272] @ (800858c <pvPortMalloc+0x190>)
|
|
800847c: 623b str r3, [r7, #32]
|
|
pxBlock = xStart.pxNextFreeBlock;
|
|
800847e: 4b43 ldr r3, [pc, #268] @ (800858c <pvPortMalloc+0x190>)
|
|
8008480: 681b ldr r3, [r3, #0]
|
|
8008482: 627b str r3, [r7, #36] @ 0x24
|
|
while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) )
|
|
8008484: e004 b.n 8008490 <pvPortMalloc+0x94>
|
|
{
|
|
pxPreviousBlock = pxBlock;
|
|
8008486: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
8008488: 623b str r3, [r7, #32]
|
|
pxBlock = pxBlock->pxNextFreeBlock;
|
|
800848a: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
800848c: 681b ldr r3, [r3, #0]
|
|
800848e: 627b str r3, [r7, #36] @ 0x24
|
|
while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) )
|
|
8008490: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
8008492: 685b ldr r3, [r3, #4]
|
|
8008494: 687a ldr r2, [r7, #4]
|
|
8008496: 429a cmp r2, r3
|
|
8008498: d903 bls.n 80084a2 <pvPortMalloc+0xa6>
|
|
800849a: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
800849c: 681b ldr r3, [r3, #0]
|
|
800849e: 2b00 cmp r3, #0
|
|
80084a0: d1f1 bne.n 8008486 <pvPortMalloc+0x8a>
|
|
}
|
|
|
|
/* If the end marker was reached then a block of adequate size
|
|
was not found. */
|
|
if( pxBlock != pxEnd )
|
|
80084a2: 4b37 ldr r3, [pc, #220] @ (8008580 <pvPortMalloc+0x184>)
|
|
80084a4: 681b ldr r3, [r3, #0]
|
|
80084a6: 6a7a ldr r2, [r7, #36] @ 0x24
|
|
80084a8: 429a cmp r2, r3
|
|
80084aa: d051 beq.n 8008550 <pvPortMalloc+0x154>
|
|
{
|
|
/* Return the memory space pointed to - jumping over the
|
|
BlockLink_t structure at its start. */
|
|
pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize );
|
|
80084ac: 6a3b ldr r3, [r7, #32]
|
|
80084ae: 681b ldr r3, [r3, #0]
|
|
80084b0: 2208 movs r2, #8
|
|
80084b2: 4413 add r3, r2
|
|
80084b4: 61fb str r3, [r7, #28]
|
|
|
|
/* This block is being returned for use so must be taken out
|
|
of the list of free blocks. */
|
|
pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock;
|
|
80084b6: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
80084b8: 681a ldr r2, [r3, #0]
|
|
80084ba: 6a3b ldr r3, [r7, #32]
|
|
80084bc: 601a str r2, [r3, #0]
|
|
|
|
/* If the block is larger than required it can be split into
|
|
two. */
|
|
if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE )
|
|
80084be: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
80084c0: 685a ldr r2, [r3, #4]
|
|
80084c2: 687b ldr r3, [r7, #4]
|
|
80084c4: 1ad2 subs r2, r2, r3
|
|
80084c6: 2308 movs r3, #8
|
|
80084c8: 005b lsls r3, r3, #1
|
|
80084ca: 429a cmp r2, r3
|
|
80084cc: d920 bls.n 8008510 <pvPortMalloc+0x114>
|
|
{
|
|
/* This block is to be split into two. Create a new
|
|
block following the number of bytes requested. The void
|
|
cast is used to prevent byte alignment warnings from the
|
|
compiler. */
|
|
pxNewBlockLink = ( void * ) ( ( ( uint8_t * ) pxBlock ) + xWantedSize );
|
|
80084ce: 6a7a ldr r2, [r7, #36] @ 0x24
|
|
80084d0: 687b ldr r3, [r7, #4]
|
|
80084d2: 4413 add r3, r2
|
|
80084d4: 61bb str r3, [r7, #24]
|
|
configASSERT( ( ( ( size_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 );
|
|
80084d6: 69bb ldr r3, [r7, #24]
|
|
80084d8: f003 0307 and.w r3, r3, #7
|
|
80084dc: 2b00 cmp r3, #0
|
|
80084de: d00b beq.n 80084f8 <pvPortMalloc+0xfc>
|
|
__asm volatile
|
|
80084e0: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80084e4: f383 8811 msr BASEPRI, r3
|
|
80084e8: f3bf 8f6f isb sy
|
|
80084ec: f3bf 8f4f dsb sy
|
|
80084f0: 613b str r3, [r7, #16]
|
|
}
|
|
80084f2: bf00 nop
|
|
80084f4: bf00 nop
|
|
80084f6: e7fd b.n 80084f4 <pvPortMalloc+0xf8>
|
|
|
|
/* Calculate the sizes of two blocks split from the
|
|
single block. */
|
|
pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize;
|
|
80084f8: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
80084fa: 685a ldr r2, [r3, #4]
|
|
80084fc: 687b ldr r3, [r7, #4]
|
|
80084fe: 1ad2 subs r2, r2, r3
|
|
8008500: 69bb ldr r3, [r7, #24]
|
|
8008502: 605a str r2, [r3, #4]
|
|
pxBlock->xBlockSize = xWantedSize;
|
|
8008504: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
8008506: 687a ldr r2, [r7, #4]
|
|
8008508: 605a str r2, [r3, #4]
|
|
|
|
/* Insert the new block into the list of free blocks. */
|
|
prvInsertBlockIntoFreeList( pxNewBlockLink );
|
|
800850a: 69b8 ldr r0, [r7, #24]
|
|
800850c: f000 f90a bl 8008724 <prvInsertBlockIntoFreeList>
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
xFreeBytesRemaining -= pxBlock->xBlockSize;
|
|
8008510: 4b1d ldr r3, [pc, #116] @ (8008588 <pvPortMalloc+0x18c>)
|
|
8008512: 681a ldr r2, [r3, #0]
|
|
8008514: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
8008516: 685b ldr r3, [r3, #4]
|
|
8008518: 1ad3 subs r3, r2, r3
|
|
800851a: 4a1b ldr r2, [pc, #108] @ (8008588 <pvPortMalloc+0x18c>)
|
|
800851c: 6013 str r3, [r2, #0]
|
|
|
|
if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining )
|
|
800851e: 4b1a ldr r3, [pc, #104] @ (8008588 <pvPortMalloc+0x18c>)
|
|
8008520: 681a ldr r2, [r3, #0]
|
|
8008522: 4b1b ldr r3, [pc, #108] @ (8008590 <pvPortMalloc+0x194>)
|
|
8008524: 681b ldr r3, [r3, #0]
|
|
8008526: 429a cmp r2, r3
|
|
8008528: d203 bcs.n 8008532 <pvPortMalloc+0x136>
|
|
{
|
|
xMinimumEverFreeBytesRemaining = xFreeBytesRemaining;
|
|
800852a: 4b17 ldr r3, [pc, #92] @ (8008588 <pvPortMalloc+0x18c>)
|
|
800852c: 681b ldr r3, [r3, #0]
|
|
800852e: 4a18 ldr r2, [pc, #96] @ (8008590 <pvPortMalloc+0x194>)
|
|
8008530: 6013 str r3, [r2, #0]
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
/* The block is being returned - it is allocated and owned
|
|
by the application and has no "next" block. */
|
|
pxBlock->xBlockSize |= xBlockAllocatedBit;
|
|
8008532: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
8008534: 685a ldr r2, [r3, #4]
|
|
8008536: 4b13 ldr r3, [pc, #76] @ (8008584 <pvPortMalloc+0x188>)
|
|
8008538: 681b ldr r3, [r3, #0]
|
|
800853a: 431a orrs r2, r3
|
|
800853c: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
800853e: 605a str r2, [r3, #4]
|
|
pxBlock->pxNextFreeBlock = NULL;
|
|
8008540: 6a7b ldr r3, [r7, #36] @ 0x24
|
|
8008542: 2200 movs r2, #0
|
|
8008544: 601a str r2, [r3, #0]
|
|
xNumberOfSuccessfulAllocations++;
|
|
8008546: 4b13 ldr r3, [pc, #76] @ (8008594 <pvPortMalloc+0x198>)
|
|
8008548: 681b ldr r3, [r3, #0]
|
|
800854a: 3301 adds r3, #1
|
|
800854c: 4a11 ldr r2, [pc, #68] @ (8008594 <pvPortMalloc+0x198>)
|
|
800854e: 6013 str r3, [r2, #0]
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
traceMALLOC( pvReturn, xWantedSize );
|
|
}
|
|
( void ) xTaskResumeAll();
|
|
8008550: f7fe fbee bl 8006d30 <xTaskResumeAll>
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
#endif
|
|
|
|
configASSERT( ( ( ( size_t ) pvReturn ) & ( size_t ) portBYTE_ALIGNMENT_MASK ) == 0 );
|
|
8008554: 69fb ldr r3, [r7, #28]
|
|
8008556: f003 0307 and.w r3, r3, #7
|
|
800855a: 2b00 cmp r3, #0
|
|
800855c: d00b beq.n 8008576 <pvPortMalloc+0x17a>
|
|
__asm volatile
|
|
800855e: f04f 0350 mov.w r3, #80 @ 0x50
|
|
8008562: f383 8811 msr BASEPRI, r3
|
|
8008566: f3bf 8f6f isb sy
|
|
800856a: f3bf 8f4f dsb sy
|
|
800856e: 60fb str r3, [r7, #12]
|
|
}
|
|
8008570: bf00 nop
|
|
8008572: bf00 nop
|
|
8008574: e7fd b.n 8008572 <pvPortMalloc+0x176>
|
|
return pvReturn;
|
|
8008576: 69fb ldr r3, [r7, #28]
|
|
}
|
|
8008578: 4618 mov r0, r3
|
|
800857a: 3728 adds r7, #40 @ 0x28
|
|
800857c: 46bd mov sp, r7
|
|
800857e: bd80 pop {r7, pc}
|
|
8008580: 20002480 .word 0x20002480
|
|
8008584: 20002494 .word 0x20002494
|
|
8008588: 20002484 .word 0x20002484
|
|
800858c: 20002478 .word 0x20002478
|
|
8008590: 20002488 .word 0x20002488
|
|
8008594: 2000248c .word 0x2000248c
|
|
|
|
08008598 <vPortFree>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
void vPortFree( void *pv )
|
|
{
|
|
8008598: b580 push {r7, lr}
|
|
800859a: b086 sub sp, #24
|
|
800859c: af00 add r7, sp, #0
|
|
800859e: 6078 str r0, [r7, #4]
|
|
uint8_t *puc = ( uint8_t * ) pv;
|
|
80085a0: 687b ldr r3, [r7, #4]
|
|
80085a2: 617b str r3, [r7, #20]
|
|
BlockLink_t *pxLink;
|
|
|
|
if( pv != NULL )
|
|
80085a4: 687b ldr r3, [r7, #4]
|
|
80085a6: 2b00 cmp r3, #0
|
|
80085a8: d04f beq.n 800864a <vPortFree+0xb2>
|
|
{
|
|
/* The memory being freed will have an BlockLink_t structure immediately
|
|
before it. */
|
|
puc -= xHeapStructSize;
|
|
80085aa: 2308 movs r3, #8
|
|
80085ac: 425b negs r3, r3
|
|
80085ae: 697a ldr r2, [r7, #20]
|
|
80085b0: 4413 add r3, r2
|
|
80085b2: 617b str r3, [r7, #20]
|
|
|
|
/* This casting is to keep the compiler from issuing warnings. */
|
|
pxLink = ( void * ) puc;
|
|
80085b4: 697b ldr r3, [r7, #20]
|
|
80085b6: 613b str r3, [r7, #16]
|
|
|
|
/* Check the block is actually allocated. */
|
|
configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 );
|
|
80085b8: 693b ldr r3, [r7, #16]
|
|
80085ba: 685a ldr r2, [r3, #4]
|
|
80085bc: 4b25 ldr r3, [pc, #148] @ (8008654 <vPortFree+0xbc>)
|
|
80085be: 681b ldr r3, [r3, #0]
|
|
80085c0: 4013 ands r3, r2
|
|
80085c2: 2b00 cmp r3, #0
|
|
80085c4: d10b bne.n 80085de <vPortFree+0x46>
|
|
__asm volatile
|
|
80085c6: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80085ca: f383 8811 msr BASEPRI, r3
|
|
80085ce: f3bf 8f6f isb sy
|
|
80085d2: f3bf 8f4f dsb sy
|
|
80085d6: 60fb str r3, [r7, #12]
|
|
}
|
|
80085d8: bf00 nop
|
|
80085da: bf00 nop
|
|
80085dc: e7fd b.n 80085da <vPortFree+0x42>
|
|
configASSERT( pxLink->pxNextFreeBlock == NULL );
|
|
80085de: 693b ldr r3, [r7, #16]
|
|
80085e0: 681b ldr r3, [r3, #0]
|
|
80085e2: 2b00 cmp r3, #0
|
|
80085e4: d00b beq.n 80085fe <vPortFree+0x66>
|
|
__asm volatile
|
|
80085e6: f04f 0350 mov.w r3, #80 @ 0x50
|
|
80085ea: f383 8811 msr BASEPRI, r3
|
|
80085ee: f3bf 8f6f isb sy
|
|
80085f2: f3bf 8f4f dsb sy
|
|
80085f6: 60bb str r3, [r7, #8]
|
|
}
|
|
80085f8: bf00 nop
|
|
80085fa: bf00 nop
|
|
80085fc: e7fd b.n 80085fa <vPortFree+0x62>
|
|
|
|
if( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 )
|
|
80085fe: 693b ldr r3, [r7, #16]
|
|
8008600: 685a ldr r2, [r3, #4]
|
|
8008602: 4b14 ldr r3, [pc, #80] @ (8008654 <vPortFree+0xbc>)
|
|
8008604: 681b ldr r3, [r3, #0]
|
|
8008606: 4013 ands r3, r2
|
|
8008608: 2b00 cmp r3, #0
|
|
800860a: d01e beq.n 800864a <vPortFree+0xb2>
|
|
{
|
|
if( pxLink->pxNextFreeBlock == NULL )
|
|
800860c: 693b ldr r3, [r7, #16]
|
|
800860e: 681b ldr r3, [r3, #0]
|
|
8008610: 2b00 cmp r3, #0
|
|
8008612: d11a bne.n 800864a <vPortFree+0xb2>
|
|
{
|
|
/* The block is being returned to the heap - it is no longer
|
|
allocated. */
|
|
pxLink->xBlockSize &= ~xBlockAllocatedBit;
|
|
8008614: 693b ldr r3, [r7, #16]
|
|
8008616: 685a ldr r2, [r3, #4]
|
|
8008618: 4b0e ldr r3, [pc, #56] @ (8008654 <vPortFree+0xbc>)
|
|
800861a: 681b ldr r3, [r3, #0]
|
|
800861c: 43db mvns r3, r3
|
|
800861e: 401a ands r2, r3
|
|
8008620: 693b ldr r3, [r7, #16]
|
|
8008622: 605a str r2, [r3, #4]
|
|
|
|
vTaskSuspendAll();
|
|
8008624: f7fe fb76 bl 8006d14 <vTaskSuspendAll>
|
|
{
|
|
/* Add this block to the list of free blocks. */
|
|
xFreeBytesRemaining += pxLink->xBlockSize;
|
|
8008628: 693b ldr r3, [r7, #16]
|
|
800862a: 685a ldr r2, [r3, #4]
|
|
800862c: 4b0a ldr r3, [pc, #40] @ (8008658 <vPortFree+0xc0>)
|
|
800862e: 681b ldr r3, [r3, #0]
|
|
8008630: 4413 add r3, r2
|
|
8008632: 4a09 ldr r2, [pc, #36] @ (8008658 <vPortFree+0xc0>)
|
|
8008634: 6013 str r3, [r2, #0]
|
|
traceFREE( pv, pxLink->xBlockSize );
|
|
prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) );
|
|
8008636: 6938 ldr r0, [r7, #16]
|
|
8008638: f000 f874 bl 8008724 <prvInsertBlockIntoFreeList>
|
|
xNumberOfSuccessfulFrees++;
|
|
800863c: 4b07 ldr r3, [pc, #28] @ (800865c <vPortFree+0xc4>)
|
|
800863e: 681b ldr r3, [r3, #0]
|
|
8008640: 3301 adds r3, #1
|
|
8008642: 4a06 ldr r2, [pc, #24] @ (800865c <vPortFree+0xc4>)
|
|
8008644: 6013 str r3, [r2, #0]
|
|
}
|
|
( void ) xTaskResumeAll();
|
|
8008646: f7fe fb73 bl 8006d30 <xTaskResumeAll>
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
}
|
|
800864a: bf00 nop
|
|
800864c: 3718 adds r7, #24
|
|
800864e: 46bd mov sp, r7
|
|
8008650: bd80 pop {r7, pc}
|
|
8008652: bf00 nop
|
|
8008654: 20002494 .word 0x20002494
|
|
8008658: 20002484 .word 0x20002484
|
|
800865c: 20002490 .word 0x20002490
|
|
|
|
08008660 <prvHeapInit>:
|
|
/* This just exists to keep the linker quiet. */
|
|
}
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static void prvHeapInit( void )
|
|
{
|
|
8008660: b480 push {r7}
|
|
8008662: b085 sub sp, #20
|
|
8008664: af00 add r7, sp, #0
|
|
BlockLink_t *pxFirstFreeBlock;
|
|
uint8_t *pucAlignedHeap;
|
|
size_t uxAddress;
|
|
size_t xTotalHeapSize = configTOTAL_HEAP_SIZE;
|
|
8008666: f44f 637a mov.w r3, #4000 @ 0xfa0
|
|
800866a: 60bb str r3, [r7, #8]
|
|
|
|
/* Ensure the heap starts on a correctly aligned boundary. */
|
|
uxAddress = ( size_t ) ucHeap;
|
|
800866c: 4b27 ldr r3, [pc, #156] @ (800870c <prvHeapInit+0xac>)
|
|
800866e: 60fb str r3, [r7, #12]
|
|
|
|
if( ( uxAddress & portBYTE_ALIGNMENT_MASK ) != 0 )
|
|
8008670: 68fb ldr r3, [r7, #12]
|
|
8008672: f003 0307 and.w r3, r3, #7
|
|
8008676: 2b00 cmp r3, #0
|
|
8008678: d00c beq.n 8008694 <prvHeapInit+0x34>
|
|
{
|
|
uxAddress += ( portBYTE_ALIGNMENT - 1 );
|
|
800867a: 68fb ldr r3, [r7, #12]
|
|
800867c: 3307 adds r3, #7
|
|
800867e: 60fb str r3, [r7, #12]
|
|
uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
|
|
8008680: 68fb ldr r3, [r7, #12]
|
|
8008682: f023 0307 bic.w r3, r3, #7
|
|
8008686: 60fb str r3, [r7, #12]
|
|
xTotalHeapSize -= uxAddress - ( size_t ) ucHeap;
|
|
8008688: 68ba ldr r2, [r7, #8]
|
|
800868a: 68fb ldr r3, [r7, #12]
|
|
800868c: 1ad3 subs r3, r2, r3
|
|
800868e: 4a1f ldr r2, [pc, #124] @ (800870c <prvHeapInit+0xac>)
|
|
8008690: 4413 add r3, r2
|
|
8008692: 60bb str r3, [r7, #8]
|
|
}
|
|
|
|
pucAlignedHeap = ( uint8_t * ) uxAddress;
|
|
8008694: 68fb ldr r3, [r7, #12]
|
|
8008696: 607b str r3, [r7, #4]
|
|
|
|
/* xStart is used to hold a pointer to the first item in the list of free
|
|
blocks. The void cast is used to prevent compiler warnings. */
|
|
xStart.pxNextFreeBlock = ( void * ) pucAlignedHeap;
|
|
8008698: 4a1d ldr r2, [pc, #116] @ (8008710 <prvHeapInit+0xb0>)
|
|
800869a: 687b ldr r3, [r7, #4]
|
|
800869c: 6013 str r3, [r2, #0]
|
|
xStart.xBlockSize = ( size_t ) 0;
|
|
800869e: 4b1c ldr r3, [pc, #112] @ (8008710 <prvHeapInit+0xb0>)
|
|
80086a0: 2200 movs r2, #0
|
|
80086a2: 605a str r2, [r3, #4]
|
|
|
|
/* pxEnd is used to mark the end of the list of free blocks and is inserted
|
|
at the end of the heap space. */
|
|
uxAddress = ( ( size_t ) pucAlignedHeap ) + xTotalHeapSize;
|
|
80086a4: 687b ldr r3, [r7, #4]
|
|
80086a6: 68ba ldr r2, [r7, #8]
|
|
80086a8: 4413 add r3, r2
|
|
80086aa: 60fb str r3, [r7, #12]
|
|
uxAddress -= xHeapStructSize;
|
|
80086ac: 2208 movs r2, #8
|
|
80086ae: 68fb ldr r3, [r7, #12]
|
|
80086b0: 1a9b subs r3, r3, r2
|
|
80086b2: 60fb str r3, [r7, #12]
|
|
uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
|
|
80086b4: 68fb ldr r3, [r7, #12]
|
|
80086b6: f023 0307 bic.w r3, r3, #7
|
|
80086ba: 60fb str r3, [r7, #12]
|
|
pxEnd = ( void * ) uxAddress;
|
|
80086bc: 68fb ldr r3, [r7, #12]
|
|
80086be: 4a15 ldr r2, [pc, #84] @ (8008714 <prvHeapInit+0xb4>)
|
|
80086c0: 6013 str r3, [r2, #0]
|
|
pxEnd->xBlockSize = 0;
|
|
80086c2: 4b14 ldr r3, [pc, #80] @ (8008714 <prvHeapInit+0xb4>)
|
|
80086c4: 681b ldr r3, [r3, #0]
|
|
80086c6: 2200 movs r2, #0
|
|
80086c8: 605a str r2, [r3, #4]
|
|
pxEnd->pxNextFreeBlock = NULL;
|
|
80086ca: 4b12 ldr r3, [pc, #72] @ (8008714 <prvHeapInit+0xb4>)
|
|
80086cc: 681b ldr r3, [r3, #0]
|
|
80086ce: 2200 movs r2, #0
|
|
80086d0: 601a str r2, [r3, #0]
|
|
|
|
/* To start with there is a single free block that is sized to take up the
|
|
entire heap space, minus the space taken by pxEnd. */
|
|
pxFirstFreeBlock = ( void * ) pucAlignedHeap;
|
|
80086d2: 687b ldr r3, [r7, #4]
|
|
80086d4: 603b str r3, [r7, #0]
|
|
pxFirstFreeBlock->xBlockSize = uxAddress - ( size_t ) pxFirstFreeBlock;
|
|
80086d6: 683b ldr r3, [r7, #0]
|
|
80086d8: 68fa ldr r2, [r7, #12]
|
|
80086da: 1ad2 subs r2, r2, r3
|
|
80086dc: 683b ldr r3, [r7, #0]
|
|
80086de: 605a str r2, [r3, #4]
|
|
pxFirstFreeBlock->pxNextFreeBlock = pxEnd;
|
|
80086e0: 4b0c ldr r3, [pc, #48] @ (8008714 <prvHeapInit+0xb4>)
|
|
80086e2: 681a ldr r2, [r3, #0]
|
|
80086e4: 683b ldr r3, [r7, #0]
|
|
80086e6: 601a str r2, [r3, #0]
|
|
|
|
/* Only one block exists - and it covers the entire usable heap space. */
|
|
xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize;
|
|
80086e8: 683b ldr r3, [r7, #0]
|
|
80086ea: 685b ldr r3, [r3, #4]
|
|
80086ec: 4a0a ldr r2, [pc, #40] @ (8008718 <prvHeapInit+0xb8>)
|
|
80086ee: 6013 str r3, [r2, #0]
|
|
xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize;
|
|
80086f0: 683b ldr r3, [r7, #0]
|
|
80086f2: 685b ldr r3, [r3, #4]
|
|
80086f4: 4a09 ldr r2, [pc, #36] @ (800871c <prvHeapInit+0xbc>)
|
|
80086f6: 6013 str r3, [r2, #0]
|
|
|
|
/* Work out the position of the top bit in a size_t variable. */
|
|
xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 );
|
|
80086f8: 4b09 ldr r3, [pc, #36] @ (8008720 <prvHeapInit+0xc0>)
|
|
80086fa: f04f 4200 mov.w r2, #2147483648 @ 0x80000000
|
|
80086fe: 601a str r2, [r3, #0]
|
|
}
|
|
8008700: bf00 nop
|
|
8008702: 3714 adds r7, #20
|
|
8008704: 46bd mov sp, r7
|
|
8008706: f85d 7b04 ldr.w r7, [sp], #4
|
|
800870a: 4770 bx lr
|
|
800870c: 200014d8 .word 0x200014d8
|
|
8008710: 20002478 .word 0x20002478
|
|
8008714: 20002480 .word 0x20002480
|
|
8008718: 20002488 .word 0x20002488
|
|
800871c: 20002484 .word 0x20002484
|
|
8008720: 20002494 .word 0x20002494
|
|
|
|
08008724 <prvInsertBlockIntoFreeList>:
|
|
/*-----------------------------------------------------------*/
|
|
|
|
static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert )
|
|
{
|
|
8008724: b480 push {r7}
|
|
8008726: b085 sub sp, #20
|
|
8008728: af00 add r7, sp, #0
|
|
800872a: 6078 str r0, [r7, #4]
|
|
BlockLink_t *pxIterator;
|
|
uint8_t *puc;
|
|
|
|
/* Iterate through the list until a block is found that has a higher address
|
|
than the block being inserted. */
|
|
for( pxIterator = &xStart; pxIterator->pxNextFreeBlock < pxBlockToInsert; pxIterator = pxIterator->pxNextFreeBlock )
|
|
800872c: 4b28 ldr r3, [pc, #160] @ (80087d0 <prvInsertBlockIntoFreeList+0xac>)
|
|
800872e: 60fb str r3, [r7, #12]
|
|
8008730: e002 b.n 8008738 <prvInsertBlockIntoFreeList+0x14>
|
|
8008732: 68fb ldr r3, [r7, #12]
|
|
8008734: 681b ldr r3, [r3, #0]
|
|
8008736: 60fb str r3, [r7, #12]
|
|
8008738: 68fb ldr r3, [r7, #12]
|
|
800873a: 681b ldr r3, [r3, #0]
|
|
800873c: 687a ldr r2, [r7, #4]
|
|
800873e: 429a cmp r2, r3
|
|
8008740: d8f7 bhi.n 8008732 <prvInsertBlockIntoFreeList+0xe>
|
|
/* Nothing to do here, just iterate to the right position. */
|
|
}
|
|
|
|
/* Do the block being inserted, and the block it is being inserted after
|
|
make a contiguous block of memory? */
|
|
puc = ( uint8_t * ) pxIterator;
|
|
8008742: 68fb ldr r3, [r7, #12]
|
|
8008744: 60bb str r3, [r7, #8]
|
|
if( ( puc + pxIterator->xBlockSize ) == ( uint8_t * ) pxBlockToInsert )
|
|
8008746: 68fb ldr r3, [r7, #12]
|
|
8008748: 685b ldr r3, [r3, #4]
|
|
800874a: 68ba ldr r2, [r7, #8]
|
|
800874c: 4413 add r3, r2
|
|
800874e: 687a ldr r2, [r7, #4]
|
|
8008750: 429a cmp r2, r3
|
|
8008752: d108 bne.n 8008766 <prvInsertBlockIntoFreeList+0x42>
|
|
{
|
|
pxIterator->xBlockSize += pxBlockToInsert->xBlockSize;
|
|
8008754: 68fb ldr r3, [r7, #12]
|
|
8008756: 685a ldr r2, [r3, #4]
|
|
8008758: 687b ldr r3, [r7, #4]
|
|
800875a: 685b ldr r3, [r3, #4]
|
|
800875c: 441a add r2, r3
|
|
800875e: 68fb ldr r3, [r7, #12]
|
|
8008760: 605a str r2, [r3, #4]
|
|
pxBlockToInsert = pxIterator;
|
|
8008762: 68fb ldr r3, [r7, #12]
|
|
8008764: 607b str r3, [r7, #4]
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
|
|
/* Do the block being inserted, and the block it is being inserted before
|
|
make a contiguous block of memory? */
|
|
puc = ( uint8_t * ) pxBlockToInsert;
|
|
8008766: 687b ldr r3, [r7, #4]
|
|
8008768: 60bb str r3, [r7, #8]
|
|
if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock )
|
|
800876a: 687b ldr r3, [r7, #4]
|
|
800876c: 685b ldr r3, [r3, #4]
|
|
800876e: 68ba ldr r2, [r7, #8]
|
|
8008770: 441a add r2, r3
|
|
8008772: 68fb ldr r3, [r7, #12]
|
|
8008774: 681b ldr r3, [r3, #0]
|
|
8008776: 429a cmp r2, r3
|
|
8008778: d118 bne.n 80087ac <prvInsertBlockIntoFreeList+0x88>
|
|
{
|
|
if( pxIterator->pxNextFreeBlock != pxEnd )
|
|
800877a: 68fb ldr r3, [r7, #12]
|
|
800877c: 681a ldr r2, [r3, #0]
|
|
800877e: 4b15 ldr r3, [pc, #84] @ (80087d4 <prvInsertBlockIntoFreeList+0xb0>)
|
|
8008780: 681b ldr r3, [r3, #0]
|
|
8008782: 429a cmp r2, r3
|
|
8008784: d00d beq.n 80087a2 <prvInsertBlockIntoFreeList+0x7e>
|
|
{
|
|
/* Form one big block from the two blocks. */
|
|
pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize;
|
|
8008786: 687b ldr r3, [r7, #4]
|
|
8008788: 685a ldr r2, [r3, #4]
|
|
800878a: 68fb ldr r3, [r7, #12]
|
|
800878c: 681b ldr r3, [r3, #0]
|
|
800878e: 685b ldr r3, [r3, #4]
|
|
8008790: 441a add r2, r3
|
|
8008792: 687b ldr r3, [r7, #4]
|
|
8008794: 605a str r2, [r3, #4]
|
|
pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock;
|
|
8008796: 68fb ldr r3, [r7, #12]
|
|
8008798: 681b ldr r3, [r3, #0]
|
|
800879a: 681a ldr r2, [r3, #0]
|
|
800879c: 687b ldr r3, [r7, #4]
|
|
800879e: 601a str r2, [r3, #0]
|
|
80087a0: e008 b.n 80087b4 <prvInsertBlockIntoFreeList+0x90>
|
|
}
|
|
else
|
|
{
|
|
pxBlockToInsert->pxNextFreeBlock = pxEnd;
|
|
80087a2: 4b0c ldr r3, [pc, #48] @ (80087d4 <prvInsertBlockIntoFreeList+0xb0>)
|
|
80087a4: 681a ldr r2, [r3, #0]
|
|
80087a6: 687b ldr r3, [r7, #4]
|
|
80087a8: 601a str r2, [r3, #0]
|
|
80087aa: e003 b.n 80087b4 <prvInsertBlockIntoFreeList+0x90>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock;
|
|
80087ac: 68fb ldr r3, [r7, #12]
|
|
80087ae: 681a ldr r2, [r3, #0]
|
|
80087b0: 687b ldr r3, [r7, #4]
|
|
80087b2: 601a str r2, [r3, #0]
|
|
|
|
/* If the block being inserted plugged a gab, so was merged with the block
|
|
before and the block after, then it's pxNextFreeBlock pointer will have
|
|
already been set, and should not be set here as that would make it point
|
|
to itself. */
|
|
if( pxIterator != pxBlockToInsert )
|
|
80087b4: 68fa ldr r2, [r7, #12]
|
|
80087b6: 687b ldr r3, [r7, #4]
|
|
80087b8: 429a cmp r2, r3
|
|
80087ba: d002 beq.n 80087c2 <prvInsertBlockIntoFreeList+0x9e>
|
|
{
|
|
pxIterator->pxNextFreeBlock = pxBlockToInsert;
|
|
80087bc: 68fb ldr r3, [r7, #12]
|
|
80087be: 687a ldr r2, [r7, #4]
|
|
80087c0: 601a str r2, [r3, #0]
|
|
}
|
|
else
|
|
{
|
|
mtCOVERAGE_TEST_MARKER();
|
|
}
|
|
}
|
|
80087c2: bf00 nop
|
|
80087c4: 3714 adds r7, #20
|
|
80087c6: 46bd mov sp, r7
|
|
80087c8: f85d 7b04 ldr.w r7, [sp], #4
|
|
80087cc: 4770 bx lr
|
|
80087ce: bf00 nop
|
|
80087d0: 20002478 .word 0x20002478
|
|
80087d4: 20002480 .word 0x20002480
|
|
|
|
080087d8 <memset>:
|
|
80087d8: 4402 add r2, r0
|
|
80087da: 4603 mov r3, r0
|
|
80087dc: 4293 cmp r3, r2
|
|
80087de: d100 bne.n 80087e2 <memset+0xa>
|
|
80087e0: 4770 bx lr
|
|
80087e2: f803 1b01 strb.w r1, [r3], #1
|
|
80087e6: e7f9 b.n 80087dc <memset+0x4>
|
|
|
|
080087e8 <__libc_init_array>:
|
|
80087e8: b570 push {r4, r5, r6, lr}
|
|
80087ea: 4d0d ldr r5, [pc, #52] @ (8008820 <__libc_init_array+0x38>)
|
|
80087ec: 4c0d ldr r4, [pc, #52] @ (8008824 <__libc_init_array+0x3c>)
|
|
80087ee: 1b64 subs r4, r4, r5
|
|
80087f0: 10a4 asrs r4, r4, #2
|
|
80087f2: 2600 movs r6, #0
|
|
80087f4: 42a6 cmp r6, r4
|
|
80087f6: d109 bne.n 800880c <__libc_init_array+0x24>
|
|
80087f8: 4d0b ldr r5, [pc, #44] @ (8008828 <__libc_init_array+0x40>)
|
|
80087fa: 4c0c ldr r4, [pc, #48] @ (800882c <__libc_init_array+0x44>)
|
|
80087fc: f000 f826 bl 800884c <_init>
|
|
8008800: 1b64 subs r4, r4, r5
|
|
8008802: 10a4 asrs r4, r4, #2
|
|
8008804: 2600 movs r6, #0
|
|
8008806: 42a6 cmp r6, r4
|
|
8008808: d105 bne.n 8008816 <__libc_init_array+0x2e>
|
|
800880a: bd70 pop {r4, r5, r6, pc}
|
|
800880c: f855 3b04 ldr.w r3, [r5], #4
|
|
8008810: 4798 blx r3
|
|
8008812: 3601 adds r6, #1
|
|
8008814: e7ee b.n 80087f4 <__libc_init_array+0xc>
|
|
8008816: f855 3b04 ldr.w r3, [r5], #4
|
|
800881a: 4798 blx r3
|
|
800881c: 3601 adds r6, #1
|
|
800881e: e7f2 b.n 8008806 <__libc_init_array+0x1e>
|
|
8008820: 080089e8 .word 0x080089e8
|
|
8008824: 080089e8 .word 0x080089e8
|
|
8008828: 080089e8 .word 0x080089e8
|
|
800882c: 080089ec .word 0x080089ec
|
|
|
|
08008830 <memcpy>:
|
|
8008830: 440a add r2, r1
|
|
8008832: 4291 cmp r1, r2
|
|
8008834: f100 33ff add.w r3, r0, #4294967295
|
|
8008838: d100 bne.n 800883c <memcpy+0xc>
|
|
800883a: 4770 bx lr
|
|
800883c: b510 push {r4, lr}
|
|
800883e: f811 4b01 ldrb.w r4, [r1], #1
|
|
8008842: f803 4f01 strb.w r4, [r3, #1]!
|
|
8008846: 4291 cmp r1, r2
|
|
8008848: d1f9 bne.n 800883e <memcpy+0xe>
|
|
800884a: bd10 pop {r4, pc}
|
|
|
|
0800884c <_init>:
|
|
800884c: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
800884e: bf00 nop
|
|
8008850: bcf8 pop {r3, r4, r5, r6, r7}
|
|
8008852: bc08 pop {r3}
|
|
8008854: 469e mov lr, r3
|
|
8008856: 4770 bx lr
|
|
|
|
08008858 <_fini>:
|
|
8008858: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
800885a: bf00 nop
|
|
800885c: bcf8 pop {r3, r4, r5, r6, r7}
|
|
800885e: bc08 pop {r3}
|
|
8008860: 469e mov lr, r3
|
|
8008862: 4770 bx lr
|